Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import {ModeWatcher} from 'mode-watcher';
import {Context} from 'runed';
import { type Snippet } from 'svelte';
import ViewPicker from '../../src/project/browse/ViewPicker.svelte';
import ViewPicker from '../../src/project/browse/EditorViewOptions.svelte';
import {InMemoryApiService} from '$lib/in-memory-api-service';
import {setupServiceProvider} from '$lib/services/service-provider';
import {setupDotnetServiceProvider} from '$lib/services/service-provider-dotnet';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@

type TriggerSnippet = PopoverTriggerProps['child'];

let { open = $bindable(false), children, title, trigger }: WithChildren<{ open?: boolean, title: string, trigger: TriggerSnippet }> = $props();
let { open = $bindable(false), children, title, trigger }: WithChildren<{ open?: boolean, title?: string, trigger: TriggerSnippet }> = $props();
</script>

{#if !IsMobile.value}
<Popover.Root bind:open>
<Popover.Trigger child={trigger} />
<Popover.Content class="w-64 sm:mr-4">
<div class="space-y-3">
<h3 class="font-medium">{title}</h3>
{#if title}
<h3 class="font-medium">{title}</h3>
{/if}

{#if children}
{@render children()}
{/if}
Expand All @@ -31,9 +34,11 @@
<Icon icon="i-mdi-close" />
</Drawer.Close>
<div class="mx-auto w-full max-w-sm p-4">
<Drawer.Header>
<Drawer.Title>{title}</Drawer.Title>
</Drawer.Header>
{#if title}
<Drawer.Header>
<Drawer.Title>{title}</Drawer.Title>
</Drawer.Header>
{/if}
{#if children}
{@render children()}
{/if}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,10 @@
{#if showActualDate && actualFormattedDate}
<span class:loading-text={loading} class="inline-flex items-center gap-1">
<Popover.Root>
<Popover.Trigger>
<Popover.InfoTrigger>
<time {...restProps}>{formattedRelativeDate}</time>
<Icon icon="i-mdi-information-outline" class="size-4 text-muted-foreground hover:text-foreground" />
</Popover.Trigger>
<Popover.Content class="w-auto p-2">
</Popover.InfoTrigger>
<Popover.Content class="w-auto p-2 text-sm">
<Icon icon="i-mdi-calendar-clock" class="text-muted-foreground mr-1" />
{actualFormattedDate}
</Popover.Content>
Expand Down
7 changes: 5 additions & 2 deletions frontend/viewer/src/lib/components/ui/popover/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/* eslint-disable @typescript-eslint/naming-convention */

import {Popover as PopoverPrimitive} from 'bits-ui';
import Content from './popover-content.svelte';
import InfoTrigger from './popover-info-trigger.svelte';
import {Popover as PopoverPrimitive} from 'bits-ui';

const Root = PopoverPrimitive.Root;
const Trigger = PopoverPrimitive.Trigger;
const Close = PopoverPrimitive.Close;
Expand All @@ -10,5 +12,6 @@ export {
Close, Content,
//
Root as Popover, Close as PopoverClose, Content as PopoverContent,
Trigger as PopoverTrigger, Root, Trigger
Trigger as PopoverTrigger, Root, Trigger,
InfoTrigger, InfoTrigger as PopoverInfoTrigger,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<script lang="ts">
import type {ComponentProps, Snippet} from 'svelte';
import {Icon} from '../icon';
import * as Popover from '../popover';
import {cn} from '$lib/utils';

type Props = ComponentProps<typeof Popover.Trigger> & {
children?: Snippet;
}

const {
children,
class: className,
...restProps
}: Props = $props();

</script>

<Popover.Trigger class={cn('group', className)} {...restProps}>
{@render children?.()}
<Icon icon="i-mdi-information-outline" class="size-4 text-muted-foreground group-hover:text-foreground" />
</Popover.Trigger>
2 changes: 1 addition & 1 deletion frontend/viewer/src/lib/markdown/NewTabLinkRenderer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
export let title: string | undefined = undefined;
</script>

<a {href} {title} target="_blank" class="external-link link link-hover">
<a {href} {title} target="_blank" class="underline underline-offset-4 hover:text-primary">
Comment thread
myieye marked this conversation as resolved.
<!-- &nbsp; prevents the link from ever being at the very beginning of a new line -->
<slot />&nbsp;<span class="i-mdi-open-in-new external-link-icon"></span>
</a>
Expand Down
2 changes: 1 addition & 1 deletion frontend/viewer/src/lib/sandbox/EditorSandbox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import {type IMultiString} from '$lib/dotnet-types';
import {type IRichString} from '$lib/dotnet-types/generated-types/MiniLcm/Models/IRichString';
import { fieldData } from '$lib/entry-editor/field-data';
import ViewPicker from '../../project/browse/ViewPicker.svelte';
import ViewPicker from '../../project/browse/EditorViewOptions.svelte';
import WsInput from '$lib/components/field-editors/ws-input.svelte';
import {vt} from '$lib/views/view-text';

Expand Down
2 changes: 1 addition & 1 deletion frontend/viewer/src/lib/views/view-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const FW_LITE_VIEW: RootView = {
export const FW_CLASSIC_VIEW: RootView = {
id: 'fieldworks',
type: 'fw-classic',
label: 'FieldWorks',
label: 'FieldWorks Classic',
fields: recursiveSpread(allFields, {
complexFormTypes: {order: allFields.components.order - 0.1},
[defaultDef]: {show: true}
Expand Down
28 changes: 24 additions & 4 deletions frontend/viewer/src/locales/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ msgstr "{num, plural, one {# new FieldWorks Classic commit} other {# new FieldWo
msgid "{num, plural, one {# new FieldWorks Lite commit} other {# new FieldWorks Lite commits}}"
msgstr "{num, plural, one {# new FieldWorks Lite commit} other {# new FieldWorks Lite commits}}"

#: src/project/browse/ViewPicker.svelte
msgid "**Fewer fields** (e.g. hides *Complex form types*, *Literal meaning*)"
msgstr "**Fewer fields** (e.g. hides *Complex form types*, *Literal meaning*)"

#: src/project/browse/ViewPicker.svelte
msgid "**Fewer morpheme types** (only *Root*, *Bound Root*, *Stem*, *Bound Stem*, *Particle*, *Phrase*, and *Discontiguous Phrase*)"
msgstr "**Fewer morpheme types** (only *Root*, *Bound Root*, *Stem*, *Bound Stem*, *Particle*, *Phrase*, and *Discontiguous Phrase*)"

#: src/project/browse/ViewPicker.svelte
msgid "**Simpler terminology** (e.g. *Word* instead of *Lexeme form*, *Meaning* instead of *Sense*)"
msgstr "**Simpler terminology** (e.g. *Word* instead of *Lexeme form*, *Meaning* instead of *Sense*)"

#: src/lib/notifications/NotificationOutlet.svelte
msgid "A new version of FieldWorks Lite is available."
msgstr "A new version of FieldWorks Lite is available."
Expand Down Expand Up @@ -498,10 +510,6 @@ msgstr "Feedback & Support"
msgid "Field"
msgstr "Field"

#: src/project/browse/ViewPicker.svelte
msgid "Field Labels"
msgstr "Field Labels"

#: src/project/sync/SyncStatusPrimitive.svelte
msgid "FieldWorks Lite"
msgstr "FieldWorks Lite"
Expand Down Expand Up @@ -1185,6 +1193,14 @@ msgstr "Tasks"
msgid "Tell us about a bug or issue you’ve encountered."
msgstr "Tell us about a bug or issue you’ve encountered."

#: src/project/browse/ViewPicker.svelte
msgid "The *FieldWorks Classic* view, on the other hand, is designed for users who are familiar with *[FieldWorks Language Explorer](https://software.sil.org/fieldworks/)*."
msgstr "The *FieldWorks Classic* view, on the other hand, is designed for users who are familiar with *[FieldWorks Language Explorer](https://software.sil.org/fieldworks/)*."

#: src/project/browse/ViewPicker.svelte
msgid "The *FieldWorks Lite* view is designed for non-linguists and differs from the *FieldWorks Classic* view in the following ways:"
msgstr "The *FieldWorks Lite* view is designed for non-linguists and differs from the *FieldWorks Classic* view in the following ways:"

#: src/project/sync/FwLiteToFwMergeDetails.svelte
msgid "The number of FieldWorks Classic commits will not necessarily match the number of changes shown in the sync result message."
msgstr "The number of FieldWorks Classic commits will not necessarily match the number of changes shown in the sync result message."
Expand Down Expand Up @@ -1315,6 +1331,10 @@ msgstr "Uses components as"
msgid "Version {0}"
msgstr "Version {0}"

#: src/project/browse/ViewPicker.svelte
msgid "View"
msgstr "View"

#: src/project/browse/ViewPicker.svelte
msgid "View Configuration"
msgstr "View Configuration"
Expand Down
28 changes: 24 additions & 4 deletions frontend/viewer/src/locales/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ msgstr ""
msgid "{num, plural, one {# new FieldWorks Lite commit} other {# new FieldWorks Lite commits}}"
msgstr ""

#: src/project/browse/ViewPicker.svelte
msgid "**Fewer fields** (e.g. hides *Complex form types*, *Literal meaning*)"
msgstr ""

#: src/project/browse/ViewPicker.svelte
msgid "**Fewer morpheme types** (only *Root*, *Bound Root*, *Stem*, *Bound Stem*, *Particle*, *Phrase*, and *Discontiguous Phrase*)"
msgstr ""

#: src/project/browse/ViewPicker.svelte
msgid "**Simpler terminology** (e.g. *Word* instead of *Lexeme form*, *Meaning* instead of *Sense*)"
msgstr ""

#: src/lib/notifications/NotificationOutlet.svelte
msgid "A new version of FieldWorks Lite is available."
msgstr "Una nueva versión de FieldWorks Lite está disponible."
Expand Down Expand Up @@ -503,10 +515,6 @@ msgstr ""
msgid "Field"
msgstr "Campo"

#: src/project/browse/ViewPicker.svelte
msgid "Field Labels"
msgstr "Etiquetas de campo"

#: src/project/sync/SyncStatusPrimitive.svelte
msgid "FieldWorks Lite"
msgstr "FieldWorks Lite"
Expand Down Expand Up @@ -1190,6 +1198,14 @@ msgstr "Tareas"
msgid "Tell us about a bug or issue you’ve encountered."
msgstr ""

#: src/project/browse/ViewPicker.svelte
msgid "The *FieldWorks Classic* view, on the other hand, is designed for users who are familiar with *[FieldWorks Language Explorer](https://software.sil.org/fieldworks/)*."
msgstr ""

#: src/project/browse/ViewPicker.svelte
msgid "The *FieldWorks Lite* view is designed for non-linguists and differs from the *FieldWorks Classic* view in the following ways:"
msgstr ""

#: src/project/sync/FwLiteToFwMergeDetails.svelte
msgid "The number of FieldWorks Classic commits will not necessarily match the number of changes shown in the sync result message."
msgstr ""
Expand Down Expand Up @@ -1320,6 +1336,10 @@ msgstr "Utiliza componentes como"
msgid "Version {0}"
msgstr "Versión {0}"

#: src/project/browse/ViewPicker.svelte
msgid "View"
msgstr ""

#: src/project/browse/ViewPicker.svelte
msgid "View Configuration"
msgstr "Ver configuración"
Expand Down
28 changes: 24 additions & 4 deletions frontend/viewer/src/locales/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ msgstr ""
msgid "{num, plural, one {# new FieldWorks Lite commit} other {# new FieldWorks Lite commits}}"
msgstr ""

#: src/project/browse/ViewPicker.svelte
msgid "**Fewer fields** (e.g. hides *Complex form types*, *Literal meaning*)"
msgstr ""

#: src/project/browse/ViewPicker.svelte
msgid "**Fewer morpheme types** (only *Root*, *Bound Root*, *Stem*, *Bound Stem*, *Particle*, *Phrase*, and *Discontiguous Phrase*)"
msgstr ""

#: src/project/browse/ViewPicker.svelte
msgid "**Simpler terminology** (e.g. *Word* instead of *Lexeme form*, *Meaning* instead of *Sense*)"
msgstr ""

#: src/lib/notifications/NotificationOutlet.svelte
msgid "A new version of FieldWorks Lite is available."
msgstr "Une nouvelle version de FieldWorks Lite sera disponible."
Expand Down Expand Up @@ -503,10 +515,6 @@ msgstr ""
msgid "Field"
msgstr "Champ d'application"

#: src/project/browse/ViewPicker.svelte
msgid "Field Labels"
msgstr "Étiquettes de champ"

#: src/project/sync/SyncStatusPrimitive.svelte
msgid "FieldWorks Lite"
msgstr "FieldWorks Lite"
Expand Down Expand Up @@ -1190,6 +1198,14 @@ msgstr "Tâches"
msgid "Tell us about a bug or issue you’ve encountered."
msgstr ""

#: src/project/browse/ViewPicker.svelte
msgid "The *FieldWorks Classic* view, on the other hand, is designed for users who are familiar with *[FieldWorks Language Explorer](https://software.sil.org/fieldworks/)*."
msgstr ""

#: src/project/browse/ViewPicker.svelte
msgid "The *FieldWorks Lite* view is designed for non-linguists and differs from the *FieldWorks Classic* view in the following ways:"
msgstr ""

#: src/project/sync/FwLiteToFwMergeDetails.svelte
msgid "The number of FieldWorks Classic commits will not necessarily match the number of changes shown in the sync result message."
msgstr ""
Expand Down Expand Up @@ -1320,6 +1336,10 @@ msgstr "Utilise des composants tels que"
msgid "Version {0}"
msgstr "Version {0}"

#: src/project/browse/ViewPicker.svelte
msgid "View"
msgstr ""

#: src/project/browse/ViewPicker.svelte
msgid "View Configuration"
msgstr "Voir la configuration"
Expand Down
28 changes: 24 additions & 4 deletions frontend/viewer/src/locales/id.po
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ msgstr ""
msgid "{num, plural, one {# new FieldWorks Lite commit} other {# new FieldWorks Lite commits}}"
msgstr ""

#: src/project/browse/ViewPicker.svelte
msgid "**Fewer fields** (e.g. hides *Complex form types*, *Literal meaning*)"
msgstr ""

#: src/project/browse/ViewPicker.svelte
msgid "**Fewer morpheme types** (only *Root*, *Bound Root*, *Stem*, *Bound Stem*, *Particle*, *Phrase*, and *Discontiguous Phrase*)"
msgstr ""

#: src/project/browse/ViewPicker.svelte
msgid "**Simpler terminology** (e.g. *Word* instead of *Lexeme form*, *Meaning* instead of *Sense*)"
msgstr ""

#: src/lib/notifications/NotificationOutlet.svelte
msgid "A new version of FieldWorks Lite is available."
msgstr "Versi baru FieldWorks Lite telah tersedia."
Expand Down Expand Up @@ -503,10 +515,6 @@ msgstr ""
msgid "Field"
msgstr "Bidang"

#: src/project/browse/ViewPicker.svelte
msgid "Field Labels"
msgstr "Label Bidang"

#: src/project/sync/SyncStatusPrimitive.svelte
msgid "FieldWorks Lite"
msgstr "FieldWorks Lite"
Expand Down Expand Up @@ -1190,6 +1198,14 @@ msgstr "Tugas"
msgid "Tell us about a bug or issue you’ve encountered."
msgstr ""

#: src/project/browse/ViewPicker.svelte
msgid "The *FieldWorks Classic* view, on the other hand, is designed for users who are familiar with *[FieldWorks Language Explorer](https://software.sil.org/fieldworks/)*."
msgstr ""

#: src/project/browse/ViewPicker.svelte
msgid "The *FieldWorks Lite* view is designed for non-linguists and differs from the *FieldWorks Classic* view in the following ways:"
msgstr ""

#: src/project/sync/FwLiteToFwMergeDetails.svelte
msgid "The number of FieldWorks Classic commits will not necessarily match the number of changes shown in the sync result message."
msgstr ""
Expand Down Expand Up @@ -1320,6 +1336,10 @@ msgstr "Menggunakan komponen sebagai"
msgid "Version {0}"
msgstr "Versi {0}"

#: src/project/browse/ViewPicker.svelte
msgid "View"
msgstr ""

#: src/project/browse/ViewPicker.svelte
msgid "View Configuration"
msgstr "Lihat Konfigurasi"
Expand Down
Loading
Loading