diff options
author | 2022-05-22 18:04:48 +0800 | |
---|---|---|
committer | 2022-05-22 18:04:48 +0800 | |
commit | 144307343d9ccf067b40aaa3929f03fdca9c6820 (patch) | |
tree | fdd84b07bb76071a8deea9442a7123ed75b98f94 /source/features/quick-repo-deletion.tsx | |
parent | 4ae6028f17f02658c9b306bd94b80c273cb66d29 (diff) | |
download | refined-github-144307343d9ccf067b40aaa3929f03fdca9c6820.tar.gz refined-github-144307343d9ccf067b40aaa3929f03fdca9c6820.tar.zst refined-github-144307343d9ccf067b40aaa3929f03fdca9c6820.zip |
Add link to the source repo in `quick-repo-deletion` (#5651)
Diffstat (limited to 'source/features/quick-repo-deletion.tsx')
-rw-r--r-- | source/features/quick-repo-deletion.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/features/quick-repo-deletion.tsx b/source/features/quick-repo-deletion.tsx index 130f3ec9..6ad6bad9 100644 --- a/source/features/quick-repo-deletion.tsx +++ b/source/features/quick-repo-deletion.tsx @@ -4,12 +4,13 @@ import React from 'dom-chef'; import cache from 'webext-storage-cache'; import select from 'select-dom'; import delegate from 'delegate-it'; +import {TrashIcon} from '@primer/octicons-react'; import elementReady from 'element-ready'; import * as pageDetect from 'github-url-detection'; import features from '.'; import * as api from '../github-helpers/api'; -import {getRepo} from '../github-helpers'; +import {getForkedRepo, getRepo} from '../github-helpers'; import pluralize from '../helpers/pluralize'; import addNotice from '../github-widgets/notice-bar'; import {getCacheKey} from './forked-to'; @@ -96,12 +97,13 @@ async function start(buttonContainer: HTMLDetailsElement): Promise<void> { method: 'DELETE', json: false, }); + const forkSource = '/' + getForkedRepo()!; const restoreURL = pageDetect.isOrganizationRepo() ? `/organizations/${owner}/settings/deleted_repositories` : '/settings/deleted_repositories'; const otherForksURL = `/${owner}?tab=repositories&type=fork`; addNotice( - <span>Repository {nameWithOwner} deleted. You might be able to <a href={restoreURL}>restore it</a> or see <a href={otherForksURL}>your other forks.</a></span>, + <><TrashIcon/> <span>Repository <strong>{nameWithOwner}</strong> deleted. <a href={restoreURL}>Restore it</a>, <a href={forkSource}>visit the source repo</a>, or see <a href={otherForksURL}>your other forks.</a></span></>, {action: false}, ); select('.application-main')!.remove(); |