mirror of
https://github.com/vegu-ai/talemate.git
synced 2025-09-02 18:39:09 +00:00
fix debug logging options not sticking
This commit is contained in:
parent
54933b52d7
commit
5e9e89d452
1 changed files with 39 additions and 16 deletions
|
@ -26,30 +26,33 @@
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<v-list density="compact" v-model:selected="debugMenuSelected" select-strategy="leaf" color="secondary">
|
<v-list density="compact" color="secondary">
|
||||||
<v-list-subheader>Debug Logging</v-list-subheader>
|
<v-list-subheader>Debug Logging</v-list-subheader>
|
||||||
<v-list-item value="logStateSet">
|
<v-list-item>
|
||||||
SET State
|
SET State
|
||||||
<template v-slot:prepend="{ isSelected }">
|
<template v-slot:prepend>
|
||||||
<v-list-item-action start>
|
<v-checkbox-btn
|
||||||
<v-checkbox-btn :model-value="isSelected"></v-checkbox-btn>
|
:model-value="debugMenuSelected.includes('logStateSet')"
|
||||||
</v-list-item-action>
|
@update:model-value="value => toggleDebugOption('logStateSet', value)"
|
||||||
|
></v-checkbox-btn>
|
||||||
</template>
|
</template>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
<v-list-item value="logStateGet">
|
<v-list-item>
|
||||||
GET State
|
GET State
|
||||||
<template v-slot:prepend="{ isSelected }">
|
<template v-slot:prepend>
|
||||||
<v-list-item-action start>
|
<v-checkbox-btn
|
||||||
<v-checkbox-btn :model-value="isSelected"></v-checkbox-btn>
|
:model-value="debugMenuSelected.includes('logStateGet')"
|
||||||
</v-list-item-action>
|
@update:model-value="value => toggleDebugOption('logStateGet', value)"
|
||||||
|
></v-checkbox-btn>
|
||||||
</template>
|
</template>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
<v-list-item value="clearLogOnTest">
|
<v-list-item>
|
||||||
Clear Log on Test
|
Clear Log on Test
|
||||||
<template v-slot:prepend="{ isSelected }">
|
<template v-slot:prepend>
|
||||||
<v-list-item-action start>
|
<v-checkbox-btn
|
||||||
<v-checkbox-btn :model-value="isSelected"></v-checkbox-btn>
|
:model-value="debugMenuSelected.includes('clearLogOnTest')"
|
||||||
</v-list-item-action>
|
@update:model-value="value => toggleDebugOption('clearLogOnTest', value)"
|
||||||
|
></v-checkbox-btn>
|
||||||
</template>
|
</template>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
</v-list>
|
</v-list>
|
||||||
|
@ -711,6 +714,16 @@ export default {
|
||||||
console.log("Breakpoint released");
|
console.log("Breakpoint released");
|
||||||
this.breakpoint = null;
|
this.breakpoint = null;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
toggleDebugOption(option, value) {
|
||||||
|
if (value) {
|
||||||
|
this.debugMenuSelected.push(option);
|
||||||
|
} else {
|
||||||
|
this.debugMenuSelected = this.debugMenuSelected.filter(o => o !== option);
|
||||||
|
}
|
||||||
|
// Save to local storage
|
||||||
|
localStorage.setItem('talemate_debug_options', JSON.stringify(this.debugMenuSelected));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -718,6 +731,16 @@ export default {
|
||||||
this.onResize();
|
this.onResize();
|
||||||
this.registerMessageHandler(this.handleMessage);
|
this.registerMessageHandler(this.handleMessage);
|
||||||
|
|
||||||
|
// Load debug menu state from local storage if available
|
||||||
|
const savedDebugOptions = localStorage.getItem('talemate_debug_options');
|
||||||
|
if (savedDebugOptions) {
|
||||||
|
try {
|
||||||
|
this.debugMenuSelected = JSON.parse(savedDebugOptions);
|
||||||
|
} catch (e) {
|
||||||
|
console.error("Failed to parse saved debug options", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const nodeEditor = this;
|
const nodeEditor = this;
|
||||||
|
|
||||||
LGraphCanvas.prototype.prompt = function(propertyName, value, callback, ev, multiline, validator) {
|
LGraphCanvas.prototype.prompt = function(propertyName, value, callback, ev, multiline, validator) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue