mirror of
https://github.com/ByteAtATime/raycast-linux.git
synced 2025-08-30 18:57:25 +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 { ArrowLeft, CheckCircle, Info, ArrowRight, Loader2 } from '@lucide/svelte';
|
||||||
import ActionBar from '$lib/components/nodes/shared/ActionBar.svelte';
|
import ActionBar from '$lib/components/nodes/shared/ActionBar.svelte';
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
|
import snippetIcon from '$lib/assets/snippets-package-1616x16@2x.png?inline';
|
||||||
|
|
||||||
type SnippetToImport = {
|
type SnippetToImport = {
|
||||||
name: string;
|
name: string;
|
||||||
|
@ -128,10 +129,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ActionBar
|
<ActionBar title="Import Snippets" icon={snippetIcon}>
|
||||||
title={importState === 'idle' || importState === 'importing' ? 'Import Snippets' : undefined}
|
|
||||||
icon={importState === 'idle' || importState === 'importing' ? 'snippets-16' : undefined}
|
|
||||||
>
|
|
||||||
{#snippet primaryAction()}
|
{#snippet primaryAction()}
|
||||||
{#if importState === 'result'}
|
{#if importState === 'result'}
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
import Header from './layout/Header.svelte';
|
import Header from './layout/Header.svelte';
|
||||||
import InfoList from './InfoList.svelte';
|
import InfoList from './InfoList.svelte';
|
||||||
import type { ActionDefinition } from './nodes/shared/actions';
|
import type { ActionDefinition } from './nodes/shared/actions';
|
||||||
|
import snippetIcon from '$lib/assets/snippets-package-1616x16@2x.png?inline';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
onBack: () => void;
|
onBack: () => void;
|
||||||
|
@ -231,7 +232,7 @@
|
||||||
|
|
||||||
{#snippet footer()}
|
{#snippet footer()}
|
||||||
{#if selectedItem}
|
{#if selectedItem}
|
||||||
<ActionBar {actions} />
|
<ActionBar {actions} icon={snippetIcon} title="Search Snippets" />
|
||||||
{/if}
|
{/if}
|
||||||
{/snippet}
|
{/snippet}
|
||||||
</MainLayout>
|
</MainLayout>
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
import MainLayout from './layout/MainLayout.svelte';
|
import MainLayout from './layout/MainLayout.svelte';
|
||||||
import Header from './layout/Header.svelte';
|
import Header from './layout/Header.svelte';
|
||||||
import ActionBar from './nodes/shared/ActionBar.svelte';
|
import ActionBar from './nodes/shared/ActionBar.svelte';
|
||||||
|
import snippetIcon from '$lib/assets/snippets-package-1616x16@2x.png?inline';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
onBack: () => void;
|
onBack: () => void;
|
||||||
|
@ -231,6 +232,8 @@
|
||||||
shortcut: { key: 'enter', modifiers: ['cmd'] }
|
shortcut: { key: 'enter', modifiers: ['cmd'] }
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
|
icon={snippetIcon}
|
||||||
|
title="Create Snippet"
|
||||||
>
|
>
|
||||||
{#snippet primaryAction({ props })}
|
{#snippet primaryAction({ props })}
|
||||||
<Button {...props} onclick={handleSave}><Save class="mr-2 size-4" /> Create Snippet</Button>
|
<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 CommandDeeplinkConfirm from '$lib/components/CommandDeeplinkConfirm.svelte';
|
||||||
import clipboardHistoryCommandIcon from '$lib/assets/command-clipboard-history-1616x16@2x.png?inline';
|
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 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 = {
|
const storePlugin: PluginInfo = {
|
||||||
title: 'Store',
|
title: 'Store',
|
||||||
|
@ -55,7 +56,7 @@
|
||||||
pluginName: 'snippets',
|
pluginName: 'snippets',
|
||||||
commandName: 'search-snippets',
|
commandName: 'search-snippets',
|
||||||
pluginPath: 'builtin:search-snippets',
|
pluginPath: 'builtin:search-snippets',
|
||||||
icon: 'snippets-16',
|
icon: snippetIcon,
|
||||||
preferences: [],
|
preferences: [],
|
||||||
mode: 'view',
|
mode: 'view',
|
||||||
owner: 'raycast'
|
owner: 'raycast'
|
||||||
|
@ -81,7 +82,7 @@
|
||||||
pluginName: 'snippets',
|
pluginName: 'snippets',
|
||||||
commandName: 'create-snippet',
|
commandName: 'create-snippet',
|
||||||
pluginPath: 'builtin:create-snippet',
|
pluginPath: 'builtin:create-snippet',
|
||||||
icon: 'snippets-16',
|
icon: snippetIcon,
|
||||||
preferences: [],
|
preferences: [],
|
||||||
mode: 'view',
|
mode: 'view',
|
||||||
owner: 'raycast'
|
owner: 'raycast'
|
||||||
|
@ -94,7 +95,7 @@
|
||||||
pluginName: 'snippets',
|
pluginName: 'snippets',
|
||||||
commandName: 'import-snippets',
|
commandName: 'import-snippets',
|
||||||
pluginPath: 'builtin:import-snippets',
|
pluginPath: 'builtin:import-snippets',
|
||||||
icon: 'upload-16',
|
icon: snippetIcon,
|
||||||
preferences: [],
|
preferences: [],
|
||||||
mode: 'view',
|
mode: 'view',
|
||||||
owner: 'raycast'
|
owner: 'raycast'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue