From 3d45e946bf22a682cafa16e945d74b2553ae91ad Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sun, 3 Mar 2024 00:43:11 -0800 Subject: feat(tools): auto-populate picker --- src/lib/Tools/Picker.svelte | 15 +++++---------- src/lib/Tools/tools.ts | 14 ++++++++------ 2 files changed, 13 insertions(+), 16 deletions(-) (limited to 'src/lib/Tools') diff --git a/src/lib/Tools/Picker.svelte b/src/lib/Tools/Picker.svelte index 75005efb..8b2d183f 100644 --- a/src/lib/Tools/Picker.svelte +++ b/src/lib/Tools/Picker.svelte @@ -2,7 +2,7 @@ import { browser } from '$app/environment'; import { goto } from '$app/navigation'; import root from '$lib/Utility/root'; - import locale from '$stores/locale'; + import { tools } from './tools'; export let tool: string; @@ -15,14 +15,9 @@ }} > - - - - - - - - - + + {#each Object.keys(tools).filter((t) => t !== 'default') as t} + + {/each} diff --git a/src/lib/Tools/tools.ts b/src/lib/Tools/tools.ts index 0f4da0a4..27a5f2b6 100644 --- a/src/lib/Tools/tools.ts +++ b/src/lib/Tools/tools.ts @@ -4,6 +4,7 @@ import { get } from 'svelte/store'; export const tools: { [key: string]: { name: () => string; + short?: string; description?: () => string; id: string; }; @@ -15,6 +16,7 @@ export const tools: { }, wrapped: { name: () => 'AniList Wrapped & Statistics Panel', + short: 'AniList Wrapped', description: () => 'Instantly generate an AniList themed Wrapped for your profile, doubling as a statistics panel for your bio', id: 'wrapped' @@ -43,22 +45,22 @@ export const tools: { description: () => "Generate random followers from any user's following list", id: 'random_follower' }, - likes: { - name: () => 'Likes', - description: () => 'Get all likes of an activity or forum thread', - id: 'likes' - }, dump_profile: { name: () => 'Dump Profile', description: () => "Dump a user's profile to JSON", id: 'dump_profile' }, + likes: { + name: () => 'Likes', + description: () => 'Get all likes of an activity or forum thread', + id: 'likes' + }, activity_history: { name: () => 'Activity History Analyser', id: 'activity_history', description: () => 'Activity history utilities & image exporter' }, - anime_girls_holding_programming_books: { + girls: { name: () => 'Anime Girls Holding Programming Books', id: 'girls', description: () => 'Find anime girls holding programming books by language' -- cgit v1.2.3