-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add embedded stack preview and settings
- Loading branch information
Showing
5 changed files
with
117 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<script lang="ts"> | ||
import { Column, Grid, Row } from 'carbon-components-svelte' | ||
import { smallPreviewSettings, smallPreviewSettingsDefault } from '../../stores/smallpreview' | ||
import Input from '../common/Input.svelte' | ||
import SettingsInput from '../common/SettingsInput.svelte' | ||
</script> | ||
|
||
<Grid narrow condensed fullWidth> | ||
<Column> | ||
<Row> | ||
<Input noPadding labelWidth="10" id="showSizeOutline" type="checkbox" label="Show" bind:checked={$smallPreviewSettings.show} /> | ||
</Row> | ||
<Row> | ||
<Input noPadding labelWidth="10" id="background" type="color" label="Background Color" bind:value={$smallPreviewSettings.background} /> | ||
<SettingsInput noPadding id="background" type="text" bind:value={$smallPreviewSettings.background} defaultValue={smallPreviewSettingsDefault.background} /> | ||
</Row> | ||
<Row> | ||
<SettingsInput noPadding labelWidth="10" id="spinSpeed" type="number" label="Spin Speed" bind:value={$smallPreviewSettings.spinSpeed} step={0.1} defaultValue={smallPreviewSettingsDefault.spinSpeed} /> | ||
</Row> | ||
<Row> | ||
<SettingsInput noPadding labelWidth="10" id="wheelIncrement" type="number" label="Mousewheel Increment" bind:value={$smallPreviewSettings.wheelIncrement} defaultValue={smallPreviewSettingsDefault.wheelIncrement} /> | ||
</Row> | ||
</Column> | ||
</Grid> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { makeLocalStorageStore } from './localstore' | ||
|
||
type SmallPreviewSettings = { | ||
show: boolean | ||
background: string | ||
spinSpeed: number | ||
wheelIncrement: number | ||
} | ||
|
||
export const smallPreviewSettingsDefault: SmallPreviewSettings = { | ||
show: true, | ||
background: '#111111', | ||
spinSpeed: 0.5, | ||
wheelIncrement: 1, | ||
} | ||
|
||
export const smallPreviewSettings = makeLocalStorageStore<SmallPreviewSettings>('smallPreview', { ...smallPreviewSettingsDefault }) |