mirror of
https://github.com/Youzini-afk/ST-Bionic-Memory-Ecology.git
synced 2026-05-15 22:30:38 +08:00
Revert "Merge PR #7: notice display and MVU diagnostics"
This reverts commitcdf6111482, reversing changes made to0d8dcb63d2.
This commit is contained in:
31
index.js
31
index.js
@@ -496,7 +496,6 @@ const defaultSettings = {
|
||||
compressionEveryN: 10,
|
||||
|
||||
// UI 面板
|
||||
noticeDisplayMode: "normal", // normal|compact
|
||||
panelTheme: "crimson", // 面板主题 crimson|cyan|amber|violet
|
||||
};
|
||||
|
||||
@@ -1055,30 +1054,6 @@ function syncStageNoticeAbortAction(stage) {
|
||||
});
|
||||
}
|
||||
|
||||
function getStageNoticeDisplayMode(level = "info") {
|
||||
const configuredMode = getSettings()?.noticeDisplayMode;
|
||||
if (
|
||||
configuredMode === "compact" &&
|
||||
level !== "warning" &&
|
||||
level !== "error"
|
||||
) {
|
||||
return "compact";
|
||||
}
|
||||
return "normal";
|
||||
}
|
||||
|
||||
function refreshVisibleStageNotices() {
|
||||
for (const stage of Object.keys(stageNoticeHandles)) {
|
||||
const handle = stageNoticeHandles[stage];
|
||||
if (!handle || handle.isClosed?.()) continue;
|
||||
const status = getStageUiStatus(stage);
|
||||
if (!status) continue;
|
||||
updateStageNotice(stage, status.text, status.meta, status.level, {
|
||||
title: getStageNoticeTitle(stage),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function updateStageNotice(
|
||||
stage,
|
||||
text,
|
||||
@@ -1094,7 +1069,6 @@ function updateStageNotice(
|
||||
const input = {
|
||||
title,
|
||||
message,
|
||||
displayMode: options.displayMode || getStageNoticeDisplayMode(noticeLevel),
|
||||
level: noticeLevel,
|
||||
busy,
|
||||
persist,
|
||||
@@ -5509,7 +5483,6 @@ function updateModuleSettings(patch = {}) {
|
||||
"hideOldMessagesKeepLastN",
|
||||
]);
|
||||
const recallUiKeys = new Set(["recallCardUserInputDisplayMode"]);
|
||||
const noticeUiKeys = new Set(["noticeDisplayMode"]);
|
||||
const settings = getSettings();
|
||||
Object.assign(settings, patch);
|
||||
extension_settings[MODULE_NAME] = settings;
|
||||
@@ -5570,10 +5543,6 @@ function updateModuleSettings(patch = {}) {
|
||||
schedulePersistedRecallMessageUiRefresh(30);
|
||||
}
|
||||
|
||||
if (Object.keys(patch).some((key) => noticeUiKeys.has(key))) {
|
||||
refreshVisibleStageNotices();
|
||||
}
|
||||
|
||||
scheduleServerSettingsSave();
|
||||
return settings;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user