diff --git a/src/renderer/src/i18n/locales/en-us.json b/src/renderer/src/i18n/locales/en-us.json index e5cc69df61..631f92bc11 100644 --- a/src/renderer/src/i18n/locales/en-us.json +++ b/src/renderer/src/i18n/locales/en-us.json @@ -1148,7 +1148,7 @@ "miniapps": { "title": "Mini Apps Settings", "custom": { - "title": "Custom Mini App", + "title": "Custom", "edit_title": "Edit Custom Mini App", "save_success": "Custom mini app saved successfully.", "save_error": "Failed to save custom mini app.", diff --git a/src/renderer/src/i18n/locales/zh-cn.json b/src/renderer/src/i18n/locales/zh-cn.json index 85c9e4c485..6ffb9620c1 100644 --- a/src/renderer/src/i18n/locales/zh-cn.json +++ b/src/renderer/src/i18n/locales/zh-cn.json @@ -1154,7 +1154,7 @@ "title": "在浏览器中打开新窗口链接" }, "custom": { - "title": "自定义小程序", + "title": "自定义", "edit_title": "编辑自定义小程序", "save_success": "自定义小程序保存成功。", "save_error": "自定义小程序保存失败。", diff --git a/src/renderer/src/i18n/locales/zh-tw.json b/src/renderer/src/i18n/locales/zh-tw.json index 212316a4ac..17667120e0 100644 --- a/src/renderer/src/i18n/locales/zh-tw.json +++ b/src/renderer/src/i18n/locales/zh-tw.json @@ -1156,7 +1156,7 @@ "custom": { "duplicate_ids": "發現重複的ID: {{ids}}", "conflicting_ids": "與預設應用ID衝突: {{ids}}", - "title": "自定義小程序", + "title": "自定義", "edit_title": "編輯自定義小程序", "save_success": "自定義小程序保存成功。", "save_error": "自定義小程序保存失敗。", diff --git a/src/renderer/src/pages/apps/App.tsx b/src/renderer/src/pages/apps/App.tsx index 295c77f6cc..506aaded1e 100644 --- a/src/renderer/src/pages/apps/App.tsx +++ b/src/renderer/src/pages/apps/App.tsx @@ -53,7 +53,7 @@ const App: FC = ({ app, onClick, size = 60, isLast }) => { return } - const newApp = { + const newApp: MinAppType = { id: values.id, name: values.name, url: values.url, @@ -70,7 +70,7 @@ const App: FC = ({ app, onClick, size = 60, isLast }) => { // 重新加载应用列表 const reloadedApps = [...ORIGIN_DEFAULT_MIN_APPS, ...(await loadCustomMiniApp())] updateDefaultMinApps(reloadedApps) - updateMinapps(reloadedApps) + updateMinapps([...minapps, newApp]) } catch (error) { message.error(t('settings.miniapps.custom.save_error')) console.error('Failed to save custom mini app:', error) @@ -143,7 +143,9 @@ const App: FC = ({ app, onClick, size = 60, isLast }) => { message.success(t('settings.miniapps.custom.remove_success')) const reloadedApps = [...ORIGIN_DEFAULT_MIN_APPS, ...(await loadCustomMiniApp())] updateDefaultMinApps(reloadedApps) - updateMinapps(reloadedApps) + updateMinapps(minapps.filter((item) => item.id !== app.id)) + updatePinnedMinapps(pinned.filter((item) => item.id !== app.id)) + updateDisabledMinapps(disabled.filter((item) => item.id !== app.id)) } catch (error) { message.error(t('settings.miniapps.custom.remove_error')) console.error('Failed to remove custom mini app:', error)