Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions web/strategy-switch-console/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2653,7 +2653,12 @@ <h2 data-i18n="summary">切换摘要</h2>
}

function currentCashOnlyExecutionForAccount(platform, account) {
return cleanOptionalBoolean(currentEntryForAccount(platform, account)?.cash_only_execution);
const entry = currentEntryForAccount(platform, account);
if (entry) {
const val = cleanOptionalBoolean(entry.cash_only_execution);
if (val !== null) return val;
}
return platformCashOnlyExecutionDefault();
}

function currentCashOnlyExecutionText(platform = state.selected, account = selectedAccount(platform)) {
Expand Down Expand Up @@ -2789,7 +2794,9 @@ <h2 data-i18n="summary">切换摘要</h2>
function currentStrategyForAccount(platform, account) {
const entry = currentEntryForAccount(platform, account);
const profile = cleanStrategyProfile(entry?.strategy_profile);
return profile || "";
if (profile) return profile;
const fallback = account?.default_strategy_profile || account?.strategy_profile || "";
return cleanStrategyProfile(fallback);
}

function currentReservePolicyForAccount(platform, account) {
Expand Down Expand Up @@ -3526,8 +3533,9 @@ <h2 data-i18n="summary">切换摘要</h2>
};
}
const nextEnabled = mode === "enabled";
const entry = currentEntryForAccount(platform, account);
return {
changed: current !== null && current !== nextEnabled,
changed: Boolean(entry && current !== null && current !== nextEnabled),
inputs: { cash_only_execution: nextEnabled },
};
}
Expand Down
2 changes: 1 addition & 1 deletion web/strategy-switch-console/page_asset.js

Large diffs are not rendered by default.

Loading