feat(admin): add MediaView, MediaPickerModal, MediaFinderField, unify MailImagePicker, and rebuild boardwalk dist
This commit is contained in:
@@ -6,6 +6,7 @@ import { loadFieldTypes } from '../app/fieldTypes'
|
||||
import { t } from '../app/i18n'
|
||||
import { safeRedirect } from '../app/router'
|
||||
import { login, me } from '../state/useAuth'
|
||||
import { loadMediaAccess } from '../state/useMediaAccess'
|
||||
import { loadNavigation } from '../state/useNavigation'
|
||||
import { loadSettings } from '../state/useSettings'
|
||||
|
||||
@@ -36,7 +37,12 @@ async function submit(): Promise<void> {
|
||||
return
|
||||
}
|
||||
password.value = ''
|
||||
await Promise.all([loadNavigation(), loadSettings().catch(() => []), loadFieldTypes()])
|
||||
await Promise.all([
|
||||
loadNavigation(),
|
||||
loadSettings().catch(() => []),
|
||||
loadMediaAccess().catch(() => false),
|
||||
loadFieldTypes(),
|
||||
])
|
||||
await router.replace(safeRedirect(route.query.redirect) ?? '/')
|
||||
} finally {
|
||||
busy.value = false
|
||||
|
||||
15
admin/src/views/MediaView.vue
Normal file
15
admin/src/views/MediaView.vue
Normal file
@@ -0,0 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
import { t } from '../app/i18n'
|
||||
import MediaBrowser from '../components/media/MediaBrowser.vue'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section data-media-view class="flex h-[calc(100vh-120px)] min-h-[520px] flex-col gap-4">
|
||||
<div class="flex items-center justify-between gap-4">
|
||||
<h1 class="text-[22px] font-bold tracking-[-0.02em]">{{ t('backend::lang.media.title') }}</h1>
|
||||
</div>
|
||||
<div class="flex min-h-0 flex-1 rounded-card border border-border bg-surface p-4">
|
||||
<MediaBrowser mode="all" :selectable="false" />
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
Reference in New Issue
Block a user