mirror of
https://github.com/Ravinou/borgwarehouse
synced 2026-03-14 14:25:46 +01:00
refactor: ⚡ migrates to the new ESLint configuration
This commit is contained in:
parent
3ff2ace3bb
commit
2ce7232849
19 changed files with 68 additions and 115 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { useState } from 'react';
|
||||
import { useState, useMemo } from 'react';
|
||||
import classes from './Repo.module.css';
|
||||
import {
|
||||
IconSettings,
|
||||
|
|
@ -22,6 +22,8 @@ type RepoProps = Omit<Repository, 'unixUser' | 'displayDetails'> & {
|
|||
export default function Repo(props: RepoProps) {
|
||||
const isMobile = useMedia({ maxWidth: 1000 });
|
||||
|
||||
const currentDate = useMemo(() => new Date(), []);
|
||||
|
||||
//Load displayDetails from LocalStorage
|
||||
const displayDetailsFromLS = (): boolean => {
|
||||
const key = `displayDetailsRepo${props.id}`;
|
||||
|
|
@ -110,7 +112,7 @@ export default function Repo(props: RepoProps) {
|
|||
>
|
||||
{props.lastSave === 0
|
||||
? '-'
|
||||
: formatDistanceStrict(fromUnixTime(props.lastSave), Date.now(), {
|
||||
: formatDistanceStrict(fromUnixTime(props.lastSave), currentDate, {
|
||||
addSuffix: true,
|
||||
})}
|
||||
</span>
|
||||
|
|
@ -177,7 +179,7 @@ export default function Repo(props: RepoProps) {
|
|||
>
|
||||
{props.lastSave === 0
|
||||
? '-'
|
||||
: formatDistanceStrict(fromUnixTime(props.lastSave), Date.now(), {
|
||||
: formatDistanceStrict(fromUnixTime(props.lastSave), currentDate, {
|
||||
addSuffix: true,
|
||||
})}
|
||||
</div>
|
||||
|
|
@ -223,7 +225,7 @@ export default function Repo(props: RepoProps) {
|
|||
>
|
||||
{props.lastSave === 0
|
||||
? '-'
|
||||
: formatDistanceStrict(fromUnixTime(props.lastSave), Date.now(), {
|
||||
: formatDistanceStrict(fromUnixTime(props.lastSave), currentDate, {
|
||||
addSuffix: true,
|
||||
})}
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -48,15 +48,7 @@ function WizardStep1() {
|
|||
Vorta
|
||||
</a>
|
||||
.
|
||||
<br />
|
||||
Vorta runs on Linux, MacOS and Windows (via Windows’ Linux Subsystem (WSL)). Find the right
|
||||
way to install it{' '}
|
||||
<a href='https://vorta.borgbase.com/install/' target='_blank' rel='noreferrer'>
|
||||
just here
|
||||
</a>
|
||||
.
|
||||
</div>
|
||||
<img src='/vorta-demo.gif' alt='Vorta GIF' />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,8 +69,8 @@ function WizardStep2(props: WizardStepProps) {
|
|||
|
||||
<h2>Pika, Vorta...</h2>
|
||||
<div className={classes.description}>
|
||||
To "Initialize a new repository" or "Add existing repository", copy this into the field
|
||||
"Repository URL" of your graphical client :
|
||||
To "Initialize a new repository" or "Add existing repository", copy this
|
||||
into the field "Repository URL" of your graphical client :
|
||||
<br />
|
||||
<div
|
||||
style={{
|
||||
|
|
@ -98,7 +98,7 @@ function WizardStep2(props: WizardStepProps) {
|
|||
<b>Check the fingerprint of server</b>
|
||||
</div>
|
||||
To check that you are talking to the right server, please make sure to validate one of the
|
||||
following key's fingerprint when you first connect :
|
||||
following key's fingerprint when you first connect :
|
||||
<li>
|
||||
<span className={classes.sshPublicKey}>
|
||||
ECDSA : {wizardEnv?.SSH_SERVER_FINGERPRINT_ECDSA}
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ function WizardStep3(props: WizardStepProps) {
|
|||
}}
|
||||
>
|
||||
<div className={classes.code}>
|
||||
borg export-tar --tar-filter="gzip -9" ssh://
|
||||
borg export-tar --tar-filter="gzip -9" ssh://
|
||||
{UNIX_USER}@{FQDN}
|
||||
{SSH_SERVER_PORT}/./
|
||||
{props.selectedRepo?.repositoryName}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue