chore(front): fmt

pipelines/37608
jon r 2025-02-24 02:55:09 +01:00
rodzic ff4c2e4b3d
commit 03d4fc75b3
3 zmienionych plików z 92 dodań i 77 usunięć

Wyświetl plik

@ -2,22 +2,21 @@
import { ref, onMounted } from 'vue'
import { type ColorProps, type PastelProps, type VariantProps, type RaisedProps, color } from '~/composables/color'
const input = ref<HTMLInputElement>();
const input = ref<HTMLInputElement>()
const emit = defineEmits<{
click: [event: MouseEvent]
}>()
const handleClick = (event: MouseEvent) => {
emit('click', event)
if (model.value !== undefined) {
input.value?.focus();
input.value?.focus()
}
}
const props = defineProps<{ noUnderline?:true, autofocus? : boolean } &(PastelProps | ColorProps) & VariantProps & RaisedProps>()
const model = defineModel<string>()
onMounted(() => {
if (props.autofocus) input.value?.focus();
if (props.autofocus) input.value?.focus()
})
const sanitize = () =>
@ -26,7 +25,6 @@ const sanitize = () =>
const sanitizeAndBlur = () =>
sanitize() && input.value?.blur()
</script>
<template>

Wyświetl plik

@ -218,29 +218,29 @@ onMounted(() => {
/>
<textarea
ref="textarea"
@click="updateLineNumber"
@mousedown.stop
@mouseup.stop
@keydown.left="updateLineNumber"
@keydown.right="updateLineNumber"
@keydown.up="updateLineNumber"
:maxlength="charLimit"
@keydown.down="updateLineNumber"
@keydown.enter="newline"
v-bind="$attrs"
:autofocus="autofocus || undefined"
@keydown.ctrl.shift.z.exact.prevent="redo"
:required="required"
@keydown.ctrl.z.exact.prevent="undo"
:placeholder="placeholder"
@keydown.ctrl.b.exact.prevent="bold"
@click="updateLineNumber"
v-model="model"
@keydown.ctrl.i.exact.prevent="italics"
@mousedown.stop
id="textarea_id"
@keydown.ctrl.shift.x.exact.prevent="strikethrough"
@mouseup.stop
:rows="initialLines"
@keydown.ctrl.k.exact.prevent="link"
@keydown.left="updateLineNumber"
:style="`min-height:${((typeof(initialLines) === 'string' ? parseInt(initialLines) : (initialLines ?? 3)) + 1.2) * 1.5}rem`"
@keydown.right="updateLineNumber"
@keydown.up="updateLineNumber"
@keydown.down="updateLineNumber"
@keydown.enter="newline"
@keydown.ctrl.shift.z.exact.prevent="redo"
@keydown.ctrl.z.exact.prevent="undo"
@keydown.ctrl.b.exact.prevent="bold"
@keydown.ctrl.i.exact.prevent="italics"
@keydown.ctrl.shift.x.exact.prevent="strikethrough"
@keydown.ctrl.k.exact.prevent="link"
/>
<label
class="textarea-buttons"

Wyświetl plik

@ -79,71 +79,85 @@ const channelUpload = ref()
:cancel="t('components.channels.UploadModal.button.cancel')"
:title="modalTitle"
>
<!-- Page content -->
<!-- Page 1 -->
<!-- Page content -->
<!-- Page 1 -->
<Layout flex style="place-content:center" v-if="state.page === 'selectDestination'">
<Card
small
solid
title="Music"
icon="bi-upload"
@click="destinationSelected({ type: 'library' })"
<Layout
v-if="state.page === 'selectDestination'"
flex
style="place-content:center"
>
<template #image>
<i class="bi bi-headphones solid secondary raised" :class="$style.icon"></i>
</template>
{{ "Host music you listen to" /* TODO: Translate */ }}
</Card>
<Card
small
title="Music"
solid
icon="bi-upload primary solid"
@click="destinationSelected({ type: 'channel', filter: 'music' })"
<Card
small
solid
title="Music"
icon="bi-upload"
@click="destinationSelected({ type: 'library' })"
>
<template #image>
<i
class="bi bi-headphones solid secondary raised"
:class="$style.icon"
/>
</template>
{{ "Host music you listen to" /* TODO: Translate */ }}
</Card>
<Card
small
title="Music"
solid
icon="bi-upload primary solid"
@click="destinationSelected({ type: 'channel', filter: 'music' })"
>
<template #image>
<i
class="bi bi-music-note-beamed solid primary"
:class="$style.icon"
/>
</template>
{{ "Publish music you make" /* TODO: Translate */ }}
</Card>
<Card
small
solid
title="Podcast"
icon="bi-upload primary solid"
@click="destinationSelected({ type: 'channel', filter: 'podcast' })"
>
<template #image>
<i
class="bi bi-mic-fill solid primary"
:class="$style.icon"
/>
</template>
{{ "Publish podcasts you make" /* TODO: Translate */ }}
</Card>
</Layout>
<!-- Page 2 -->
<Layout
v-if="state.page === 'uploadFiles'"
stack
>
<template #image>
<i class="bi bi-music-note-beamed solid primary" :class="$style.icon"></i>
</template>
{{ "Publish music you make" /* TODO: Translate */ }}
</Card>
<Card
small
solid
title="Podcast"
icon="bi-upload primary solid"
@click="destinationSelected({ type: 'channel', filter: 'podcast' })"
>
<template #image>
<i class="bi bi-mic-fill solid primary" :class="$style.icon"></i>
</template>
{{ "Publish podcasts you make" /* TODO: Translate */ }}
</Card>
</Layout>
<!-- -->
<!-- Page 2 -->
<Layout stack v-if="state.page === 'uploadFiles'">
<!-- -->
<ChannelUpload
ref="channelUpload"
v-if="state.uploadDestination?.type === 'channel'"
:filter="state.uploadDestination.filter"
:channel="null"
<ChannelUpload
v-if="state.uploadDestination?.type === 'channel'"
ref="channelUpload"
:filter="state.uploadDestination.filter"
:channel="null"
/>
<!-- -->
<!-- Privacy Slider -->
<LibraryUpload
v-if="state.uploadDestination?.type === 'library'"
v-model="privacyLevel">
</LibraryUpload>
{{ state.files }}
</Layout>
<!-- Privacy Slider -->
<LibraryUpload
v-if="state.uploadDestination?.type === 'library'"
v-model="privacyLevel"
/>
{{ state.files }}
</Layout>
<template #actions>
<Button
@ -153,7 +167,10 @@ const channelUpload = ref()
>
{{ t('components.channels.UploadModal.button.previous') }}
</Button>
<Spacer h grow />
<Spacer
h
grow
/>
<Spacer size-16 />
<Button
v-if="state.page === 'uploadFiles'"