mirror of
https://github.com/Ravinou/borgwarehouse
synced 2026-03-14 22:35:46 +01:00
Merge pull request #465 from Forceu/noIds
Move ID from own row in overview to repo name row
This commit is contained in:
commit
aa85cee260
3 changed files with 9 additions and 12 deletions
|
|
@ -111,8 +111,7 @@ export default function Repo(props: RepoProps) {
|
|||
<th style={{ width: '10%' }}>Storage Size</th>
|
||||
<th style={{ width: '30%' }}>Storage Used</th>
|
||||
<th style={{ width: '15%' }}>Last change</th>
|
||||
<th style={{ width: '5%' }}>ID</th>
|
||||
<th style={{ width: '5%' }}>Edit</th>
|
||||
<th style={{ width: '10%' }}>Edit</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -127,7 +126,6 @@ export default function Repo(props: RepoProps) {
|
|||
{props.lastSave === 0 ? '-' : fromUnixTime(props.lastSave).toLocaleString()}
|
||||
</div>
|
||||
</th>
|
||||
<th>#{props.id}</th>
|
||||
<th>
|
||||
<div className={classes.editButton}>
|
||||
<IconSettings
|
||||
|
|
@ -159,7 +157,6 @@ export default function Repo(props: RepoProps) {
|
|||
</div>
|
||||
<div className={classes.lastSave}>
|
||||
{props.lastSave === 0 ? null : fromUnixTime(props.lastSave).toLocaleString()}
|
||||
<span style={{ marginLeft: '20px', color: '#637381' }}>#{props.id}</span>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -68,8 +68,8 @@ function SetupWizard(props: SetupWizardProps) {
|
|||
|
||||
//Options for react-select
|
||||
const options: Optional<Array<SelectedRepoWizard>> = 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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue