dsh-plugin 1.6.1 → 1.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/client/client.js CHANGED
@@ -251,9 +251,12 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
251
251
  confirmCancel: "取消",
252
252
  doneBtn: "完成",
253
253
  restartNow: "立即重启",
254
- restartLater: "稍后重启",
255
254
  restarting: "正在重启…",
256
255
  restartHint: "重启会中断正在进行的安装/卸载任务,其进度将丢失。部分插件(如插件市场、顶层 bundle)需重启后才会生效。",
256
+ toastRestartDesktop: "桌面端的宿主由应用管理,请在应用菜单(或托盘)选择退出后重新打开,重启后生效",
257
+ reloadHint: "插件已加载,关闭本窗口后会自动刷新页面生效。",
258
+ toastInstalledLive: "安装成功,已立即生效",
259
+ toastInstalledReload: "安装成功,正在自动刷新页面…",
257
260
  done: "完成",
258
261
  restartPendingHint: "安装成功,重启后生效",
259
262
  restartPendingHintUninstall: "卸载成功,重启后移除",
@@ -590,9 +593,12 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
590
593
  confirmCancel: "Cancel",
591
594
  doneBtn: "Done",
592
595
  restartNow: "Restart now",
593
- restartLater: "Later",
594
596
  restarting: "Restarting…",
595
597
  restartHint: "Restarting interrupts any in-progress install / uninstall task — its progress will be lost. Some plugins (such as plugin markets / top-level bundles) only take effect after a restart.",
598
+ toastRestartDesktop: "In the desktop app the host is managed by the app: quit from the app menu (or tray) and open it again — the change takes effect after that restart",
599
+ reloadHint: "The plugin is loaded — closing this window will refresh the page automatically.",
600
+ toastInstalledLive: "Installed — active now",
601
+ toastInstalledReload: "Installed — refreshing the page automatically…",
596
602
  done: "Done",
597
603
  restartPendingHint: "Installed — takes effect after restart",
598
604
  restartPendingHintUninstall: "Removed — cleaned up after restart",
@@ -706,42 +712,42 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
706
712
  css: css$11
707
713
  });
708
714
  var Header_module_css_default = {
709
- "githubIcon": "qikqja_githubIcon",
715
+ "copyIcon": "qikqja_copyIcon",
716
+ "header": "qikqja_header",
717
+ "controls": "qikqja_controls",
718
+ "aboutBtn": "qikqja_aboutBtn",
710
719
  "version": "qikqja_version",
711
720
  "segBtnActive": "qikqja_segBtnActive",
712
- "resultSeg": "qikqja_resultSeg",
713
- "searchRow": "qikqja_searchRow",
714
- "tabActive": "qikqja_tabActive",
715
- "tab": "qikqja_tab",
716
- "headerRight": "qikqja_headerRight",
717
- "title": "qikqja_title",
721
+ "tabCount": "qikqja_tabCount",
722
+ "tagline": "qikqja_tagline",
723
+ "hubUpdateBadge": "qikqja_hubUpdateBadge",
724
+ "resultCount": "qikqja_resultCount",
718
725
  "adBadge": "qikqja_adBadge",
719
- "logoIcon": "qikqja_logoIcon",
720
- "githubLink": "qikqja_githubLink",
721
- "header": "qikqja_header",
726
+ "tabsRow": "qikqja_tabsRow",
722
727
  "taglineLink": "qikqja_taglineLink",
728
+ "segBtn": "qikqja_segBtn",
729
+ "brandTitle": "qikqja_brandTitle",
730
+ "search": "qikqja_search",
731
+ "langBtn": "qikqja_langBtn",
723
732
  "tabs": "qikqja_tabs",
733
+ "githubIcon": "qikqja_githubIcon",
734
+ "headerTitleRow": "qikqja_headerTitleRow",
735
+ "adArrow": "qikqja_adArrow",
736
+ "logoIcon": "qikqja_logoIcon",
724
737
  "sortGroup": "qikqja_sortGroup",
725
- "search": "qikqja_search",
726
- "tabCount": "qikqja_tabCount",
727
- "brandTitle": "qikqja_brandTitle",
728
738
  "versionBtn": "qikqja_versionBtn",
729
- "controls": "qikqja_controls",
730
- "copyIcon": "qikqja_copyIcon",
731
- "segGroup": "qikqja_segGroup",
732
- "langBtn": "qikqja_langBtn",
739
+ "segLabel": "qikqja_segLabel",
733
740
  "root": "qikqja_root",
734
741
  "adText": "qikqja_adText",
735
- "headerTitleRow": "qikqja_headerTitleRow",
736
- "hubUpdateBadge": "qikqja_hubUpdateBadge",
737
- "resultCount": "qikqja_resultCount",
738
- "segLabel": "qikqja_segLabel",
739
- "segBtn": "qikqja_segBtn",
740
- "tagline": "qikqja_tagline",
742
+ "title": "qikqja_title",
743
+ "segGroup": "qikqja_segGroup",
744
+ "resultSeg": "qikqja_resultSeg",
741
745
  "adBanner": "qikqja_adBanner",
742
- "aboutBtn": "qikqja_aboutBtn",
743
- "adArrow": "qikqja_adArrow",
744
- "tabsRow": "qikqja_tabsRow"
746
+ "headerRight": "qikqja_headerRight",
747
+ "searchRow": "qikqja_searchRow",
748
+ "tab": "qikqja_tab",
749
+ "tabActive": "qikqja_tabActive",
750
+ "githubLink": "qikqja_githubLink"
745
751
  };
746
752
  //#endregion
747
753
  //#region \0dsh-css:src/client/styles/Modal.module.css.mjs
@@ -760,136 +766,136 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
760
766
  css: css$10
761
767
  });
762
768
  var Modal_module_css_default = {
763
- "errorHint": "BiQ1zG_errorHint",
764
- "resultCheckIcon": "BiQ1zG_resultCheckIcon",
765
- "linkIcon": "BiQ1zG_linkIcon",
766
- "queuedHint": "BiQ1zG_queuedHint",
767
- "failNetworkTarget": "BiQ1zG_failNetworkTarget",
768
- "modalDesc": "BiQ1zG_modalDesc",
769
- "queueRowBody": "BiQ1zG_queueRowBody",
770
- "toastIn": "BiQ1zG_toastIn",
769
+ "queueRowTarget": "BiQ1zG_queueRowTarget",
770
+ "detailUpdateHint": "BiQ1zG_detailUpdateHint",
771
+ "failRepo": "BiQ1zG_failRepo",
772
+ "detailLink": "BiQ1zG_detailLink",
773
+ "modalTitleBusy": "BiQ1zG_modalTitleBusy",
774
+ "failedCopyHint": "BiQ1zG_failedCopyHint",
775
+ "resultCheck": "BiQ1zG_resultCheck",
776
+ "queueRowHead": "BiQ1zG_queueRowHead",
777
+ "dangerConfirm": "BiQ1zG_dangerConfirm",
778
+ "confirmIconWrap": "BiQ1zG_confirmIconWrap",
779
+ "restartNowWarning": "BiQ1zG_restartNowWarning",
780
+ "noticeMain": "BiQ1zG_noticeMain",
781
+ "hubUpdateModal": "BiQ1zG_hubUpdateModal",
782
+ "detailMono": "BiQ1zG_detailMono",
783
+ "helpModal": "BiQ1zG_helpModal",
771
784
  "queueRow": "BiQ1zG_queueRow",
772
- "modalTitle": "BiQ1zG_modalTitle",
773
- "modalValue": "BiQ1zG_modalValue",
785
+ "modalCopy": "BiQ1zG_modalCopy",
774
786
  "uninstallConfirm": "BiQ1zG_uninstallConfirm",
775
- "modalLink": "BiQ1zG_modalLink",
776
- "progressFillFail": "BiQ1zG_progressFillFail",
777
- "detailGrid": "BiQ1zG_detailGrid",
778
- "resultDesc": "BiQ1zG_resultDesc",
779
- "failRepo": "BiQ1zG_failRepo",
780
- "modalHead": "BiQ1zG_modalHead",
781
- "progressFill": "BiQ1zG_progressFill",
782
- "errorBox": "BiQ1zG_errorBox",
787
+ "detailPathText": "BiQ1zG_detailPathText",
788
+ "pendingRowStatus": "BiQ1zG_pendingRowStatus",
789
+ "failClear": "BiQ1zG_failClear",
790
+ "noticeBadgeOk": "BiQ1zG_noticeBadgeOk",
791
+ "aboutModal": "BiQ1zG_aboutModal",
792
+ "failKindInstall": "BiQ1zG_failKindInstall",
793
+ "modalIn": "BiQ1zG_modalIn",
783
794
  "detailDim": "BiQ1zG_detailDim",
784
- "queueRowTarget": "BiQ1zG_queueRowTarget",
785
- "overlay": "BiQ1zG_overlay",
786
795
  "overlayIn": "BiQ1zG_overlayIn",
787
- "queueSectionTitle": "BiQ1zG_queueSectionTitle",
788
- "modal": "BiQ1zG_modal",
789
- "restartNowWarning": "BiQ1zG_restartNowWarning",
790
- "noticeRowOk": "BiQ1zG_noticeRowOk",
791
- "modalIn": "BiQ1zG_modalIn",
792
- "failDiagBtn": "BiQ1zG_failDiagBtn",
793
- "modalCmdText": "BiQ1zG_modalCmdText",
794
- "queueRowHead": "BiQ1zG_queueRowHead",
795
- "failKindUninstall": "BiQ1zG_failKindUninstall",
796
- "queueRowPct": "BiQ1zG_queueRowPct",
797
- "modalCmd": "BiQ1zG_modalCmd",
798
- "noticeRemove": "BiQ1zG_noticeRemove",
799
- "pendingRowActions": "BiQ1zG_pendingRowActions",
800
- "modalCmdCopy": "BiQ1zG_modalCmdCopy",
801
- "noticeIgnore": "BiQ1zG_noticeIgnore",
802
- "confirmIcon": "BiQ1zG_confirmIcon",
803
- "noticeBadgeOk": "BiQ1zG_noticeBadgeOk",
804
- "trustHint": "BiQ1zG_trustHint",
796
+ "modalBody": "BiQ1zG_modalBody",
797
+ "modalTitleQueued": "BiQ1zG_modalTitleQueued",
798
+ "failPrepareHint": "BiQ1zG_failPrepareHint",
799
+ "modalDesc": "BiQ1zG_modalDesc",
805
800
  "errorModal": "BiQ1zG_errorModal",
806
- "pendingRowStatus": "BiQ1zG_pendingRowStatus",
807
- "logModal": "BiQ1zG_logModal",
808
- "queueSection": "BiQ1zG_queueSection",
809
- "detailArrow": "BiQ1zG_detailArrow",
801
+ "failRow": "BiQ1zG_failRow",
802
+ "modalTitle": "BiQ1zG_modalTitle",
803
+ "failKindUninstall": "BiQ1zG_failKindUninstall",
804
+ "detailPathActions": "BiQ1zG_detailPathActions",
805
+ "failList": "BiQ1zG_failList",
806
+ "failCopy": "BiQ1zG_failCopy",
807
+ "hubUpdateNotes": "BiQ1zG_hubUpdateNotes",
808
+ "modalCloseIcon": "BiQ1zG_modalCloseIcon",
809
+ "modalActions": "BiQ1zG_modalActions",
810
+ "errorCopySoft": "BiQ1zG_errorCopySoft",
811
+ "progressFillFail": "BiQ1zG_progressFillFail",
812
+ "linkIcon": "BiQ1zG_linkIcon",
813
+ "modalWide": "BiQ1zG_modalWide",
814
+ "noticeHead": "BiQ1zG_noticeHead",
815
+ "modal": "BiQ1zG_modal",
816
+ "noticeBadgeFail": "BiQ1zG_noticeBadgeFail",
817
+ "progressFill": "BiQ1zG_progressFill",
818
+ "noticeBadgeIcon": "BiQ1zG_noticeBadgeIcon",
810
819
  "detailStatusRunning": "BiQ1zG_detailStatusRunning",
811
- "restartNow": "BiQ1zG_restartNow",
820
+ "overlay": "BiQ1zG_overlay",
821
+ "modalLink": "BiQ1zG_modalLink",
822
+ "noticeTextFail": "BiQ1zG_noticeTextFail",
823
+ "modalLabel": "BiQ1zG_modalLabel",
824
+ "failHead": "BiQ1zG_failHead",
825
+ "confirmIcon": "BiQ1zG_confirmIcon",
826
+ "failNetworkTarget": "BiQ1zG_failNetworkTarget",
827
+ "queuedHint": "BiQ1zG_queuedHint",
828
+ "noticeVersion": "BiQ1zG_noticeVersion",
829
+ "queueRowBody": "BiQ1zG_queueRowBody",
830
+ "detailPath": "BiQ1zG_detailPath",
812
831
  "detailStatusText": "BiQ1zG_detailStatusText",
832
+ "toast": "BiQ1zG_toast",
833
+ "progressHead": "BiQ1zG_progressHead",
813
834
  "confirmPrimary": "BiQ1zG_confirmPrimary",
814
- "modalCopy": "BiQ1zG_modalCopy",
815
- "detailPathActions": "BiQ1zG_detailPathActions",
816
- "restartLater": "BiQ1zG_restartLater",
817
- "noticeRow": "BiQ1zG_noticeRow",
818
- "failPrepareHint": "BiQ1zG_failPrepareHint",
819
- "hubUpdateMetaItem": "BiQ1zG_hubUpdateMetaItem",
820
- "cliOnlyHint": "BiQ1zG_cliOnlyHint",
835
+ "modalRow": "BiQ1zG_modalRow",
836
+ "noticeUpdateGo": "BiQ1zG_noticeUpdateGo",
837
+ "detailLabel": "BiQ1zG_detailLabel",
838
+ "queueRowStatus": "BiQ1zG_queueRowStatus",
839
+ "modalClose": "BiQ1zG_modalClose",
840
+ "noticeList": "BiQ1zG_noticeList",
841
+ "modalCmdText": "BiQ1zG_modalCmdText",
842
+ "confirmIconDanger": "BiQ1zG_confirmIconDanger",
821
843
  "resultRestarting": "BiQ1zG_resultRestarting",
822
- "progress": "BiQ1zG_progress",
823
- "noticeRowUpdate": "BiQ1zG_noticeRowUpdate",
824
844
  "detailValue": "BiQ1zG_detailValue",
825
- "modalWide": "BiQ1zG_modalWide",
826
- "resultTitle": "BiQ1zG_resultTitle",
827
- "noticeTime": "BiQ1zG_noticeTime",
828
- "modalInstall": "BiQ1zG_modalInstall",
829
- "modalCancel": "BiQ1zG_modalCancel",
830
- "modalActions": "BiQ1zG_modalActions",
831
- "failEmpty": "BiQ1zG_failEmpty",
832
- "helpModal": "BiQ1zG_helpModal",
845
+ "detailPathBtn": "BiQ1zG_detailPathBtn",
833
846
  "hubUpdateMeta": "BiQ1zG_hubUpdateMeta",
834
- "detailUpdateHint": "BiQ1zG_detailUpdateHint",
835
- "modalCloseIcon": "BiQ1zG_modalCloseIcon",
836
- "detailLink": "BiQ1zG_detailLink",
837
- "failCopy": "BiQ1zG_failCopy",
847
+ "noticeRowOk": "BiQ1zG_noticeRowOk",
848
+ "modalCmdCopy": "BiQ1zG_modalCmdCopy",
849
+ "noticeIgnore": "BiQ1zG_noticeIgnore",
850
+ "modalCmd": "BiQ1zG_modalCmd",
851
+ "queueRowTrack": "BiQ1zG_queueRowTrack",
852
+ "errorHint": "BiQ1zG_errorHint",
853
+ "resultTitle": "BiQ1zG_resultTitle",
854
+ "logModal": "BiQ1zG_logModal",
855
+ "noticeRowUpdate": "BiQ1zG_noticeRowUpdate",
838
856
  "detailStatusPending": "BiQ1zG_detailStatusPending",
839
- "errorTitle": "BiQ1zG_errorTitle",
840
- "hubUpdateNotes": "BiQ1zG_hubUpdateNotes",
841
- "progressHead": "BiQ1zG_progressHead",
842
- "progressText": "BiQ1zG_progressText",
843
- "progressTrack": "BiQ1zG_progressTrack",
844
- "noticeBadgeFail": "BiQ1zG_noticeBadgeFail",
857
+ "queueRowDesc": "BiQ1zG_queueRowDesc",
845
858
  "detailModal": "BiQ1zG_detailModal",
846
- "toastFail": "BiQ1zG_toastFail",
847
- "queueRowStatus": "BiQ1zG_queueRowStatus",
848
- "noticeRowMain": "BiQ1zG_noticeRowMain",
849
- "errorCopySoft": "BiQ1zG_errorCopySoft",
850
- "noticeMain": "BiQ1zG_noticeMain",
859
+ "queueSection": "BiQ1zG_queueSection",
860
+ "restartLater": "BiQ1zG_restartLater",
861
+ "restartNow": "BiQ1zG_restartNow",
862
+ "noticeRow": "BiQ1zG_noticeRow",
863
+ "progressTrack": "BiQ1zG_progressTrack",
864
+ "trustHint": "BiQ1zG_trustHint",
865
+ "resultCheckIcon": "BiQ1zG_resultCheckIcon",
851
866
  "detailRow": "BiQ1zG_detailRow",
852
- "detailPath": "BiQ1zG_detailPath",
853
- "detailLabel": "BiQ1zG_detailLabel",
854
- "noticeTextOk": "BiQ1zG_noticeTextOk",
855
- "queueRowTrack": "BiQ1zG_queueRowTrack",
856
- "modalBody": "BiQ1zG_modalBody",
857
- "stripCancel": "BiQ1zG_stripCancel",
858
- "modalClose": "BiQ1zG_modalClose",
859
- "confirmIconWrap": "BiQ1zG_confirmIconWrap",
860
- "toast": "BiQ1zG_toast",
861
- "aboutModal": "BiQ1zG_aboutModal",
862
- "detailPathText": "BiQ1zG_detailPathText",
867
+ "toastFail": "BiQ1zG_toastFail",
863
868
  "failBigIssue": "BiQ1zG_failBigIssue",
864
- "modalTitleQueued": "BiQ1zG_modalTitleQueued",
865
- "dangerConfirm": "BiQ1zG_dangerConfirm",
869
+ "queueRowPct": "BiQ1zG_queueRowPct",
870
+ "errorBox": "BiQ1zG_errorBox",
871
+ "stripCancel": "BiQ1zG_stripCancel",
872
+ "noticeTime": "BiQ1zG_noticeTime",
873
+ "modalValue": "BiQ1zG_modalValue",
874
+ "cliOnlyHint": "BiQ1zG_cliOnlyHint",
875
+ "hubUpdateMetaItem": "BiQ1zG_hubUpdateMetaItem",
876
+ "errorTitle": "BiQ1zG_errorTitle",
877
+ "progressText": "BiQ1zG_progressText",
866
878
  "result": "BiQ1zG_result",
867
- "failList": "BiQ1zG_failList",
868
- "modalTitleBusy": "BiQ1zG_modalTitleBusy",
869
- "detailMono": "BiQ1zG_detailMono",
870
- "aboutContent": "BiQ1zG_aboutContent",
871
- "modalRow": "BiQ1zG_modalRow",
872
- "detailStars": "BiQ1zG_detailStars",
873
- "queueRowDesc": "BiQ1zG_queueRowDesc",
874
- "failRow": "BiQ1zG_failRow",
875
- "aboutMeta": "BiQ1zG_aboutMeta",
876
- "noticeList": "BiQ1zG_noticeList",
879
+ "queueSectionTitle": "BiQ1zG_queueSectionTitle",
877
880
  "failKind": "BiQ1zG_failKind",
878
- "noticeTextFail": "BiQ1zG_noticeTextFail",
879
- "resultCheck": "BiQ1zG_resultCheck",
880
- "modalLabel": "BiQ1zG_modalLabel",
881
- "noticeBadgeIcon": "BiQ1zG_noticeBadgeIcon",
882
- "confirmIconDanger": "BiQ1zG_confirmIconDanger",
883
- "failClear": "BiQ1zG_failClear",
884
- "noticeVersion": "BiQ1zG_noticeVersion",
885
- "hubUpdateModal": "BiQ1zG_hubUpdateModal",
881
+ "aboutContent": "BiQ1zG_aboutContent",
882
+ "failEmpty": "BiQ1zG_failEmpty",
883
+ "noticeRemove": "BiQ1zG_noticeRemove",
884
+ "progress": "BiQ1zG_progress",
885
+ "modalHead": "BiQ1zG_modalHead",
886
+ "toastIn": "BiQ1zG_toastIn",
887
+ "pendingRowActions": "BiQ1zG_pendingRowActions",
886
888
  "noticeFoot": "BiQ1zG_noticeFoot",
887
- "detailPathBtn": "BiQ1zG_detailPathBtn",
888
- "failKindInstall": "BiQ1zG_failKindInstall",
889
- "noticeHead": "BiQ1zG_noticeHead",
890
- "failHead": "BiQ1zG_failHead",
891
- "failedCopyHint": "BiQ1zG_failedCopyHint",
892
- "noticeUpdateGo": "BiQ1zG_noticeUpdateGo"
889
+ "detailGrid": "BiQ1zG_detailGrid",
890
+ "noticeRowMain": "BiQ1zG_noticeRowMain",
891
+ "modalInstall": "BiQ1zG_modalInstall",
892
+ "noticeTextOk": "BiQ1zG_noticeTextOk",
893
+ "resultDesc": "BiQ1zG_resultDesc",
894
+ "aboutMeta": "BiQ1zG_aboutMeta",
895
+ "modalCancel": "BiQ1zG_modalCancel",
896
+ "detailArrow": "BiQ1zG_detailArrow",
897
+ "detailStars": "BiQ1zG_detailStars",
898
+ "failDiagBtn": "BiQ1zG_failDiagBtn"
893
899
  };
