Revert "feat: split button editor into app subpages"

This reverts commit 5a4e3f6423.
This commit is contained in:
7015725
2026-05-12 20:08:40 +08:00
parent 5a4e3f6423
commit 46393fe9ba
5 changed files with 12 additions and 221 deletions

View File

@@ -489,8 +489,6 @@ FloatBallAppWM.prototype.getToolAppTitle = function(route) {
if (r === "settings_group") return this.getSettingsGroupTitle ? this.getSettingsGroupTitle(this.state.settingsGroupKey) : "设置分组";
if (r === "btn_editor") {
if (this.state.editingButtonIndex !== null && this.state.editingButtonIndex !== undefined) {
if (this.state.buttonEditorSubPage === "basic") return "基础信息"; // button_editor_basic
if (this.state.buttonEditorSubPage === "legacy") return "完整编辑"; // button_editor_legacy
return (this.state.editingButtonIndex === -1) ? "新增按钮" : "编辑按钮";
}
return "按钮管理";
@@ -628,20 +626,9 @@ FloatBallAppWM.prototype.replaceToolAppPage = function(route) {
FloatBallAppWM.prototype.popToolAppPage = function(reason) {
try {
var curRoute = this.state.toolAppRoute ? String(this.state.toolAppRoute) : "";
if (curRoute === "btn_editor") {
if (this.state.editingButtonIndex !== null && this.state.editingButtonIndex !== undefined) {
if (this.state.buttonEditorSubPage !== null && this.state.buttonEditorSubPage !== undefined) {
this.state.buttonEditorSubPage = null;
this.state.keepBtnEditorState = true;
} else {
this.state.editingButtonIndex = null;
this.state.buttonEditorDraft = null;
this.state.keepBtnEditorState = true;
}
} else {
this.state.buttonEditorSubPage = null;
this.state.buttonEditorDraft = null;
}
if (curRoute === "btn_editor" && this.state.editingButtonIndex !== null && this.state.editingButtonIndex !== undefined) {
this.state.editingButtonIndex = null;
this.state.keepBtnEditorState = true;
}
if (curRoute === "schema_editor" && this.state.editingSchemaIndex !== null && this.state.editingSchemaIndex !== undefined) {
this.state.editingSchemaIndex = null;
@@ -652,11 +639,6 @@ FloatBallAppWM.prototype.popToolAppPage = function(reason) {
return true;
}
this.state.toolAppNavStack.pop();
var rr = String(reason || "");
if (curRoute === "btn_editor" && rr.indexOf("button_edit_") === 0 && this.state.editingButtonIndex === null && this.state.toolAppNavStack.length > 1) {
var prevTop = this.state.toolAppNavStack[this.state.toolAppNavStack.length - 1];
if (prevTop && String(prevTop.route || "") === "btn_editor") this.state.toolAppNavStack.pop();
}
var top = this.state.toolAppNavStack[this.state.toolAppNavStack.length - 1];
var nextRoute = top && top.route ? String(top.route) : "settings";
if (nextRoute !== "settings_group") this.state.settingsGroupKey = null;