From f81a89adc9bf8cb1c4b833e3a51b05e1109b0d45 Mon Sep 17 00:00:00 2001 From: Ap_Tx <3045929398@qq.com> Date: Sun, 13 Sep 2026 18:16:18 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E7=A5=9E=E7=A7=98=E5=BD=A9?= =?UTF-8?q?=E8=9B=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app-frontend/src/announcements/catalog.ts | 62 ++++++++++++++++ .../components/ui/settings/AboutSettings.vue | 7 ++ tools/icon_work/add_announcement.py | 74 +++++++++++++++++++ tools/icon_work/add_yuanshen.py | 40 ++++++++++ tools/icon_work/release_notes_test.md | 49 ++++++++++++ 5 files changed, 232 insertions(+) create mode 100644 tools/icon_work/add_announcement.py create mode 100644 tools/icon_work/add_yuanshen.py create mode 100644 tools/icon_work/release_notes_test.md diff --git a/apps/app-frontend/src/announcements/catalog.ts b/apps/app-frontend/src/announcements/catalog.ts index d2801be..bd210ef 100644 --- a/apps/app-frontend/src/announcements/catalog.ts +++ b/apps/app-frontend/src/announcements/catalog.ts @@ -32,6 +32,68 @@ export const ANNOUNCEMENT_CHANGE_TYPES: readonly AnnouncementChangeType[] = [ ] export const launcherAnnouncements: readonly LauncherAnnouncement[] = [ + { + id: 'launcher-1.0.0-beta1', + version: '1.0.0-beta1', + publishedAt: '2026-09-13', + title: { + 'en-US': 'Starlight Launcher 1.0.0-beta1', + 'zh-CN': 'Starlight Launcher 1.0.0-beta1', + }, + changes: { + changed: [ + { + 'en-US': + 'The launcher has been rebranded from Axolotl Launcher to Starlight Launcher, with a new icon and a refreshed about page.', + 'zh-CN': '启动器已从 Axolotl Launcher 更名为 Starlight Launcher,并更换了全新图标与关于页。', + }, + { + 'en-US': + 'The "Powered by" and copyright notices now correctly credit Axolotl Launcher as the upstream project.', + 'zh-CN': '版权与 "Powered by" 署名现在正确标注上游项目 Axolotl Launcher。', + }, + { + 'en-US': 'The developer list on the about page now shows Ax_Tps and Disy920.', + 'zh-CN': '关于页的开发组现在显示 Ax_Tps 与 Disy920。', + }, + ], + added: [ + { + 'en-US': 'A "Starlight" entry was added to the sidebar, which embeds the StarLight skin site.', + 'zh-CN': '侧边栏新增「斯达莱特」入口,内嵌 StarLight 皮肤站。', + }, + { + 'en-US': + 'A launch progress panel was added to the home sidebar, showing the current launch stage and progress.', + 'zh-CN': '主页侧边栏新增启动进度面板,显示当前启动阶段与进度。', + }, + { + 'en-US': + 'An easter egg mini-game (star merge) was added, reachable via the secret code "starlight", the Konami code, or a long press on a developer name on the about page.', + 'zh-CN': + '新增彩蛋小游戏(下界之星合成),可通过暗号 starlight、Konami 秘技或长按关于页开发者名字触发。', + }, + ], + removed: [ + { + 'en-US': + 'The hard-coded Starlight official server was removed from "Pinned servers"; only servers you favorite yourself are shown now.', + 'zh-CN': '移除了「固定的服务器」中写死的 Starlight 官方服务器,现在只显示你自己收藏的服务器。', + }, + { + 'en-US': 'The swimming axolotl animation on the about page was replaced with a static nether star.', + 'zh-CN': '关于页中游动的美西螈动画已替换为静止的下界之星。', + }, + ], + fixed: [ + { + 'en-US': + 'Minecraft now launches in a maximized window when the maximize option is enabled.', + 'zh-CN': '启用最大化选项后,Minecraft 现在会以最大化窗口启动。', + }, + ], + }, + }, { id: 'launcher-1.9.6-beta.3', version: '1.9.6-beta.3', diff --git a/apps/app-frontend/src/components/ui/settings/AboutSettings.vue b/apps/app-frontend/src/components/ui/settings/AboutSettings.vue index 152a02a..e8845dc 100644 --- a/apps/app-frontend/src/components/ui/settings/AboutSettings.vue +++ b/apps/app-frontend/src/components/ui/settings/AboutSettings.vue @@ -8,6 +8,7 @@ import { } from '@modrinth/assets' import { Avatar, defineMessages, NewButton as Button, useVIntl } from '@modrinth/ui' import { getVersion } from '@tauri-apps/api/app' +import { openUrl } from '@tauri-apps/plugin-opener' import { inject, nextTick, onScopeDispose, ref, shallowRef } from 'vue' import EasterEggContributorsModal from '@/components/ui/easteregg/EasterEggContributorsModal.vue' import EasterEggGameModal from '@/components/ui/easteregg/EasterEggGameModal.vue' @@ -80,6 +81,7 @@ const contributorsModal = ref | let typedBuffer = '' const secretCodes = ['starlight'] +const YUANSHEN_URL = 'https://ys.mihoyo.com/cloud/' const konamiSequence = [ 'ArrowUp', @@ -101,6 +103,11 @@ function handleEasterEggKeydown(event: KeyboardEvent) { if (typedBuffer.length > maxCodeLen) { typedBuffer = typedBuffer.slice(-maxCodeLen) } + if (typedBuffer.endsWith('yuanshen')) { + typedBuffer = '' + openUrl(YUANSHEN_URL).catch(() => {}) + return + } if (secretCodes.some((code) => typedBuffer.endsWith(code))) { typedBuffer = '' gameModal.value?.show() diff --git a/tools/icon_work/add_announcement.py b/tools/icon_work/add_announcement.py new file mode 100644 index 0000000..121c04f --- /dev/null +++ b/tools/icon_work/add_announcement.py @@ -0,0 +1,74 @@ + +p = r"D:\Project\Starlight_Lancher\apps\app-frontend\src\announcements\catalog.ts" +t = open(p, encoding="utf-8").read() + +entry = """ { + id: 'launcher-1.0.0-beta1', + version: '1.0.0-beta1', + publishedAt: '2026-09-13', + title: { + 'en-US': 'Starlight Launcher 1.0.0-beta1', + 'zh-CN': 'Starlight Launcher 1.0.0-beta1', + }, + changes: { + changed: [ + { + 'en-US': + 'The launcher has been rebranded from Axolotl Launcher to Starlight Launcher, with a new icon and a refreshed about page.', + 'zh-CN': '启动器已从 Axolotl Launcher 更名为 Starlight Launcher,并更换了全新图标与关于页。', + }, + { + 'en-US': + 'The "Powered by" and copyright notices now correctly credit Axolotl Launcher as the upstream project.', + 'zh-CN': '版权与 "Powered by" 署名现在正确标注上游项目 Axolotl Launcher。', + }, + { + 'en-US': 'The developer list on the about page now shows Ax_Tps and Disy920.', + 'zh-CN': '关于页的开发组现在显示 Ax_Tps 与 Disy920。', + }, + ], + added: [ + { + 'en-US': 'A "Starlight" entry was added to the sidebar, which embeds the StarLight skin site.', + 'zh-CN': '侧边栏新增「斯达莱特」入口,内嵌 StarLight 皮肤站。', + }, + { + 'en-US': + 'A launch progress panel was added to the home sidebar, showing the current launch stage and progress.', + 'zh-CN': '主页侧边栏新增启动进度面板,显示当前启动阶段与进度。', + }, + { + 'en-US': + 'An easter egg mini-game (star merge) was added, reachable via the secret code "starlight", the Konami code, or a long press on a developer name on the about page.', + 'zh-CN': + '新增彩蛋小游戏(下界之星合成),可通过暗号 starlight、Konami 秘技或长按关于页开发者名字触发。', + }, + ], + removed: [ + { + 'en-US': + 'The hard-coded Starlight official server was removed from "Pinned servers"; only servers you favorite yourself are shown now.', + 'zh-CN': '移除了「固定的服务器」中写死的 Starlight 官方服务器,现在只显示你自己收藏的服务器。', + }, + { + 'en-US': 'The swimming axolotl animation on the about page was replaced with a static nether star.', + 'zh-CN': '关于页中游动的美西螈动画已替换为静止的下界之星。', + }, + ], + fixed: [ + { + 'en-US': + 'Minecraft now launches in a maximized window when the maximize option is enabled.', + 'zh-CN': '启用最大化选项后,Minecraft 现在会以最大化窗口启动。', + }, + ], + }, + }, +""" + +anchor = "export const launcherAnnouncements: readonly LauncherAnnouncement[] = [\n" +assert anchor in t, "找不到数组开头" +t = t.replace(anchor, anchor + entry, 1) + +open(p, "w", encoding="utf-8", newline="\n").write(t) +print("done") diff --git a/tools/icon_work/add_yuanshen.py b/tools/icon_work/add_yuanshen.py new file mode 100644 index 0000000..2ff9c1e --- /dev/null +++ b/tools/icon_work/add_yuanshen.py @@ -0,0 +1,40 @@ +p = r"D:\Project\Starlight_Lancher\apps\app-frontend\src\components\ui\settings\AboutSettings.vue" +t = open(p, encoding="utf-8").read() + +# 1) import openUrl +old_imp = "import { getVersion } from '@tauri-apps/api/app'" +new_imp = "import { getVersion } from '@tauri-apps/api/app'\nimport { openUrl } from '@tauri-apps/plugin-opener'" +assert old_imp in t, "getVersion import 找不到" +t = t.replace(old_imp, new_imp, 1) + +# 2) 暗号逻辑:区分 starlight(游戏)与 yuanshen(开链接) +old_logic = """let typedBuffer = '' +const secretCodes = ['starlight']""" +new_logic = """let typedBuffer = '' +const secretCodes = ['starlight'] +const YUANSHEN_URL = 'https://ys.mihoyo.com/cloud/'""" +assert old_logic in t, "secretCodes 找不到" +t = t.replace(old_logic, new_logic, 1) + +old_check = """ if (secretCodes.some((code) => typedBuffer.endsWith(code))) { + typedBuffer = '' + gameModal.value?.show() + return + }""" +new_check = """ if (typedBuffer.endsWith('yuanshen')) { + typedBuffer = '' + openUrl(YUANSHEN_URL).catch(() => {}) + return + } + if (secretCodes.some((code) => typedBuffer.endsWith(code))) { + typedBuffer = '' + gameModal.value?.show() + return + }""" +assert old_check in t, "暗号判断块找不到" +t = t.replace(old_check, new_check, 1) + +open(p, "w", encoding="utf-8", newline="\n").write(t) +print("done") +print(" 含 openUrl import:", "plugin-opener" in t) +print(" 含 yuanshen:", "yuanshen" in t) \ No newline at end of file diff --git a/tools/icon_work/release_notes_test.md b/tools/icon_work/release_notes_test.md new file mode 100644 index 0000000..888a6a4 --- /dev/null +++ b/tools/icon_work/release_notes_test.md @@ -0,0 +1,49 @@ +# Starlight Launcher 1.0.0-beta1 + +发布日期 / Published: 2026-09-13 + +## 中文 + +### 新增 + +- 侧边栏新增「斯达莱特」入口,内嵌 StarLight 皮肤站。 +- 主页侧边栏新增启动进度面板,显示当前启动阶段与进度。 +- 新增彩蛋小游戏(下界之星合成),可通过暗号 starlight、Konami 秘技或长按关于页开发者名字触发。 + +### 变更 + +- 启动器已从 Axolotl Launcher 更名为 Starlight Launcher,并更换了全新图标与关于页。 +- 版权与 "Powered by" 署名现在正确标注上游项目 Axolotl Launcher。 +- 关于页的开发组现在显示 Ax_Tps 与 Disy920。 + +### 移除 + +- 移除了「固定的服务器」中写死的 Starlight 官方服务器,现在只显示你自己收藏的服务器。 +- 关于页中游动的美西螈动画已替换为静止的下界之星。 + +### Bug 修复 + +- 启用最大化选项后,Minecraft 现在会以最大化窗口启动。 + +## English + +### Added + +- A "Starlight" entry was added to the sidebar, which embeds the StarLight skin site. +- A launch progress panel was added to the home sidebar, showing the current launch stage and progress. +- An easter egg mini-game (star merge) was added, reachable via the secret code "starlight", the Konami code, or a long press on a developer name on the about page. + +### Changed + +- The launcher has been rebranded from Axolotl Launcher to Starlight Launcher, with a new icon and a refreshed about page. +- The "Powered by" and copyright notices now correctly credit Axolotl Launcher as the upstream project. +- The developer list on the about page now shows Ax_Tps and Disy920. + +### Removed + +- The hard-coded Starlight official server was removed from "Pinned servers"; only servers you favorite yourself are shown now. +- The swimming axolotl animation on the about page was replaced with a static nether star. + +### Fixed + +- Minecraft now launches in a maximized window when the maximize option is enabled.