894
900
  //#endregion
895
901
  //#region src/server/services/install/release-target.ts
@@ -1001,7 +1007,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
1001
1007
  * tsdown 构建时用 define 把 __PLUGIN_VERSION__ 替换成 package.json 的版本号;
1002
1008
  * node --test 直接 import 本模块时该标识符不存在,typeof 守卫兜底为空串。
1003
1009
  */
1004
- const PLUGIN_VERSION = "1.6.1";
1010
+ const PLUGIN_VERSION = "1.6.3";
1005
1011
  const CATEGORY_ORDER = [
1006
1012
  "interface",
1007
1013
  "session",
@@ -1638,7 +1644,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
1638
1644
  */
1639
1645
  const hubHasUpdate = (() => {
1640
1646
  if (!hubUpdateInfo) return false;
1641
- if (hubUpdateInfo.version === "1.6.1") return false;
1647
+ if (hubUpdateInfo.version === "1.6.3") return false;
1642
1648
  const publishedAt = hubUpdateInfo.publishedAt;
1643
1649
  if (publishedAt) {
1644
1650
  const publishedMs = Date.parse(publishedAt);
@@ -2398,14 +2404,14 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
2398
2404
  refreshInstalled();
2399
2405
  if (q.kind === "uninstall") {
2400
2406
  syncInstalledVersion(q.repo, void 0, void 0);
2401
- onUninstallDone(modalTaskRef.current === q.id, q.repo, q.needsRestart);
2407
+ onUninstallDone(modalTaskRef.current === q.id, q.repo, q.needsRestart, q.needsReload ?? false);
2402
2408
  } else {
2403
2409
  syncInstalledVersion(q.repo, q.version, q.updatedAt);
2404
2410
  pendingInfoRef.current.set(q.target, {
2405
2411
  desc: q.desc,
2406
2412
  version: q.version
2407
2413
  });
2408
- onInstallDone(modalTaskRef.current === q.id, q.repo, q.needsRestart, q.action === "update");
2414
+ onInstallDone(modalTaskRef.current === q.id, q.repo, q.needsRestart, q.action === "update", q.needsReload ?? false);
2409
2415
  }
2410
2416
  } else {
2411
2417
  const rawDetail = lines.length > 0 ? [...lines].reverse().join("\n") : q.kind === "uninstall" ? t("uninstallFail") : t("installFail");
@@ -2455,10 +2461,12 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
2455
2461
  lines = task.lines ?? [];
2456
2462
  attempts = Array.isArray(task.attempts) ? task.attempts : void 0;
2457
2463
  const needsRestart = typeof task.needsRestart === "boolean" ? task.needsRestart : q.needsRestart;
2464
+ const needsReload = typeof task.needsReload === "boolean" ? task.needsReload : q.needsReload ?? false;
2458
2465
  if (status === "done") {
2459
2466
  const settled = {
2460
2467
  ...q,
2461
- needsRestart
2468
+ needsRestart,
2469
+ needsReload
2462
2470
  };
2463
2471
  if (q.kind === "uninstall") settleDone(settled, lines);
2464
2472
  else finishQueueTask(true, settled, lines);
@@ -3312,14 +3320,17 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
3312
3320
  *
3313
3321
  * Dialog layer for the Plugin Hub: the install-confirm dialog, the uninstall
3314
3322
  * dialog and the global toast. Both dialogs lock themselves while a mutation
3315
- * or restart is running, then switch to a result view offering an immediate
3316
- * restart or a "later" deferral.
3323
+ * is running, then switch to a result view with a single action — "done" for
3324
+ * the common case (the page refreshes on close so the change applies), or a
3325
+ * single "restart now" for the rare changes a refresh cannot pick up.
3317
3326
  */
3318
3327
  /** 完成结果视图:绿色对勾 + 标题/描述;
3319
- * needsRestart=true(插件需重启才生效)→ 「稍后重启 / 立即重启」按钮对,点稍后重启后
3320
- * 通知中心待重启条目常驻(服务端登记,内存态),直到用户点「立即重启」真正重启后才消失;
3321
- * needsRestart=false(卸载已即时生效)→ 仅「完成」关闭。 */
3322
- function ResultView({ title, desc, t, restarting, needsRestart, onRestart, onClose }) {
3328
+ * 终态只有两种:
3329
+ * - needsRestart=true(刷新解决不了:热挂载失败 / 非 dsh 插件 / 更新)→ 仅一个「立即重启」
3330
+ * 按钮(重启会中断进行中的任务,故仍需用户确认),关闭即放弃;
3331
+ * - 其余(含 needsReload=true 的「已热挂载、仅剩客户端 UI」)→ 仅「完成」按钮:关闭结果弹窗时
3332
+ * 上层自动刷新页面让插件生效,不再给「稍后/立即刷新」手动选择。 */
3333
+ function ResultView({ title, desc, t, restarting, needsRestart, needsReload, onRestart, onClose }) {
3323
3334
  return (0, react.createElement)("div", { className: Modal_module_css_default.result }, (0, react.createElement)("div", { className: Modal_module_css_default.resultCheck }, (0, react.createElement)("svg", {
3324
3335
  className: Modal_module_css_default.resultCheckIcon,
3325
3336
  viewBox: "0 0 16 16",
@@ -3334,17 +3345,13 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
3334
3345
  strokeLinecap: "round",
3335
3346
  strokeLinejoin: "round"
3336
3347
  }))), (0, react.createElement)("div", { className: Modal_module_css_default.resultTitle }, title), desc ? (0, react.createElement)("div", { className: Modal_module_css_default.resultDesc }, desc) : null, needsRestart ? (0, react.createElement)("div", null, [(0, react.createElement)("div", { className: Modal_module_css_default.resultRestarting }, restarting ? t("restarting") : t("restartHint")), (0, react.createElement)("div", { className: Modal_module_css_default.modalActions }, (0, react.createElement)("button", {
3337
- className: Modal_module_css_default.restartLater,
3338
- onClick: onClose,
3339
- disabled: restarting
3340
- }, t("restartLater")), (0, react.createElement)("button", {
3341
3348
  className: Modal_module_css_default.restartNowWarning,
3342
3349
  onClick: onRestart,
3343
3350
  disabled: restarting
3344
- }, restarting ? t("restarting") : t("restartNow")))]) : (0, react.createElement)("div", { className: Modal_module_css_default.modalActions }, (0, react.createElement)("button", {
3351
+ }, restarting ? t("restarting") : t("restartNow")))]) : (0, react.createElement)("div", null, [needsReload ? (0, react.createElement)("div", { className: Modal_module_css_default.resultRestarting }, t("reloadHint")) : null, (0, react.createElement)("div", { className: Modal_module_css_default.modalActions }, (0, react.createElement)("button", {
3345
3352
  className: Modal_module_css_default.restartNow,
3346
3353
  onClick: onClose
3347
- }, t("done"))));
3354
+ }, t("done")))]));
3348
3355
  }
