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
4 changes: 4 additions & 0 deletions frontend/viewer/src/ShadcnProjectView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import ProjectSidebar from './project/ProjectSidebar.svelte';
import BrowseView from './project/browse/BrowseView.svelte';
import TasksView from './project/tasks/TasksView.svelte';
import DashboardView from './project/dashboard/DashboardView.svelte';
import {initViewService} from '$lib/views/view-service.svelte';
import DialogsProvider from '$lib/DialogsProvider.svelte';
import {navigate, Route, useRouter} from 'svelte-routing';
Expand Down Expand Up @@ -70,6 +71,9 @@
<Route path="/tasks">
<TasksView/>
</Route>
<Route path="/dashboard">
<DashboardView/>
</Route>
<Route path="/activity">
<ActivityView />
</Route>
Expand Down
5 changes: 3 additions & 2 deletions frontend/viewer/src/lib/about/FeedbackDialog.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import {useFwLiteConfig} from '$lib/services/service-provider';
import {Button} from '$lib/components/ui/button';
import ResponsiveDialog from '$lib/components/responsive-dialog/responsive-dialog.svelte';
import {featureRequestsUrl, supportForumUrl} from './community-links';

let {open = $bindable()}: { open: boolean } = $props();
const config = useFwLiteConfig();
Expand All @@ -14,7 +15,7 @@

<ResponsiveDialog bind:open title={$t`Feedback & Support`}>
<div class="flex flex-col gap-4">
<Button variant="ghost" href="https://community.software.sil.org/c/fwlite/fwlite-feature-requests/" target="_blank" class="gap-4 p-4 h-auto text-base justify-start whitespace-normal">
<Button variant="ghost" href={featureRequestsUrl} target="_blank" class="gap-4 p-4 h-auto text-base justify-start whitespace-normal">
<Icon icon="i-mdi-lightbulb-on-outline" class="size-10"/>
<div>
<div class="font-semibold underline">{$t`Make a suggestion`}</div>
Expand All @@ -23,7 +24,7 @@
</div>
</div>
</Button>
<Button variant="ghost" href="https://community.software.sil.org/c/fwlite/48" target="_blank" class="gap-4 p-4 h-auto text-base justify-start whitespace-normal">
<Button variant="ghost" href={supportForumUrl} target="_blank" class="gap-4 p-4 h-auto text-base justify-start whitespace-normal">
<Icon icon="i-mdi-forum-outline" class="size-10"/>
<div>
<div class="font-semibold underline">{$t`Get support`}</div>
Expand Down
13 changes: 13 additions & 0 deletions frontend/viewer/src/lib/about/community-links.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const communityBaseUrl = 'https://community.software.sil.org';

export const featureRequestsUrl = `${communityBaseUrl}/c/fwlite/fwlite-feature-requests/50`;
export const supportForumUrl = `${communityBaseUrl}/c/fwlite/48`;

// Opens the Discourse composer already scoped to the feature-requests category and tagged so
// dashboard ideas group together. Prefill stays English on purpose — it posts to an English forum.
export const dashboardSuggestionUrl = `${communityBaseUrl}/new-topic?${new URLSearchParams({
category: 'fwlite-feature-requests',
tags: 'dashboard',
title: 'What would help me on the dashboard',
body: 'How I use FieldWorks Lite:\n\nWhat would help me most on the dashboard:\n\n',
}).toString()}`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<script lang="ts">
import {cn} from '$lib/utils.js';

let {
value = 0,
max = 100,
size = 14,
strokeWidth = 2,
class: className,
trackClass,
indicatorClass,
}: {
value?: number;
max?: number;
size?: number;
strokeWidth?: number;
class?: string;
trackClass?: string;
indicatorClass?: string;
} = $props();

const percent = $derived(max === 0 ? 0 : Math.min(100, Math.max(0, Math.round((value / max) * 100))));
const radius = $derived((size - strokeWidth) / 2);
const circumference = $derived(2 * Math.PI * radius);
const dashOffset = $derived(circumference - (percent / 100) * circumference);
const center = $derived(size / 2);
</script>

