mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-30 04:42:45 +08:00
减小侧边栏宽度
This commit is contained in:
parent
b00048e5ec
commit
a1a955f412
@ -12,6 +12,7 @@
|
|||||||
transform: isFullscreen ? 'translateX(-100%)' : 'translateX(0)',
|
transform: isFullscreen ? 'translateX(-100%)' : 'translateX(0)',
|
||||||
transition: 'transform 0.3s cubic-bezier(0.4, 0, 0.2, 1)',
|
transition: 'transform 0.3s cubic-bezier(0.4, 0, 0.2, 1)',
|
||||||
}"
|
}"
|
||||||
|
:sideBarWidth="sideBarWidth"
|
||||||
v-if="showSidebar"
|
v-if="showSidebar"
|
||||||
></CommandSideBar>
|
></CommandSideBar>
|
||||||
|
|
||||||
@ -224,13 +225,14 @@
|
|||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加全屏按钮 -->
|
<!-- 全屏按钮 -->
|
||||||
<q-btn
|
<q-btn
|
||||||
class="fullscreen-btn"
|
class="fullscreen-btn"
|
||||||
round
|
round
|
||||||
flat
|
flat
|
||||||
:icon="isFullscreen ? 'fullscreen_exit' : 'fullscreen'"
|
:icon="isFullscreen ? 'fullscreen_exit' : 'fullscreen'"
|
||||||
@click="toggleFullscreen"
|
@click="toggleFullscreen"
|
||||||
|
:class="{ 'btn-fullscreen': isFullscreen }"
|
||||||
>
|
>
|
||||||
<q-tooltip>{{
|
<q-tooltip>{{
|
||||||
isFullscreen ? "退出全屏 (F11)" : "全屏编辑 (F11)"
|
isFullscreen ? "退出全屏 (F11)" : "全屏编辑 (F11)"
|
||||||
@ -252,7 +254,7 @@ const MonacoEditor = defineAsyncComponent(() =>
|
|||||||
import("components/MonacoEditor")
|
import("components/MonacoEditor")
|
||||||
);
|
);
|
||||||
|
|
||||||
const defaultSideBarWidth = 250;
|
const defaultSideBarWidth = 200;
|
||||||
const defaultlanguageBarHeight = 40;
|
const defaultlanguageBarHeight = 40;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -324,7 +326,7 @@ export default {
|
|||||||
: this.action.data;
|
: this.action.data;
|
||||||
quickCommandInfo?.program &&
|
quickCommandInfo?.program &&
|
||||||
Object.assign(this.quickcommandInfo, _.cloneDeep(quickCommandInfo));
|
Object.assign(this.quickcommandInfo, _.cloneDeep(quickCommandInfo));
|
||||||
// 默认命令<EFBFBD><EFBFBD>编辑
|
// 默认命令编辑
|
||||||
if (this.quickcommandInfo.tags?.includes("默认") && !utools.isDev()) {
|
if (this.quickcommandInfo.tags?.includes("默认") && !utools.isDev()) {
|
||||||
this.canCommandSave = false;
|
this.canCommandSave = false;
|
||||||
}
|
}
|
||||||
@ -466,26 +468,47 @@ export default {
|
|||||||
|
|
||||||
.fullscreen-btn {
|
.fullscreen-btn {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 20px;
|
right: 24px;
|
||||||
bottom: 20px;
|
bottom: 24px;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
background: rgba(var(--q-primary-rgb), 0.1);
|
background: rgba(var(--q-primary-rgb), 0.08);
|
||||||
color: var(--q-primary);
|
color: var(--q-primary);
|
||||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
transform-origin: center;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||||
|
backdrop-filter: blur(4px);
|
||||||
|
transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.fullscreen-btn:hover {
|
.fullscreen-btn:hover {
|
||||||
background: rgba(var(--q-primary-rgb), 0.2);
|
background: rgba(var(--q-primary-rgb), 0.15);
|
||||||
transform: scale(1.1);
|
transform: scale(1.1) translateY(-2px);
|
||||||
|
box-shadow: 0 4px 12px rgba(var(--q-primary-rgb), 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fullscreen-btn:active {
|
||||||
|
transform: scale(0.95);
|
||||||
|
transition-duration: 0.1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-fullscreen {
|
||||||
|
right: 32px;
|
||||||
|
bottom: 32px;
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-fullscreen:hover {
|
||||||
|
transform: rotate(180deg) scale(1.1) translateY(-2px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.body--dark .fullscreen-btn {
|
.body--dark .fullscreen-btn {
|
||||||
background: rgba(255, 255, 255, 0.1);
|
background: rgba(255, 255, 255, 0.1);
|
||||||
color: rgba(255, 255, 255, 0.9);
|
color: rgba(255, 255, 255, 0.9);
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.body--dark .fullscreen-btn:hover {
|
.body--dark .fullscreen-btn:hover {
|
||||||
background: rgba(255, 255, 255, 0.15);
|
background: rgba(255, 255, 255, 0.15);
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 统一过渡效果 */
|
/* 统一过渡效果 */
|
||||||
@ -520,6 +543,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.editor-transition {
|
.editor-transition {
|
||||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||||
|
will-change: transform, left, top, opacity;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -8,23 +8,33 @@
|
|||||||
}"
|
}"
|
||||||
class="command-side-bar"
|
class="command-side-bar"
|
||||||
>
|
>
|
||||||
<div class="row q-pa-md q-gutter-md">
|
<div class="row" :style="{ padding: sideBarPadding + 'px' }">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="row items-center relative-position q-pb-md">
|
||||||
<q-btn
|
<q-btn
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
color="grey"
|
color="grey"
|
||||||
style="margin-right: 29px"
|
|
||||||
icon="arrow_back_ios_new"
|
icon="arrow_back_ios_new"
|
||||||
v-close-popup
|
v-close-popup
|
||||||
|
class="absolute-left"
|
||||||
|
style="height: 48px"
|
||||||
/>
|
/>
|
||||||
|
<div class="col-12 flex justify-center">
|
||||||
<q-avatar size="64" square class="commandLogo">
|
<q-avatar size="64" square class="commandLogo">
|
||||||
<q-img
|
<q-img
|
||||||
@click="showIconPicker = true"
|
@click="showIconPicker = true"
|
||||||
:src="currentCommand.features.icon"
|
:src="currentCommand.features.icon"
|
||||||
/>
|
/>
|
||||||
</q-avatar>
|
</q-avatar>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="command-side-bar-content">
|
<div
|
||||||
|
class="command-side-bar-content"
|
||||||
|
:style="{ width: sideBarWidth - sideBarPadding * 2 + 'px' }"
|
||||||
|
>
|
||||||
<!-- 说明 -->
|
<!-- 说明 -->
|
||||||
<q-input
|
<q-input
|
||||||
:disable="!canCommandSave"
|
:disable="!canCommandSave"
|
||||||
@ -95,7 +105,7 @@
|
|||||||
v-model="cmdMatch"
|
v-model="cmdMatch"
|
||||||
max-values="3"
|
max-values="3"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="回车添加多个"
|
placeholder="回车添加"
|
||||||
use-input
|
use-input
|
||||||
use-chips
|
use-chips
|
||||||
multiple
|
multiple
|
||||||
@ -140,7 +150,7 @@
|
|||||||
max-values="3"
|
max-values="3"
|
||||||
type="text"
|
type="text"
|
||||||
label="标签"
|
label="标签"
|
||||||
placeholder="回车添加多个"
|
placeholder="回车添加"
|
||||||
use-input
|
use-input
|
||||||
use-chips
|
use-chips
|
||||||
multiple
|
multiple
|
||||||
@ -239,8 +249,8 @@
|
|||||||
<div class="self-center full-width no-outline" tabindex="0">
|
<div class="self-center full-width no-outline" tabindex="0">
|
||||||
{{
|
{{
|
||||||
currentCommand.features.mainPush
|
currentCommand.features.mainPush
|
||||||
? "主搜索框执行"
|
? "主搜索执行"
|
||||||
: "进插件后执行"
|
: "进插件执行"
|
||||||
}}
|
}}
|
||||||
<q-btn
|
<q-btn
|
||||||
flat
|
flat
|
||||||
@ -310,6 +320,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<q-dialog v-model="showIconPicker" position="left">
|
<q-dialog v-model="showIconPicker" position="left">
|
||||||
<iconPicker
|
<iconPicker
|
||||||
@iconChanged="(dataUrl) => (currentCommand.features.icon = dataUrl)"
|
@iconChanged="(dataUrl) => (currentCommand.features.icon = dataUrl)"
|
||||||
@ -355,11 +366,13 @@ export default {
|
|||||||
allQuickCommandTags: this.$parent.allQuickCommandTags,
|
allQuickCommandTags: this.$parent.allQuickCommandTags,
|
||||||
showIconPicker: false,
|
showIconPicker: false,
|
||||||
showUserData: false,
|
showUserData: false,
|
||||||
|
sideBarPadding: 12,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
quickcommandInfo: Object,
|
quickcommandInfo: Object,
|
||||||
canCommandSave: Boolean,
|
canCommandSave: Boolean,
|
||||||
|
sideBarWidth: Number,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
commandTypesOptions() {
|
commandTypesOptions() {
|
||||||
@ -578,4 +591,8 @@ export default {
|
|||||||
background: var(--q-primary);
|
background: var(--q-primary);
|
||||||
opacity: 0.85;
|
opacity: 0.85;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* .command-side-bar-content {
|
||||||
|
width: 171px;
|
||||||
|
} */
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user