refactor: migrates to the new ESLint configuration

This commit is contained in:
Ravinou 2025-12-04 21:45:47 +01:00
commit 2ce7232849
No known key found for this signature in database
GPG key ID: 25F0EB44D87EBC13
19 changed files with 68 additions and 115 deletions

View file

@ -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>

View file

@ -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>
);
}

View file

@ -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 &quot;Initialize a new repository&quot; or &quot;Add existing repository&quot;, copy this
into the field &quot;Repository URL&quot; 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&apos;s fingerprint when you first connect :
<li>
<span className={classes.sshPublicKey}>
ECDSA : {wizardEnv?.SSH_SERVER_FINGERPRINT_ECDSA}

View file

@ -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=&quot;gzip -9&quot; ssh://
{UNIX_USER}@{FQDN}
{SSH_SERVER_PORT}/./
{props.selectedRepo?.repositoryName}