<div class={cn('relative flex shrink-0', className)} style:width="{size}px" style:height="{size}px">
<svg
width={size}
height={size}
viewBox="0 0 {size} {size}"
class="absolute inset-0 block -rotate-90"
role="progressbar"
aria-valuenow={value}
aria-valuemin={0}
aria-valuemax={max}
aria-label="{percent}%"
>
<circle
cx={center}
cy={center}
r={radius}
fill="none"
class={cn('stroke-current/20', trackClass)}
stroke-width={strokeWidth}
/>
<circle
cx={center}
cy={center}
r={radius}
fill="none"
class={cn('stroke-current transition-[stroke-dashoffset] duration-300', indicatorClass)}
stroke-width={strokeWidth}
stroke-linecap="round"
stroke-dasharray={circumference}
stroke-dashoffset={dashOffset}
/>
</svg>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Root from './circular-progress.svelte';

export {
Root,
//
Root as CircularProgress,
};
70 changes: 70 additions & 0 deletions frontend/viewer/src/locales/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ msgstr "Add to dictionary"
msgid "Add Word"
msgstr "Add Word"

#: src/project/dashboard/DashboardView.svelte
msgid "Add your first entry to start building your dictionary."
msgstr "Add your first entry to start building your dictionary."

#. Radio option in custom view writing system picker.
#. Includes all writing systems (no filtering).
#: src/lib/views/custom/CustomViewWritingSystems.svelte
Expand Down Expand Up @@ -225,6 +229,10 @@ msgstr "Analysis"
msgid "Analysis writing system code"
msgstr "Analysis writing system code"

#: src/project/dashboard/DashboardView.svelte
msgid "Analysis writing systems"
msgstr "Analysis writing systems"

#. Relevant view: Classic
#. Lite view equivalent: "Any part of speech"
#. Filter option: clear grammatical info filter
Expand Down Expand Up @@ -370,6 +378,7 @@ msgstr "Choose theme"
#. Lite view equivalent: "Display as"
#. Field label: form for citing in dictionary
#: src/lib/views/entity-config.ts
#: src/project/dashboard/DashboardView.svelte
msgid "Citation form"
msgstr "Citation form"

Expand Down Expand Up @@ -553,9 +562,14 @@ msgstr "Dark"

#. Sidebar menu item
#: src/project/ProjectSidebar.svelte
#: src/project/dashboard/DashboardView.svelte
msgid "Dashboard"
msgstr "Dashboard"

#: src/project/dashboard/DashboardView.svelte
msgid "Dashboard failed to load"
msgstr "Dashboard failed to load"

#. Field label
#: src/lib/troubleshoot/TroubleshootDialog.svelte
msgid "Data Directory"
Expand All @@ -565,6 +579,7 @@ msgstr "Data Directory"
#. Definition for a sense/meaning (e.g., "bank" = "financial institution")
#. Appears under each Sense/Meaning in entry editor
#: src/lib/views/entity-config.ts
#: src/project/dashboard/DashboardView.svelte
msgid "Definition"
msgstr "Definition"

Expand Down Expand Up @@ -726,6 +741,14 @@ msgstr "Ends with"
msgid "Entries missing..."
msgstr "Entries missing..."

#: src/project/dashboard/DashboardView.svelte
msgid "Entries with examples"
msgstr "Entries with examples"

#: src/project/dashboard/DashboardView.svelte
msgid "Entries with senses"
msgstr "Entries with senses"

#. EntryView label for the current dictionary object when FieldWorks Classic is shown
#: src/project/browse/EntryView.svelte
msgid "entry"
Expand Down Expand Up @@ -794,6 +817,10 @@ msgstr "Example"
msgid "Example sentence"
msgstr "Example sentence"

#: src/project/dashboard/DashboardView.svelte
msgid "Example sentences"
msgstr "Example sentences"

#. Error message when copy fails
#: src/lib/components/ui/button/copy-button.svelte
msgid "Failed to copy to clipboard"
Expand Down Expand Up @@ -1000,6 +1027,7 @@ msgstr "Get support"
#. Different from "Definition" (longer explanation)
#. Appears under each sense/meaning; concise translation
#: src/lib/views/entity-config.ts
#: src/project/dashboard/DashboardView.svelte
msgid "Gloss"
msgstr "Gloss"

