0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-12-01 15:37:29 +00:00
VueTube/NUXT/pages/mods/tweaks.vue

198 lines
5.1 KiB
Vue
Raw Normal View History

2022-03-21 05:13:21 +00:00
<template>
<!-- !IMPORTANT: don't let autoformatter format this style to multiline or else it breaks ¯\_()_/¯ -->
2022-05-05 04:28:51 +00:00
<div
class="d-flex flex-column justify-end"
style="
min-height: calc(100vh - 8rem - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
"
2022-05-05 04:28:51 +00:00
>
<!-- TODO: outer radius -->
<!-- TODO: Dense Navbar -->
<!-- TODO: Disable Top Bar -->
<!-- TODO: Top and Bottom bar color selection -->
2022-03-31 06:01:29 +00:00
<v-card
flat
2022-05-18 03:53:03 +00:00
class="mx-4 my-2 px-4 py-2 d-flex flex-row justify-between background"
2022-03-31 23:33:39 +00:00
style="transition-duration: 0.3s; transition-property: border-radius"
:class="
roundTweak > 0 ? ($vuetify.theme.dark ? 'lighten-1' : 'darken-1') : ''
"
2022-03-31 06:01:29 +00:00
:style="{
borderRadius: `${roundTweak / 2}rem`,
}"
>
<h3
2022-05-18 03:53:03 +00:00
class="my-auto background--text"
:class="$vuetify.theme.dark ? 'text--lighten-3' : 'text--darken-3'"
>
Fullscreen (Soon)
</h3>
<v-spacer />
2022-05-18 03:53:03 +00:00
<v-switch
disabled
class="mt-2"
style="pointer-events: none"
persistent-hint
inset
/>
</v-card>
<v-divider v-if="!roundTweak" />
<v-card
flat
2022-05-18 03:53:03 +00:00
class="mx-4 my-2 px-4 py-2 d-flex flex-row justify-between background"
style="transition-duration: 0.3s; transition-property: border-radius"
:class="
roundTweak > 0 ? ($vuetify.theme.dark ? 'lighten-1' : 'darken-1') : ''
"
:style="{
borderRadius: `${roundTweak / 2}rem`,
}"
>
<h3
2022-05-18 03:53:03 +00:00
class="my-auto background--text"
:class="$vuetify.theme.dark ? 'text--lighten-3' : 'text--darken-3'"
>
Navbar Blur (Soon)
</h3>
<v-spacer />
2022-05-18 03:53:03 +00:00
<v-switch
disabled
class="mt-2"
style="pointer-events: none"
persistent-hint
inset
/>
</v-card>
<v-divider v-if="!roundTweak" />
2022-05-18 03:53:03 +00:00
<h3 class="ml-8 mt-8">Rounded Corners</h3>
<v-card
flat
class="mx-4 my-2 background"
2022-05-18 03:53:03 +00:00
style="
transition-duration: 0.3s;
transition-property: border-radius;
overflow: hidden;
"
:style="{
borderRadius: `${roundTweak / 2}rem`,
}"
>
2022-05-18 03:53:03 +00:00
<!-- margin: $store.state.tweaks.roundTweak > 0 ? '0 1rem' : '0', -->
<v-card
flat
2022-05-18 04:22:14 +00:00
class="mb-1 px-4 py-2 d-flex flex-row justify-between background"
2022-05-18 03:53:03 +00:00
:class="
roundTweak > 0 ? ($vuetify.theme.dark ? 'lighten-1' : 'darken-1') : ''
"
:style="{
2022-05-18 04:22:14 +00:00
borderRadius: `${roundTweak / 12}rem`,
2022-05-18 03:53:03 +00:00
}"
@click="
(roundThumb = !roundThumb), $vuetube.haptics.hapticsImpactLight(1)
"
>
2022-05-18 03:53:03 +00:00
<div
2022-05-18 04:22:14 +00:00
class="my-auto background--text"
2022-05-18 03:53:03 +00:00
:class="$vuetify.theme.dark ? 'text--lighten-4' : 'text--darken-4'"
>
Round Thumbnails
</div>
<v-spacer />
<v-switch
v-model="roundThumb"
style="pointer-events: none"
persistent-hint
2022-05-18 03:53:03 +00:00
class="mt-2"
inset
/>
</v-card>
<v-card
flat
2022-05-18 04:22:14 +00:00
class="mb-1 px-4 py-2 d-flex flex-row justify-between background"
2022-05-18 03:53:03 +00:00
:class="
roundTweak > 0 ? ($vuetify.theme.dark ? 'lighten-1' : 'darken-1') : ''
"
:style="{
2022-05-18 04:22:14 +00:00
borderRadius: `${roundTweak / 12}rem`,
2022-05-18 03:53:03 +00:00
}"
@click="
(roundWatch = !roundWatch), $vuetube.haptics.hapticsImpactLight(1)
"
>
2022-05-18 03:53:03 +00:00
<div
2022-05-18 04:22:14 +00:00
class="my-auto background--text"
2022-05-18 03:53:03 +00:00
:class="$vuetify.theme.dark ? 'text--lighten-4' : 'text--darken-4'"
>
Round Watch Page Components
</div>
<v-spacer />
<v-switch
v-model="roundWatch"
style="pointer-events: none"
persistent-hint
2022-05-18 03:53:03 +00:00
class="mt-2"
inset
/>
</v-card>
2022-03-21 05:13:21 +00:00
<v-slider
2022-03-21 23:47:11 +00:00
v-model="roundTweak"
2022-05-18 04:22:14 +00:00
class="pr-4 pl-4 pt-4 pb-1 background"
2022-03-21 05:13:21 +00:00
:max="4"
2022-05-18 04:22:14 +00:00
label="Radius"
step=".25"
2022-03-21 05:13:21 +00:00
thumb-size="64"
2022-05-18 03:53:03 +00:00
:class="
roundTweak > 0 ? ($vuetify.theme.dark ? 'lighten-1' : 'darken-1') : ''
"
:style="{
2022-05-18 04:22:14 +00:00
borderRadius: `${roundTweak / 12}rem`,
2022-05-18 03:53:03 +00:00
}"
@input="$vuetube.haptics.hapticsImpactLight(0)"
2022-03-21 05:13:21 +00:00
>
2022-03-21 23:47:11 +00:00
<template #thumb-label="{ value }">
2022-03-21 05:13:21 +00:00
<div
2022-03-31 06:01:29 +00:00
class="pa-4 background text-red red-text red--text"
2022-03-21 05:13:21 +00:00
:style="{ borderRadius: value * 3 + 'px !important' }"
></div>
</template>
</v-slider>
</v-card>
</div>
</template>
<script>
export default {
computed: {
roundTweak: {
get() {
return this.$store.state.tweaks.roundTweak;
},
set(value) {
this.$store.commit("tweaks/setRoundTweak", value);
},
},
roundThumb: {
get() {
return this.$store.state.tweaks.roundThumb;
},
set(value) {
this.$store.commit("tweaks/setRoundThumb", value);
},
},
roundWatch: {
get() {
return this.$store.state.tweaks.roundWatch;
},
set(value) {
this.$store.commit("tweaks/setRoundWatch", value);
},
},
2022-03-21 05:13:21 +00:00
},
};
</script>