diff --git a/src/components/CommandCard.vue b/src/components/CommandCard.vue
index a58dd2b..d7c7698 100644
--- a/src/components/CommandCard.vue
+++ b/src/components/CommandCard.vue
@@ -16,15 +16,15 @@
v-model:isVisible="isWarpperHover"
v-show="cardStyleVars.showButtons"
:isActivated="isCommandActivated"
+ :isRunButtonVisible="canRunInConfigurationPage"
:commandInfo="commandInfo"
- :canRunAtCurrentOS="canRunAtCurrentOS"
@commandChanged="$emit('commandChanged', $event)"
/>
@@ -57,17 +57,25 @@ export default {
this.cardStyle.code > 1 ? "justify-start" : "justify-center",
fontPosition:
this.cardStyle.code > 1 ? "justify-end" : "justify-center",
- hideCard:
- this.cardStyle.code === 1 &&
- (!this.isCommandActivated || !this.$refs.controlButtons?.canRun),
+ hideCard: this.cardStyle.code === 1 && !this.canRunInConfigurationPage,
};
},
- canRunAtCurrentOS() {
+ isPlatformSupported() {
let { platform } = this.commandInfo.features;
return !_.isEmpty(platform) && !platform.includes(window.processPlatform)
? false
: true;
},
+ canRunInConfigurationPage() {
+ // 未启用
+ if (!this.isCommandActivated) return false;
+ // 平台不支持
+ if (!this.isPlatformSupported) return false;
+ let { cmds } = this.commandInfo.features;
+ // 窗口模式
+ if (cmds[0].type && cmds[0].type === "window") return false;
+ return true;
+ },
},
props: {
commandInfo: Object,
diff --git a/src/components/ConfigurationMenu.vue b/src/components/ConfigurationMenu.vue
deleted file mode 100644
index f37bca8..0000000
--- a/src/components/ConfigurationMenu.vue
+++ /dev/null
@@ -1,765 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- 命令管理
-
-
-
-
-
-
-
- 从文件导入命令
-
-
-
-
-
- 从剪贴板导入命令
-
-
-
-
-
-
- 导出所有命令
-
-
-
-
-
- 启用本页所有命令
-
-
-
-
-
- 禁用本页所有命令
-
-
-
-
-
-
- 清空数据
-
-
-
-
-
-
-
-
-
- 实用功能
-
-
-
-
-
-
-
-
- toggleFeature('favFile', val)
- "
- v-model="$root.profile.quickFileEnable"
- checked-icon="check"
- color="primary"
- />
-
- 启用后,选中文件可以通过超级面板快速将文件收藏到「{{
- $root.profile.quickFileTag
- }}」标签
-
-
-
-
-
-
-
-
-
- toggleFeature('favUrl', val)
- "
- v-model="$root.profile.quickUrlEnable"
- checked-icon="check"
- color="primary"
- />
-
- 启用后,在浏览器界面可以通过超级面板快速将网址收藏到「{{
- $root.profile.quickUrlTag
- }}」标签
-
-
-
-
-
-
-
-
-
- toggleFeature('pluNickName', val)
- "
- v-model="$root.profile.pluNickNameEnable"
- checked-icon="check"
- color="primary"
- />
-
- 启用后,在主输入框输入「插件别名」可以快速设置插件别名
- 并将所有设置的别名保存至「{{
- $root.profile.pluNickNameTag
- }}」标签
-
-
-
-
-
-
-
-
-
-
- 快捷命令服务
-
-
-
-
-
- 通过本地监听
- {{ $root.nativeProfile.serverPort }}
- 端口的形式,接收用户传送过来的参数,然后根据参数执行不同的操作
-
- 需要配置插件跟随 utools 启动和保留后台
- 也可在主输入框通过关键字「快捷命令服务配置」进入
-
-
-
-
-
-
-
-
-
-
- 运行代码
-
-
-
-
-
- 一个可以直接运行代码的代码编辑器
- 也可在主输入框输入关键字「RunCode」进入
-
-
-
-
-
-
-
-
-
-
-
- 环境配置
-
-
-
-
-
-
- 用户特殊变量
- 用户设置的变量,类似一个全局配置项
- 配置好后可选择特殊变量中的「usr:」插入
- 也可直接在特殊变量中配置
-
-
-
-
-
-
- 修改本插件环境变量中的 PATH,直接覆盖而非追加
-
将会影响到除 quickcommand、html
- 以外的所有环境
-
-
-
-
-
-
-
- 一行一条,配置方法和 shell 的语法一样
如 alias
- python="/home/user/.bin/python"
将会影响到除
- quickcommand、html 以外的所有环境
-
-
-
-
-
-
-
-
-
-
- 个性化设置
-
-
-
-
-
-
- 主颜色
- 你可以更改界面的主题色,会员限定 😎
-
-
-
-
-
-
-
-
-
- 背景图片设置
- 设置背景图片,会员限定 😎
-
-
-
- 亮色模式背景
-
-
-
-
-
-
-
- 暗色模式背景
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 毛玻璃效果
- 启用毛玻璃界面,并调节效果强度,会员限定 😎
-
-
-
-
-
-
-
-
-
-
- 紧凑标签栏
- 更为紧凑的标签栏,适用于标签非常多的情形
-
-
-
-
-
-
- 自动聚焦搜索
- 进入插件时自动聚焦搜索
-
-
-
-
-
-
-
-
-
-
-
-
- 取消收藏
-
-
-
-
-
- 收藏标签
- 收藏后,会将当前标签名作为全局关键字,可在 uTools
- 的主输入框进行搜索
-
- 搜索进入后,默认进入当前标签的面板视图
- 类似于旧版本的「快捷面板」
-
-
-
-
-
-
- 关于和帮助
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/card/CommandCardContent.vue b/src/components/card/CommandCardContent.vue
index f59a9cd..b23a9da 100644
--- a/src/components/card/CommandCardContent.vue
+++ b/src/components/card/CommandCardContent.vue
@@ -41,7 +41,7 @@
@@ -81,7 +81,7 @@ export default {
commandInfo: Object,
isActivated: Boolean,
cardStyleVars: Object,
- canRunAtCurrentOS: Boolean,
+ isPlatformSupported: Boolean,
isHovered: Boolean,
},
emits: ["click"],
diff --git a/src/components/card/ControlButtons.vue b/src/components/card/ControlButtons.vue
index a8f4969..0e44d13 100644
--- a/src/components/card/ControlButtons.vue
+++ b/src/components/card/ControlButtons.vue
@@ -22,7 +22,7 @@
dense
color="green"
icon="play_arrow"
- v-show="canRun"
+ v-show="isRunButtonVisible"
@click="runCommand"
>
运行
@@ -120,7 +120,7 @@ export default {
isVisible: Boolean,
isActivated: Boolean,
commandInfo: Object,
- canRunAtCurrentOS: Boolean,
+ isRunButtonVisible: Boolean,
},
emits: ["update:isVisible", "commandChanged"],
data() {
@@ -134,16 +134,6 @@ export default {
cronExp() {
return this.$root.nativeProfile.crontabs[this.featureCode];
},
- // 命令是否可直接运行
- canRun() {
- // 未启用
- if (!this.isActivated) return false;
- if (!this.canRunAtCurrentOS) return false;
- let { cmds } = this.commandInfo.features;
- // 窗口模式
- if (cmds[0].type && cmds[0].type === "window") return false;
- return true;
- },
// 命令未启用可以添加计划任务
canAddCron() {
return !!this.commandInfo.features.cmds[0].length;
diff --git a/src/components/menu/CommandManageMenu.vue b/src/components/menu/CommandManageMenu.vue
new file mode 100644
index 0000000..b1f0b37
--- /dev/null
+++ b/src/components/menu/CommandManageMenu.vue
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+ 从文件导入命令
+
+
+
+
+
+ 从剪贴板导入命令
+
+
+
+
+
+
+ 导出所有命令
+
+
+
+
+
+ 启用本页所有命令
+
+
+
+
+
+ 禁用本页所有命令
+
+
+
+
+
+
+ 清空数据
+
+
+
+
+
+
diff --git a/src/components/menu/EnvConfigMenu.vue b/src/components/menu/EnvConfigMenu.vue
new file mode 100644
index 0000000..57cd94a
--- /dev/null
+++ b/src/components/menu/EnvConfigMenu.vue
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+ 用户特殊变量
+
+ 用户设置的变量,类似一个全局配置项
+ 配置好后可选择特殊变量中的「usr:」插入
+ 也可直接在特殊变量中配置
+
+
+
+
+
+
+
+
+ 修改本插件环境变量中的 PATH,直接覆盖而非追加
+
将会影响到除 quickcommand、html 以外的所有环境
+
+
+
+
+
+
+
+
+
+ 一行一条,配置方法和 shell 的语法一样
如 alias
+ python="/home/user/.bin/python"
+ 将会影响到除 quickcommand、html 以外的所有环境
+
+
+
+
+
+
+
+
+
diff --git a/src/components/menu/PersonalizeMenu.vue b/src/components/menu/PersonalizeMenu.vue
new file mode 100644
index 0000000..de4d98e
--- /dev/null
+++ b/src/components/menu/PersonalizeMenu.vue
@@ -0,0 +1,208 @@
+
+
+
+
+
+
+
+ 主颜色
+ 你可以更改界面的主题色,会员限定 😎
+
+
+
+
+
+
+
+
+
+
+
+
+ 毛玻璃效果
+ 启用毛玻璃界面,并调节效果强度,会员限定 😎
+
+
+
+
+
+
+
+
+
+
+
+ 紧凑标签栏
+ 更为紧凑的标签栏,适用于标签非常多的情形,会员限定 😎
+
+
+
+
+
+
+
+
+ 自动聚焦搜索
+ 进入插件时自动聚焦搜索
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/menu/UtilityFeaturesMenu.vue b/src/components/menu/UtilityFeaturesMenu.vue
new file mode 100644
index 0000000..9ca39b1
--- /dev/null
+++ b/src/components/menu/UtilityFeaturesMenu.vue
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+ toggleFeature('favFile', val)"
+ v-model="$root.profile.quickFileEnable"
+ checked-icon="check"
+ color="primary"
+ />
+
+ 启用后,选中文件可以通过超级面板快速将文件收藏到「{{ $root.profile.quickFileTag }}」标签
+
+
+
+
+
+
+
+
+ toggleFeature('favUrl', val)"
+ v-model="$root.profile.quickUrlEnable"
+ checked-icon="check"
+ color="primary"
+ />
+
+ 启用后,在浏览器界面可以通过超级面板快速将网址收藏到「{{ $root.profile.quickUrlTag }}」标签
+
+
+
+
+
+
+
+
+ toggleFeature('pluNickName', val)"
+ v-model="$root.profile.pluNickNameEnable"
+ checked-icon="check"
+ color="primary"
+ />
+
+
+ 启用后,在主输入框输入「插件别名」可以快速设置插件别名
+ 并将所有设置的别名保存至「{{ $root.profile.pluNickNameTag }}」标签
+
+
+
+
+
+
+
+
+
+ 快捷命令服务
+
+
+
+
+
+ 通过本地监听 {{ $root.nativeProfile.serverPort }} 端口的形式,接收用户传送过来的参数,然后根据参数执行不同的操作
+
需要配置插件跟随 utools 启动和保留后台
也可在主输入框通过关键字「快捷命令服务配置」进入
+
+
+
+
+
+
+
+
+
+ 运行代码
+
+
+
+
+
+ 一个可以直接运行代码的代码编辑器
也可在主输入框输入关键字「RunCode」进入
+
+
+
+
+
+
+
+
diff --git a/src/components/menu/index.vue b/src/components/menu/index.vue
new file mode 100644
index 0000000..27b7baf
--- /dev/null
+++ b/src/components/menu/index.vue
@@ -0,0 +1,152 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 命令管理
+
+
+
+
+
+
+
+
+ 实用功能
+
+
+
+
+
+
+
+
+ 环境配置
+
+
+
+
+
+
+
+
+ 个性化设置
+
+
+
+
+
+
+
+
+ 取消收藏
+
+
+
+
+
+ 收藏标签
+
+ 收藏后,会将当前标签名作为全局关键字,可在 uTools 的主输入框进行搜索
+
+ 搜索进入后,默认进入当前标签的面板视图
+ 类似于旧版本的「快捷面板」
+
+
+
+
+
+
+
+
+ 关于和帮助
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/css/app.css b/src/css/app.css
index 846a176..0e95073 100644
--- a/src/css/app.css
+++ b/src/css/app.css
@@ -144,22 +144,6 @@ body {
height: 100vh;
}
-.config-page-container {
- position: relative;
- height: 100vh;
- width: 100%;
- overflow: hidden;
-}
-
-.background-layer {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- z-index: 0;
-}
-
/* 毛玻璃效果叠加 */
body.glass-effect-menu .q-card.command {
background: rgba(255, 255, 255, calc(0.3 + var(--glass-effect-strength) * 0.01)) !important;
@@ -181,3 +165,59 @@ body.body--dark.glass-effect-menu .q-tabs {
background: rgba(0, 0, 0, calc(0.2 + var(--glass-effect-strength) * 0.02)) !important;
border-right: 1px solid rgba(255, 255, 255, 0.05);
}
+
+/* 基础菜单样式 - 始终保持最小毛玻璃效果 */
+.q-menu {
+ background: rgba(255, 255, 255, 0.15) !important;
+ backdrop-filter: blur(5px) !important;
+ -webkit-backdrop-filter: blur(5px) !important;
+ border: 1px solid rgba(255, 255, 255, 0.1);
+ box-shadow: 0 4px 16px 0 rgba(31, 38, 135, 0.07);
+}
+
+.body--dark .q-menu {
+ background: rgba(0, 0, 0, 0.2) !important;
+ border: 1px solid rgba(255, 255, 255, 0.05);
+}
+
+/* 毛玻璃菜单效果 - 叠加用户设置的效果 */
+body.glass-effect-menu .q-menu {
+ background: rgba(255,
+ 255,
+ 255,
+ calc(0.15 + var(--glass-effect-strength) * 0.01)) !important;
+ backdrop-filter: blur(calc(5px + var(--glass-effect-strength) * 1px)) !important;
+ -webkit-backdrop-filter: blur(calc(5px + var(--glass-effect-strength) * 1px)) !important;
+}
+
+/* 暗色模式菜单 */
+body.body--dark.glass-effect-menu .q-menu {
+ background: rgba(0,
+ 0,
+ 0,
+ calc(0.2 + var(--glass-effect-strength) * 0.02)) !important;
+}
+
+/* 菜单列表透明背景 */
+.q-menu .q-list {
+ background: transparent !important;
+}
+
+/* 菜单项浮效果 */
+.q-menu .q-item:hover {
+ background: rgba(255, 255, 255, 0.1) !important;
+}
+
+.body--dark .q-menu .q-item:hover {
+ background: rgba(255, 255, 255, 0.05) !important;
+}
+
+/* 输入框样式 */
+.q-menu .q-field__control {
+ background: rgba(255, 255, 255, 0.15) !important;
+ border-radius: 4px;
+}
+
+.body--dark .q-menu .q-field__control {
+ background: rgba(0, 0, 0, 0.3) !important;
+}
diff --git a/src/pages/ConfigurationPage.vue b/src/pages/ConfigurationPage.vue
index 119d2d0..e7da790 100644
--- a/src/pages/ConfigurationPage.vue
+++ b/src/pages/ConfigurationPage.vue
@@ -244,13 +244,11 @@ import changeLog from "js/options/changeLog.js";
import pinyinMatch from "pinyin-match";
import CommandCard from "components/CommandCard";
import CommandEditor from "components/CommandEditor";
+import ConfigurationMenu from "components/menu";
const CommandRunResult = defineAsyncComponent(() =>
import("components/CommandRunResult.vue")
);
// Performance Rendering > 300ms
-const ConfigurationMenu = defineAsyncComponent(() =>
- import("components/ConfigurationMenu.vue")
-);
// 默认命令
let defaultCommands = importAll(require.context("../json/", false, /\.json$/));
@@ -568,7 +566,10 @@ export default {
this.getAllQuickCommandTags();
this.changeCurrentTag("默认");
quickcommand.showMessageBox(
- "清空完毕,为防止误操作,已将所有命令复制到剪贴板,可通过导入命令恢复"
+ "清空完毕,为防止误操作,已将所有命令复制到剪贴板,可通过导入命令恢复",
+ "success",
+ 2000,
+ "bottom-right"
);
});
},
@@ -655,6 +656,22 @@ export default {