3349
3356
  /**
3350
3357
  * 信任确认弹窗:安装进入后台队列后弹窗仍可关闭(任务继续),
@@ -3352,7 +3359,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
3352
3359
  * 目录插件与命令行安装(customTarget 模式)共用同一套确认/进度/结果流程。
3353
3360
  */
3354
3361
  function InstallModal(props) {
3355
- const { plugin, customTarget, globalNpm, done, task, t, langPath, restarting, submitting, update, cliOnly, needsRestart, onClose, onCopy, onInstall, onRestart } = props;
3362
+ const { plugin, customTarget, globalNpm, done, task, t, langPath, restarting, submitting, update, cliOnly, needsRestart, needsReload, onClose, onCopy, onInstall, onRestart } = props;
3356
3363
  const busy = submitting || task !== null && (task.status === "pending" || task.status === "running");
3357
3364
  const name = customTarget ?? (globalNpm !== void 0 && globalNpm.length > 0 ? globalNpm.join(" ") : void 0) ?? plugin?.displayName ?? plugin?.slug ?? "";
3358
3365
  const busyTitle = (label) => langPath === "zh/" ? `${name} 插件${label}` : `${label} ${name}`;
@@ -3376,6 +3383,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
3376
3383
  t,
3377
3384
  restarting,
3378
3385
  needsRestart,
3386
+ needsReload,
3379
3387
  onRestart,
3380
3388
  onClose
3381
3389
  }) : (0, react.createElement)("div", { className: Modal_module_css_default.modalBody }, !busy ? (0, react.createElement)("div", { className: Modal_module_css_default.confirmIconWrap }, (0, react.createElement)(ConfirmIcon, { type: "question" })) : null, (0, react.createElement)("div", { className: Modal_module_css_default.trustHint }, t("confirmDesc")), (0, react.createElement)("div", { className: Modal_module_css_default.modalRow }, (0, react.createElement)("span", { className: Modal_module_css_default.modalLabel }, t("confirmPlugin")), (0, react.createElement)("span", {
@@ -3405,7 +3413,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
3405
3413
  }
3406
3414
  /** 卸载确认弹窗:确认/进行中(后台队列,可关闭);完成后切换为结果视图(成功即生效,仅「完成」关闭)。 */
3407
3415
  function UninstallModal(props) {
3408
- const { plugin, done, task, t, langPath, restarting, submitting, needsRestart, onClose, onCancel, onCopyCommand, onConfirm, onRestart } = props;
3416
+ const { plugin, done, task, t, langPath, restarting, submitting, needsRestart, needsReload, onClose, onCancel, onCopyCommand, onConfirm, onRestart } = props;
3409
3417
  const busy = submitting || task !== null && (task.status === "pending" || task.status === "running");
3410
3418
  const name = plugin.displayName ?? plugin.slug;
3411
3419
  const busyTitle = (label) => langPath === "zh/" ? `${name} 插件${label}` : `${label} ${name}`;
@@ -3429,6 +3437,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
3429
3437
  t,
3430
3438
  restarting,
3431
3439
  needsRestart,
3440
+ needsReload,
3432
3441
  onRestart,
3433
3442
  onClose
3434
3443
  }) : (0, react.createElement)("div", { className: Modal_module_css_default.modalBody }, !busy ? (0, react.createElement)("div", { className: Modal_module_css_default.confirmIconWrap }, (0, react.createElement)(ConfirmIcon, { type: "trash" })) : null, (0, react.createElement)("div", { className: Modal_module_css_default.modalDesc }, t("uninstallDesc")), (0, react.createElement)("div", { className: Modal_module_css_default.modalRow }, (0, react.createElement)("span", { className: Modal_module_css_default.modalLabel }, t("confirmPlugin")), (0, react.createElement)("span", {
@@ -3521,15 +3530,15 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
3521
3530
  }
3522
3531
  /** 全局反馈 Toast:复制成功(反色)/ 安装完成(反色)/ 安装失败(红色)/ 卸载结果 */
3523
3532
  function Toast({ toast, t }) {
3524
- const text = toast.kind === "copied" ? t("toastCopied") : toast.kind === "errCopied" ? t("errCopied") : toast.kind === "done" ? t("installDone") : toast.kind === "fail" ? t("installFail") : toast.kind === "removed" ? t("uninstallDone") : toast.kind === "revealFail" ? t("openFolderFail") : t("uninstallFail");
3525
- const fail = toast.kind === "fail" || toast.kind === "removeFail" || toast.kind === "revealFail";
3533
+ const text = toast.kind === "copied" ? t("toastCopied") : toast.kind === "errCopied" ? t("errCopied") : toast.kind === "done" ? t("installDone") : toast.kind === "fail" ? t("installFail") : toast.kind === "removed" ? t("uninstallDone") : toast.kind === "revealFail" ? t("openFolderFail") : toast.kind === "restartDesktop" ? t("toastRestartDesktop") : toast.kind === "installedLive" ? t("toastInstalledLive") : toast.kind === "installedReload" ? t("toastInstalledReload") : t("uninstallFail");
3534
+ const fail = toast.kind === "fail" || toast.kind === "removeFail" || toast.kind === "revealFail" || toast.kind === "restartDesktop";
3526
3535
  return (0, react.createElement)("div", {
3527
3536
  key: toast.id,
3528
3537
  className: fail ? `${Modal_module_css_default.toast} ${Modal_module_css_default.toastFail}` : Modal_module_css_default.toast
3529
3538
  }, text);
3530
3539
  }
3531
3540
  /** 待重启确认弹窗:已安装列表行内「重启」按钮点击后弹出,
3532
- * 与通知中心待重启条目同一交互(说明 + 稍后重启 / 立即重启),
3541
+ * 与通知中心待重启条目同一交互(红色警告说明 + 单个「立即重启」),
3533
3542
  * 避免行内按钮误触直接触发宿主重启。 */
3534
3543
  function RestartConfirmModal({ t, restarting, onClose, onRestartNow }) {
3535
3544
  return (0, react.createElement)("div", {
@@ -3547,11 +3556,6 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
3547
3556
  "aria-label": t("errorClose"),
3548
3557
  onClick: onClose
3549
3558
  }, (0, react.createElement)(CloseIcon))), (0, react.createElement)("div", { className: Modal_module_css_default.modalBody }, (0, react.createElement)("div", { className: Modal_module_css_default.confirmIconWrap }, (0, react.createElement)(ConfirmIcon, { type: "warning" })), (0, react.createElement)("div", { className: Modal_module_css_default.failPrepareHint }, t("restartHint")), (0, react.createElement)("div", { className: Modal_module_css_default.modalActions }, (0, react.createElement)("button", {
3550
- className: Modal_module_css_default.restartLater,
3551
- type: "button",
3552
- disabled: restarting,
3553
- onClick: onClose
3554
- }, t("restartLater")), (0, react.createElement)("button", {
3555
3559
  className: Modal_module_css_default.restartNowWarning,
3556
3560
  type: "button",
3557
3561
  disabled: restarting,
@@ -3970,10 +3974,6 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
3970
3974
  className: Modal_module_css_default.queueRowDesc,
3971
3975
  title: p.desc
3972
3976
  }, p.desc) : null, (0, react.createElement)("div", { className: Modal_module_css_default.queueRowBody }, (0, react.createElement)("span", { className: Modal_module_css_default.pendingRowStatus }, p.kind === "uninstall" ? t("restartPendingHintUninstall") : t("restartPendingHint")), (0, react.createElement)("span", { className: Modal_module_css_default.pendingRowActions }, (0, react.createElement)("button", {
3973
- className: Modal_module_css_default.restartLater,
3974
- disabled: restarting,
3975
- onClick: onClose
3976
- }, t("restartLater")), (0, react.createElement)("button", {
3977
3977
  className: Modal_module_css_default.restartNow,
3978
3978
  disabled: restarting,
3979
3979
  onClick: onRestart
@@ -4278,40 +4278,40 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
4278
4278
  css: css$9
4279
4279
  });
4280
4280
  var List_module_css_default = {
4281
- "actions": "_3XaZHa_actions",
4282
- "detailBtn": "_3XaZHa_detailBtn",
4283
- "versionBadge": "_3XaZHa_versionBadge",
4284
- "stateActions": "_3XaZHa_stateActions",
4285
- "footLink": "_3XaZHa_footLink",
4286
- "desc": "_3XaZHa_desc",
4281
+ "cardMain": "_3XaZHa_cardMain",
4282
+ "updateBadge": "_3XaZHa_updateBadge",
4283
+ "footer": "_3XaZHa_footer",
4287
4284
  "installBtn": "_3XaZHa_installBtn",
4288
- "stateDesc": "_3XaZHa_stateDesc",
4289
- "installBtnCopied": "_3XaZHa_installBtnCopied",
4285
+ "fork": "_3XaZHa_fork",
4286
+ "body": "_3XaZHa_body",
4287
+ "diagBtn": "_3XaZHa_diagBtn",
4290
4288
  "verified": "_3XaZHa_verified",
4291
- "date": "_3XaZHa_date",
4292
- "state": "_3XaZHa_state",
4289
+ "cardSide": "_3XaZHa_cardSide",
4290
+ "list": "_3XaZHa_list",
4293
4291
  "topic": "_3XaZHa_topic",
4292
+ "installBtnInstalled": "_3XaZHa_installBtnInstalled",
4293
+ "uninstallBtn": "_3XaZHa_uninstallBtn",
4294
+ "card": "_3XaZHa_card",
4295
+ "stateTitle": "_3XaZHa_stateTitle",
4296
+ "cardTitle": "_3XaZHa_cardTitle",
4297
+ "desc": "_3XaZHa_desc",
4298
+ "versionBadge": "_3XaZHa_versionBadge",
4299
+ "retryBtn": "_3XaZHa_retryBtn",
4300
+ "cardHead": "_3XaZHa_cardHead",
4301
+ "stateDesc": "_3XaZHa_stateDesc",
4302
+ "detailBtn": "_3XaZHa_detailBtn",
4294
4303
  "categoryBadge": "_3XaZHa_categoryBadge",
4304
+ "installBtnCopied": "_3XaZHa_installBtnCopied",
4305
+ "moreSentinel": "_3XaZHa_moreSentinel",
4306
+ "star": "_3XaZHa_star",
4307
+ "date": "_3XaZHa_date",
4308
+ "actions": "_3XaZHa_actions",
4295
4309
  "installBtnUpdate": "_3XaZHa_installBtnUpdate",
4296
- "card": "_3XaZHa_card",
4297
- "cardTitle": "_3XaZHa_cardTitle",
4298
- "uninstallBtn": "_3XaZHa_uninstallBtn",
4299
- "list": "_3XaZHa_list",
4300
- "cardHead": "_3XaZHa_cardHead",
4301
- "fork": "_3XaZHa_fork",
4302
- "retryBtn": "_3XaZHa_retryBtn",
4303
- "diagBtn": "_3XaZHa_diagBtn",
4304
- "installBtnInstalled": "_3XaZHa_installBtnInstalled",
4305
- "cardSide": "_3XaZHa_cardSide",
4306
4310
  "stats": "_3XaZHa_stats",
4307
- "footer": "_3XaZHa_footer",
4311
+ "footLink": "_3XaZHa_footLink",
4312
+ "state": "_3XaZHa_state",
4308
4313
  "topics": "_3XaZHa_topics",
4309
- "updateBadge": "_3XaZHa_updateBadge",
4310
- "stateTitle": "_3XaZHa_stateTitle",
4311
- "body": "_3XaZHa_body",
4312
- "moreSentinel": "_3XaZHa_moreSentinel",
4313
- "cardMain": "_3XaZHa_cardMain",
4314
- "star": "_3XaZHa_star"
4314
+ "stateActions": "_3XaZHa_stateActions"
4315
4315
  };
4316
4316
  //#endregion
4317
4317
  //#region src/client/hooks/useIncrementalList.ts
@@ -4518,15 +4518,15 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
4518
4518
  css: css$8
4519
4519
  });
4520
4520
  var SectionTabs_module_css_default = {
4521
- "tab": "_7tvizq_tab",
4522
4521
  "tabIcon": "_7tvizq_tabIcon",
4523
- "tabActive": "_7tvizq_tabActive",
4524
- "tabCountActive": "_7tvizq_tabCountActive",
4525
- "noticeBtn": "_7tvizq_noticeBtn",
4526
- "tabCount": "_7tvizq_tabCount",
4527
4522
  "root": "_7tvizq_root",
4528
4523
  "noticeIcon": "_7tvizq_noticeIcon",
4529
- "noticeCount": "_7tvizq_noticeCount"
4524
+ "noticeBtn": "_7tvizq_noticeBtn",
4525
+ "noticeCount": "_7tvizq_noticeCount",
4526
+ "tab": "_7tvizq_tab",
4527
+ "tabCount": "_7tvizq_tabCount",
4528
+ "tabActive": "_7tvizq_tabActive",
4529
+ "tabCountActive": "_7tvizq_tabCountActive"
4530
4530
  };
4531
4531
  //#endregion
4532
4532
  //#region src/client/components/layout/SectionTabs.tsx
@@ -4603,42 +4603,42 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
4603
4603
  css: css$7
4604
4604
  });
4605
4605
  var InstalledView_module_css_default = {
4606
+ "updateBadge": "_1nXeGW_updateBadge",
4606
4607
  "versionBadge": "_1nXeGW_versionBadge",
4607
- "statusPending": "_1nXeGW_statusPending",
4608
- "rowRestart": "_1nXeGW_rowRestart",
4609
- "statusDot": "_1nXeGW_statusDot",
4610
- "statusInactive": "_1nXeGW_statusInactive",
4611
- "empty": "_1nXeGW_empty",
4612
- "rowMain": "_1nXeGW_rowMain",
4613
- "searchInput": "_1nXeGW_searchInput",
4614
- "root": "_1nXeGW_root",
4615
- "rowDesc": "_1nXeGW_rowDesc",
4616
- "segLabel": "_1nXeGW_segLabel",
4617
- "list": "_1nXeGW_list",
4618
- "rowUpdate": "_1nXeGW_rowUpdate",
4619
- "segRow": "_1nXeGW_segRow",
4620
4608
  "segBtn": "_1nXeGW_segBtn",
4621
- "rowTitleLine": "_1nXeGW_rowTitleLine",
4609
+ "rowSourceTagManual": "_1nXeGW_rowSourceTagManual",
4622
4610
  "rowTitle": "_1nXeGW_rowTitle",
4623
- "toolbar": "_1nXeGW_toolbar",
4624
- "emptyTitle": "_1nXeGW_emptyTitle",
4625
- "rowUninstall": "_1nXeGW_rowUninstall",
4626
- "emptyDesc": "_1nXeGW_emptyDesc",
4611
+ "rowDesc": "_1nXeGW_rowDesc",
4612
+ "row": "_1nXeGW_row",
4627
4613
  "rowRepo": "_1nXeGW_rowRepo",
4628
- "rowDetail": "_1nXeGW_rowDetail",
4614
+ "rowMeta": "_1nXeGW_rowMeta",
4615
+ "empty": "_1nXeGW_empty",
4616
+ "rowCategory": "_1nXeGW_rowCategory",
4617
+ "segRow": "_1nXeGW_segRow",
4618
+ "searchWrap": "_1nXeGW_searchWrap",
4629
4619
  "rowActions": "_1nXeGW_rowActions",
4630
- "rowSourceTag": "_1nXeGW_rowSourceTag",
4631
- "row": "_1nXeGW_row",
4620
+ "list": "_1nXeGW_list",
4632
4621
  "segBtnActive": "_1nXeGW_segBtnActive",
4622
+ "emptyDesc": "_1nXeGW_emptyDesc",
4633
4623
  "exampleBadge": "_1nXeGW_exampleBadge",
4634
- "rowCategory": "_1nXeGW_rowCategory",
4635
- "segGroup": "_1nXeGW_segGroup",
4636
- "rowMeta": "_1nXeGW_rowMeta",
4624
+ "statusInactive": "_1nXeGW_statusInactive",
4625
+ "statusDot": "_1nXeGW_statusDot",
4626
+ "rowRestart": "_1nXeGW_rowRestart",
4627
+ "rowUninstall": "_1nXeGW_rowUninstall",
4628
+ "searchInput": "_1nXeGW_searchInput",
4629
+ "toolbar": "_1nXeGW_toolbar",
4630
+ "segLabel": "_1nXeGW_segLabel",
4631
+ "rowTitleLine": "_1nXeGW_rowTitleLine",
4632
+ "statusPending": "_1nXeGW_statusPending",
4633
+ "root": "_1nXeGW_root",
4637
4634
  "rowSourceTagHub": "_1nXeGW_rowSourceTagHub",
4638
- "rowSourceTagManual": "_1nXeGW_rowSourceTagManual",
4635
+ "rowUpdate": "_1nXeGW_rowUpdate",
4639
4636
  "exampleRow": "_1nXeGW_exampleRow",
4640
- "searchWrap": "_1nXeGW_searchWrap",
4641
- "updateBadge": "_1nXeGW_updateBadge"
4637
+ "rowDetail": "_1nXeGW_rowDetail",
4638
+ "rowSourceTag": "_1nXeGW_rowSourceTag",
4639
+ "segGroup": "_1nXeGW_segGroup",
4640
+ "emptyTitle": "_1nXeGW_emptyTitle",
4641
+ "rowMain": "_1nXeGW_rowMain"
4642
4642
  };
4643
4643
  //#endregion
4644
4644
  //#region src/client/components/views/InstalledView.tsx
@@ -4884,28 +4884,28 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
4884
4884
  css: css$6
4885
4885
  });
4886
4886
  var CustomInstallView_module_css_default = {
4887
- "channelOffBtn": "zISxCG_channelOffBtn",
4888
- "root": "zISxCG_root",
4889
- "installCards": "zISxCG_installCards",
4887
+ "installBtn": "zISxCG_installBtn",
4888
+ "installCard": "zISxCG_installCard",
4890
4889
  "channelOff": "zISxCG_channelOff",
4891
- "channelOffText": "zISxCG_channelOffText",
4892
4890
  "installError": "zISxCG_installError",
4893
- "installInput": "zISxCG_installInput",
4891
+ "helpCmd": "zISxCG_helpCmd",
4894
4892
  "installRow": "zISxCG_installRow",
4895
- "installCardDisabled": "zISxCG_installCardDisabled",
4896
- "desc": "zISxCG_desc",
4897
- "installExample": "zISxCG_installExample",
4893
+ "root": "zISxCG_root",
4898
4894
  "installCardHead": "zISxCG_installCardHead",
4899
- "installBtn": "zISxCG_installBtn",
4900
- "helpBody": "zISxCG_helpBody",
4901
- "helpNote": "zISxCG_helpNote",
4902
- "helpCmd": "zISxCG_helpCmd",
4895
+ "installCards": "zISxCG_installCards",
4896
+ "channelOffBtn": "zISxCG_channelOffBtn",
4903
4897
  "installHelpBtn": "zISxCG_installHelpBtn",
4898
+ "helpBody": "zISxCG_helpBody",
4899
+ "installExample": "zISxCG_installExample",
4900
+ "installInsertBtn": "zISxCG_installInsertBtn",
4904
4901
  "installInputError": "zISxCG_installInputError",
4902
+ "desc": "zISxCG_desc",
4903
+ "installCardDisabled": "zISxCG_installCardDisabled",
4904
+ "channelOffText": "zISxCG_channelOffText",
4905
+ "helpNote": "zISxCG_helpNote",
4905
4906
  "helpLine": "zISxCG_helpLine",
4906
- "installCard": "zISxCG_installCard",
4907
4907
  "installLabel": "zISxCG_installLabel",
4908
- "installInsertBtn": "zISxCG_installInsertBtn"
4908
+ "installInput": "zISxCG_installInput"
4909
4909
  };
4910
4910
  //#endregion
4911
4911
  //#region src/client/components/views/CustomInstallView.tsx
@@ -5195,30 +5195,30 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
5195
5195
  css: css$5
5196
5196
  });
5197
5197
  var SettingsView_module_css_default = {
5198
- "pageHeader": "_506LLG_pageHeader",
5199
- "content": "_506LLG_content",
5200
- "pageDesc": "_506LLG_pageDesc",
5201
- "settingTitle": "_506LLG_settingTitle",
5202
- "settingControlStack": "_506LLG_settingControlStack",
5203
- "navItemActive": "_506LLG_navItemActive",
5204
5198
  "root": "_506LLG_root",
5199
+ "content": "_506LLG_content",
5200
+ "pageHeader": "_506LLG_pageHeader",
5201
+ "pageTitle": "_506LLG_pageTitle",
5202
+ "card": "_506LLG_card",
5203
+ "navIcon": "_506LLG_navIcon",
5204
+ "settingRow": "_506LLG_settingRow",
5205
+ "settingDesc": "_506LLG_settingDesc",
5206
+ "settingControl": "_506LLG_settingControl",
5207
+ "proxyHintOk": "_506LLG_proxyHintOk",
5205
5208
  "sidebar": "_506LLG_sidebar",
5209
+ "pageDesc": "_506LLG_pageDesc",
5206
5210
  "proxyControl": "_506LLG_proxyControl",
5207
- "settingRow": "_506LLG_settingRow",
5211
+ "navItem": "_506LLG_navItem",
5208
5212
  "proxyHintFail": "_506LLG_proxyHintFail",
5213
+ "navItemActive": "_506LLG_navItemActive",
5214
+ "settingControlStack": "_506LLG_settingControlStack",
5215
+ "settingTitle": "_506LLG_settingTitle",
5216
+ "settingLabel": "_506LLG_settingLabel",
5209
5217
  "controlDropdown": "_506LLG_controlDropdown",
5210
- "navIcon": "_506LLG_navIcon",
5211
- "settingDesc": "_506LLG_settingDesc",
5212
- "navItem": "_506LLG_navItem",
5213
5218
  "proxyHint": "_506LLG_proxyHint",
5214
- "settingControl": "_506LLG_settingControl",
5215
5219
  "settingRowStack": "_506LLG_settingRowStack",
5216
- "proxyHintOk": "_506LLG_proxyHintOk",
5217
- "pageTitle": "_506LLG_pageTitle",
5218
- "settingLabel": "_506LLG_settingLabel",
5219
- "card": "_506LLG_card",
5220
- "textInput": "_506LLG_textInput",
5221
- "resetBtn": "_506LLG_resetBtn"
5220
+ "resetBtn": "_506LLG_resetBtn",
5221
+ "textInput": "_506LLG_textInput"
5222
5222
  };
5223
5223
  //#endregion
5224
5224
  //#region \0dsh-css:src/client/styles/Dropdown.module.css.mjs
@@ -5237,18 +5237,18 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
5237
5237
  css: css$4
5238
5238
  });
