feat(editor): Encapsulate the tools in the editor toolbar as independent components.

This commit is contained in:
Rafi
2023-04-19 16:52:41 +08:00
parent 7353614472
commit 31dc740554
4 changed files with 120 additions and 50 deletions

View File

@@ -0,0 +1,53 @@
<script setup>
import {useFrugalMode} from "~/composables/states";
const menu = ref(false)
const frugalMode = useFrugalMode()
</script>
<template>
<v-menu
v-model="menu"
:close-on-content-click="false"
>
<template v-slot:activator="{ props }">
<v-btn
v-bind="props"
icon
>
<v-icon
icon="network_wifi_2_bar"
:color="frugalMode ? '' : 'grey'"
></v-icon>
</v-btn>
</template>
<v-container>
<v-card
min-width="300"
max-width="500"
>
<v-card-title>
<span class="headline">{{ $t('frugalMode') }}</span>
</v-card-title>
<v-divider></v-divider>
<v-card-text>
<p>{{ $t('frugalModeTip') }}</p>
<v-switch
v-model="frugalMode"
inline
hide-details
color="primary"
:label="$t('frugalMode')"
></v-switch>
</v-card-text>
</v-card>
</v-container>
</v-menu>
</template>
<style scoped>
</style>