mirror of
https://github.com/ByteAtATime/raycast-linux.git
synced 2025-08-30 10:47:26 +00:00
feat(snippets): add snippet icon
This commit is contained in:
parent
7670c93210
commit
07c279b288
5 changed files with 11 additions and 8 deletions
BIN
src/lib/assets/snippets-package-1616x16@2x.png
Normal file
BIN
src/lib/assets/snippets-package-1616x16@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
|
@ -7,6 +7,7 @@
|
|||
import { ArrowLeft, CheckCircle, Info, ArrowRight, Loader2 } from '@lucide/svelte';
|
||||
import ActionBar from '$lib/components/nodes/shared/ActionBar.svelte';
|
||||
import { onMount } from 'svelte';
|
||||
import snippetIcon from '$lib/assets/snippets-package-1616x16@2x.png?inline';
|
||||
|
||||
type SnippetToImport = {
|
||||
name: string;
|
||||
|
@ -128,10 +129,7 @@
|
|||
{/if}
|
||||
</div>
|
||||
|
||||
<ActionBar
|
||||
title={importState === 'idle' || importState === 'importing' ? 'Import Snippets' : undefined}
|
||||
icon={importState === 'idle' || importState === 'importing' ? 'snippets-16' : undefined}
|
||||
>
|
||||
<ActionBar title="Import Snippets" icon={snippetIcon}>
|
||||
{#snippet primaryAction()}
|
||||
{#if importState === 'result'}
|
||||
<Button
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
import Header from './layout/Header.svelte';
|
||||
import InfoList from './InfoList.svelte';
|
||||
import type { ActionDefinition } from './nodes/shared/actions';
|
||||
import snippetIcon from '$lib/assets/snippets-package-1616x16@2x.png?inline';
|
||||
|
||||
type Props = {
|
||||
onBack: () => void;
|
||||
|
@ -231,7 +232,7 @@
|
|||
|
||||
{#snippet footer()}
|
||||
{#if selectedItem}
|
||||
<ActionBar {actions} />
|
||||
<ActionBar {actions} icon={snippetIcon} title="Search Snippets" />
|
||||
{/if}
|
||||
{/snippet}
|
||||
</MainLayout>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
import MainLayout from './layout/MainLayout.svelte';
|
||||
import Header from './layout/Header.svelte';
|
||||
import ActionBar from './nodes/shared/ActionBar.svelte';
|
||||
import snippetIcon from '$lib/assets/snippets-package-1616x16@2x.png?inline';
|
||||
|
||||
type Props = {
|
||||
onBack: () => void;
|
||||
|
@ -231,6 +232,8 @@
|
|||
shortcut: { key: 'enter', modifiers: ['cmd'] }
|
||||
}
|
||||
]}
|
||||
icon={snippetIcon}
|
||||
title="Create Snippet"
|
||||
>
|
||||
{#snippet primaryAction({ props })}
|
||||
<Button {...props} onclick={handleSave}><Save class="mr-2 size-4" /> Create Snippet</Button>
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
import CommandDeeplinkConfirm from '$lib/components/CommandDeeplinkConfirm.svelte';
|
||||
import clipboardHistoryCommandIcon from '$lib/assets/command-clipboard-history-1616x16@2x.png?inline';
|
||||
import fileSearchCommandIcon from '$lib/assets/command-file-search-1616x16@2x.png?inline';
|
||||
import snippetIcon from '$lib/assets/snippets-package-1616x16@2x.png?inline';
|
||||
|
||||
const storePlugin: PluginInfo = {
|
||||
title: 'Store',
|
||||
|
@ -55,7 +56,7 @@
|
|||
pluginName: 'snippets',
|
||||
commandName: 'search-snippets',
|
||||
pluginPath: 'builtin:search-snippets',
|
||||
icon: 'snippets-16',
|
||||
icon: snippetIcon,
|
||||
preferences: [],
|
||||
mode: 'view',
|
||||
owner: 'raycast'
|
||||
|
@ -81,7 +82,7 @@
|
|||
pluginName: 'snippets',
|
||||
commandName: 'create-snippet',
|
||||
pluginPath: 'builtin:create-snippet',
|
||||
icon: 'snippets-16',
|
||||
icon: snippetIcon,
|
||||
preferences: [],
|
||||
mode: 'view',
|
||||
owner: 'raycast'
|
||||
|
@ -94,7 +95,7 @@
|
|||
pluginName: 'snippets',
|
||||
commandName: 'import-snippets',
|
||||
pluginPath: 'builtin:import-snippets',
|
||||
icon: 'upload-16',
|
||||
icon: snippetIcon,
|
||||
preferences: [],
|
||||
mode: 'view',
|
||||
owner: 'raycast'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue