图标移至src

This commit is contained in:
fofolee 2022-04-15 18:54:21 +08:00
parent 4e879e6dc2
commit e4e7d77808
25 changed files with 22 additions and 14 deletions

BIN
src/assets/feature/file.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 B

BIN
src/assets/feature/url.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 826 B

After

Width:  |  Height:  |  Size: 826 B

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -2,7 +2,7 @@
<q-card> <q-card>
<q-card-section class="q-gutter-md flex items-center"> <q-card-section class="q-gutter-md flex items-center">
<q-avatar square size="48px"> <q-avatar square size="48px">
<img src="logo/quickcommand.png" /> <img :src="require('../assets/logo/quickcommand.png')" />
</q-avatar> </q-avatar>
<span class="text-h5" <span class="text-h5"
>{{ pluginInfo.pluginName }} v{{ pluginInfo.version }}</span >{{ pluginInfo.pluginName }} v{{ pluginInfo.version }}</span

View File

@ -59,13 +59,13 @@
> >
<template v-slot:append> <template v-slot:append>
<q-avatar size="lg" square> <q-avatar size="lg" square>
<img :src="getLanguageIcon(quickcommandInfo.program)" /> <img :src="$programmings[quickcommandInfo.program].icon" />
</q-avatar> </q-avatar>
</template> </template>
<template v-slot:option="scope"> <template v-slot:option="scope">
<q-item v-bind="scope.itemProps"> <q-item v-bind="scope.itemProps">
<q-item-section avatar> <q-item-section avatar>
<img width="32" :src="getLanguageIcon(scope.opt)" /> <img width="32" :src="$programmings[scope.opt].icon" />
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label v-html="scope.opt" /> <q-item-label v-html="scope.opt" />
@ -243,9 +243,6 @@ export default {
let highlight = this.$programmings[language].highlight; let highlight = this.$programmings[language].highlight;
this.$refs.editor.setEditorLanguage(highlight ? highlight : language); this.$refs.editor.setEditorLanguage(highlight ? highlight : language);
}, },
getLanguageIcon(program) {
return `img/logo/${program}.png`;
},
// //
showHelp() { showHelp() {
utools.createBrowserWindow("./helps/quickcommand.html", { utools.createBrowserWindow("./helps/quickcommand.html", {

View File

@ -324,11 +324,8 @@ export default {
this.setIcon(this.quickcommandInfo.program); this.setIcon(this.quickcommandInfo.program);
this.platformVerify(); this.platformVerify();
}, },
// 使
setIcon(language) { setIcon(language) {
this.currentCommand.features.icon?.slice(0, 5) === "data:" || this.currentCommand.features.icon = this.$programmings[language].icon;
(this.currentCommand.features.icon =
this.$parent.getLanguageIcon(language));
}, },
getCommandType() { getCommandType() {
let data = { type: "key", match: [] }; let data = { type: "key", match: [] };

View File

@ -59,7 +59,7 @@ export default {
return { return {
features: { features: {
explain: `进入${this.currentTag}的面板视图`, explain: `进入${this.currentTag}的面板视图`,
icon: "img/logo/quickcommand.png", icon: require("../assets/logo/quickcommand.png"),
cmds: [this.currentTag], cmds: [this.currentTag],
platform: ["win32", "darwin", "linux"], platform: ["win32", "darwin", "linux"],
code: `panel_${window.hexEncode(this.currentTag)}`, code: `panel_${window.hexEncode(this.currentTag)}`,

View File

@ -10,6 +10,7 @@ const programs = {
argv: "", argv: "",
ext: "", ext: "",
color: "primary", color: "primary",
icon: require("../../assets/logo/quickcommand.png"),
}, },
shell: { shell: {
name: "shell", name: "shell",
@ -17,6 +18,7 @@ const programs = {
argv: "", argv: "",
ext: "sh", ext: "sh",
color: "green-6", color: "green-6",
icon: require("../../assets/logo/shell.png"),
}, },
applescript: { applescript: {
name: "applescript", name: "applescript",
@ -24,6 +26,7 @@ const programs = {
argv: "", argv: "",
ext: "scpt", ext: "scpt",
color: "cyan-10", color: "cyan-10",
icon: require("../../assets/logo/applescript.png"),
}, },
cmd: { cmd: {
name: "cmd", name: "cmd",
@ -32,6 +35,7 @@ const programs = {
argv: "", argv: "",
ext: "bat", ext: "bat",
color: "orange-10", color: "orange-10",
icon: require("../../assets/logo/cmd.png"),
}, },
powershell: { powershell: {
name: "powershell", name: "powershell",
@ -39,6 +43,7 @@ const programs = {
argv: "-NoProfile -File", argv: "-NoProfile -File",
ext: "ps1", ext: "ps1",
color: "amber-14", color: "amber-14",
icon: require("../../assets/logo/powershell.png"),
}, },
python: { python: {
name: "python", name: "python",
@ -46,6 +51,7 @@ const programs = {
argv: "-u", argv: "-u",
ext: "py", ext: "py",
color: "light-blue-10", color: "light-blue-10",
icon: require("../../assets/logo/python.png"),
}, },
javascript: { javascript: {
name: "javascript", name: "javascript",
@ -53,6 +59,7 @@ const programs = {
argv: "", argv: "",
ext: "js", ext: "js",
color: "teal", color: "teal",
icon: require("../../assets/logo/javascript.png"),
}, },
ruby: { ruby: {
name: "ruby", name: "ruby",
@ -60,6 +67,7 @@ const programs = {
argv: "", argv: "",
ext: "rb", ext: "rb",
color: "red-10", color: "red-10",
icon: require("../../assets/logo/ruby.png"),
}, },
php: { php: {
name: "php", name: "php",
@ -67,6 +75,7 @@ const programs = {
argv: "", argv: "",
ext: "php", ext: "php",
color: "deep-purple", color: "deep-purple",
icon: require("../../assets/logo/php.png"),
}, },
c: { c: {
name: "c", name: "c",
@ -74,6 +83,7 @@ const programs = {
argv: "-o", argv: "-o",
ext: "c", ext: "c",
color: "blue-7", color: "blue-7",
icon: require("../../assets/logo/c.png"),
}, },
csharp: { csharp: {
name: "csharp", name: "csharp",
@ -81,6 +91,7 @@ const programs = {
argv: "/Nologo", argv: "/Nologo",
ext: "cs", ext: "cs",
color: "light-blue-13", color: "light-blue-13",
icon: require("../../assets/logo/csharp.png"),
}, },
lua: { lua: {
name: "lua", name: "lua",
@ -88,6 +99,7 @@ const programs = {
argv: "", argv: "",
ext: "lua", ext: "lua",
color: "light-green-8", color: "light-green-8",
icon: require("../../assets/logo/lua.png"),
}, },
perl: { perl: {
name: "perl", name: "perl",
@ -95,6 +107,7 @@ const programs = {
argv: "", argv: "",
ext: "pl", ext: "pl",
color: "purple", color: "purple",
icon: require("../../assets/logo/perl.png")
}, },
custom: { custom: {
name: "custom", name: "custom",
@ -102,6 +115,7 @@ const programs = {
argv: "", argv: "",
ext: "", ext: "",
color: "indigo-6", color: "indigo-6",
icon: require("../../assets/logo/custom.png"),
}, },
}; };
export default programs export default programs

View File

@ -7,7 +7,7 @@ const quickFeatures = {
type: "files", type: "files",
match: "/.*+/i", match: "/.*+/i",
}, ], }, ],
icon: "img/feature/file.png", icon: require("../../assets/feature/file.png"),
platform: ["win32", "darwin", "linux"], platform: ["win32", "darwin", "linux"],
}, },
@ -32,7 +32,7 @@ const quickFeatures = {
], ],
}, },
}, ], }, ],
icon: "img/feature/url.png", icon: require("../../assets/feature/url.png"),
platform: ["win32", "darwin", "linux"], platform: ["win32", "darwin", "linux"],
}, },
@ -40,7 +40,7 @@ const quickFeatures = {
code: "feature_pluNickName", code: "feature_pluNickName",
explain: "为插件设置别名", explain: "为插件设置别名",
cmds: ["插件别名"], cmds: ["插件别名"],
icon: "img/feature/plugin.png", icon: require("../../assets/feature/plugin.png"),
platform: ["win32", "darwin", "linux"], platform: ["win32", "darwin", "linux"],
} }
} }