From a477b1fb9a1a9621217fb229b0fd5dd6c29e6a20 Mon Sep 17 00:00:00 2001 From: Disy Date: Sat, 19 Sep 2026 18:14:41 +0800 Subject: [PATCH] feat: integrate StarLight updates and improve font settings and skin editor loading --- .github/workflows/axolotl-release.yml | 11 +- .../ui/settings/DefaultInstanceSettings.vue | 27 ++++ .../components/ui/settings/UpdateSettings.vue | 4 +- .../ui/settings/settings-search-index.ts | 10 ++ .../ui/settings/settings-search.test.ts | 22 +++ apps/app-frontend/src/helpers/settings.ts | 2 + .../app-frontend/src/locales/en-US/index.json | 9 ++ .../app-frontend/src/locales/zh-CN/index.json | 9 ++ .../app-frontend/src/locales/zh-TW/index.json | 6 + apps/app-frontend/src/pages/LabSkinEditor.vue | 58 +++++-- apps/app/capabilities/plugins.json | 2 +- apps/app/src/main.rs | 106 ++++++++++++- apps/app/src/skin_editor_bridge.js | 32 ++++ apps/app/src/updater_impl.rs | 54 +++++-- apps/app/tauri-release.conf.json | 2 +- apps/app/tauri.conf.json | 4 +- .../20260919000000_force-unicode-font.sql | 1 + packages/app-lib/src/launcher/language.rs | 145 +++++++++++++----- packages/app-lib/src/launcher/mod.rs | 2 + packages/app-lib/src/state/settings.rs | 65 ++++++++ scripts/axolotl/create-update-manifest.mjs | 31 ++++ .../axolotl/create-update-manifest.test.mjs | 70 +++++++++ scripts/axolotl/skin-editor-bridge.test.mjs | 49 ++++++ scripts/axolotl/verify-update-manifest.mjs | 18 +++ 24 files changed, 665 insertions(+), 74 deletions(-) create mode 100644 apps/app/src/skin_editor_bridge.js create mode 100644 packages/app-lib/migrations/20260919000000_force-unicode-font.sql create mode 100644 scripts/axolotl/create-update-manifest.test.mjs create mode 100644 scripts/axolotl/skin-editor-bridge.test.mjs diff --git a/.github/workflows/axolotl-release.yml b/.github/workflows/axolotl-release.yml index 97e44d4..3709c38 100644 --- a/.github/workflows/axolotl-release.yml +++ b/.github/workflows/axolotl-release.yml @@ -198,7 +198,7 @@ jobs: shell: pwsh run: | $version = "${{ github.ref_name }}" -replace '^v', '' - $appName = "Axolotl Launcher" + $appName = (Get-Content apps/app/tauri.conf.json -Raw | ConvertFrom-Json).mainBinaryName $outDir = "target/release/bundle/nsis" $buildDir = "target/portable-build" $publishDir = Join-Path $env:RUNNER_TEMP "windows-assets" @@ -249,6 +249,15 @@ jobs: New-Item -ItemType Directory -Force -Path "$buildDir\Axolotl" | Out-Null Copy-Item -Force $appExe "$buildDir\Axolotl\" + $editorResources = "target/release/resources/blockbench-skin" + foreach ($requiredFile in @('index.html', 'css/setup.css', 'dist/skin.bundle.js.gz')) { + if (!(Test-Path -LiteralPath (Join-Path $editorResources $requiredFile) -PathType Leaf)) { + throw "Missing skin editor resource: $requiredFile" + } + } + New-Item -ItemType Directory -Force -Path "$buildDir\Axolotl\resources" | Out-Null + Copy-Item -LiteralPath $editorResources -Destination "$buildDir\Axolotl\resources" -Recurse -Force + # Create empty .Axolotl folder to trigger portable mode New-Item -ItemType Directory -Force -Path "$buildDir\Axolotl\.Axolotl" | Out-Null diff --git a/apps/app-frontend/src/components/ui/settings/DefaultInstanceSettings.vue b/apps/app-frontend/src/components/ui/settings/DefaultInstanceSettings.vue index 3baebd7..fc73d9c 100644 --- a/apps/app-frontend/src/components/ui/settings/DefaultInstanceSettings.vue +++ b/apps/app-frontend/src/components/ui/settings/DefaultInstanceSettings.vue @@ -12,6 +12,15 @@ import SettingsSection from './SettingsSection.vue' const { formatMessage } = useVIntl() const messages = defineMessages({ + forceUnicodeFont: { + id: 'app.settings.defaults.force-unicode-font', + defaultMessage: 'Force Unicode font', + }, + forceUnicodeFontDescription: { + id: 'app.settings.defaults.force-unicode-font-description', + defaultMessage: + 'Use the Unicode font when initializing a new instance. Off by default; existing font settings are preserved.', + }, fullscreen: { id: 'app.settings.defaults.fullscreen', defaultMessage: 'Fullscreen' }, fullscreenDescription: { id: 'app.settings.defaults.fullscreen-description', @@ -205,6 +214,24 @@ watch( + + + + + + + +