Expand Down Expand Up @@ -1125,6 +1153,7 @@ msgstr "Lexbox logo"
#. Lite view equivalent: "Word"
#. Field label: the main headword/base form
#: src/lib/views/entity-config.ts
#: src/project/dashboard/DashboardView.svelte
msgid "Lexeme form"
msgstr "Lexeme form"

Expand Down Expand Up @@ -1157,6 +1186,10 @@ msgstr "Literal meaning"
msgid "Loading activity"
msgstr "Loading activity"

#: src/project/dashboard/DashboardView.svelte
msgid "Loading dashboard..."
msgstr "Loading dashboard..."

#. Loading state text shown in the project/dictionary dropdown while the list of dictionaries is being fetched.
#: src/project/ProjectDropdown.svelte
msgid "Loading Dictionaries..."
Expand Down Expand Up @@ -1349,6 +1382,10 @@ msgstr "Newest first"
msgid "Next"
msgstr "Next"

#: src/project/dashboard/DashboardView.svelte
msgid "Next milestone: {0}. {1} to go."
msgstr "Next milestone: {0}. {1} to go."

#. Empty state when activity list filters exclude every commit.
#: src/lib/activity/ActivityView.svelte
msgid "No activity matches these filters"
Expand All @@ -1358,6 +1395,10 @@ msgstr "No activity matches these filters"
msgid "No activity types"
msgstr "No activity types"

#: src/project/dashboard/DashboardView.svelte
msgid "No analysis writing systems configured."
msgstr "No analysis writing systems configured."

#. Placeholder when no audio file
#. Shows in audio field when empty (no file uploaded yet)
#: src/lib/components/field-editors/audio-input.svelte
Expand Down Expand Up @@ -1418,6 +1459,10 @@ msgstr "No server configured"
msgid "No subject, unable to create a new {0}"
msgstr "No subject, unable to create a new {0}"

#: src/project/dashboard/DashboardView.svelte
msgid "No vernacular writing systems configured."
msgstr "No vernacular writing systems configured."

#. Relevant view: Lite
#. Classic view equivalent: "No entries found"
#: src/lib/entry-editor/EntryOrSensePicker.svelte
Expand Down Expand Up @@ -1968,6 +2013,10 @@ 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/dashboard/DashboardView.svelte
msgid "Tell us how you work and what would help most. Your ideas guide what we build."
msgstr "Tell us how you work and what would help most. Your ideas guide what we build."

#. View description
#: 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/)*."
Expand Down Expand Up @@ -2039,6 +2088,11 @@ msgstr "Toggle filters"
msgid "Toggle pinned"
msgstr "Toggle pinned"

#: src/project/dashboard/DashboardView.svelte
#: src/project/dashboard/DashboardView.svelte
msgid "Total entries"
msgstr "Total entries"

#. Field label
#: src/lib/entry-editor/object-editors/ExampleEditorPrimitive.svelte
#: src/lib/views/entity-config.ts
Expand Down Expand Up @@ -2206,6 +2260,10 @@ msgstr "Vernacular writing system code"
msgid "Vernacular writing system is required"
msgstr "Vernacular writing system is required"

#: src/project/dashboard/DashboardView.svelte
msgid "Vernacular writing systems"
msgstr "Vernacular writing systems"

#. Button label
#: src/project/browse/ViewPicker.svelte
msgid "View"
Expand All @@ -2216,6 +2274,10 @@ msgstr "View"
msgid "violet"
msgstr "violet"

#: src/project/dashboard/DashboardView.svelte
msgid "What would you like to see here?"
msgstr "What would you like to see here?"

#. External link button text for help
#: src/home/Server.svelte
msgid "Where are my projects?"
Expand Down Expand Up @@ -2312,3 +2374,11 @@ msgstr "You don't have permission to download project {0} from {1}"
#: src/home/Server.svelte
msgid "You have already downloaded the {0} project"
msgstr "You have already downloaded the {0} project"

#: src/project/dashboard/DashboardView.svelte
msgid "You've passed every milestone. What an achievement!"
msgstr "You've passed every milestone. What an achievement!"

#: src/project/dashboard/DashboardView.svelte
msgid "Your dictionary starts here"
msgstr "Your dictionary starts here"
Loading
Loading