-
-
Notifications
You must be signed in to change notification settings - Fork 2k
feat: add all Draw.io themes to settings panel (#499) #513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
801974a
783cb4a
b723406
a8ff1ea
de0ba6b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -24,6 +24,7 @@ import { | |||||||||||
| import { Switch } from "@/components/ui/switch" | ||||||||||||
| import { useDictionary } from "@/hooks/use-dictionary" | ||||||||||||
| import { getApiEndpoint } from "@/lib/base-path" | ||||||||||||
| import { DRAWIO_THEMES, type DrawioTheme } from "@/lib/drawio-themes" | ||||||||||||
| import { i18n, type Locale } from "@/lib/i18n/config" | ||||||||||||
| import { STORAGE_KEYS } from "@/lib/storage" | ||||||||||||
|
|
||||||||||||
|
|
@@ -58,11 +59,24 @@ const LANGUAGE_LABELS: Record<Locale, string> = { | |||||||||||
| ja: "日本語", | ||||||||||||
| } | ||||||||||||
|
|
||||||||||||
| // Mapping of Draw.io theme values to their translation dictionary keys | ||||||||||||
| const DRAWIO_THEME_LABELS: Record< | ||||||||||||
| DrawioTheme, | ||||||||||||
| keyof typeof DRAWIO_THEMES | string | ||||||||||||
| > = { | ||||||||||||
|
Comment on lines
+63
to
+66
|
||||||||||||
| const DRAWIO_THEME_LABELS: Record< | |
| DrawioTheme, | |
| keyof typeof DRAWIO_THEMES | string | |
| > = { | |
| const DRAWIO_THEME_LABELS: Record<DrawioTheme, string> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot is correct. It is better to apply its sugguestion.
xinyang20 marked this conversation as resolved.
Show resolved
Hide resolved
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // Draw.io UI themes configuration | ||
| export type DrawioTheme = "kennedy" | "simple" | "min" | "sketch" | "atlas" | ||
|
|
||
| export const DRAWIO_THEMES: DrawioTheme[] = [ | ||
| "kennedy", | ||
| "simple", | ||
| "min", | ||
| "sketch", | ||
| "atlas", | ||
| ] | ||
|
|
||
| export const DEFAULT_DRAWIO_THEME: DrawioTheme = "min" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,10 +96,16 @@ | |
| "theme": "Theme", | ||
| "themeDescription": "Dark/Light mode for interface and DrawIO canvas.", | ||
| "drawioStyle": "DrawIO Style", | ||
| "drawioStyleDescription": "Canvas style:", | ||
| "switchTo": "Switch to", | ||
| "minimal": "Minimal", | ||
| "sketch": "Sketch", | ||
| "drawioStyleDescription": "Choose canvas UI theme.", | ||
| "themes": { | ||
| "classic": "Classic", | ||
| "simple": "Simple", | ||
| "minimal": "Minimal", | ||
| "sketch": "Sketch", | ||
| "atlas": "Atlas" | ||
| }, | ||
| "closeProtection": "Close Protection", | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The close projection has been delete from the main. Could you rebase on the latest main first? |
||
| "closeProtectionDescription": "Show confirmation when leaving the page.", | ||
| "diagramStyle": "Diagram Style", | ||
| "diagramStyleDescription": "Toggle between minimal and styled diagram output.", | ||
| "sendShortcut": "Send Shortcut", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works but is unconventional. Better to add an explicit import.