tera-system-ui 0.0.33 → 0.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/side-navigation/SideNavigation.d.ts +1 -0
- package/dist/components/side-navigation/SideNavigation.svelte +7 -3
- package/dist/components/side-navigation/SideNavigationLayout.svelte +2 -2
- package/dist/components/side-navigation/SideNavigationLayout.svelte.d.ts +1 -0
- package/dist/components/user-avatar-with-menu/UserAvatarWithMenu.svelte +4 -3
- package/dist/paraglide/messages/de.d.ts +2 -0
- package/dist/paraglide/messages/de.js +16 -0
- package/dist/paraglide/messages/en.d.ts +2 -0
- package/dist/paraglide/messages/en.js +16 -0
- package/dist/paraglide/messages/es.d.ts +2 -0
- package/dist/paraglide/messages/es.js +16 -0
- package/dist/paraglide/messages/fr.d.ts +2 -0
- package/dist/paraglide/messages/fr.js +16 -0
- package/dist/paraglide/messages/it.d.ts +2 -0
- package/dist/paraglide/messages/it.js +16 -0
- package/dist/paraglide/messages/pt.d.ts +2 -0
- package/dist/paraglide/messages/pt.js +16 -0
- package/dist/paraglide/messages/ru.d.ts +2 -0
- package/dist/paraglide/messages/ru.js +16 -0
- package/dist/paraglide/messages/vi.d.ts +2 -0
- package/dist/paraglide/messages/vi.js +16 -0
- package/dist/paraglide/messages.d.ts +6 -0
- package/dist/paraglide/messages.js +56 -0
- package/package.json +1 -1
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
import {getGlobalContext} from "../tera-ui-context/global-context";
|
|
21
21
|
|
|
22
|
-
let {children, sideNavHref, ...props}: SideNavigationProps = $props();
|
|
22
|
+
let {children, sideNavHref, language, ...props}: SideNavigationProps = $props();
|
|
23
23
|
|
|
24
24
|
let temporaryExpand: any = undefined
|
|
25
25
|
|
|
@@ -48,19 +48,23 @@
|
|
|
48
48
|
let globalContext = getGlobalContext()
|
|
49
49
|
|
|
50
50
|
sideNavHref = sideNavHref || globalContext?.sideNavHref
|
|
51
|
+
language = language || globalContext?.language
|
|
52
|
+
|
|
53
|
+
let langPath = (language === 'en' || !language) ? '' : `/${language}`
|
|
51
54
|
|
|
52
55
|
function isSelected(href: string) {
|
|
53
56
|
return sideNavHref?.startsWith(href)
|
|
54
57
|
}
|
|
55
58
|
|
|
59
|
+
|
|
56
60
|
const NAV_ITEM = [
|
|
57
61
|
{
|
|
58
|
-
href:
|
|
62
|
+
href: `/calculator${langPath}`,
|
|
59
63
|
icon: IconCalculator,
|
|
60
64
|
title: m.text_calces_scientific_calculator(),
|
|
61
65
|
},
|
|
62
66
|
{
|
|
63
|
-
href:
|
|
67
|
+
href: `/convert${langPath}`,
|
|
64
68
|
icon: IconTransform,
|
|
65
69
|
title: m.text_unit_converter(),
|
|
66
70
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {SideNavigation} from "./";
|
|
3
3
|
import './sidenav.scss'
|
|
4
4
|
|
|
5
|
-
let {children} = $props()
|
|
5
|
+
let {children, language} = $props()
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
8
|
<main
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
class="side-nav_main-layout relative"
|
|
11
11
|
data-side-nav-state="compact"
|
|
12
12
|
>
|
|
13
|
-
<SideNavigation/>
|
|
13
|
+
<SideNavigation language={language}/>
|
|
14
14
|
|
|
15
15
|
<section class="side-nav_main-content">
|
|
16
16
|
{@render children?.()}
|
|
@@ -10,12 +10,13 @@
|
|
|
10
10
|
} from "../dropdown-menu";
|
|
11
11
|
import {IconLogout, IconSettings} from "../icons";
|
|
12
12
|
import {extractShortUsernameFromEmail} from "../../internal/service/user.service";
|
|
13
|
-
|
|
13
|
+
import * as m from '../../paraglide/messages'
|
|
14
14
|
let {children, user, onLogout,...props}: UserAvatarWithMenuProps = $props();
|
|
15
15
|
|
|
16
16
|
let shortUserName = extractShortUsernameFromEmail(user?.email)
|
|
17
17
|
let triggerRef = $state()
|
|
18
18
|
let open = $state(false)
|
|
19
|
+
|
|
19
20
|
</script>
|
|
20
21
|
|
|
21
22
|
|
|
@@ -54,14 +55,14 @@
|
|
|
54
55
|
href="/account-settings"
|
|
55
56
|
>
|
|
56
57
|
<IconSettings/>
|
|
57
|
-
|
|
58
|
+
{m.text_account_settings()}
|
|
58
59
|
</DropdownMenuItem>
|
|
59
60
|
</DropdownMenuGroup>
|
|
60
61
|
<DropdownMenuSeparator/>
|
|
61
62
|
<DropdownMenuGroup>
|
|
62
63
|
<DropdownMenuItem onclick={onLogout}>
|
|
63
64
|
<IconLogout/>
|
|
64
|
-
|
|
65
|
+
{m.text_logout()}
|
|
65
66
|
</DropdownMenuItem>
|
|
66
67
|
</DropdownMenuGroup>
|
|
67
68
|
</DropdownMenu>
|
|
@@ -2,3 +2,5 @@ export function text_select_language(): string;
|
|
|
2
2
|
export function text_unit_converter(): string;
|
|
3
3
|
export function text_calces_scientific_calculator(): string;
|
|
4
4
|
export function text_calces_documentation(): string;
|
|
5
|
+
export function text_account_settings(): string;
|
|
6
|
+
export function text_logout(): string;
|
|
@@ -40,3 +40,19 @@ export const text_calces_scientific_calculator = () => `CalcES Sci. Rechner`
|
|
|
40
40
|
*/
|
|
41
41
|
/* @__NO_SIDE_EFFECTS__ */
|
|
42
42
|
export const text_calces_documentation = () => `CalcES Dokumentation`
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @returns {string}
|
|
48
|
+
*/
|
|
49
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
50
|
+
export const text_account_settings = () => `Kontoeinstellungen`
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @returns {string}
|
|
56
|
+
*/
|
|
57
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
58
|
+
export const text_logout = () => `Abmelden`
|
|
@@ -2,3 +2,5 @@ export function text_select_language(): string;
|
|
|
2
2
|
export function text_unit_converter(): string;
|
|
3
3
|
export function text_calces_scientific_calculator(): string;
|
|
4
4
|
export function text_calces_documentation(): string;
|
|
5
|
+
export function text_account_settings(): string;
|
|
6
|
+
export function text_logout(): string;
|
|
@@ -40,3 +40,19 @@ export const text_calces_scientific_calculator = () => `CalcES Scientific Calcul
|
|
|
40
40
|
*/
|
|
41
41
|
/* @__NO_SIDE_EFFECTS__ */
|
|
42
42
|
export const text_calces_documentation = () => `CalcES Documentation`
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @returns {string}
|
|
48
|
+
*/
|
|
49
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
50
|
+
export const text_account_settings = () => `Account Settings`
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @returns {string}
|
|
56
|
+
*/
|
|
57
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
58
|
+
export const text_logout = () => `Logout`
|
|
@@ -2,3 +2,5 @@ export function text_select_language(): string;
|
|
|
2
2
|
export function text_unit_converter(): string;
|
|
3
3
|
export function text_calces_scientific_calculator(): string;
|
|
4
4
|
export function text_calces_documentation(): string;
|
|
5
|
+
export function text_account_settings(): string;
|
|
6
|
+
export function text_logout(): string;
|
|
@@ -40,3 +40,19 @@ export const text_calces_scientific_calculator = () => `Calculadora Científica`
|
|
|
40
40
|
*/
|
|
41
41
|
/* @__NO_SIDE_EFFECTS__ */
|
|
42
42
|
export const text_calces_documentation = () => `Documentación de CalcES`
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @returns {string}
|
|
48
|
+
*/
|
|
49
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
50
|
+
export const text_account_settings = () => `Configuración de la cuenta`
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @returns {string}
|
|
56
|
+
*/
|
|
57
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
58
|
+
export const text_logout = () => `Cerrar sesión`
|
|
@@ -2,3 +2,5 @@ export function text_select_language(): string;
|
|
|
2
2
|
export function text_unit_converter(): string;
|
|
3
3
|
export function text_calces_scientific_calculator(): string;
|
|
4
4
|
export function text_calces_documentation(): string;
|
|
5
|
+
export function text_account_settings(): string;
|
|
6
|
+
export function text_logout(): string;
|
|
@@ -40,3 +40,19 @@ export const text_calces_scientific_calculator = () => `Calculatrice Scientifiqu
|
|
|
40
40
|
*/
|
|
41
41
|
/* @__NO_SIDE_EFFECTS__ */
|
|
42
42
|
export const text_calces_documentation = () => `Documentation de CalcES`
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @returns {string}
|
|
48
|
+
*/
|
|
49
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
50
|
+
export const text_account_settings = () => `Paramètres du compte`
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @returns {string}
|
|
56
|
+
*/
|
|
57
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
58
|
+
export const text_logout = () => `Déconnexion`
|
|
@@ -2,3 +2,5 @@ export function text_select_language(): string;
|
|
|
2
2
|
export function text_unit_converter(): string;
|
|
3
3
|
export function text_calces_scientific_calculator(): string;
|
|
4
4
|
export function text_calces_documentation(): string;
|
|
5
|
+
export function text_account_settings(): string;
|
|
6
|
+
export function text_logout(): string;
|
|
@@ -40,3 +40,19 @@ export const text_calces_scientific_calculator = () => `Calcolatrice Scientifica
|
|
|
40
40
|
*/
|
|
41
41
|
/* @__NO_SIDE_EFFECTS__ */
|
|
42
42
|
export const text_calces_documentation = () => `Documentazione di CalcES`
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @returns {string}
|
|
48
|
+
*/
|
|
49
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
50
|
+
export const text_account_settings = () => `Impostazioni dell'account`
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @returns {string}
|
|
56
|
+
*/
|
|
57
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
58
|
+
export const text_logout = () => `Disconnettersi`
|
|
@@ -2,3 +2,5 @@ export function text_select_language(): string;
|
|
|
2
2
|
export function text_unit_converter(): string;
|
|
3
3
|
export function text_calces_scientific_calculator(): string;
|
|
4
4
|
export function text_calces_documentation(): string;
|
|
5
|
+
export function text_account_settings(): string;
|
|
6
|
+
export function text_logout(): string;
|
|
@@ -40,3 +40,19 @@ export const text_calces_scientific_calculator = () => `Calculadora Científica`
|
|
|
40
40
|
*/
|
|
41
41
|
/* @__NO_SIDE_EFFECTS__ */
|
|
42
42
|
export const text_calces_documentation = () => `Documentação CalcES`
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @returns {string}
|
|
48
|
+
*/
|
|
49
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
50
|
+
export const text_account_settings = () => `Configurações da conta`
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @returns {string}
|
|
56
|
+
*/
|
|
57
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
58
|
+
export const text_logout = () => `Sair`
|
|
@@ -2,3 +2,5 @@ export function text_select_language(): string;
|
|
|
2
2
|
export function text_unit_converter(): string;
|
|
3
3
|
export function text_calces_scientific_calculator(): string;
|
|
4
4
|
export function text_calces_documentation(): string;
|
|
5
|
+
export function text_account_settings(): string;
|
|
6
|
+
export function text_logout(): string;
|
|
@@ -40,3 +40,19 @@ export const text_calces_scientific_calculator = () => `Научный каль
|
|
|
40
40
|
*/
|
|
41
41
|
/* @__NO_SIDE_EFFECTS__ */
|
|
42
42
|
export const text_calces_documentation = () => `Документация CalcES`
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @returns {string}
|
|
48
|
+
*/
|
|
49
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
50
|
+
export const text_account_settings = () => `Настройки аккаунта`
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @returns {string}
|
|
56
|
+
*/
|
|
57
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
58
|
+
export const text_logout = () => `Выйти`
|
|
@@ -2,3 +2,5 @@ export function text_select_language(): string;
|
|
|
2
2
|
export function text_unit_converter(): string;
|
|
3
3
|
export function text_calces_scientific_calculator(): string;
|
|
4
4
|
export function text_calces_documentation(): string;
|
|
5
|
+
export function text_account_settings(): string;
|
|
6
|
+
export function text_logout(): string;
|
|
@@ -40,3 +40,19 @@ export const text_calces_scientific_calculator = () => `Máy Tính Khoa Học`
|
|
|
40
40
|
*/
|
|
41
41
|
/* @__NO_SIDE_EFFECTS__ */
|
|
42
42
|
export const text_calces_documentation = () => `Tài Liệu CalcES`
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @returns {string}
|
|
48
|
+
*/
|
|
49
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
50
|
+
export const text_account_settings = () => `Cài đặt tài khoản`
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @returns {string}
|
|
56
|
+
*/
|
|
57
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
58
|
+
export const text_logout = () => `Đăng xuất`
|
|
@@ -10,3 +10,9 @@ export function text_calces_scientific_calculator(params?: {}, options?: {
|
|
|
10
10
|
export function text_calces_documentation(params?: {}, options?: {
|
|
11
11
|
languageTag?: "de" | "en" | "es" | "fr" | "pt" | "vi" | "ru" | "it";
|
|
12
12
|
}): string;
|
|
13
|
+
export function text_account_settings(params?: {}, options?: {
|
|
14
|
+
languageTag?: "de" | "en" | "es" | "fr" | "pt" | "vi" | "ru" | "it";
|
|
15
|
+
}): string;
|
|
16
|
+
export function text_logout(params?: {}, options?: {
|
|
17
|
+
languageTag?: "de" | "en" | "es" | "fr" | "pt" | "vi" | "ru" | "it";
|
|
18
|
+
}): string;
|
|
@@ -120,3 +120,59 @@ export const text_calces_documentation = (params = {}, options = {}) => {
|
|
|
120
120
|
}[options.languageTag ?? languageTag()]()
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* This message has been compiled by [inlang paraglide](https://inlang.com/m/gerre34r/library-inlang-paraglideJs).
|
|
127
|
+
*
|
|
128
|
+
* - Don't edit the message's code. Use [Sherlock (VS Code extension)](https://inlang.com/m/r7kp499g/app-inlang-ideExtension),
|
|
129
|
+
* the [web editor](https://inlang.com/m/tdozzpar/app-inlang-finkLocalizationEditor) instead, or edit the translation files manually.
|
|
130
|
+
*
|
|
131
|
+
* - The params are NonNullable<unknown> because the inlang SDK does not provide information on the type of a param (yet).
|
|
132
|
+
*
|
|
133
|
+
* @param {{}} params
|
|
134
|
+
* @param {{ languageTag?: "de" | "en" | "es" | "fr" | "pt" | "vi" | "ru" | "it" }} options
|
|
135
|
+
* @returns {string}
|
|
136
|
+
*/
|
|
137
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
138
|
+
export const text_account_settings = (params = {}, options = {}) => {
|
|
139
|
+
return {
|
|
140
|
+
de: de.text_account_settings,
|
|
141
|
+
en: en.text_account_settings,
|
|
142
|
+
es: es.text_account_settings,
|
|
143
|
+
fr: fr.text_account_settings,
|
|
144
|
+
it: it.text_account_settings,
|
|
145
|
+
pt: pt.text_account_settings,
|
|
146
|
+
ru: ru.text_account_settings,
|
|
147
|
+
vi: vi.text_account_settings
|
|
148
|
+
}[options.languageTag ?? languageTag()]()
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* This message has been compiled by [inlang paraglide](https://inlang.com/m/gerre34r/library-inlang-paraglideJs).
|
|
155
|
+
*
|
|
156
|
+
* - Don't edit the message's code. Use [Sherlock (VS Code extension)](https://inlang.com/m/r7kp499g/app-inlang-ideExtension),
|
|
157
|
+
* the [web editor](https://inlang.com/m/tdozzpar/app-inlang-finkLocalizationEditor) instead, or edit the translation files manually.
|
|
158
|
+
*
|
|
159
|
+
* - The params are NonNullable<unknown> because the inlang SDK does not provide information on the type of a param (yet).
|
|
160
|
+
*
|
|
161
|
+
* @param {{}} params
|
|
162
|
+
* @param {{ languageTag?: "de" | "en" | "es" | "fr" | "pt" | "vi" | "ru" | "it" }} options
|
|
163
|
+
* @returns {string}
|
|
164
|
+
*/
|
|
165
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
166
|
+
export const text_logout = (params = {}, options = {}) => {
|
|
167
|
+
return {
|
|
168
|
+
de: de.text_logout,
|
|
169
|
+
en: en.text_logout,
|
|
170
|
+
es: es.text_logout,
|
|
171
|
+
fr: fr.text_logout,
|
|
172
|
+
it: it.text_logout,
|
|
173
|
+
pt: pt.text_logout,
|
|
174
|
+
ru: ru.text_logout,
|
|
175
|
+
vi: vi.text_logout
|
|
176
|
+
}[options.languageTag ?? languageTag()]()
|
|
177
|
+
}
|
|
178
|
+
|