-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make listen and record blocks in list entry view all same width
- Loading branch information
Showing
15 changed files
with
239 additions
and
124 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
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
70 changes: 70 additions & 0 deletions
70
packages/site/src/routes/[dictionaryId]/entries/Audio.variants.ts
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,70 @@ | ||
import type { Variant, Viewport } from 'kitbook' | ||
import type Component from './Audio.svelte' | ||
|
||
export const viewports: Viewport[] = [ | ||
{ width: 80, height: 80 }, | ||
] | ||
|
||
export const languages = [] | ||
|
||
const entry = { | ||
sound_files: [ | ||
{ fb_storage_path: '' } | ||
], | ||
} | ||
|
||
export const variants: Variant<Component>[] = [ | ||
{ | ||
name: 'List sound', | ||
props: { | ||
entry, | ||
context: 'list', | ||
}, | ||
}, | ||
{ | ||
name: 'Table sound', | ||
props: { | ||
entry, | ||
context: 'table', | ||
}, | ||
}, | ||
{ | ||
name: 'Entry sound', | ||
props: { | ||
entry, | ||
context: 'entry', | ||
}, | ||
}, | ||
{ | ||
name: 'Entry sound, can edit', | ||
props: { | ||
entry, | ||
context: 'entry', | ||
canEdit: true, | ||
}, | ||
}, | ||
{ | ||
name: 'List no sound, can edit', | ||
props: { | ||
entry: {}, | ||
context: 'list', | ||
canEdit: true, | ||
}, | ||
}, | ||
{ | ||
name: 'Table no sound, can edit', | ||
props: { | ||
entry: {}, | ||
context: 'table', | ||
canEdit: true, | ||
}, | ||
}, | ||
{ | ||
name: 'Entry no sound, can edit', | ||
props: { | ||
entry: {}, | ||
context: 'entry', | ||
canEdit: true, | ||
}, | ||
}, | ||
] |
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
14 changes: 14 additions & 0 deletions
14
packages/site/src/routes/[dictionaryId]/entries/list/List.svelte
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,14 @@ | ||
<script lang="ts"> | ||
import type { ActualDatabaseEntry, IDictionary } from '@living-dictionaries/types'; | ||
import ListEntry from './ListEntry.svelte'; | ||
import { convert_and_expand_entry } from '$lib/transformers/convert_and_expand_entry'; | ||
import { page } from '$app/stores'; | ||
export let entries: ActualDatabaseEntry[] | ||
export let dictionary: IDictionary | ||
export let canEdit = false | ||
</script> | ||
|
||
{#each entries as entry (entry.id)} | ||
<ListEntry {canEdit} {dictionary} entry={convert_and_expand_entry(entry, $page.data.t)} /> | ||
{/each} |
32 changes: 32 additions & 0 deletions
32
packages/site/src/routes/[dictionaryId]/entries/list/List.variants.ts
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,32 @@ | ||
import type { Variant, Viewport } from 'kitbook' | ||
import type Component from './List.svelte' | ||
import { basic_mock_dictionary } from '$lib/mocks/dictionaries' | ||
|
||
export const viewports: Viewport[] = [ | ||
{ width: 300, height: 150 }, | ||
{ width: 800, height: 150 }, | ||
] | ||
|
||
export const variants: Variant<Component>[] = [ | ||
{ | ||
props: { | ||
entries: [ | ||
{ | ||
id: '1', | ||
lx: 'hi - I have audio', | ||
sfs: [ | ||
{ | ||
path: '' | ||
} | ||
] | ||
}, | ||
{ | ||
id: '2', | ||
lx: 'hi, I am here too', | ||
}, | ||
], | ||
canEdit: true, | ||
dictionary: basic_mock_dictionary | ||
}, | ||
}, | ||
] |
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
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 |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
|
||
<MainPage {data} /> | ||
|
||
<!-- Kitbook route files were auto-generated by [email protected].6^ - Do not edit as they will be overwritten next time kitbook updates routing. --> | ||
<!-- Kitbook route files were auto-generated by [email protected].17^ - Do not edit as they will be overwritten next time kitbook updates routing. --> |
Oops, something went wrong.