mirror of
https://github.com/Ravinou/borgwarehouse
synced 2026-03-14 14:25:46 +01:00
ui: 🎨 replace front-end "id" information with repositoryName
This commit is contained in:
parent
0f03b26a63
commit
62aedfa1e1
3 changed files with 9 additions and 9 deletions
|
|
@ -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}
|
||||
</span>{' '}
|
||||
?
|
||||
</h1>
|
||||
</div>
|
||||
<div className={classes.deleteDialogMessage}>
|
||||
<div style={{ marginBottom: '5px' }}>
|
||||
You are about to permanently delete the repository <b>#{targetRepo?.id}</b> and all
|
||||
the backups it contains.
|
||||
You are about to permanently delete the repository{' '}
|
||||
<b>{targetRepo?.repositoryName}</b> and all the backups it contains.
|
||||
</div>
|
||||
<div>The data will not be recoverable and it will not be possible to go back.</div>
|
||||
</div>
|
||||
|
|
@ -300,7 +300,7 @@ export default function RepoManage(props: RepoManageProps) {
|
|||
color: 'rgba(99, 115, 129, 0.38)',
|
||||
}}
|
||||
>
|
||||
#{targetRepo?.id}
|
||||
{targetRepo?.repositoryName}
|
||||
</span>
|
||||
</h2>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue