feat [front]: admin page titles
This commit is contained in:
parent
2d2179ed53
commit
fc0b8f8a87
|
@ -11,6 +11,10 @@
|
||||||
import { useAuthStore } from "~/stores/authStore"
|
import { useAuthStore } from "~/stores/authStore"
|
||||||
|
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
|
useHead({
|
||||||
|
titleTemplate: (pageTitle) =>
|
||||||
|
(pageTitle ? `${pageTitle} | ` : "") + "Admin | Ciné-club ENS Ulm",
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="sass"></style>
|
<style scoped lang="sass"></style>
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
app: {
|
app: {
|
||||||
head: {
|
head: {
|
||||||
title: "front",
|
|
||||||
htmlAttrs: {
|
htmlAttrs: {
|
||||||
lang: "fr",
|
lang: "fr",
|
||||||
},
|
},
|
||||||
|
|
|
@ -13,17 +13,15 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Film } from "~/composables/types"
|
import { Film } from "~/composables/types"
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({ layout: "admin" })
|
||||||
layout: "admin",
|
|
||||||
})
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const id = route.params.id
|
const id = route.params.id
|
||||||
|
|
||||||
const film = reactive<Film>({})
|
const film = reactive<Film>({})
|
||||||
|
|
||||||
Object.assign(film, (await apiGet(`admin/films/${id}/`)).data.value)
|
Object.assign(film, (await apiGet(`admin/films/${id}/`)).data.value)
|
||||||
|
|
||||||
// TODO manage errors
|
// TODO manage errors
|
||||||
|
useHead({ title: `Édition de ${film.title}` })
|
||||||
|
|
||||||
async function save(publish: boolean) {
|
async function save(publish: boolean) {
|
||||||
const { data } = await apiPatch(`admin/films/${id}/`, {
|
const { data } = await apiPatch(`admin/films/${id}/`, {
|
||||||
|
|
|
@ -5,8 +5,11 @@
|
||||||
{{ film.isConfirmed ? "Publié" : "Brouillon" }}
|
{{ film.isConfirmed ? "Publié" : "Brouillon" }}
|
||||||
</div>
|
</div>
|
||||||
<h1 class="mx-5">
|
<h1 class="mx-5">
|
||||||
<time v-if="film.projectionDate" :datetime="film.projectionDate">{{ new Date(film.projectionDate).toLocaleString()}}</time>
|
<time v-if="film.projectionDate" :datetime="film.projectionDate"
|
||||||
<template v-else>À planifier</template> -
|
>{{ new Date(film.projectionDate).toLocaleString() }}
|
||||||
|
</time>
|
||||||
|
<template v-else>À planifier</template>
|
||||||
|
-
|
||||||
{{ film.title }}
|
{{ film.title }}
|
||||||
<span class="has-text-grey-lighter">#{{ film.id }}</span>
|
<span class="has-text-grey-lighter">#{{ film.id }}</span>
|
||||||
</h1>
|
</h1>
|
||||||
|
@ -73,15 +76,14 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Film } from "~/composables/types"
|
import { Film } from "~/composables/types"
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({ layout: "admin" })
|
||||||
layout: "admin",
|
|
||||||
})
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const id = route.params.id
|
const id = route.params.id
|
||||||
|
|
||||||
const film = reactive<Film>({})
|
const film = reactive<Film>({})
|
||||||
|
|
||||||
Object.assign(film, (await apiGet(`admin/films/${id}/`)).data.value)
|
Object.assign(film, (await apiGet(`admin/films/${id}/`)).data.value)
|
||||||
|
useHead({ title: `Consultation de ${film.title}` })
|
||||||
|
|
||||||
const tags = computed(() => {
|
const tags = computed(() => {
|
||||||
const base = [
|
const base = [
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<template></template>
|
<template></template>
|
||||||
|
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts">
|
||||||
|
definePageMeta({ layout: "admin" })
|
||||||
|
</script>
|
||||||
|
|
||||||
<style scoped lang="sass"></style>
|
<style scoped lang="sass"></style>
|
||||||
|
|
|
@ -23,9 +23,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ShortFilm } from "~/composables/types"
|
import { ShortFilm } from "~/composables/types"
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({ layout: "admin" })
|
||||||
layout: "admin",
|
useHead({ title: "Liste des séances" })
|
||||||
})
|
|
||||||
|
|
||||||
const films = reactive<ShortFilm[]>([])
|
const films = reactive<ShortFilm[]>([])
|
||||||
|
|
||||||
|
|
|
@ -54,9 +54,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAuthStore } from "~/stores/authStore"
|
import { useAuthStore } from "~/stores/authStore"
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({ layout: "admin" })
|
||||||
layout: "admin",
|
useHead({ title: "Connexion" })
|
||||||
})
|
|
||||||
|
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
const login = ref({ username: "", password: "" })
|
const login = ref({ username: "", password: "" })
|
||||||
|
|
|
@ -8,9 +8,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Film } from "~/composables/types"
|
import { Film } from "~/composables/types"
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({ layout: "admin" })
|
||||||
layout: "admin",
|
useHead({ title: "Nouvelle séance" })
|
||||||
})
|
|
||||||
|
|
||||||
const film = reactive<Film>({})
|
const film = reactive<Film>({})
|
||||||
const { $api } = useNuxtApp()
|
const { $api } = useNuxtApp()
|
||||||
|
|
5617
front/yarn.lock
5617
front/yarn.lock
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue