diff --git a/src/App.vue b/src/App.vue index 306807f..e97b399 100644 --- a/src/App.vue +++ b/src/App.vue @@ -117,7 +117,7 @@ export default defineComponent({ console.log(e); } - EventBus.getInstance().on(EventNamesDefine.CheckDebug, () => { + EventBus.getInstance().on(EventNamesDefine.CheckDebug2, () => { const to_normal_url = () => { const p1 = window.location.href.indexOf("?debug"); const p2 = window.location.href.indexOf("#"); diff --git a/src/common/ClientConnection.ts b/src/common/ClientConnection.ts index 97e1df6..b9a3f6a 100644 --- a/src/common/ClientConnection.ts +++ b/src/common/ClientConnection.ts @@ -1519,6 +1519,15 @@ export default class ClientConnection { console.error(e); } } + public async CheckModeIndex(mode_index:number) { + try { + return await this.doRpc( + new Protocol.RpcCheckModeIndexRequestEntity(mode_index) + ); + } catch (e) { + console.error(e); + } + } } export interface NotifyMessage { diff --git a/src/components/ModeDialog.vue b/src/components/ModeDialog.vue index d218726..be459a0 100644 --- a/src/components/ModeDialog.vue +++ b/src/components/ModeDialog.vue @@ -1,537 +1,541 @@ - - - - - + + + + + diff --git a/src/entities/WSProtocol.ts b/src/entities/WSProtocol.ts index 5922bce..54f1711 100644 --- a/src/entities/WSProtocol.ts +++ b/src/entities/WSProtocol.ts @@ -534,6 +534,9 @@ export namespace Protocol { public static get kRpcFileManagerCreateDirectory() { return Commands.PROTOCOL_PREFIX + "RpcFileManagerCreateDirectory"; } + public static get kRpcCheckModeIndex() { + return Commands.PROTOCOL_PREFIX + "RpcCheckModeIndex"; + } static _all_commands = new Set([ Commands.kUnKnowCommand, Commands.kSearchDevice, @@ -668,6 +671,7 @@ export namespace Protocol { Commands.kRpcFileManagerRename, Commands.kRpcFileManagerDelete, Commands.kRpcFileManagerCreateDirectory, + Commands.kRpcCheckModeIndex, ]); public static get AllCommands() { return this._all_commands; @@ -3541,4 +3545,21 @@ export namespace Protocol { error_message="" error_code=0; } + export class RpcCheckModeIndexRequestEntity extends PacketEntity{ + constructor(mode_index:number,rpc_id = 0) { + super(); + super.command = Commands.kRpcCheckModeIndex; + super.flag = PacketEntity.FLAG_REQUEST; + this.mode_index=mode_index + } + mode_index = 0; + } + export class RpcCheckModeIndexResponseEntity extends PacketEntity{ + constructor() { + super(); + super.flag = PacketEntity.FLAG_RESPONSE; + } + success = false; + + } }