+
+ {{ store.dictTitle }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ok
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
ok
-
-
-
-
-
-
+
+ width="24"
+ color="#999"/>
@@ -110,10 +119,8 @@ watch(() => store.setting.showToolbar, n => {
header {
width: var(--toolbar-width);
margin-top: 10rem;
- min-height: 60rem;
background: var(--color-header-bg);
- display: flex;
- justify-content: space-between;
+
border-radius: 8rem;
margin-bottom: 30rem;
//position: absolute;
@@ -125,21 +132,37 @@ header {
gap: 10rem;
//opacity: 0;
- .info {
- font-size: 16rem;
- color: var(--color-font-1);
+ .content {
+ min-height: 60rem;
display: flex;
- justify-content: center;
- align-items: center;
- cursor: pointer;
+ justify-content: space-between;
+
+ .info {
+ font-size: 16rem;
+ color: var(--color-font-1);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ cursor: pointer;
+ }
+
+ .options {
+ display: flex;
+ align-items: center;
+ gap: 10rem;
+ }
}
- .options {
+ .translate-progress {
display: flex;
- align-items: center;
- gap: 10rem;
+ gap: $space;
+
+ .el-progress {
+ flex: 1;
+ }
}
+
.arrow {
position: absolute;
bottom: 0;
diff --git a/src/components/Toolbar/TrabslateSetting.vue b/src/components/Toolbar/TrabslateSetting.vue
new file mode 100644
index 00000000..89b1f330
--- /dev/null
+++ b/src/components/Toolbar/TrabslateSetting.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/Toolbar/VolumeSetting.vue b/src/components/Toolbar/VolumeSetting.vue
new file mode 100644
index 00000000..35bf0a47
--- /dev/null
+++ b/src/components/Toolbar/VolumeSetting.vue
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/Tooltip.vue b/src/components/Tooltip.vue
index f136f09e..4bc19211 100644
--- a/src/components/Tooltip.vue
+++ b/src/components/Tooltip.vue
@@ -77,6 +77,6 @@ export default {
padding: 10rem;
color: var(--color-font-1);
background: var(--color-tooltip-bg);
- //box-shadow: 1px 1px 6px #bbbbbb;
+ box-shadow: 1px 1px 6px #bbbbbb;
}
diff --git a/src/hooks/event.ts b/src/hooks/event.ts
new file mode 100644
index 00000000..7fb88f5b
--- /dev/null
+++ b/src/hooks/event.ts
@@ -0,0 +1,12 @@
+import {onMounted, onUnmounted} from "vue";
+import {emitter, EventKey} from "@/utils/eventBus.ts";
+
+export function useWindowClick(cb: () => void) {
+ onMounted(() => {
+ emitter.on(EventKey.closeOther, cb)
+ window.addEventListener('click', cb)
+ })
+ onUnmounted(() => {
+ window.removeEventListener('click', cb)
+ })
+}
\ No newline at end of file
diff --git a/src/stores/base.ts b/src/stores/base.ts
index 16fc9d8e..b9c3741b 100644
--- a/src/stores/base.ts
+++ b/src/stores/base.ts
@@ -80,6 +80,14 @@ export const useBaseStore = defineStore('base', {
setting: {
showToolbar: true,
show: false,
+
+ keyboardVolume: true,
+ effectVolume: true,
+ repeatCount: 1,
+ repeatCustomCount: null,
+ dictation: true,
+ showTranslate: true,
+
value1: false,
value2: 50,
value3: 1,
diff --git a/src/types.ts b/src/types.ts
index 529b1bba..e12a9b3b 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -183,6 +183,13 @@ export interface State {
setting: {
showToolbar: boolean,
show: boolean,
+
+ keyboardVolume: boolean,
+ effectVolume: boolean,
+ repeatCount: number,
+ repeatCustomCount?: number,
+ dictation: boolean,
+
value1: boolean,
value2: number,
value3: number,
diff --git a/src/utils/eventBus.ts b/src/utils/eventBus.ts
index df3a0df1..b45b9c59 100644
--- a/src/utils/eventBus.ts
+++ b/src/utils/eventBus.ts
@@ -5,4 +5,5 @@ export const EventKey = {
resetWord: 'resetWord',
openSide: 'openSide',
openStatModal: 'openStatModal',
+ closeOther: 'closeOther',
}
\ No newline at end of file