mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-29 12:22:44 +08:00
规范utools引用
This commit is contained in:
parent
dcac385dbd
commit
05e5223ef3
68
src/App.vue
68
src/App.vue
@ -10,7 +10,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { defineComponent } from "vue";
|
import { defineComponent } from "vue";
|
||||||
import { setCssVar } from "quasar";
|
import { setCssVar } from "quasar";
|
||||||
import UTOOLS from "./js/utools.js";
|
import { utoolsFull, dbManager } from "./js/utools.js";
|
||||||
import programmings from "./js/options/programs.js";
|
import programmings from "./js/options/programs.js";
|
||||||
import defaultProfile from "./js/options/defaultProfile.js";
|
import defaultProfile from "./js/options/defaultProfile.js";
|
||||||
import Cron from "croner";
|
import Cron from "croner";
|
||||||
@ -27,7 +27,7 @@ export default defineComponent({
|
|||||||
isRunningCommand: false,
|
isRunningCommand: false,
|
||||||
profile: defaultProfile.common,
|
profile: defaultProfile.common,
|
||||||
nativeProfile: defaultProfile.native,
|
nativeProfile: defaultProfile.native,
|
||||||
utools: UTOOLS,
|
utools: utoolsFull,
|
||||||
cronJobs: {},
|
cronJobs: {},
|
||||||
enterData: {},
|
enterData: {},
|
||||||
subInputEvent: null,
|
subInputEvent: null,
|
||||||
@ -60,11 +60,11 @@ export default defineComponent({
|
|||||||
startUp() {
|
startUp() {
|
||||||
this.loadProfile();
|
this.loadProfile();
|
||||||
this.startUpOnce();
|
this.startUpOnce();
|
||||||
this.utools.whole.onPluginEnter((enter) => {
|
this.utools.onPluginEnter((enter) => {
|
||||||
this.enterPlugin(enter);
|
this.enterPlugin(enter);
|
||||||
});
|
});
|
||||||
window.isAppVersion4() &&
|
window.isAppVersion4() &&
|
||||||
this.utools.whole.onMainPush(
|
this.utools.onMainPush(
|
||||||
async ({ code, type, payload }) => {
|
async ({ code, type, payload }) => {
|
||||||
let result = await this.runCommand(code, payload, 5000);
|
let result = await this.runCommand(code, payload, 5000);
|
||||||
return result.map((x) => {
|
return result.map((x) => {
|
||||||
@ -78,13 +78,13 @@ export default defineComponent({
|
|||||||
window.utools.showNotification("已复制");
|
window.utools.showNotification("已复制");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
this.utools.whole.onPluginOut(() => {
|
this.utools.onPluginOut(() => {
|
||||||
this.outPlugin();
|
this.outPlugin();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
loadProfile() {
|
loadProfile() {
|
||||||
let commonProfile = this.utools.getDB("cfg_profile");
|
let commonProfile = dbManager.getDB("cfg_profile");
|
||||||
let nativeProfile = this.utools.getDB(
|
let nativeProfile = dbManager.getDB(
|
||||||
"cfg_" + utools.getNativeId() + "_profile"
|
"cfg_" + utools.getNativeId() + "_profile"
|
||||||
);
|
);
|
||||||
this.profile = Object.assign(
|
this.profile = Object.assign(
|
||||||
@ -97,8 +97,11 @@ export default defineComponent({
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
saveProfile() {
|
saveProfile() {
|
||||||
this.utools.putDB(window.lodashM.cloneDeep(this.profile), "cfg_profile");
|
dbManager.putDB(
|
||||||
this.utools.putDB(
|
window.lodashM.cloneDeep(this.profile),
|
||||||
|
"cfg_profile"
|
||||||
|
);
|
||||||
|
dbManager.putDB(
|
||||||
window.lodashM.cloneDeep(this.nativeProfile),
|
window.lodashM.cloneDeep(this.nativeProfile),
|
||||||
"cfg_" + utools.getNativeId() + "_profile"
|
"cfg_" + utools.getNativeId() + "_profile"
|
||||||
);
|
);
|
||||||
@ -148,7 +151,7 @@ export default defineComponent({
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
reslove([`超过${timeout}ms未响应`]);
|
reslove([`超过${timeout}ms未响应`]);
|
||||||
}, timeout);
|
}, timeout);
|
||||||
let command = this.utools.getDB("qc_" + featureCode);
|
let command = dbManager.getDB("qc_" + featureCode);
|
||||||
let commandCode = command.cmd;
|
let commandCode = command.cmd;
|
||||||
if (mainInput)
|
if (mainInput)
|
||||||
commandCode = commandCode.replace(/\{\{input\}\}/g, mainInput);
|
commandCode = commandCode.replace(/\{\{input\}\}/g, mainInput);
|
||||||
@ -180,39 +183,24 @@ export default defineComponent({
|
|||||||
runCommandSilently(featureCode) {
|
runCommandSilently(featureCode) {
|
||||||
this.runCommand(featureCode);
|
this.runCommand(featureCode);
|
||||||
},
|
},
|
||||||
// usageStatistics(featureCode, runTime) {
|
|
||||||
// let statisticsData = this.utools.getDB("cfg_statisticsData");
|
|
||||||
// let thisYear = runTime.year;
|
|
||||||
// if (!statisticsData[thisYear]) statisticsData[thisYear] = [];
|
|
||||||
// statisticsData[thisYear].push({
|
|
||||||
// code: featureCode,
|
|
||||||
// time: {
|
|
||||||
// month: runTime.month,
|
|
||||||
// day: runTime.day,
|
|
||||||
// hour: runTime.hour,
|
|
||||||
// minute: runTime.minute,
|
|
||||||
// },
|
|
||||||
// });
|
|
||||||
// this.utools.putDB(statisticsData, "cfg_statisticsData");
|
|
||||||
// },
|
|
||||||
updateExp() {
|
updateExp() {
|
||||||
let exp = this.utools.getDB("cfg_exp");
|
let exp = dbManager.getDB("cfg_exp");
|
||||||
if (typeof exp !== "object") {
|
if (typeof exp !== "object") {
|
||||||
exp += 1;
|
exp += 1;
|
||||||
this.utools.putDB(exp, "cfg_exp");
|
dbManager.putDB(exp, "cfg_exp");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let statisticsData = this.utools.getDB("cfg_statisticsData");
|
let statisticsData = dbManager.getDB("cfg_statisticsData");
|
||||||
exp = Object.values(statisticsData)
|
exp = Object.values(statisticsData)
|
||||||
.map((x) => x.length)
|
.map((x) => x.length)
|
||||||
.reduce((x, y) => x + y);
|
.reduce((x, y) => x + y);
|
||||||
// 有BUG可能删不掉
|
// 有BUG可能删不掉
|
||||||
this.utools.delDB("cfg_statisticsData");
|
dbManager.delDB("cfg_statisticsData");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
exp = 0;
|
exp = 0;
|
||||||
}
|
}
|
||||||
this.utools.putDB(exp, "cfg_exp");
|
dbManager.putDB(exp, "cfg_exp");
|
||||||
},
|
},
|
||||||
parseDate: (dateString) => {
|
parseDate: (dateString) => {
|
||||||
return {
|
return {
|
||||||
@ -225,25 +213,11 @@ export default defineComponent({
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
firstRun() {
|
firstRun() {
|
||||||
if (this.utools.getStorage("st_v300Inited")) return;
|
if (dbManager.getStorage("st_v300Inited")) return;
|
||||||
window.showUb.help();
|
window.showUb.help();
|
||||||
// 处理统计数据
|
|
||||||
// let statisticsData = this.utools.getDB("cfg_statisticsData");
|
|
||||||
// window.lodashM.forIn(statisticsData, (data, year) => {
|
|
||||||
// statisticsData[year] = data.map((x) => {
|
|
||||||
// if (!x.command) return x;
|
|
||||||
// let code =
|
|
||||||
// x.command.code === "options" ? "configuration" : x.command.code;
|
|
||||||
// return {
|
|
||||||
// code: code,
|
|
||||||
// time: x.time,
|
|
||||||
// };
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
// this.utools.putDB(statisticsData, "cfg_statisticsData");
|
|
||||||
// 删掉数据库内的默认命令
|
// 删掉数据库内的默认命令
|
||||||
this.utools.delAll("qc_default");
|
dbManager.delAll("qc_default");
|
||||||
this.utools.setStorage("st_v300Inited", true);
|
dbManager.setStorage("st_v300Inited", true);
|
||||||
},
|
},
|
||||||
getOpacityColor(color, percent) {
|
getOpacityColor(color, percent) {
|
||||||
return (
|
return (
|
||||||
|
@ -83,6 +83,7 @@ import EditorTools from "components/editor/EditorTools";
|
|||||||
import CommandRunResult from "components/CommandRunResult";
|
import CommandRunResult from "components/CommandRunResult";
|
||||||
import CommandComposer from "components/composer/CommandComposer.vue";
|
import CommandComposer from "components/composer/CommandComposer.vue";
|
||||||
import programs from "js/options/programs.js";
|
import programs from "js/options/programs.js";
|
||||||
|
import { dbManager } from "js/utools.js";
|
||||||
|
|
||||||
// 预加载 MonacoEditor
|
// 预加载 MonacoEditor
|
||||||
const MonacoEditorPromise = import("components/editor/MonacoEditor");
|
const MonacoEditorPromise = import("components/editor/MonacoEditor");
|
||||||
@ -169,7 +170,7 @@ export default {
|
|||||||
// 命令初始化
|
// 命令初始化
|
||||||
commandInit() {
|
commandInit() {
|
||||||
let quickCommandInfo = this.isRunCodePage
|
let quickCommandInfo = this.isRunCodePage
|
||||||
? this.$root.utools.getDB("cfg_codeHistory")
|
? dbManager.getDB("cfg_codeHistory")
|
||||||
: this.action.data;
|
: this.action.data;
|
||||||
quickCommandInfo?.program &&
|
quickCommandInfo?.program &&
|
||||||
Object.assign(
|
Object.assign(
|
||||||
@ -233,7 +234,7 @@ export default {
|
|||||||
case "apply":
|
case "apply":
|
||||||
return this.replaceText(actionData);
|
return this.replaceText(actionData);
|
||||||
case "close":
|
case "close":
|
||||||
return this.showComposer = false;
|
return (this.showComposer = false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
@ -245,7 +246,7 @@ export default {
|
|||||||
window.lodashM.cloneDeep(updatedData)
|
window.lodashM.cloneDeep(updatedData)
|
||||||
);
|
);
|
||||||
let newQuickcommandInfo = window.lodashM.cloneDeep(this.quickcommandInfo);
|
let newQuickcommandInfo = window.lodashM.cloneDeep(this.quickcommandInfo);
|
||||||
this.$root.utools.putDB(
|
dbManager.putDB(
|
||||||
newQuickcommandInfo,
|
newQuickcommandInfo,
|
||||||
"qc_" + this.quickcommandInfo.features.code
|
"qc_" + this.quickcommandInfo.features.code
|
||||||
);
|
);
|
||||||
@ -272,7 +273,7 @@ export default {
|
|||||||
if (this.action.type !== "run") return;
|
if (this.action.type !== "run") return;
|
||||||
let command = window.lodashM.cloneDeep(this.quickcommandInfo);
|
let command = window.lodashM.cloneDeep(this.quickcommandInfo);
|
||||||
command.cursorPosition = this.$refs.editor.getCursorPosition();
|
command.cursorPosition = this.$refs.editor.getCursorPosition();
|
||||||
this.$root.utools.putDB(command, "cfg_codeHistory");
|
dbManager.putDB(command, "cfg_codeHistory");
|
||||||
},
|
},
|
||||||
monacoTyping(val) {
|
monacoTyping(val) {
|
||||||
this.quickcommandInfo.cmd = val;
|
this.quickcommandInfo.cmd = val;
|
||||||
|
@ -77,6 +77,7 @@ import ResultArea from "components/ResultArea.vue";
|
|||||||
import ResultMenu from "components/popup/ResultMenu.vue";
|
import ResultMenu from "components/popup/ResultMenu.vue";
|
||||||
import { generateFlowsCode } from "js/composer/generateCode";
|
import { generateFlowsCode } from "js/composer/generateCode";
|
||||||
import { getValidCommand } from "js/commandManager";
|
import { getValidCommand } from "js/commandManager";
|
||||||
|
import { dbManager } from "js/utools.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { ResultArea, ResultMenu },
|
components: { ResultArea, ResultMenu },
|
||||||
@ -225,7 +226,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 特殊变量赋值
|
// 特殊变量赋值
|
||||||
assignSpecialVars(cmd) {
|
assignSpecialVars(cmd) {
|
||||||
let userData = this.$root.utools.userData.all();
|
let userData = dbManager.userData.all();
|
||||||
let spVars = window.lodashM.filter(specialVars, (sp) => sp.repl);
|
let spVars = window.lodashM.filter(specialVars, (sp) => sp.repl);
|
||||||
window.lodashM.forIn(spVars, (val, key) => {
|
window.lodashM.forIn(spVars, (val, key) => {
|
||||||
let label = val.label.slice(0, -2);
|
let label = val.label.slice(0, -2);
|
||||||
|
@ -59,6 +59,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import draggable from "vuedraggable";
|
import draggable from "vuedraggable";
|
||||||
|
import { dbManager } from "js/utools.js";
|
||||||
|
|
||||||
const FIXED_TAGS = ["未分类", "默认", "搜索结果"];
|
const FIXED_TAGS = ["未分类", "默认", "搜索结果"];
|
||||||
const TAG_ORDER_KEY = "cfg_tagOrder";
|
const TAG_ORDER_KEY = "cfg_tagOrder";
|
||||||
@ -98,7 +99,7 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// 初始化时读取一次数据库
|
// 初始化时读取一次数据库
|
||||||
this.savedTagOrder = this.$root.utools.getDB(TAG_ORDER_KEY);
|
this.savedTagOrder = dbManager.getDB(TAG_ORDER_KEY);
|
||||||
if (!this.savedTagOrder.length) {
|
if (!this.savedTagOrder.length) {
|
||||||
this.savedTagOrder = this.allQuickCommandTags;
|
this.savedTagOrder = this.allQuickCommandTags;
|
||||||
}
|
}
|
||||||
@ -145,7 +146,7 @@ export default {
|
|||||||
// 更新内部缓存
|
// 更新内部缓存
|
||||||
this.savedTagOrder = value;
|
this.savedTagOrder = value;
|
||||||
// 保存到数据库
|
// 保存到数据库
|
||||||
this.$root.utools.putDB(value, TAG_ORDER_KEY);
|
dbManager.putDB(value, TAG_ORDER_KEY);
|
||||||
// 触发标签重排序事件
|
// 触发标签重排序事件
|
||||||
this.$emit("tags-reordered", value);
|
this.$emit("tags-reordered", value);
|
||||||
},
|
},
|
||||||
@ -158,7 +159,7 @@ export default {
|
|||||||
// 更新内部缓存
|
// 更新内部缓存
|
||||||
this.savedTagOrder = newOrder;
|
this.savedTagOrder = newOrder;
|
||||||
// 保存到数据库
|
// 保存到数据库
|
||||||
this.$root.utools.putDB(newOrder, TAG_ORDER_KEY);
|
dbManager.putDB(newOrder, TAG_ORDER_KEY);
|
||||||
// 触发重新加载标签
|
// 触发重新加载标签
|
||||||
this.$emit("tags-reordered", newOrder);
|
this.$emit("tags-reordered", newOrder);
|
||||||
}
|
}
|
||||||
|
@ -142,16 +142,22 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import features from "js/options/quickFeatures.js";
|
import features from "js/options/quickFeatures.js";
|
||||||
|
import { utoolsFull } from "js/utools.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "UtilityFeaturesMenu",
|
name: "UtilityFeaturesMenu",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
utools: utoolsFull,
|
||||||
|
};
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toggleFeature(type, enable) {
|
toggleFeature(type, enable) {
|
||||||
enable
|
enable
|
||||||
? this.$root.utools.whole.setFeature(
|
? this.utools.setFeature(
|
||||||
window.lodashM.cloneDeep(features[type])
|
window.lodashM.cloneDeep(features[type])
|
||||||
)
|
)
|
||||||
: this.$root.utools.whole.removeFeature(features[type].code);
|
: this.utools.removeFeature(features[type].code);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -103,6 +103,7 @@ import UtilityFeaturesMenu from "./UtilityFeaturesMenu.vue";
|
|||||||
import EnvConfigMenu from "./EnvConfigMenu.vue";
|
import EnvConfigMenu from "./EnvConfigMenu.vue";
|
||||||
import PersonalizeMenu from "./PersonalizeMenu.vue";
|
import PersonalizeMenu from "./PersonalizeMenu.vue";
|
||||||
import UserData from "../popup/UserData.vue";
|
import UserData from "../popup/UserData.vue";
|
||||||
|
import { utoolsFull } from "js/utools.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ConfigurationMenu",
|
name: "ConfigurationMenu",
|
||||||
@ -121,6 +122,7 @@ export default {
|
|||||||
showAbout: false,
|
showAbout: false,
|
||||||
showPanelConf: false,
|
showPanelConf: false,
|
||||||
showUserData: false,
|
showUserData: false,
|
||||||
|
utools: utoolsFull,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@ -140,7 +142,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
unMarkTag() {
|
unMarkTag() {
|
||||||
this.$root.utools.whole.removeFeature(
|
this.utools.removeFeature(
|
||||||
`panel_${window.hexEncode(this.currentTag)}`
|
`panel_${window.hexEncode(this.currentTag)}`
|
||||||
);
|
);
|
||||||
window.lodashM.pull(
|
window.lodashM.pull(
|
||||||
|
@ -51,11 +51,13 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import IconPicker from "components/popup/IconPicker";
|
import IconPicker from "components/popup/IconPicker";
|
||||||
|
import { utoolsFull } from "js/utools.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { IconPicker },
|
components: { IconPicker },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
utools: utoolsFull,
|
||||||
features: {
|
features: {
|
||||||
explain: `进入${this.currentTag}的面板视图`,
|
explain: `进入${this.currentTag}的面板视图`,
|
||||||
icon: "logo/quickcommand.png",
|
icon: "logo/quickcommand.png",
|
||||||
@ -71,9 +73,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
markTag() {
|
markTag() {
|
||||||
this.$root.utools.whole.setFeature(
|
this.utools.setFeature(window.lodashM.cloneDeep(this.features));
|
||||||
window.lodashM.cloneDeep(this.features)
|
|
||||||
);
|
|
||||||
this.$root.$refs.view.activatedQuickPanels.push(this.currentTag);
|
this.$root.$refs.view.activatedQuickPanels.push(this.currentTag);
|
||||||
quickcommand.showMessageBox(
|
quickcommand.showMessageBox(
|
||||||
`主输入框输入『${this.features.cmds.join("、")}』即可直接进入『${
|
`主输入框输入『${this.features.cmds.join("、")}』即可直接进入『${
|
||||||
|
@ -62,7 +62,7 @@ const joinLink = [
|
|||||||
"https://www.yuque.com/g/fofolee/qcshares4/collaborator/join?token=DXb4XAVatwn2OoGK#",
|
"https://www.yuque.com/g/fofolee/qcshares4/collaborator/join?token=DXb4XAVatwn2OoGK#",
|
||||||
"https://www.yuque.com/g/fofolee/qcshares5/collaborator/join?token=tw1kyfD2T4jjsQHc#",
|
"https://www.yuque.com/g/fofolee/qcshares5/collaborator/join?token=tw1kyfD2T4jjsQHc#",
|
||||||
];
|
];
|
||||||
|
import { dbManager } from "js/utools.js";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -167,10 +167,10 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
loadYuQueInfo() {
|
loadYuQueInfo() {
|
||||||
return this.$root.utools.getDB("cfg_extraInfo");
|
return dbManager.getDB("cfg_extraInfo");
|
||||||
},
|
},
|
||||||
saveYuQueInfo() {
|
saveYuQueInfo() {
|
||||||
this.$root.utools.putDB(
|
dbManager.putDB(
|
||||||
window.lodashM.cloneDeep(this.yuQueInfo),
|
window.lodashM.cloneDeep(this.yuQueInfo),
|
||||||
"cfg_extraInfo"
|
"cfg_extraInfo"
|
||||||
);
|
);
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { dbManager } from "js/utools.js";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -68,18 +69,18 @@ export default {
|
|||||||
showInsertBtn: Boolean,
|
showInsertBtn: Boolean,
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.allUserData = this.$root.utools.userData.all();
|
this.allUserData = dbManager.userData.all();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
saveUserData() {
|
saveUserData() {
|
||||||
this.allUserData.forEach((item) => {
|
this.allUserData.forEach((item) => {
|
||||||
this.$root.utools.userData.put(item.value, item.id, item.isNative);
|
dbManager.userData.put(item.value, item.id, item.isNative);
|
||||||
});
|
});
|
||||||
quickcommand.showMessageBox("更新完毕!");
|
quickcommand.showMessageBox("更新完毕!");
|
||||||
},
|
},
|
||||||
delUserData(id) {
|
delUserData(id) {
|
||||||
quickcommand.showConfirmBox("删除后不可恢复").then(() => {
|
quickcommand.showConfirmBox("删除后不可恢复").then(() => {
|
||||||
this.$root.utools.userData.del(id);
|
dbManager.userData.del(id);
|
||||||
this.allUserData = this.allUserData.filter((item) => item.id !== id);
|
this.allUserData = this.allUserData.filter((item) => item.id !== id);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -97,7 +98,7 @@ export default {
|
|||||||
value,
|
value,
|
||||||
isNative: true,
|
isNative: true,
|
||||||
});
|
});
|
||||||
this.$root.utools.userData.put(value, id, true);
|
dbManager.userData.put(value, id, true);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -130,10 +130,12 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import levelDetail from "js/options/levelDetail.js";
|
import levelDetail from "js/options/levelDetail.js";
|
||||||
|
import { dbManager, utoolsFull } from "js/utools.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
utools: utoolsFull,
|
||||||
userInfo: {
|
userInfo: {
|
||||||
exp: 0,
|
exp: 0,
|
||||||
level: 1,
|
level: 1,
|
||||||
@ -160,8 +162,8 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getUserInfo() {
|
async getUserInfo() {
|
||||||
Object.assign(this.userInfo, this.$root.utools.whole.getUser());
|
Object.assign(this.userInfo, this.utools.getUser());
|
||||||
this.userInfo.exp = this.$root.utools.getDB("cfg_exp");
|
this.userInfo.exp = dbManager.getDB("cfg_exp");
|
||||||
this.userInfo.level = this.levelDetail
|
this.userInfo.level = this.levelDetail
|
||||||
.filter((x) => this.userInfo.exp > x.minExp)
|
.filter((x) => this.userInfo.exp > x.minExp)
|
||||||
.pop().lv;
|
.pop().lv;
|
||||||
@ -174,8 +176,7 @@ export default {
|
|||||||
).toFixed(2)
|
).toFixed(2)
|
||||||
)
|
)
|
||||||
: 1;
|
: 1;
|
||||||
let ret = await this.$root.utools.whole.fetchUserPayments();
|
let ret = await this.utools.fetchUserPayments();
|
||||||
console.log("PayInfo:", ret);
|
|
||||||
|
|
||||||
this.isPluginVIP = ret.find((x) => x.goods_id === this.goodsId);
|
this.isPluginVIP = ret.find((x) => x.goods_id === this.goodsId);
|
||||||
this.isUtoolsVIP = this.userInfo.type === "member";
|
this.isUtoolsVIP = this.userInfo.type === "member";
|
||||||
@ -189,7 +190,7 @@ export default {
|
|||||||
}, 3000);
|
}, 3000);
|
||||||
},
|
},
|
||||||
payForMember() {
|
payForMember() {
|
||||||
this.$root.utools.whole.openPayment({ goodsId: this.goodsId }, () => {
|
this.utools.openPayment({ goodsId: this.goodsId }, () => {
|
||||||
this.isPluginVIP = true;
|
this.isPluginVIP = true;
|
||||||
this.showPayPage = false;
|
this.showPayPage = false;
|
||||||
});
|
});
|
||||||
|
@ -37,6 +37,7 @@ import ConfirmBox from "components/quickcommandUI/ConfirmBox";
|
|||||||
import TextArea from "components/quickcommandUI/TextArea";
|
import TextArea from "components/quickcommandUI/TextArea";
|
||||||
import SelectList from "components/quickcommandUI/SelectList";
|
import SelectList from "components/quickcommandUI/SelectList";
|
||||||
import programs from "js/options/programs";
|
import programs from "js/options/programs";
|
||||||
|
import { dbManager } from "js/utools.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -264,7 +265,7 @@ export default {
|
|||||||
Object.assign(window.quickcommand, quickcommandUI);
|
Object.assign(window.quickcommand, quickcommandUI);
|
||||||
|
|
||||||
// 获取用户数据
|
// 获取用户数据
|
||||||
window.quickcommand.userData = this.$root.utools.userData;
|
window.quickcommand.userData = dbManager.userData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 执行代码
|
* 执行代码
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { reactive } from "vue";
|
import { reactive } from "vue";
|
||||||
import quickcommandParser from "js/common/quickcommandParser.js";
|
import quickcommandParser from "js/common/quickcommandParser.js";
|
||||||
import importAll from "js/common/importAll.js";
|
import importAll from "js/common/importAll.js";
|
||||||
import utoolsFull from "js/utools.js";
|
import { utoolsFull, dbManager } from "js/utools.js";
|
||||||
import { getUniqueId } from "js/common/uuid.js";
|
import { getUniqueId } from "js/common/uuid.js";
|
||||||
import outputTypes from "js/options/outputTypes.js";
|
import outputTypes from "js/options/outputTypes.js";
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ export const getValidCommand = (command) => {
|
|||||||
export function useCommandManager() {
|
export function useCommandManager() {
|
||||||
// 获取已启用的命令
|
// 获取已启用的命令
|
||||||
const getActivatedFeatures = () => {
|
const getActivatedFeatures = () => {
|
||||||
let features = utoolsFull.whole.getFeatures();
|
let features = utoolsFull.getFeatures();
|
||||||
let currentFts = [];
|
let currentFts = [];
|
||||||
let quickpanels = [];
|
let quickpanels = [];
|
||||||
features.forEach((x) =>
|
features.forEach((x) =>
|
||||||
@ -79,16 +79,16 @@ export function useCommandManager() {
|
|||||||
};
|
};
|
||||||
// 清除所有命令
|
// 清除所有命令
|
||||||
const clearAllFeatures = () => {
|
const clearAllFeatures = () => {
|
||||||
for (var feature of utoolsFull.whole.getFeatures()) {
|
for (var feature of utoolsFull.getFeatures()) {
|
||||||
if (feature.code.slice(0, 8) === "feature_") continue;
|
if (feature.code.slice(0, 8) === "feature_") continue;
|
||||||
utoolsFull.whole.removeFeature(feature.code);
|
utoolsFull.removeFeature(feature.code);
|
||||||
}
|
}
|
||||||
state.activatedQuickCommandFeatureCodes = [];
|
state.activatedQuickCommandFeatureCodes = [];
|
||||||
};
|
};
|
||||||
// 获取所有的命令
|
// 获取所有的命令
|
||||||
const getAllQuickCommands = () => {
|
const getAllQuickCommands = () => {
|
||||||
state.allQuickCommands = window.lodashM.cloneDeep(defaultCommands);
|
state.allQuickCommands = window.lodashM.cloneDeep(defaultCommands);
|
||||||
utoolsFull.getAll("qc_").forEach((x) => {
|
dbManager.getAll("qc_").forEach((x) => {
|
||||||
if (x.data.features.code.includes("default_")) return;
|
if (x.data.features.code.includes("default_")) return;
|
||||||
state.allQuickCommands[x.data.features.code] = x.data;
|
state.allQuickCommands[x.data.features.code] = x.data;
|
||||||
});
|
});
|
||||||
@ -117,11 +117,11 @@ export function useCommandManager() {
|
|||||||
state.activatedQuickCommandFeatureCodes.push(code);
|
state.activatedQuickCommandFeatureCodes.push(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
utoolsFull.whole.removeFeature(code);
|
utoolsFull.removeFeature(code);
|
||||||
utoolsFull.whole.setFeature(command.features);
|
utoolsFull.setFeature(command.features);
|
||||||
|
|
||||||
if (!isDefaultCommand(code)) {
|
if (!isDefaultCommand(code)) {
|
||||||
utoolsFull.putDB(command, "qc_" + code);
|
dbManager.putDB(command, "qc_" + code);
|
||||||
}
|
}
|
||||||
|
|
||||||
getAllQuickCommandTags();
|
getAllQuickCommandTags();
|
||||||
@ -130,11 +130,11 @@ export function useCommandManager() {
|
|||||||
|
|
||||||
// 删除命令
|
// 删除命令
|
||||||
const removeCommand = (code) => {
|
const removeCommand = (code) => {
|
||||||
utoolsFull.whole.copyText(
|
utoolsFull.copyText(
|
||||||
JSON.stringify(state.allQuickCommands[code], null, 4)
|
JSON.stringify(state.allQuickCommands[code], null, 4)
|
||||||
);
|
);
|
||||||
delete state.allQuickCommands[code];
|
delete state.allQuickCommands[code];
|
||||||
utoolsFull.delDB("qc_" + code);
|
dbManager.delDB("qc_" + code);
|
||||||
removeCommandFromHistory(code);
|
removeCommandFromHistory(code);
|
||||||
disableCommand(code);
|
disableCommand(code);
|
||||||
getAllQuickCommandTags();
|
getAllQuickCommandTags();
|
||||||
@ -158,7 +158,7 @@ export function useCommandManager() {
|
|||||||
|
|
||||||
// 启用命令
|
// 启用命令
|
||||||
const enableCommand = (code) => {
|
const enableCommand = (code) => {
|
||||||
utoolsFull.whole.setFeature(
|
utoolsFull.setFeature(
|
||||||
window.lodashM.cloneDeep(state.allQuickCommands[code].features)
|
window.lodashM.cloneDeep(state.allQuickCommands[code].features)
|
||||||
);
|
);
|
||||||
state.activatedQuickCommandFeatureCodes.push(code);
|
state.activatedQuickCommandFeatureCodes.push(code);
|
||||||
@ -166,7 +166,7 @@ export function useCommandManager() {
|
|||||||
|
|
||||||
// 禁用命令
|
// 禁用命令
|
||||||
const disableCommand = (code) => {
|
const disableCommand = (code) => {
|
||||||
utoolsFull.whole.removeFeature(code);
|
utoolsFull.removeFeature(code);
|
||||||
state.activatedQuickCommandFeatureCodes =
|
state.activatedQuickCommandFeatureCodes =
|
||||||
state.activatedQuickCommandFeatureCodes.filter((x) => x !== code);
|
state.activatedQuickCommandFeatureCodes.filter((x) => x !== code);
|
||||||
};
|
};
|
||||||
@ -197,7 +197,7 @@ export function useCommandManager() {
|
|||||||
|
|
||||||
for (var code of Object.keys(dataToPushed)) {
|
for (var code of Object.keys(dataToPushed)) {
|
||||||
if (isDefaultCommand(code)) continue;
|
if (isDefaultCommand(code)) continue;
|
||||||
utoolsFull.putDB(dataToPushed[code], "qc_" + code);
|
dbManager.putDB(dataToPushed[code], "qc_" + code);
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.assign(state.allQuickCommands, dataToPushed);
|
Object.assign(state.allQuickCommands, dataToPushed);
|
||||||
@ -228,7 +228,7 @@ export function useCommandManager() {
|
|||||||
if (saveAsFile) {
|
if (saveAsFile) {
|
||||||
return window.saveFile(stringifyCommands, options);
|
return window.saveFile(stringifyCommands, options);
|
||||||
} else {
|
} else {
|
||||||
utoolsFull.whole.copyText(stringifyCommands);
|
utoolsFull.copyText(stringifyCommands);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -236,7 +236,7 @@ export function useCommandManager() {
|
|||||||
// 清空所有命令
|
// 清空所有命令
|
||||||
const clearAllCommands = () => {
|
const clearAllCommands = () => {
|
||||||
exportAllCommands(false);
|
exportAllCommands(false);
|
||||||
utoolsFull.delAll("qc_");
|
dbManager.delAll("qc_");
|
||||||
clearAllFeatures();
|
clearAllFeatures();
|
||||||
getAllQuickCommands();
|
getAllQuickCommands();
|
||||||
};
|
};
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// 禁用危险函数
|
// 禁用危险函数
|
||||||
let whole = window.utools;
|
export const utoolsFull = window.utools;
|
||||||
|
|
||||||
// 数据库前缀
|
// 数据库前缀
|
||||||
const DBPRE = {
|
const DBPRE = {
|
||||||
@ -17,40 +17,40 @@ const DBPRE = {
|
|||||||
|
|
||||||
// 数据库函数封装
|
// 数据库函数封装
|
||||||
let getDB = (id) => {
|
let getDB = (id) => {
|
||||||
let db = whole.db.get(id);
|
let db = utoolsFull.db.get(id);
|
||||||
return db ? db.data : {};
|
return db ? db.data : {};
|
||||||
};
|
};
|
||||||
|
|
||||||
let putDB = (value, id) => {
|
let putDB = (value, id) => {
|
||||||
let db = whole.db.get(id);
|
let db = utoolsFull.db.get(id);
|
||||||
return db
|
return db
|
||||||
? whole.db.put({
|
? utoolsFull.db.put({
|
||||||
_id: id,
|
_id: id,
|
||||||
data: value,
|
data: value,
|
||||||
_rev: db._rev,
|
_rev: db._rev,
|
||||||
})
|
})
|
||||||
: whole.db.put({
|
: utoolsFull.db.put({
|
||||||
_id: id,
|
_id: id,
|
||||||
data: value,
|
data: value,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
let delDB = (id) => {
|
let delDB = (id) => {
|
||||||
return whole.db.remove(id);
|
return utoolsFull.db.remove(id);
|
||||||
};
|
};
|
||||||
|
|
||||||
let getAll = (key) => {
|
let getAll = (key) => {
|
||||||
return whole.db.allDocs(key);
|
return utoolsFull.db.allDocs(key);
|
||||||
};
|
};
|
||||||
|
|
||||||
let delAll = (key) => {
|
let delAll = (key) => {
|
||||||
return getAll(key).forEach((x) => delDB(x._id));
|
return getAll(key).forEach((x) => delDB(x._id));
|
||||||
};
|
};
|
||||||
|
|
||||||
let setStorage = whole.dbStorage.setItem;
|
let setStorage = utoolsFull.dbStorage.setItem;
|
||||||
let getStorage = whole.dbStorage.getItem;
|
let getStorage = utoolsFull.dbStorage.getItem;
|
||||||
|
|
||||||
const nativeId = utools.getNativeId();
|
const nativeId = utoolsFull.getNativeId();
|
||||||
|
|
||||||
let userData = {
|
let userData = {
|
||||||
put: function (value, id, isNative = true) {
|
put: function (value, id, isNative = true) {
|
||||||
@ -85,8 +85,7 @@ let userData = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export const dbManager = {
|
||||||
whole,
|
|
||||||
getDB,
|
getDB,
|
||||||
putDB,
|
putDB,
|
||||||
delDB,
|
delDB,
|
||||||
|
@ -6,11 +6,13 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CommandRunResult from "components/CommandRunResult";
|
import CommandRunResult from "components/CommandRunResult";
|
||||||
|
import { utoolsFull } from "js/utools.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { CommandRunResult },
|
components: { CommandRunResult },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
utools: utoolsFull,
|
||||||
action: {
|
action: {
|
||||||
type: "input",
|
type: "input",
|
||||||
data: {},
|
data: {},
|
||||||
@ -22,7 +24,7 @@ export default {
|
|||||||
let command =
|
let command =
|
||||||
this.featureCode.slice(0, 8) === "default_"
|
this.featureCode.slice(0, 8) === "default_"
|
||||||
? require(`../json/${this.featureCode}.json`)
|
? require(`../json/${this.featureCode}.json`)
|
||||||
: this.$root.utools.whole.db.get("qc_" + this.featureCode).data;
|
: this.utools.db.get("qc_" + this.featureCode).data;
|
||||||
this.runCurrentCommand(command);
|
this.runCurrentCommand(command);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
import { defineAsyncComponent } from "vue";
|
import { defineAsyncComponent } from "vue";
|
||||||
import { useCommandManager } from "js/commandManager.js";
|
import { useCommandManager } from "js/commandManager.js";
|
||||||
import changeLog from "js/options/changeLog.js";
|
import changeLog from "js/options/changeLog.js";
|
||||||
|
import { utoolsFull, dbManager } from "js/utools.js";
|
||||||
import pinyinMatch from "pinyin-match";
|
import pinyinMatch from "pinyin-match";
|
||||||
import CommandEditor from "components/CommandEditor";
|
import CommandEditor from "components/CommandEditor";
|
||||||
import ComposerEditor from "components/ComposerEditor";
|
import ComposerEditor from "components/ComposerEditor";
|
||||||
@ -86,6 +87,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
utools: utoolsFull,
|
||||||
currentTag: "",
|
currentTag: "",
|
||||||
lastTag: "",
|
lastTag: "",
|
||||||
commandSearchKeyword: "",
|
commandSearchKeyword: "",
|
||||||
@ -367,7 +369,7 @@ export default {
|
|||||||
showChangeLog() {
|
showChangeLog() {
|
||||||
let lastNeedLogEvent = changeLog[changeLog.length - 1];
|
let lastNeedLogEvent = changeLog[changeLog.length - 1];
|
||||||
let loggedVersion =
|
let loggedVersion =
|
||||||
this.$root.utools.whole.dbStorage.getItem("cfg_loggedVersion") ||
|
this.utools.dbStorage.getItem("cfg_loggedVersion") ||
|
||||||
"0.0.0";
|
"0.0.0";
|
||||||
if (loggedVersion < lastNeedLogEvent.version) {
|
if (loggedVersion < lastNeedLogEvent.version) {
|
||||||
quickcommand.showConfirmBox(
|
quickcommand.showConfirmBox(
|
||||||
@ -378,7 +380,7 @@ export default {
|
|||||||
true,
|
true,
|
||||||
700
|
700
|
||||||
);
|
);
|
||||||
this.$root.utools.whole.dbStorage.setItem(
|
this.utools.dbStorage.setItem(
|
||||||
"cfg_loggedVersion",
|
"cfg_loggedVersion",
|
||||||
lastNeedLogEvent.version
|
lastNeedLogEvent.version
|
||||||
);
|
);
|
||||||
@ -407,7 +409,7 @@ export default {
|
|||||||
// 只保存被修改的命令
|
// 只保存被修改的命令
|
||||||
Object.entries(tagCommands).forEach(([code, command]) => {
|
Object.entries(tagCommands).forEach(([code, command]) => {
|
||||||
if (!this.isDefaultCommand(code)) {
|
if (!this.isDefaultCommand(code)) {
|
||||||
this.$root.utools.putDB(
|
dbManager.putDB(
|
||||||
window.lodashM.cloneDeep(command),
|
window.lodashM.cloneDeep(command),
|
||||||
"qc_" + code
|
"qc_" + code
|
||||||
);
|
);
|
||||||
|
@ -7,6 +7,7 @@ import PluginNickName from "components/quickFeatures/PluginNickName";
|
|||||||
import FavFile from "components/quickFeatures/FavFile";
|
import FavFile from "components/quickFeatures/FavFile";
|
||||||
import FavUrl from "components/quickFeatures/FavUrl";
|
import FavUrl from "components/quickFeatures/FavUrl";
|
||||||
import { markRaw } from "vue";
|
import { markRaw } from "vue";
|
||||||
|
import { utoolsFull, dbManager } from "js/utools.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -16,14 +17,15 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
utools: utoolsFull,
|
||||||
currentComponent: this.$route.params.featuretype,
|
currentComponent: this.$route.params.featuretype,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
importCommand(command) {
|
importCommand(command) {
|
||||||
command = window.lodashM.cloneDeep(command);
|
command = window.lodashM.cloneDeep(command);
|
||||||
this.$root.utools.putDB(command, "qc_" + command.features.code);
|
dbManager.putDB(command, "qc_" + command.features.code);
|
||||||
this.$root.utools.whole.setFeature(command.features);
|
this.utools.setFeature(command.features);
|
||||||
},
|
},
|
||||||
getUid() {
|
getUid() {
|
||||||
return Number(
|
return Number(
|
||||||
|
@ -16,14 +16,7 @@
|
|||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
class="
|
class="absolute-bottom flex items-center justify-between q-px-md shadow-10"
|
||||||
absolute-bottom
|
|
||||||
flex
|
|
||||||
items-center
|
|
||||||
justify-between
|
|
||||||
q-px-md
|
|
||||||
shadow-10
|
|
||||||
"
|
|
||||||
:style="{
|
:style="{
|
||||||
height: bottomHeight + 'px',
|
height: bottomHeight + 'px',
|
||||||
}"
|
}"
|
||||||
@ -81,6 +74,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MonacoEditor from "components/editor/MonacoEditor";
|
import MonacoEditor from "components/editor/MonacoEditor";
|
||||||
|
import { dbManager } from "js/utools.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { MonacoEditor },
|
components: { MonacoEditor },
|
||||||
@ -92,7 +86,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.cmd = this.$root.utools.getStorage("cfg_serverCode") || "";
|
this.cmd = dbManager.getStorage("cfg_serverCode") || "";
|
||||||
this.$refs.editor.setEditorValue(this.cmd);
|
this.$refs.editor.setEditorValue(this.cmd);
|
||||||
this.$refs.editor.setEditorLanguage("javascript");
|
this.$refs.editor.setEditorLanguage("javascript");
|
||||||
},
|
},
|
||||||
@ -132,7 +126,7 @@ export default {
|
|||||||
saveCode() {
|
saveCode() {
|
||||||
clearTimeout(this.saveCodeTimer);
|
clearTimeout(this.saveCodeTimer);
|
||||||
this.saveCodeTimer = setTimeout(() => {
|
this.saveCodeTimer = setTimeout(() => {
|
||||||
this.$root.utools.setStorage("cfg_serverCode", this.cmd);
|
dbManager.setStorage("cfg_serverCode", this.cmd);
|
||||||
this.saveCodeTimer = null;
|
this.saveCodeTimer = null;
|
||||||
}, 1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
|
@ -126,6 +126,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import commandTypes from "js/options/commandTypes.js";
|
import commandTypes from "js/options/commandTypes.js";
|
||||||
|
import { dbManager } from "js/utools.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@ -197,7 +198,7 @@ export default {
|
|||||||
this.installedCodes.push(code);
|
this.installedCodes.push(code);
|
||||||
let pushData = window.lodashM.cloneDeep(command);
|
let pushData = window.lodashM.cloneDeep(command);
|
||||||
pushData.fromShare = true;
|
pushData.fromShare = true;
|
||||||
this.$root.utools.putDB(window.lodashM.cloneDeep(pushData), "qc_" + code);
|
dbManager.putDB(window.lodashM.cloneDeep(pushData), "qc_" + code);
|
||||||
// 通过模拟访问页面来统计下载量
|
// 通过模拟访问页面来统计下载量
|
||||||
utools.ubrowser
|
utools.ubrowser
|
||||||
.goto(`https://www.yuque.com/${this.releaseRepo}/${code}`)
|
.goto(`https://www.yuque.com/${this.releaseRepo}/${code}`)
|
||||||
@ -256,7 +257,7 @@ export default {
|
|||||||
checkCommands() {
|
checkCommands() {
|
||||||
let installed = [];
|
let installed = [];
|
||||||
let needUpdate = [];
|
let needUpdate = [];
|
||||||
this.$root.utools.getAll("qc_").forEach((item) => {
|
dbManager.getAll("qc_").forEach((item) => {
|
||||||
if (!item.data.fromShare) return;
|
if (!item.data.fromShare) return;
|
||||||
let code = item._id.slice(3);
|
let code = item._id.slice(3);
|
||||||
let remote = this.remoteCommands.filter((cmd) => cmd.slug === code)[0];
|
let remote = this.remoteCommands.filter((cmd) => cmd.slug === code)[0];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user