5239
5239
  var Dropdown_module_css_default = {
5240
- "dropdown": "B_Gxsq_dropdown",
5241
- "dropdownFill": "B_Gxsq_dropdownFill",
5242
- "dropdownBtn": "B_Gxsq_dropdownBtn",
5243
- "dropdownPanel": "B_Gxsq_dropdownPanel",
5240
+ "dropdownItemLabel": "B_Gxsq_dropdownItemLabel",
5244
5241
  "dropdownArrow": "B_Gxsq_dropdownArrow",
5245
5242
  "dropdownLabel": "B_Gxsq_dropdownLabel",
5246
- "dropdownItem": "B_Gxsq_dropdownItem",
5247
- "dropdownCount": "B_Gxsq_dropdownCount",
5243
+ "dropdownFill": "B_Gxsq_dropdownFill",
5244
+ "dropdownPanel": "B_Gxsq_dropdownPanel",
5245
+ "dropdown": "B_Gxsq_dropdown",
5248
5246
  "dropdownCountActive": "B_Gxsq_dropdownCountActive",
5249
- "dropdownArrowOpen": "B_Gxsq_dropdownArrowOpen",
5250
5247
  "dropdownItemActive": "B_Gxsq_dropdownItemActive",
5251
- "dropdownItemLabel": "B_Gxsq_dropdownItemLabel"
5248
+ "dropdownArrowOpen": "B_Gxsq_dropdownArrowOpen",
5249
+ "dropdownCount": "B_Gxsq_dropdownCount",
5250
+ "dropdownBtn": "B_Gxsq_dropdownBtn",
5251
+ "dropdownItem": "B_Gxsq_dropdownItem"
5252
5252
  };
