feat(front): add links to go back from album editor to album
This commit is contained in:
parent
d9c1b70f83
commit
e1bc6f524e
|
@ -11,9 +11,10 @@ import axios from 'axios'
|
||||||
|
|
||||||
import Layout from '~/components/ui/Layout.vue'
|
import Layout from '~/components/ui/Layout.vue'
|
||||||
import Button from '~/components/ui/Button.vue'
|
import Button from '~/components/ui/Button.vue'
|
||||||
|
import Link from '~/components/ui/Link.vue'
|
||||||
import Spacer from '~/components/ui/Spacer.vue'
|
import Spacer from '~/components/ui/Spacer.vue'
|
||||||
import Input from '~/components/ui/Input.vue'
|
import Input from '~/components/ui/Input.vue'
|
||||||
// import Textarea from '~/components/ui/Textarea.vue'
|
import Textarea from '~/components/ui/Textarea.vue'
|
||||||
import Pills from '~/components/ui/Pills.vue'
|
import Pills from '~/components/ui/Pills.vue'
|
||||||
import Alert from '~/components/ui/Alert.vue'
|
import Alert from '~/components/ui/Alert.vue'
|
||||||
|
|
||||||
|
@ -155,6 +156,15 @@ const resetField = (fieldId: string) => {
|
||||||
>
|
>
|
||||||
{{ t('components.library.EditForm.button.new') }}
|
{{ t('components.library.EditForm.button.new') }}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
<Link
|
||||||
|
solid
|
||||||
|
secondary
|
||||||
|
raised
|
||||||
|
:to="{ name: 'library.albums.detail', params: { id: object.id } }"
|
||||||
|
>
|
||||||
|
Back to Album
|
||||||
|
</Link>
|
||||||
</Alert>
|
</Alert>
|
||||||
<Layout
|
<Layout
|
||||||
v-else
|
v-else
|
||||||
|
@ -268,14 +278,12 @@ const resetField = (fieldId: string) => {
|
||||||
</select>
|
</select>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="fieldConfig.type === 'content'">
|
<template v-else-if="fieldConfig.type === 'content'">
|
||||||
TEXTAREA
|
<Textarea
|
||||||
<b> v-model: </b>{{ values[fieldConfig.id].text }}
|
|
||||||
<!-- <Textarea
|
|
||||||
v-model="values[fieldConfig.id].text"
|
v-model="values[fieldConfig.id].text"
|
||||||
:label="fieldConfig.label"
|
:label="fieldConfig.label"
|
||||||
:field-id="fieldConfig.id"
|
:field-id="fieldConfig.id"
|
||||||
initial-lines="3"
|
initial-lines="3"
|
||||||
/> -->
|
/>
|
||||||
</template>
|
</template>
|
||||||
<!-- TODO: Style Attachment Input -->
|
<!-- TODO: Style Attachment Input -->
|
||||||
<template v-else-if="fieldConfig.type === 'attachment'">
|
<template v-else-if="fieldConfig.type === 'attachment'">
|
||||||
|
@ -324,9 +332,7 @@ const resetField = (fieldId: string) => {
|
||||||
</Button>
|
</Button>
|
||||||
</Layout>
|
</Layout>
|
||||||
<Spacer />
|
<Spacer />
|
||||||
TEXTAREA
|
<Textarea
|
||||||
<b> v-model: </b>{{ summary }}
|
|
||||||
<!-- <Textarea
|
|
||||||
id="change-summary"
|
id="change-summary"
|
||||||
v-model="summary"
|
v-model="summary"
|
||||||
name="change-summary"
|
name="change-summary"
|
||||||
|
@ -338,24 +344,34 @@ const resetField = (fieldId: string) => {
|
||||||
v-if="objectType === 'track'"
|
v-if="objectType === 'track'"
|
||||||
low-height
|
low-height
|
||||||
secondary
|
secondary
|
||||||
raised
|
:to="{ name: 'library.tracks.detail', params: { id: object.id } }"
|
||||||
:to="{name: 'library.tracks.detail', params: {id: object.id }}"
|
|
||||||
>
|
>
|
||||||
{{ t('components.library.EditForm.button.cancel') }}
|
{{ t('components.library.EditForm.button.cancel') }}
|
||||||
</Link>
|
</Link>
|
||||||
</Textarea> -->
|
</Textarea>
|
||||||
<Button
|
<Layout flex>
|
||||||
:is-loading="isLoading"
|
<Spacer grow />
|
||||||
primary
|
<Button
|
||||||
:disabled="isLoading || !mutationPayload"
|
:is-loading="isLoading"
|
||||||
>
|
primary
|
||||||
<span v-if="canEdit">
|
:disabled="isLoading || !mutationPayload"
|
||||||
{{ t('components.library.EditForm.button.submit') }}
|
>
|
||||||
</span>
|
<span v-if="canEdit">
|
||||||
<span v-else>
|
{{ t('components.library.EditForm.button.submit') }}
|
||||||
{{ t('components.library.EditForm.button.suggest') }}
|
</span>
|
||||||
</span>
|
<span v-else>
|
||||||
</Button>
|
{{ t('components.library.EditForm.button.suggest') }}
|
||||||
|
</span>
|
||||||
|
</Button>
|
||||||
|
<Link
|
||||||
|
solid
|
||||||
|
secondary
|
||||||
|
raised
|
||||||
|
:to="{ name: 'library.albums.detail', params: { id: object.id } }"
|
||||||
|
>
|
||||||
|
{{ t('components.library.EditForm.button.cancel') }}
|
||||||
|
</Link>
|
||||||
|
</Layout>
|
||||||
</form>
|
</form>
|
||||||
</Layout>
|
</Layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -22,7 +22,8 @@ const { charLimit = Infinity, placeholder = '', initialLines: minLines = 3, ...p
|
||||||
const model = defineModel<string>({ required: true })
|
const model = defineModel<string>({ required: true })
|
||||||
|
|
||||||
const { undo, redo, commit: commitHistory, last } = useManualRefHistory(model)
|
const { undo, redo, commit: commitHistory, last } = useManualRefHistory(model)
|
||||||
const { textarea, triggerResize } = useTextareaAutosize({ input: model })
|
const textarea = ref()
|
||||||
|
const { triggerResize } = useTextareaAutosize({ input: model, element: textarea })
|
||||||
|
|
||||||
const commit = () => {
|
const commit = () => {
|
||||||
triggerResize()
|
triggerResize()
|
||||||
|
|
Loading…
Reference in New Issue