Lint
This commit is contained in:
parent
4714b6bc75
commit
8bd72bffa4
@ -248,7 +248,7 @@ const debounceTimeout = ref<number | null>(null);
|
|||||||
const commandObject = ref<{
|
const commandObject = ref<{
|
||||||
[key in keyof SettingsCommand]: string;
|
[key in keyof SettingsCommand]: string;
|
||||||
}>({});
|
}>({});
|
||||||
const shellValue = ref<string>("")
|
const shellValue = ref<string>("");
|
||||||
|
|
||||||
const $showError = inject<TToast>("$showError") as TToast;
|
const $showError = inject<TToast>("$showError") as TToast;
|
||||||
const $showSuccess = inject<TToast>("$showSuccess") as TToast;
|
const $showSuccess = inject<TToast>("$showSuccess") as TToast;
|
||||||
@ -307,16 +307,16 @@ const save = async () => {
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
for (const name of Object.keys(settings.value.commands)) {
|
for (const name of Object.keys(settings.value.commands)) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const newValue = commandObject.value[name]
|
const newValue = commandObject.value[name];
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
if(name in commandObject.value && !Array.isArray(newValue)) {
|
if (name in commandObject.value && !Array.isArray(newValue)) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
newSettings.commands[name] = newValue
|
newSettings.commands[name] = newValue
|
||||||
.split("\n")
|
.split("\n")
|
||||||
.filter((cmd: string) => cmd !== "");
|
.filter((cmd: string) => cmd !== "");
|
||||||
} else {
|
} else {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
newSettings.commands[name] = newValue
|
newSettings.commands[name] = newValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newSettings.shell = shellValue.value.split("\n");
|
newSettings.shell = shellValue.value.split("\n");
|
||||||
@ -381,7 +381,7 @@ onMounted(async () => {
|
|||||||
originalSettings.value = original;
|
originalSettings.value = original;
|
||||||
settings.value = newSettings;
|
settings.value = newSettings;
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
shellValue.value = newSettings.shell.join("\n")
|
shellValue.value = newSettings.shell.join("\n");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
error.value = e;
|
error.value = e;
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user