5253
5253
  //#endregion
5254
5254
  //#region \0dsh-css:src/client/styles/Toggle.module.css.mjs
@@ -5267,8 +5267,8 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
5267
5267
  css: css$3
5268
5268
  });
5269
5269
  var Toggle_module_css_default = {
5270
- "toggleOn": "k-cD4G_toggleOn",
5271
5270
  "knob": "k-cD4G_knob",
5271
+ "toggleOn": "k-cD4G_toggleOn",
5272
5272
  "toggle": "k-cD4G_toggle"
5273
5273
  };
5274
5274
  //#endregion
@@ -5369,29 +5369,29 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
5369
5369
  css: css$2
5370
5370
  });
5371
5371
  var DiagnosticsView_module_css_default = {
5372
- "envDesc": "k9eRya_envDesc",
5373
- "row": "k9eRya_row",
5374
5372
  "summaryRunning": "k9eRya_summaryRunning",
5375
- "badgeRunning": "k9eRya_badgeRunning",
5376
- "envRow": "k9eRya_envRow",
5377
- "head": "k9eRya_head",
5378
- "badgeFail": "k9eRya_badgeFail",
5379
- "summaryOk": "k9eRya_summaryOk",
5380
- "envLabel": "k9eRya_envLabel",
5381
- "badge": "k9eRya_badge",
5382
5373
  "runBtn": "k9eRya_runBtn",
5383
- "headHint": "k9eRya_headHint",
5374
+ "panel": "k9eRya_panel",
5384
5375
  "envTitle": "k9eRya_envTitle",
5385
- "badgeOk": "k9eRya_badgeOk",
5376
+ "row": "k9eRya_row",
5377
+ "envRow": "k9eRya_envRow",
5378
+ "badgeRunning": "k9eRya_badgeRunning",
5386
5379
  "meta": "k9eRya_meta",
5387
- "summary": "k9eRya_summary",
5388
5380
  "name": "k9eRya_name",
5381
+ "badgeOk": "k9eRya_badgeOk",
5382
+ "badgeFail": "k9eRya_badgeFail",
5383
+ "envCopyBtn": "k9eRya_envCopyBtn",
5384
+ "summaryOk": "k9eRya_summaryOk",
5385
+ "envDesc": "k9eRya_envDesc",
5389
5386
  "diagPulse": "k9eRya_diagPulse",
5390
- "summaryFail": "k9eRya_summaryFail",
5387
+ "head": "k9eRya_head",
5388
+ "headHint": "k9eRya_headHint",
5391
5389
  "display": "k9eRya_display",
5392
- "badgeIdle": "k9eRya_badgeIdle",
5393
- "panel": "k9eRya_panel",
5394
- "envCopyBtn": "k9eRya_envCopyBtn"
5390
+ "summaryFail": "k9eRya_summaryFail",
5391
+ "envLabel": "k9eRya_envLabel",
5392
+ "badge": "k9eRya_badge",
5393
+ "summary": "k9eRya_summary",
5394
+ "badgeIdle": "k9eRya_badgeIdle"
5395
5395
  };
