Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae9a762439 | ||
|
|
8480927b99 | ||
|
|
24f5761317 | ||
|
|
3d003f9b31 | ||
|
|
1b487da5c2 | ||
|
|
b310018c38 | ||
|
|
fbde37f5a0 | ||
|
|
e6f9987694 |
No files matched your search
@@ -764,13 +764,13 @@ const messages = defineMessages({
|
||||
defaultMessage: 'Library',
|
||||
},
|
||||
multiplayer: {
|
||||
screenshots: {
|
||||
id: 'app.navigation.screenshots',
|
||||
defaultMessage: 'Screenshots',
|
||||
},
|
||||
id: 'app.navigation.multiplayer',
|
||||
defaultMessage: 'Multiplayer',
|
||||
},
|
||||
screenshots: {
|
||||
id: 'app.navigation.screenshots',
|
||||
defaultMessage: 'Screenshots',
|
||||
},
|
||||
downloads: {
|
||||
id: 'app.navigation.downloads',
|
||||
defaultMessage: 'Downloads',
|
||||
|
||||
@@ -32,6 +32,57 @@ export const ANNOUNCEMENT_CHANGE_TYPES: readonly AnnouncementChangeType[] = [
|
||||
]
|
||||
|
||||
export const launcherAnnouncements: readonly LauncherAnnouncement[] = [
|
||||
{
|
||||
id: 'launcher-1.0.1-beta9',
|
||||
version: '1.0.1-beta9',
|
||||
publishedAt: '2026-10-02',
|
||||
title: {
|
||||
'en-US': 'Starlight Launcher 1.0.1-beta9',
|
||||
'zh-CN': 'Starlight Launcher 1.0.1-beta9',
|
||||
},
|
||||
changes: {
|
||||
fixed: [
|
||||
{
|
||||
'en-US':
|
||||
'Fixed a crash on the minimal home layout caused by an unrecognized multiplayer feature flag (missing backend enum variant).',
|
||||
'zh-CN': '修复多人联机功能开关缺少后端枚举变体、导致精简主页报错的问题。',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'launcher-1.0.1-beta8',
|
||||
version: '1.0.1-beta8',
|
||||
publishedAt: '2026-10-02',
|
||||
title: {
|
||||
'en-US': 'Starlight Launcher 1.0.1-beta8',
|
||||
'zh-CN': 'Starlight Launcher 1.0.1-beta8',
|
||||
},
|
||||
changes: {
|
||||
fixed: [
|
||||
{
|
||||
'en-US':
|
||||
'Fixed the sidebar navigation entries breaking after the screenshot center was added.',
|
||||
'zh-CN': '修复添加截图中心后侧边栏导航项损坏的问题。',
|
||||
},
|
||||
{
|
||||
'en-US':
|
||||
'Fixed being unable to install the StarLight hosted pack even after signing in (missing command permission).',
|
||||
'zh-CN': '修复登录后仍无法安装 StarLight 实例的问题(命令权限缺失)。',
|
||||
},
|
||||
{
|
||||
'en-US':
|
||||
'Fixed the launcher UI scaling not applying when changed (missing command permission).',
|
||||
'zh-CN': '修复修改启动器界面缩放后不生效的问题(命令权限缺失)。',
|
||||
},
|
||||
{
|
||||
'en-US':
|
||||
'Fixed several screenshot center actions failing due to missing command permissions.',
|
||||
'zh-CN': '修复截图中心部分操作因命令权限缺失而失败的问题。',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'launcher-1.0.1-beta7',
|
||||
version: '1.0.1-beta7',
|
||||
|
||||
@@ -21,7 +21,6 @@ import {
|
||||
import {
|
||||
Avatar,
|
||||
Button,
|
||||
type ButtonMenuOption,
|
||||
type ComboboxOption,
|
||||
commonMessages,
|
||||
ConfirmModal,
|
||||
@@ -1038,7 +1037,6 @@ function activateScreenshot(screenshot: InstanceScreenshot, event: MouseEvent |
|
||||
(candidate) => getSelectionKey(candidate) === getSelectionKey(screenshot),
|
||||
)
|
||||
if (index >= 0) {
|
||||
screenshotOptionsMenu.value?.close()
|
||||
imageViewer.value?.show(index)
|
||||
}
|
||||
}
|
||||
@@ -1055,44 +1053,34 @@ function requestDelete(screenshot: InstanceScreenshot, fromPreview = false) {
|
||||
|
||||
function showScreenshotOptions(screenshot: InstanceScreenshot, event: MouseEvent) {
|
||||
screenshotOptionsTarget.value = screenshot
|
||||
const options: ButtonMenuOption[] = [
|
||||
...(event.type === 'contextmenu'
|
||||
? [
|
||||
{
|
||||
id: 'edit',
|
||||
label: formatMessage(messages.edit),
|
||||
icon: EditIcon,
|
||||
action: () => editScreenshot(screenshot),
|
||||
},
|
||||
{
|
||||
id: 'copy',
|
||||
label: formatMessage(messages.copy),
|
||||
icon: ClipboardCopyIcon,
|
||||
action: () => void copyScreenshot(screenshot),
|
||||
},
|
||||
]
|
||||
: []),
|
||||
{
|
||||
id: 'open',
|
||||
label: formatMessage(messages.showInFolder),
|
||||
icon: FolderOpenIcon,
|
||||
action: () => void openScreenshot(screenshot),
|
||||
},
|
||||
{
|
||||
id: 'go-to-instance',
|
||||
label: formatMessage(messages.goToInstance),
|
||||
action: () => void goToInstance(screenshot),
|
||||
},
|
||||
const options = [
|
||||
...(event.type === 'contextmenu' ? [{ name: 'edit' }, { name: 'copy' }] : []),
|
||||
{ name: 'open' },
|
||||
{ name: 'go-to-instance' },
|
||||
{ type: 'divider' },
|
||||
{
|
||||
id: 'delete',
|
||||
label: formatMessage(commonMessages.deleteLabel),
|
||||
icon: TrashIcon,
|
||||
tone: 'red',
|
||||
action: () => requestDelete(screenshot),
|
||||
},
|
||||
{ name: 'delete', color: 'danger' },
|
||||
]
|
||||
screenshotOptionsMenu.value?.open(event, options)
|
||||
screenshotOptionsMenu.value?.showMenu(event, screenshot, options)
|
||||
}
|
||||
|
||||
function handleScreenshotOptionClicked({ item, option }: { item: InstanceScreenshot; option: string }) {
|
||||
switch (option) {
|
||||
case 'edit':
|
||||
editScreenshot(item)
|
||||
break
|
||||
case 'copy':
|
||||
void copyScreenshot(item)
|
||||
break
|
||||
case 'open':
|
||||
void openScreenshot(item)
|
||||
break
|
||||
case 'go-to-instance':
|
||||
void goToInstance(item)
|
||||
break
|
||||
case 'delete':
|
||||
requestDelete(item)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
function goToInstance(screenshot: InstanceScreenshot) {
|
||||
@@ -1128,7 +1116,6 @@ function editScreenshot(screenshot: InstanceScreenshot) {
|
||||
(candidate) => getSelectionKey(candidate) === getSelectionKey(screenshot),
|
||||
)
|
||||
if (index >= 0) {
|
||||
screenshotOptionsMenu.value?.close()
|
||||
void imageViewer.value?.edit(index)
|
||||
}
|
||||
}
|
||||
@@ -1426,7 +1413,23 @@ onBeforeUnmount(() => {
|
||||
:markdown="false"
|
||||
@proceed="deleteCustomGroup"
|
||||
/>
|
||||
<ContextMenu ref="screenshotOptionsMenu" :label="formatMessage(commonMessages.actionsLabel)">
|
||||
<ContextMenu
|
||||
ref="screenshotOptionsMenu"
|
||||
:label="formatMessage(commonMessages.actionsLabel)"
|
||||
@option-clicked="handleScreenshotOptionClicked"
|
||||
>
|
||||
<template #edit>
|
||||
<EditIcon />
|
||||
{{ formatMessage(messages.edit) }}
|
||||
</template>
|
||||
<template #copy>
|
||||
<ClipboardCopyIcon />
|
||||
{{ formatMessage(messages.copy) }}
|
||||
</template>
|
||||
<template #open>
|
||||
<FolderOpenIcon />
|
||||
{{ formatMessage(messages.showInFolder) }}
|
||||
</template>
|
||||
<template #go-to-instance>
|
||||
<Avatar
|
||||
:src="getInstanceIconUrl(screenshotOptionsInstance?.icon_path)"
|
||||
@@ -1437,6 +1440,10 @@ onBeforeUnmount(() => {
|
||||
/>
|
||||
{{ formatMessage(messages.goToInstance) }}
|
||||
</template>
|
||||
<template #delete>
|
||||
<TrashIcon />
|
||||
{{ formatMessage(commonMessages.deleteLabel) }}
|
||||
</template>
|
||||
</ContextMenu>
|
||||
<ImageViewerEditor
|
||||
ref="imageViewer"
|
||||
|
||||
@@ -9922,5 +9922,8 @@
|
||||
},
|
||||
"unknown-pack-warning-modal.warning.title": {
|
||||
"message": "Unknown file warning"
|
||||
},
|
||||
"app.navigation.screenshots": {
|
||||
"message": "Screenshots"
|
||||
}
|
||||
}
|
||||
@@ -10680,5 +10680,8 @@
|
||||
},
|
||||
"app.starlight-skin.frame-title": {
|
||||
"message": "StarLight 皮肤站"
|
||||
},
|
||||
"app.navigation.screenshots": {
|
||||
"message": "截图"
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ import type { AbstractPopupNotificationManager, AbstractWebNotificationManager }
|
||||
import { setupCreationModal } from './setup/creation-modal'
|
||||
import { setupFileDropProvider } from './setup/file-drop'
|
||||
import { setupFilePickerProvider } from './setup/file-picker'
|
||||
import { setupImageViewerEditorProvider } from './setup/image-viewer-editor'
|
||||
import { setupInstanceImportProvider } from './setup/instance-import'
|
||||
import { setupTagsProvider } from './setup/tags'
|
||||
|
||||
@@ -14,6 +15,7 @@ export function setupProviders(
|
||||
setupTagsProvider(notificationManager, stateInitialization)
|
||||
const fileDrop = setupFileDropProvider()
|
||||
const filePicker = setupFilePickerProvider()
|
||||
setupImageViewerEditorProvider()
|
||||
setupInstanceImportProvider(notificationManager)
|
||||
|
||||
return {
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import {
|
||||
type ImageViewerEditorData,
|
||||
type ImageViewerEditorSource,
|
||||
provideImageViewerEditor,
|
||||
} from '@modrinth/ui'
|
||||
import { readFile } from '@tauri-apps/plugin-fs'
|
||||
|
||||
export function setupImageViewerEditorProvider() {
|
||||
provideImageViewerEditor({
|
||||
async loadEditorData(source: ImageViewerEditorSource): Promise<ImageViewerEditorData> {
|
||||
return {
|
||||
source: new Blob([await readFile(source.path)], { type: 'image/png' }),
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -119,6 +119,10 @@ export default new createRouter({
|
||||
pageTransitionGroup: 'multiplayer',
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
redirect: { name: 'MultiplayerRooms' },
|
||||
},
|
||||
{
|
||||
path: 'rooms',
|
||||
name: 'MultiplayerRooms',
|
||||
|
||||
@@ -365,6 +365,7 @@ fn main() {
|
||||
"install_existing_instance",
|
||||
"hosted_default",
|
||||
"hosted_set_session",
|
||||
"hosted_has_game_account",
|
||||
"hosted_create",
|
||||
"hosted_binding",
|
||||
"hosted_sync",
|
||||
@@ -508,6 +509,20 @@ fn main() {
|
||||
"instance_edit_icon",
|
||||
"instance_export_mrpack",
|
||||
"instance_get_pack_export_candidates",
|
||||
"instance_list_screenshots",
|
||||
"instance_list_all_screenshots",
|
||||
"instance_list_synced_screenshots",
|
||||
"instance_save_edited_screenshot",
|
||||
"instance_list_screenshot_groups",
|
||||
"instance_create_screenshot_group",
|
||||
"instance_rename_screenshot_group",
|
||||
"instance_delete_screenshot_group",
|
||||
"instance_set_screenshot_group_memberships",
|
||||
"instance_import_screenshot_groups",
|
||||
"instance_delete_screenshots",
|
||||
"instance_export_screenshots",
|
||||
"instance_move_screenshots",
|
||||
"instance_open_screenshot",
|
||||
])
|
||||
.default_permission(
|
||||
DefaultPermissionRule::AllowAllCommands,
|
||||
@@ -524,6 +539,7 @@ fn main() {
|
||||
"proxy_get",
|
||||
"proxy_set",
|
||||
"proxy_test",
|
||||
"set_ui_scale",
|
||||
])
|
||||
.default_permission(
|
||||
DefaultPermissionRule::AllowAllCommands,
|
||||
@@ -669,6 +685,7 @@ fn main() {
|
||||
"file_save_as",
|
||||
"file_read_dragged_file",
|
||||
"screenshot_thumbnail",
|
||||
"instance_icon_thumbnail",
|
||||
"studio_read_text",
|
||||
"studio_read_binary",
|
||||
"studio_write_binary",
|
||||
|
||||
@@ -212,6 +212,7 @@ pub enum FeatureFlag {
|
||||
ServersInApp,
|
||||
ServerProjectQa,
|
||||
I18nDebug,
|
||||
MultiplayerInApp,
|
||||
ShowInstancePlayTime,
|
||||
SkipNonEssentialWarnings,
|
||||
AdvancedFiltersCollapsed,
|
||||
|
||||
Reference in new issue
Block a user