From e1aeaf1217b6061b4212b87c9fd421984f73e437 Mon Sep 17 00:00:00 2001 From: Nayam Amarshe <25067102+NayamAmarshe@users.noreply.github.com> Date: Wed, 25 Dec 2024 21:35:13 +0530 Subject: [PATCH] Bump version to 2.15.1 and update build version to 25.12.25; refactor LanguageSwitcher and OnboardingDialog for improved locale handling --- mas.json | 2 +- package.json | 2 +- .../components/main-content/onboarding-dialog.tsx | 9 ++++++--- .../sidebar/settings-tab/language-switcher.tsx | 5 +++-- .../models/{hfa2k-4x.bin => high-fidelity-4x.bin} | Bin .../{hfa2k-4x.param => high-fidelity-4x.param} | 0 6 files changed, 11 insertions(+), 7 deletions(-) rename resources/models/{hfa2k-4x.bin => high-fidelity-4x.bin} (100%) rename resources/models/{hfa2k-4x.param => high-fidelity-4x.param} (100%) diff --git a/mas.json b/mas.json index b90846e..3fdb7d5 100644 --- a/mas.json +++ b/mas.json @@ -2,7 +2,7 @@ "productName": "Upscayl", "appId": "org.upscayl.Upscayl", "afterSign": "./notarize.js", - "buildVersion": "25.06.01", + "buildVersion": "25.12.25", "asar": true, "asarUnpack": ["**/node_modules/sharp/**/*", "**/node_modules/@img/**/*"], "extraFiles": [ diff --git a/package.json b/package.json index f339a85..a451669 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "upscayl", "private": true, - "version": "2.15.0", + "version": "2.15.1", "productName": "Upscayl", "author": { "name": "Nayam Amarshe", diff --git a/renderer/components/main-content/onboarding-dialog.tsx b/renderer/components/main-content/onboarding-dialog.tsx index 54c72f5..96080c3 100644 --- a/renderer/components/main-content/onboarding-dialog.tsx +++ b/renderer/components/main-content/onboarding-dialog.tsx @@ -13,9 +13,10 @@ import { autoUpdateAtom, enableContributionAtom, } from "@/atoms/user-settings-atom"; -import { useAtom } from "jotai"; +import { useAtom, useAtomValue } from "jotai"; import useTranslation from "../hooks/use-translation"; import LanguageSwitcher from "../sidebar/settings-tab/language-switcher"; +import { localeAtom } from "@/atoms/translations-atom"; type OnboardingStep = { title: string; @@ -36,6 +37,7 @@ export function OnboardingDialog() { const [currentStep, setCurrentStep] = useState(0); const [settings, setSettings] = useState>({}); + const locale = useAtomValue(localeAtom); const [open, setOpen] = useState(false); @@ -97,7 +99,7 @@ export function OnboardingDialog() { type: "info", }, ], - [], + [locale], ); const currentStepData = onboardingSteps[currentStep]; @@ -152,7 +154,8 @@ export function OnboardingDialog() { className={cn( "flex h-full w-full flex-col rounded-sm bg-primary p-8", "h-auto w-auto gap-8", - currentStepData.configurationOptions[0].type === "video" && "p-0", + currentStepData.configurationOptions[0].type === "video" && + "h-full w-full gap-0 p-0", )} > {currentStepData.configurationOptions.map((option) => ( diff --git a/renderer/components/sidebar/settings-tab/language-switcher.tsx b/renderer/components/sidebar/settings-tab/language-switcher.tsx index 15dfb14..a0449be 100644 --- a/renderer/components/sidebar/settings-tab/language-switcher.tsx +++ b/renderer/components/sidebar/settings-tab/language-switcher.tsx @@ -1,5 +1,5 @@ import { localeAtom, translationAtom } from "@/atoms/translations-atom"; -import { useAtomValue, useSetAtom } from "jotai"; +import { useAtom, useAtomValue, useSetAtom } from "jotai"; const locales = { en: "English", @@ -14,7 +14,7 @@ const locales = { }; const LanguageSwitcher = ({ hideLabel = false }: { hideLabel?: boolean }) => { - const setLocale = useSetAtom(localeAtom); + const [locale, setLocale] = useAtom(localeAtom); const t = useAtomValue(translationAtom); return ( @@ -26,6 +26,7 @@ const LanguageSwitcher = ({ hideLabel = false }: { hideLabel?: boolean }) => {