Compare commits
2 Commits
71a8e65085
...
8e9b0894ba
| Author | SHA1 | Date | |
|---|---|---|---|
| 8e9b0894ba | |||
| f81a89adc9 |
@ -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',
|
||||
|
||||
@ -225,12 +225,21 @@ const breadcrumbs = computed<Breadcrumb[]>(() => {
|
||||
function resolveLabel(name: string): string {
|
||||
return resolveBreadcrumbLabel(
|
||||
name,
|
||||
(key) => breadcrumbData.getName(key),
|
||||
(key) => breadcrumbData.getName(key) || fallbackDynamicLabel(key),
|
||||
staticLabels,
|
||||
(message) => formatMessage(message),
|
||||
)
|
||||
}
|
||||
|
||||
// 动态面包屑(?Xxx)在页面异步 setName 之前,回退到静态标签,避免图标与文字不同步
|
||||
function fallbackDynamicLabel(key: string): string {
|
||||
const fallback: Record<string, keyof typeof staticLabels> = {
|
||||
BrowseTitle: 'Discover content',
|
||||
}
|
||||
const staticKey = fallback[key]
|
||||
return staticKey ? formatMessage(staticLabels[staticKey]) : ''
|
||||
}
|
||||
|
||||
function resolveIcon(breadcrumb: Breadcrumb): Component | undefined {
|
||||
if (breadcrumb.iconUrl || breadcrumbData.getIcon(breadcrumb.name.slice(1))) return undefined
|
||||
const dynamicIcons: Record<string, Component> = {
|
||||
|
||||
@ -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<InstanceType<typeof EasterEggContributorsModal> |
|
||||
|
||||
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()
|
||||
|
||||
74
tools/icon_work/add_announcement.py
Normal file
74
tools/icon_work/add_announcement.py
Normal file
@ -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")
|
||||
40
tools/icon_work/add_yuanshen.py
Normal file
40
tools/icon_work/add_yuanshen.py
Normal file
@ -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)
|
||||
13
tools/icon_work/chk_alpha.py
Normal file
13
tools/icon_work/chk_alpha.py
Normal file
@ -0,0 +1,13 @@
|
||||
from PIL import Image
|
||||
im = Image.open(r"C:\Users\28579\Downloads\resources\resources\netherstar.png")
|
||||
print("模式:", im.mode)
|
||||
print("尺寸:", im.size)
|
||||
print("有 alpha:", im.mode in ("RGBA", "LA"))
|
||||
if im.mode in ("RGBA", "LA"):
|
||||
a = im.getchannel("A")
|
||||
print("alpha bbox:", a.getbbox())
|
||||
print("alpha 范围:", a.getextrema())
|
||||
# 采样角落像素,看是不是白/透明
|
||||
w, h = im.size
|
||||
print("左上角:", im.getpixel((0, 0)))
|
||||
print("中心:", im.getpixel((w // 2, h // 2)))
|
||||
33
tools/icon_work/fix_bc_label.py
Normal file
33
tools/icon_work/fix_bc_label.py
Normal file
@ -0,0 +1,33 @@
|
||||
p = r"D:\Project\Starlight_Lancher\apps\app-frontend\src\components\ui\Breadcrumbs.vue"
|
||||
t = open(p, encoding="utf-8").read()
|
||||
|
||||
old = """function resolveLabel(name: string): string {
|
||||
return resolveBreadcrumbLabel(
|
||||
name,
|
||||
(key) => breadcrumbData.getName(key),
|
||||
staticLabels,
|
||||
(message) => formatMessage(message),
|
||||
)
|
||||
}"""
|
||||
new = """function resolveLabel(name: string): string {
|
||||
return resolveBreadcrumbLabel(
|
||||
name,
|
||||
(key) => breadcrumbData.getName(key) || fallbackDynamicLabel(key),
|
||||
staticLabels,
|
||||
(message) => formatMessage(message),
|
||||
)
|
||||
}
|
||||
|
||||
// 动态面包屑(?Xxx)在页面异步 setName 之前,回退到静态标签,避免图标与文字不同步
|
||||
function fallbackDynamicLabel(key: string): string {
|
||||
const fallback: Record<string, keyof typeof staticLabels> = {
|
||||
BrowseTitle: 'Discover content',
|
||||
}
|
||||
const staticKey = fallback[key]
|
||||
return staticKey ? formatMessage(staticLabels[staticKey]) : ''
|
||||
}"""
|
||||
|
||||
assert old in t, "resolveLabel 找不到"
|
||||
t = t.replace(old, new, 1)
|
||||
open(p, "w", encoding="utf-8", newline="\n").write(t)
|
||||
print("done")
|
||||
32
tools/icon_work/fix_star_png.py
Normal file
32
tools/icon_work/fix_star_png.py
Normal file
@ -0,0 +1,32 @@
|
||||
from PIL import Image
|
||||
import numpy as np
|
||||
from scipy import ndimage
|
||||
|
||||
src = r"C:\Users\28579\Downloads\resources\resources\netherstar.png"
|
||||
dst = r"D:\Project\Starlight_Lancher\apps\app-frontend\public\models\netherstar.png"
|
||||
|
||||
im = Image.open(src).convert("RGBA")
|
||||
arr = np.array(im, dtype=np.float32)
|
||||
r, g, b, a = arr[..., 0], arr[..., 1], arr[..., 2], arr[..., 3]
|
||||
|
||||
# 1) 完全不透明像素的位置
|
||||
opaque = a >= 254
|
||||
# 2) 对每个通道,用最近的不透明像素值填充(距离变换的索引)
|
||||
# 用一个临时:在 opaque 区域保留原 RGB,其余待填
|
||||
h, w = a.shape
|
||||
# 用 scipy 的 distance_transform_edt 拿到"最近的 opaque 像素索引"
|
||||
indices = ndimage.distance_transform_edt(~opaque, return_distances=False, return_indices=True)
|
||||
nearest_rgb = arr[indices[0], indices[1], :3]
|
||||
|
||||
# 3) 半透明区域(a < 254 且 a > 0)的 RGB 换成最近不透明像素颜色
|
||||
semi = (a > 0) & (a < 254)
|
||||
out = arr.copy()
|
||||
out[semi, 0:3] = nearest_rgb[semi]
|
||||
|
||||
# 4) 可选:收紧极小 alpha(<8 直接透明),减少杂边
|
||||
out[a < 8, 3] = 0
|
||||
|
||||
out_img = Image.fromarray(np.clip(out, 0, 255).astype(np.uint8), "RGBA")
|
||||
out_img.save(dst)
|
||||
print("done ->", dst)
|
||||
print("尺寸:", out_img.size)
|
||||
29
tools/icon_work/inspect_star.py
Normal file
29
tools/icon_work/inspect_star.py
Normal file
@ -0,0 +1,29 @@
|
||||
from PIL import Image
|
||||
im = Image.open(r"C:\Users\28579\Downloads\resources\resources\netherstar.png").convert("RGBA")
|
||||
w, h = im.size
|
||||
# 找 alpha 从 0 到 255 的过渡带,看这些像素的 RGB
|
||||
print("=== 半透明白色像素采样 ===")
|
||||
cnt = 0
|
||||
for y in range(0, h, 5):
|
||||
for x in range(0, w, 5):
|
||||
r, g, b, a = im.getpixel((x, y))
|
||||
if 0 < a < 255 and r > 240 and g > 240 and b > 240:
|
||||
print(f"({x},{y}) RGBA=({r},{g},{b},{a})")
|
||||
cnt += 1
|
||||
if cnt >= 10:
|
||||
break
|
||||
if cnt >= 10:
|
||||
break
|
||||
# 对比:全不透明像素的 RGB
|
||||
print("\n=== 不透明像素采样 ===")
|
||||
cnt = 0
|
||||
for y in range(0, h, 5):
|
||||
for x in range(0, w, 5):
|
||||
r, g, b, a = im.getpixel((x, y))
|
||||
if a == 255:
|
||||
print(f"({x},{y}) RGBA=({r},{g},{b},{a})")
|
||||
cnt += 1
|
||||
if cnt >= 5:
|
||||
break
|
||||
if cnt >= 5:
|
||||
break
|
||||
49
tools/icon_work/release_notes_test.md
Normal file
49
tools/icon_work/release_notes_test.md
Normal file
@ -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.
|
||||
19
tools/icon_work/sample_edge.py
Normal file
19
tools/icon_work/sample_edge.py
Normal file
@ -0,0 +1,19 @@
|
||||
from PIL import Image
|
||||
im = Image.open(r"C:\Users\28579\Downloads\resources\resources\netherstar.png").convert("RGBA")
|
||||
w, h = im.size
|
||||
print("尺寸:", (w, h))
|
||||
# 采样边缘一圈(alpha 低但 RGB 接近白的像素 = "脏"边缘)
|
||||
dirty = 0
|
||||
total_edge = 0
|
||||
for y in range(0, h, 3):
|
||||
for x in range(0, w, 3):
|
||||
r, g, b, a = im.getpixel((x, y))
|
||||
if 0 < a < 255:
|
||||
total_edge += 1
|
||||
# alpha 半透明,但 RGB 很亮(接近白)—— 这就是"没剔干净"的迹象
|
||||
if r > 240 and g > 240 and b > 240:
|
||||
dirty += 1
|
||||
print("半透明像素总数:", total_edge)
|
||||
print("半透明中 RGB 接近白的(脏边缘):", dirty)
|
||||
if total_edge:
|
||||
print("脏边比例: {:.1f}%".format(dirty / total_edge * 100))
|
||||
Reference in New Issue
Block a user