diff options
| author | Fuwn <[email protected]> | 2024-02-11 00:19:02 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-02-11 00:19:02 -0800 |
| commit | 183efa0bf0394817ce74dc72e6d104c90b41cc04 (patch) | |
| tree | a527855c53dcd7c6eebf257d7d50b80c57b3c8c4 /src/routes | |
| parent | fix(error): use path store (diff) | |
| download | due.moe-183efa0bf0394817ce74dc72e6d104c90b41cc04.tar.xz due.moe-183efa0bf0394817ce74dc72e6d104c90b41cc04.zip | |
feat(tools): use error-style not found
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/tools/[tool]/+page.svelte | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/routes/tools/[tool]/+page.svelte b/src/routes/tools/[tool]/+page.svelte index 137df74d..12ecde4d 100644 --- a/src/routes/tools/[tool]/+page.svelte +++ b/src/routes/tools/[tool]/+page.svelte @@ -14,6 +14,7 @@ import Picker from '$lib/Tools/Picker.svelte'; import Likes from '$lib/Tools/Likes.svelte'; import root from '$lib/Utility/root.js'; + import Popup from '$lib/Popup.svelte'; export let data; @@ -31,8 +32,10 @@ {#if !Object.keys(tools).includes(tool)} <HeadTitle route="Tools" path="/tools" /> - <div class="card"> - <p>Tool not found.</p> + <Popup> + <p style="text-align: center;"> + Tool "<a href={root(`/tools/${tool}`)}>{tool}</a>" not found + </p> <blockquote style="margin: 0 0 0 1.5rem;"> Did you mean "<a @@ -40,10 +43,10 @@ on:click={() => (tool = suggestion)} style={suggestion === '...' ? 'pointer-events: none; color: inherit;' : ''} > - {suggestion === '...' ? '...' : tools[suggestion].name}</a + {suggestion === '...' ? '...' : tools[suggestion].name()}</a >"? </blockquote> - </div> + </Popup> {:else} <HeadTitle route={tools[tool].name()} path={`/tools?tool=${tool}`} /> |