diff --git a/app.dx b/app.dx index a5ff85a..d8f24f1 100644 --- a/app.dx +++ b/app.dx @@ -1,5 +1,5 @@ name: "Localization Example", -icon: "https://cdn.unyt.org/unyt-resources/logos/unyt/square-dark-background.png"; +icon: https://cdn.unyt.org/unyt-resources/logos/unyt/square-dark-background.png; plugin git_deploy ( prod: ( diff --git a/backend/entrypoint.tsx b/backend/entrypoint.tsx index 1de0761..067b018 100644 --- a/backend/entrypoint.tsx +++ b/backend/entrypoint.tsx @@ -5,6 +5,5 @@ import { renderBackend, renderHybrid, renderStatic } from "uix/base/render-metho export default { '/': null, '/static': () => renderStatic(
), - '/backend': () => renderBackend(
), '/hybrid': () => renderHybrid(
), } satisfies Entrypoint; \ No newline at end of file diff --git a/common/components/Main.tsx b/common/components/Main.tsx index f070dc4..446f186 100644 --- a/common/components/Main.tsx +++ b/common/components/Main.tsx @@ -1,7 +1,8 @@ +import { UIX } from "uix"; +import { include } from "uix/base/decorators.ts"; import { Component } from "uix/components/Component.ts"; import { template } from "uix/html/template.ts"; import { always, Datex } from "unyt_core/datex.ts"; -import { use } from "uix/base/decorators.ts"; const languages = { "en": "🇺🇸", @@ -15,7 +16,7 @@ const languages = { { Object.entries(languages).map(([lang, flag]) =>
use(lang) && Datex.Runtime.ENV.LANG === lang)} + data-active={always(() => Datex.Runtime.ENV.LANG === lang)} onclick:frontend={() => use(lang) && (Datex.Runtime.ENV.LANG = lang)} class="toggle"> {flag}
@@ -25,5 +26,5 @@ const languages = { }) export class Main extends Component { - @use("../data.dx") declare strings: {[key: string]: string}; + @include("../data.dx") declare strings: {[key: string]: string}; } \ No newline at end of file