5396
5396
  //#endregion
5397
5397
  //#region src/client/components/views/DiagnosticsView.tsx
@@ -5569,57 +5569,57 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
5569
5569
  css: css$1
5570
5570
  });
5571
5571
  var LogsView_module_css_default = {
5572
- "logList": "_3j77BW_logList",
5573
5572
  "footCount": "_3j77BW_footCount",
5574
- "catSettings": "_3j77BW_catSettings",
5575
- "catInstall": "_3j77BW_catInstall",
5576
- "headActions": "_3j77BW_headActions",
5577
- "catUpdate": "_3j77BW_catUpdate",
5573
+ "list": "_3j77BW_list",
5578
5574
  "badge": "_3j77BW_badge",
5579
- "pathLabel": "_3j77BW_pathLabel",
5580
- "catBadge": "_3j77BW_catBadge",
5581
- "filterChip": "_3j77BW_filterChip",
5582
- "badgeSuccess": "_3j77BW_badgeSuccess",
5583
- "pathDialogRow": "_3j77BW_pathDialogRow",
5584
- "head": "_3j77BW_head",
5585
- "footFail": "_3j77BW_footFail",
5586
- "headHint": "_3j77BW_headHint",
5587
- "linkBtn": "_3j77BW_linkBtn",
5588
- "pathDraft": "_3j77BW_pathDraft",
5589
- "search": "_3j77BW_search",
5590
- "btn": "_3j77BW_btn",
5575
+ "moreEnd": "_3j77BW_moreEnd",
5576
+ "badgeError": "_3j77BW_badgeError",
5577
+ "pathDialogReset": "_3j77BW_pathDialogReset",
5578
+ "badgeInfo": "_3j77BW_badgeInfo",
5579
+ "empty": "_3j77BW_empty",
5580
+ "footActions": "_3j77BW_footActions",
5581
+ "catSettings": "_3j77BW_catSettings",
5582
+ "catSystem": "_3j77BW_catSystem",
5591
5583
  "clearBtn": "_3j77BW_clearBtn",
5592
- "panel": "_3j77BW_panel",
5593
- "message": "_3j77BW_message",
5594
- "more": "_3j77BW_more",
5595
- "footPath": "_3j77BW_footPath",
5584
+ "catDiagnostics": "_3j77BW_catDiagnostics",
5585
+ "pathDraft": "_3j77BW_pathDraft",
5586
+ "footFail": "_3j77BW_footFail",
5596
5587
  "pathDialogFoot": "_3j77BW_pathDialogFoot",
5597
- "badgeWarn": "_3j77BW_badgeWarn",
5598
5588
  "searchInput": "_3j77BW_searchInput",
5599
- "badgeInfo": "_3j77BW_badgeInfo",
5600
- "pathDialog": "_3j77BW_pathDialog",
5601
- "previewRow": "_3j77BW_previewRow",
5602
- "moreEnd": "_3j77BW_moreEnd",
5589
+ "badgeSuccess": "_3j77BW_badgeSuccess",
5590
+ "pathDialogRow": "_3j77BW_pathDialogRow",
5591
+ "badgeWarn": "_3j77BW_badgeWarn",
5603
5592
  "pathDialogDesc": "_3j77BW_pathDialogDesc",
5604
- "pathRow": "_3j77BW_pathRow",
5593
+ "filterChip": "_3j77BW_filterChip",
5605
5594
  "pathText": "_3j77BW_pathText",
5595
+ "headActions": "_3j77BW_headActions",
5596
+ "event": "_3j77BW_event",
5597
+ "filterChipActive": "_3j77BW_filterChipActive",
5598
+ "headHint": "_3j77BW_headHint",
5599
+ "head": "_3j77BW_head",
5606
5600
  "catUninstall": "_3j77BW_catUninstall",
5607
- "pathDialogReset": "_3j77BW_pathDialogReset",
5608
- "list": "_3j77BW_list",
5609
- "badgeError": "_3j77BW_badgeError",
5610
- "entry": "_3j77BW_entry",
5611
5601
  "actions": "_3j77BW_actions",
5602
+ "logList": "_3j77BW_logList",
5603
+ "pathDialog": "_3j77BW_pathDialog",
5604
+ "catBadge": "_3j77BW_catBadge",
5605
+ "time": "_3j77BW_time",
5606
+ "message": "_3j77BW_message",
5607
+ "panel": "_3j77BW_panel",
5608
+ "entry": "_3j77BW_entry",
5609
+ "more": "_3j77BW_more",
5610
+ "pathRow": "_3j77BW_pathRow",
5612
5611
  "foot": "_3j77BW_foot",
5613
- "footActions": "_3j77BW_footActions",
5612
+ "pathLabel": "_3j77BW_pathLabel",
5613
+ "catInstall": "_3j77BW_catInstall",
5614
+ "search": "_3j77BW_search",
5614
5615
  "badgeDebug": "_3j77BW_badgeDebug",
5615
- "catDiagnostics": "_3j77BW_catDiagnostics",
5616
- "catSystem": "_3j77BW_catSystem",
5617
- "empty": "_3j77BW_empty",
5618
- "filterChipActive": "_3j77BW_filterChipActive",
5619
- "event": "_3j77BW_event",
5616
+ "catUpdate": "_3j77BW_catUpdate",
5617
+ "footPath": "_3j77BW_footPath",
5620
5618
  "pathDialogHint": "_3j77BW_pathDialogHint",
5619
+ "btn": "_3j77BW_btn",
5620
+ "linkBtn": "_3j77BW_linkBtn",
5621
5621
  "filterBar": "_3j77BW_filterBar",
5622
- "time": "_3j77BW_time"
5622
+ "previewRow": "_3j77BW_previewRow"
5623
5623
  };
5624
5624
  //#endregion
5625
5625
  //#region src/client/components/modals/LogsModal.tsx
@@ -6501,10 +6501,15 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
6501
6501
  /** 安装/卸载完成后的结果视图:停留弹窗内,点「完成」关闭 */
6502
6502
  const [installDone, setInstallDone] = (0, react.useState)(false);
6503
6503
  const [uninstallDone, setUninstallDone] = (0, react.useState)(false);
