koel/resources/assets/js/components/profile-preferences/PreferencesForm.vue

74 lines
2.2 KiB
Vue
Raw Normal View History

2022-04-15 14:24:30 +00:00
<template>
2024-04-04 22:20:42 +00:00
<div class="space-y-3">
<FormRow v-if="isPlus">
<div>
<CheckBox v-model="preferences.make_uploads_public" name="make_upload_public" />
Make uploaded songs public by default
2024-04-04 22:20:42 +00:00
</div>
</FormRow>
<FormRow>
<div>
2024-03-25 22:59:38 +00:00
<CheckBox v-model="preferences.continuous_playback" name="continuous_playback" />
2024-05-19 05:49:42 +00:00
Playing a song or episode triggers continuous playback of the entire playlist, album, artist, genre, or podcast
2024-04-04 22:20:42 +00:00
</div>
</FormRow>
<FormRow v-if="onMobile">
2024-04-04 22:20:42 +00:00
<div>
<CheckBox v-model="preferences.show_now_playing_notification" name="notify" />
2024-03-12 04:48:57 +00:00
Show Now Playing notification
2024-04-04 22:20:42 +00:00
</div>
</FormRow>
<FormRow v-if="!onMobile">
2024-04-04 22:20:42 +00:00
<div>
<CheckBox v-model="preferences.confirm_before_closing" name="confirm_closing" />
2022-04-15 14:24:30 +00:00
Confirm before closing Koel
2024-04-04 22:20:42 +00:00
</div>
</FormRow>
<FormRow v-if="showTranscodingOption">
2024-04-04 22:20:42 +00:00
<div>
<CheckBox
v-model="preferences.transcode_on_mobile"
data-testid="transcode_on_mobile"
name="transcode_on_mobile"
/>
Convert and play media at
<select
v-model="preferences.transcode_quality"
:disabled="!preferences.transcode_on_mobile"
class="appearance-auto rounded"
>
<option v-for="quality in [64, 96, 128, 192, 256, 320]" :key="quality" :value="quality">{{ quality }}</option>
</select>
kbps on mobile
2024-04-04 22:20:42 +00:00
</div>
</FormRow>
<FormRow>
<div>
<CheckBox v-model="preferences.show_album_art_overlay" name="show_album_art_overlay" />
2022-04-15 14:24:30 +00:00
Show a translucent, blurred overlay of the current albums art
2024-04-04 22:20:42 +00:00
</div>
</FormRow>
2022-04-15 14:24:30 +00:00
</div>
</template>
2022-04-15 17:00:08 +00:00
<script lang="ts" setup>
2022-04-15 14:24:30 +00:00
import isMobile from 'ismobilejs'
import { toRef } from 'vue'
import { commonStore, preferenceStore as preferences } from '@/stores'
import { useKoelPlus } from '@/composables'
2024-04-04 22:20:42 +00:00
import CheckBox from '@/components/ui/form/CheckBox.vue'
import FormRow from '@/components/ui/form/FormRow.vue'
2022-04-15 14:24:30 +00:00
const onMobile = isMobile.any
const { isPlus } = useKoelPlus()
const showTranscodingOption = toRef(commonStore.state, 'supports_transcoding')
2022-04-15 14:24:30 +00:00
</script>
2024-04-04 20:13:35 +00:00
<style lang="postcss" scoped>
2022-04-15 14:24:30 +00:00
label {
2024-04-04 22:20:42 +00:00
@apply text-base;
2022-04-15 14:24:30 +00:00
}
</style>