增加禁用融合参数选项

This commit is contained in:
ljqing 2023-01-17 19:18:57 +08:00
parent ddb5e15800
commit ee96b91aef
4 changed files with 163 additions and 142 deletions

View File

@ -75,6 +75,9 @@
<q-card-actions align="right">
<span>{{ $t("Whether to hide the desktop") }}</span><q-checkbox style="justify-content: flex-start"
v-model="hide_desktop_value" @click="send_hide_desktop" />
<span>{{ $t("disable blending params") }}</span>
<q-checkbox style="justify-content: flex-start"
v-model="disable_blending_params" @click="send_disable_blending_params" />
<div class="q-space" data-v-39efcd1f=""></div>
<q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall config')" />
<div class="q-space" data-v-39efcd1f=""></div>
@ -144,6 +147,9 @@ export default defineComponent({
const send_hide_desktop = () => {
set?.SetBlendingOption(0, hide_desktop_value.value ? 1 : 0);
};
const send_disable_blending_params = () => {
set?.SetBlendingOption(1, disable_blending_params.value ? 1 : 0);
};
const resetall=()=>{
set?.ResetBlendingConfig()
}
@ -152,7 +158,7 @@ export default defineComponent({
let optionsstr = ref();
optionsstr.value = "FusionLocale";
const hide_desktop_value = ref(true);
const hide_desktop_id = ref(0);
const disable_blending_params = ref(false);
const options = computed({
get() {
return optionsstr.value;
@ -233,15 +239,28 @@ export default defineComponent({
setTimeout(() => {
set?.GetBlendingConfig("").then((res) => {
let tmp = JSON.parse(res ? res.config : "");
hide_desktop_id.value = tmp.options[0][0];
hide_desktop_value.value = tmp.options[0][1] == 0 ? false : true;
//console.log(tmp.options[0][1])
let local_options = [ [ref(0), hide_desktop_value], [ref(1), disable_blending_params] ];
let k:any;
for(k in local_options) {
let local_opt = local_options[k];
let ii:any;
for(ii in tmp.options){
let opt = tmp.options[ii];
if (2 == opt.length && local_opt[0].value == opt[0]){
local_opt[1].value = (opt[1] == 0 ? false : true);
break;
}
}
}
});
}, 1000);
});
return {
send_hide_desktop,
hide_desktop_value,
send_disable_blending_params,
disable_blending_params,
clear,
show_dialog,
options,

View File

@ -426,4 +426,5 @@ export default {
"Whether to enable integration":"Whether to enable integration",
"Whether to hide the desktop":"Whether to hide the desktop",
"resetall config":"resetall config",
"disable blending params":"Dsable blending params",
};

View File

@ -695,4 +695,5 @@ export default {
"Whether to enable integration":"是否启用融合",
"Whether to hide the desktop":"是否隐藏桌面",
"resetall config":"重置所有配置",
"disable blending params":"禁用融合参数",
};