From 0f03b26a630deaf6fec6154c0fb5644baaf5421a Mon Sep 17 00:00:00 2001 From: Marc Ole Bulling Date: Wed, 14 May 2025 10:41:50 +0200 Subject: [PATCH 1/2] Move ID to repository name --- Components/Repo/Repo.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Components/Repo/Repo.tsx b/Components/Repo/Repo.tsx index 6ddf110..c206ad2 100644 --- a/Components/Repo/Repo.tsx +++ b/Components/Repo/Repo.tsx @@ -111,13 +111,12 @@ export default function Repo(props: RepoProps) { Storage Size Storage Used Last change - ID - Edit + Edit - {props.repositoryName} + {props.repositoryName} #{props.id} {props.storageSize} GB @@ -127,7 +126,6 @@ export default function Repo(props: RepoProps) { {props.lastSave === 0 ? '-' : fromUnixTime(props.lastSave).toLocaleString()} - #{props.id}
{props.lastSave === 0 ? null : fromUnixTime(props.lastSave).toLocaleString()} - #{props.id}
From 62aedfa1e12e017cba3059efacf7c2d156bc6ba5 Mon Sep 17 00:00:00 2001 From: Ravinou Date: Sun, 18 May 2025 11:02:25 +0200 Subject: [PATCH 2/2] =?UTF-8?q?ui:=20=F0=9F=8E=A8=20replace=20front-end=20?= =?UTF-8?q?"id"=20information=20with=20repositoryName?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Components/Repo/Repo.tsx | 2 +- Containers/RepoManage/RepoManage.tsx | 12 ++++++------ Containers/SetupWizard/SetupWizard.tsx | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Components/Repo/Repo.tsx b/Components/Repo/Repo.tsx index c206ad2..d7d92a3 100644 --- a/Components/Repo/Repo.tsx +++ b/Components/Repo/Repo.tsx @@ -116,7 +116,7 @@ export default function Repo(props: RepoProps) { - {props.repositoryName} #{props.id} + {props.repositoryName} {props.storageSize} GB diff --git a/Containers/RepoManage/RepoManage.tsx b/Containers/RepoManage/RepoManage.tsx index 6bd4f8b..97a067c 100644 --- a/Containers/RepoManage/RepoManage.tsx +++ b/Containers/RepoManage/RepoManage.tsx @@ -121,7 +121,7 @@ export default function RepoManage(props: RepoManageProps) { const publicKeyPrefix = sshPublicKey.split(' ').slice(0, 2).join(' '); const response = await fetch('/api/v1/repositories', { method: 'GET' }); - const data = await response.json(); + const data: { repoList: Repository[] } = await response.json(); const conflictingRepo = data.repoList.find((repo: { sshPublicKey: string; id: number }) => { const repoPublicKeyPrefix = repo.sshPublicKey.split(' ').slice(0, 2).join(' '); @@ -132,7 +132,7 @@ export default function RepoManage(props: RepoManageProps) { if (conflictingRepo) { toast.error( - `The SSH key is already used in repository #${conflictingRepo.id}. Please use another key or delete the key from the other repository.`, + `The SSH key is already used in repository ${conflictingRepo.repositoryName}. Please use another key or delete the key from the other repository.`, toastOptions ); return false; @@ -257,15 +257,15 @@ export default function RepoManage(props: RepoManageProps) { color: 'rgba(99, 115, 129, 0.38)', }} > - #{targetRepo?.id} + {targetRepo?.repositoryName} {' '} ?
- You are about to permanently delete the repository #{targetRepo?.id} and all - the backups it contains. + You are about to permanently delete the repository{' '} + {targetRepo?.repositoryName} and all the backups it contains.
The data will not be recoverable and it will not be possible to go back.
@@ -300,7 +300,7 @@ export default function RepoManage(props: RepoManageProps) { color: 'rgba(99, 115, 129, 0.38)', }} > - #{targetRepo?.id} + {targetRepo?.repositoryName} )} diff --git a/Containers/SetupWizard/SetupWizard.tsx b/Containers/SetupWizard/SetupWizard.tsx index 4a48745..b070668 100644 --- a/Containers/SetupWizard/SetupWizard.tsx +++ b/Containers/SetupWizard/SetupWizard.tsx @@ -68,8 +68,8 @@ function SetupWizard(props: SetupWizardProps) { //Options for react-select const options: Optional> = repoList?.map((repo) => ({ - label: `${repo.alias} - #${repo.id}`, - value: `${repo.alias} - #${repo.id}`, + label: `${repo.alias} - ${repo.repositoryName}`, + value: `${repo.alias} - ${repo.repositoryName}`, id: repo.id.toString(), repositoryName: repo.repositoryName, lanCommand: repo.lanCommand ? repo.lanCommand : false,