6504
- /** 结果视图是否给「立即重启」:服务端任务终态带出(卸载时 loader 已即时移除 → false 只给「完成」;
6505
- * true 时通知中心待重启条目同步常驻,直到用户点「立即重启」真正重启后才消失) */
6506
- const [installNeedsRestart, setInstallNeedsRestart] = (0, react.useState)(true);
6507
- const [uninstallNeedsRestart, setUninstallNeedsRestart] = (0, react.useState)(true);
6504
+ /** 结果视图是否给「立即重启」:服务端任务终态带出。仅刷新解决不了的兜底场景
6505
+ * (热挂载失败 / 非 dsh 插件 / 更新)为 true;其余(热挂载成功、卸载已即时停用)为 false,
6506
+ * 结果视图只给「完成」,关闭时自动刷新页面生效 */
6507
+ const [installNeedsRestart, setInstallNeedsRestart] = (0, react.useState)(false);
6508
+ const [uninstallNeedsRestart, setUninstallNeedsRestart] = (0, react.useState)(false);
6509
+ /** 结果视图是否显示「关闭后自动刷新」说明:插件已热挂进运行中 loader(安装)、或卸载后
6510
+ * 插件面板仍残留在当前页面(卸载)。关闭弹窗即整页刷新,不给手动刷新按钮。 */
6511
+ const [installNeedsReload, setInstallNeedsReload] = (0, react.useState)(false);
6512
+ const [uninstallNeedsReload, setUninstallNeedsReload] = (0, react.useState)(false);
6508
6513
  /** 结果视图「立即重启」:请求宿主重启后进入等待,服务回来后整页刷新 */
6509
6514
  const [restarting, setRestarting] = (0, react.useState)(false);
6510
6515
  /** 操作失败完整信息 + 所属插件仓库 + 失败类型(决定弹窗标题「安装失败/卸载失败」)+ 实际执行的安装命令 + 尝试过的安装方式(issue 预填用) */
@@ -6529,30 +6534,41 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
6529
6534
  (0, react.useEffect)(() => {
6530
6535
  ensurePluginCss();
6531
6536
  }, [view]);
6537
+ /** 后台任务(弹窗已关)完成且只需刷新页面即生效时,等结果 Toast 读完再整页刷新:
6538
+ * 新插件(或卸载后残留)的客户端资源要重新加载页面才会生效,无需重启宿主。 */
6539
+ const scheduleAutoReload = () => {
6540
+ window.setTimeout(() => window.location.reload(), 1600);
6541
+ };
6532
6542
  const queue = useTaskQueue({
6533
6543
  t,
6534
6544
  langKey,
6535
6545
  refreshInstalled: catalog.refreshInstalled,
6536
- onInstallDone: (viaModal, repo, needsRestart, update) => {
6546
+ onInstallDone: (viaModal, repo, needsRestart, update, needsReload) => {
6547
+ const reload = needsReload === true;
6537
6548
  setInstallNeedsRestart(needsRestart);
6549
+ setInstallNeedsReload(reload);
6538
6550
  if (viaModal) setInstallDone(true);
6539
6551
  else setToast({
6540
6552
  id: Date.now(),
6541
- kind: "done"
6553
+ kind: reload ? "installedReload" : needsRestart ? "done" : "installedLive"
6542
6554
  });
6555
+ if (!viaModal && reload) scheduleAutoReload();
6543
6556
  setNotifications(addSuccess({
6544
6557
  kind: "install",
6545
6558
  action: update ? "update" : "install",
6546
6559
  repo: repo ?? ""
6547
6560
  }));
6548
6561
  },
6549
- onUninstallDone: (viaModal, repo, needsRestart) => {
6562
+ onUninstallDone: (viaModal, repo, needsRestart, needsReload) => {
6563
+ const reload = needsReload === true;
6550
6564
  setUninstallNeedsRestart(needsRestart);
6565
+ setUninstallNeedsReload(reload);
6551
6566
  if (viaModal) setUninstallDone(true);
6552
6567
  else setToast({
6553
6568
  id: Date.now(),
6554
6569
  kind: "removed"
6555
6570
  });
6571
+ if (!viaModal && reload) scheduleAutoReload();
6556
6572
  setNotifications(addSuccess({
6557
6573
  kind: "uninstall",
6558
6574
  repo: repo ?? ""
@@ -6725,13 +6741,24 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
6725
6741
  kind: "revealFail"
6726
6742
  });
6727
6743
  };
6728
- /** 「立即重启」:POST 同源 /restart,宿主进程自杀重启;随后轮询服务恢复后整页刷新。 */
6744
+ /** 「立即重启」:POST 同源 /restart,宿主进程自杀重启;随后轮询服务恢复后整页刷新。
6745
+ * 只在刷新解决不了的兜底场景(热挂载失败 / 非 dsh 插件 / 更新)出现。
6746
+ * 桌面端宿主归应用壳管(服务端回 `desktop: true` 且不重启):不轮询,改提示退出重开。 */
6729
6747
  const requestRestart = async () => {
6730
6748
  if (restarting) return;
6731
6749
  setRestarting(true);
6750
+ let desktop = false;
6732
6751
  try {
6733
- await fetch("/dsh-plugin-hub/restart", { method: "POST" });
6752
+ desktop = (await (await fetch("/dsh-plugin-hub/restart", { method: "POST" })).json()).desktop === true;
6734
6753
  } catch {}
6754
+ if (desktop) {
6755
+ setRestarting(false);
6756
+ setToast({
6757
+ id: Date.now(),
6758
+ kind: "restartDesktop"
6759
+ });
6760
+ return;
6761
+ }
6735
6762
  let attempts = 0;
6736
6763
  const poll = async () => {
6737
6764
  attempts += 1;
@@ -6868,7 +6895,7 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
6868
6895
  openSection: settingsSection,
6869
6896
  onConsumedOpenSection: () => setSettingsSection(null)
6870
6897
  }), showHubUpdate && (0, react.createElement)(HubUpdateModal, {
6871
- info: catalog.hubUpdateInfo ?? { version: "1.6.1" },
6898
+ info: catalog.hubUpdateInfo ?? { version: "1.6.3" },
6872
6899
  lang,
6873
6900
  t,
6874
6901
  hasUpdate: catalog.hubHasUpdate,
@@ -6958,7 +6985,12 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
6958
6985
  cliOnly: confirmPlugin.install?.webInstallable === false,
6959
6986
  submitting: queue.submitting,
6960
6987
  needsRestart: installNeedsRestart,
6961
- onClose: () => setConfirmPlugin(null),
6988
+ needsReload: installNeedsReload,
6989
+ onClose: () => {
6990
+ const reload = installDone && installNeedsReload;
6991
+ setConfirmPlugin(null);
6992
+ if (reload) window.location.reload();
6993
+ },
6962
6994
  onCopy: () => copyCommand(confirmPlugin),
6963
6995
  onInstall: () => queue.installNow(confirmPlugin, confirmIsUpdate ? { update: true } : void 0),
6964
6996
  onRestart: () => setShowRestartConfirm(true)
@@ -6974,10 +7006,13 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
6974
7006
  cliOnly: false,
6975
7007
  submitting: queue.submitting,
6976
7008
  needsRestart: installNeedsRestart,
7009
+ needsReload: installNeedsReload,
6977
7010
  onClose: () => {
7011
+ const reload = installDone && installNeedsReload;
6978
7012
  setInstallDone(false);
6979
7013
  setConfirmCustomTarget(null);
6980
7014
  setConfirmCustomChannel(null);
7015
+ if (reload) window.location.reload();
6981
7016
  },
6982
7017
  onCopy: () => {
6983
7018
  doCopy(`pnpm add ${confirmCustomTarget}`);
@@ -7003,10 +7038,13 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
7003
7038
  cliOnly: false,
7004
7039
  submitting: queue.submitting,
7005
7040
  needsRestart: installNeedsRestart,
7041
+ needsReload: installNeedsReload,
7006
7042
  onClose: () => {
7043
+ const reload = installDone && installNeedsReload;
7007
7044
  setInstallDone(false);
7008
7045
  setConfirmGlobalNpm(null);
7009
7046
  setConfirmCustomChannel(null);
7047
+ if (reload) window.location.reload();
7010
7048
  },
7011
7049
  onCopy: () => {
7012
7050
  doCopy(`npm install -g ${confirmGlobalNpm.pkgs.join(" ")}`);
@@ -7026,10 +7064,13 @@ window.__ModuleLoader__.load({ id: "dsh-plugin", factory: (require) => {
7026
7064
  restarting,
7027
7065
  submitting: queue.submitting,
7028
7066
  needsRestart: uninstallNeedsRestart,
7067
+ needsReload: uninstallNeedsReload,
7029
7068
  onClose: () => {
7069
+ const reload = uninstallDone && uninstallNeedsReload;
7030
7070
  setUninstallDone(false);
7031
7071
  setUninstallPlugin(null);
7032
7072
  setUninstallItem(null);
7073
+ if (reload) window.location.reload();
7033
7074
  },
7034
7075
  onCancel: () => {
7035
7076
  setUninstallPlugin(null);