This commit is contained in:
Maximilian Harz 2025-08-04 11:43:07 +01:00
parent 636fda45f2
commit a800ea217b
35 changed files with 126 additions and 20 deletions

View File

@ -28,7 +28,9 @@
</transition>
</template>
<script setup>
<script setup lang="ts">
// TODO add blank layout
// TODO refactor back to maintenance.vue
import emails from '~/constants/emails'
import metadata from '~/constants/metadata'

View File

@ -0,0 +1,80 @@
<template>
<transition name="fade" appear>
<ds-container width="medium">
<base-card>
<ds-space>
<!-- <locale-switch class="login-locale-switch" offset="5" /> -->
</ds-space>
<ds-flex>
<ds-flex-item :width="{ base: '100%', sm: 1, md: 1 }">
<ds-space>
<!-- QUESTION: could we have internal page or even all internal pages here as well with PageParamsLink by having the footer underneath? -->
<!-- I tried this out, but only could get the nginx page displayed. I guees the there were nuxt errors, because the nuxt config file 'webapp/maintenance/source/nuxt.config.maintenance.js' would have to be refactored for that as well and may be the missing folder `components/_new/generic/` plays a role, see https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/4619 -->
<!-- <page-params-link :pageParams="links.ORGANIZATION" :title="$t('login.moreInfo', metadata)">
<logo type="maintenance" />
</page-params-link> -->
<!-- BUT: not the logo and not even the a-tag is working at the moment -->
<!-- <a
:href="emails.ORGANIZATION_LINK"
:title="$t('login.moreInfo', metadata)"
target="_blank"
> -->
<img class="image" alt="Under maintenance" src="/img/custom/logo-squared.svg" >
<!-- </a> -->
</ds-space>
</ds-flex-item>
<ds-flex-item :width="{ base: '100%', sm: 1, md: 1 }">
<ds-flex-item>
<ds-heading tag="h3">{{ $t('maintenance.title', metadata) }}</ds-heading>
</ds-flex-item>
<ds-flex-item>
<ds-space margin="small">
<ds-text>{{ $t('maintenance.explanation') }}</ds-text>
<ds-text>
{{ $t('maintenance.questions') }}
<a :href="'mailto:' + supportEmail">{{ supportEmail }}</a>
</ds-text>
</ds-space>
</ds-flex-item>
</ds-flex-item>
</ds-flex>
</base-card>
</ds-container>
</transition>
</template>
<script>
import emails from '~/constants/emails'
// import links from '~/constants/links.js'
import metadata from '~/constants/metadata'
// import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch'
// import Logo from '~/components/Logo/Logo'
import { Container as DsContainer, Card as BaseCard, Space as DsSpace, Flex as DsFlex, FlexItem as DsFlexItem, Heading as DsHeading, Text as DsText } from 'ocelot-styleguide'
export default {
components: {
// LocaleSwitch,
// Logo,
DsContainer,
BaseCard,
DsSpace,
DsFlex,
DsFlexItem,
DsHeading,
DsText,
},
layout: 'blank',
data() {
// return { links, metadata, supportEmail: emails.SUPPORT_EMAIL }
return { metadata, supportEmail: emails.SUPPORT_EMAIL }
},
}
</script>
<style lang="scss">
.image {
width: 75%;
height: auto;
}
</style>

View File

@ -925,7 +925,7 @@
"Tag": "Hashtag ::: Hashtags",
"User": "Nutzer ::: Nutzer"
},
"hint": "!... sucht Beiträge, @... sucht Nutzer, &... sucht Gruppen, #… sucht Hashtags",
"hint": "!... sucht Beiträge, {'@'}... sucht Nutzer, &... sucht Gruppen, #… sucht Hashtags",
"no-results": "Keine Ergebnisse für \"{search}\" gefunden. Versuch' es mit einem anderen Begriff!",
"page": "Seite",
"placeholder": "Suchen",

View File

@ -925,7 +925,7 @@
"Tag": "Hashtag ::: Hashtags",
"User": "User ::: Users"
},
"hint": "!... searches posts, @... searches users, &... searches groups, #… searches hashtags",
"hint": "!... searches posts, {'@'}'... searches users, &... searches groups, #… searches hashtags",
"no-results": "No results found for \"{search}\". Try a different search term!",
"page": "Page",
"placeholder": "Search",

View File

@ -925,7 +925,7 @@
"Tag": null,
"User": "Usuarios"
},
"hint": "¿Qué estás buscando? Utiliza !… para contribuciones, @… para usuarios, #… para hashtags.",
"hint": "¿Qué estás buscando? Utiliza !… para contribuciones, {'@'}… para usuarios, #… para hashtags.",
"no-results": null,
"page": null,
"placeholder": "Buscar",

View File

@ -925,7 +925,7 @@
"Tag": null,
"User": "Utilisateurs"
},
"hint": "Qu'est-ce que vous cherchez? Utiliser !… pour des posts, @… pour des membres, #… pour des hashtag.",
"hint": "Qu'est-ce que vous cherchez? Utiliser !… pour des posts, {'@'}… pour des membres, #… pour des hashtag.",
"no-results": null,
"page": null,
"placeholder": "Rechercher",

View File

@ -1,5 +1,4 @@
import { enUS, de, nl, fr, es, it, pt, pl, ru } from 'date-fns/locale'
import find from 'lodash/find'
const locales = [
{
@ -68,7 +67,7 @@ const locales = [
]
export default locales
export function getDateFnsLocale({ $i18n }) {
const { dateFnsLocale } = find(locales, { code: $i18n.locale() }) || {}
return dateFnsLocale || enUS
export function getDateFnsLocale(code: string) {
return locales.find(locale => locale.code === code)?.dateFnsLocale ?? enUS
}

View File

@ -925,7 +925,7 @@
"Tag": null,
"User": null
},
"hint": "Cosa state cercando? Usate !... per i post, @... per gli utenti, #... per gli hashtag.",
"hint": "Cosa state cercando? Usate !... per i post, {'@'}... per gli utenti, #... per gli hashtag.",
"no-results": null,
"page": null,
"placeholder": "Ricerca",

View File

@ -925,7 +925,7 @@
"Tag": null,
"User": null
},
"hint": "Waar zoekt u naar? Gebruik !... voor berichten, @... voor gebruikers, #... voor hashtags.",
"hint": "Waar zoekt u naar? Gebruik !... voor berichten, {'@'}... voor gebruikers, #... voor hashtags.",
"no-results": null,
"page": null,
"placeholder": "Zoeken",

View File

@ -925,7 +925,7 @@
"Tag": null,
"User": null
},
"hint": "Czego szukasz? Użyj !... dla postów, @... dla użytkowników, #... dla hashtagów.",
"hint": "Czego szukasz? Użyj !... dla postów, {'@'}... dla użytkowników, #... dla hashtagów.",
"no-results": null,
"page": null,
"placeholder": "Szukaj",

View File

@ -925,7 +925,7 @@
"Tag": null,
"User": null
},
"hint": "O que você está buscando? Use !... para postagens, @... para usuários, #... para hashtags.",
"hint": "O que você está buscando? Use !... para postagens, {'@'}... para usuários, #... para hashtags.",
"no-results": null,
"page": null,
"placeholder": "Buscar",

View File

@ -925,7 +925,7 @@
"Tag": null,
"User": "Пользователи"
},
"hint": "Что вы хотите найти? Используйте !... для постов, @... для пользователей, #... для хэштегов.",
"hint": "Что вы хотите найти? Используйте !... для постов, {'@'}... для пользователей, #... для хэштегов.",
"no-results": null,
"page": null,
"placeholder": "Поиск",

View File

@ -1,6 +1,7 @@
import { resolve } from "path";
import sourcemaps from "rollup-plugin-sourcemaps";
import viteTsConfigPaths from 'vite-tsconfig-paths';
import viteTsConfigPaths from "vite-tsconfig-paths";
import locales from "./i18n/locales";
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
@ -26,16 +27,31 @@ export default defineNuxtConfig({
},
},
i18n: {
locales: locales.map((locale: typeof locales[0]) => ({
code: locale.code,
language: locale.name,
file: `${locale.code}.json`,
})),
defaultLocale: "en",
compilation: {
strictMessage: false,
},
bundle: {
optimizeTranslationDirective: false,
}
},
vite: {
plugins: [viteTsConfigPaths()],
resolve: {
alias: {
'@@': resolve(__dirname, './lib/styleguide'),
}
},
alias: {
"@@": resolve(__dirname, "./lib/styleguide"),
},
},
build: {
rollupOptions: {
plugins: [sourcemaps, ],
plugins: [sourcemaps],
output: {
sourcemap: true,
},

View File

@ -35,6 +35,7 @@
},
"devDependencies": {
"@nuxtjs/apollo": "^5.0.0-alpha.14",
"@types/lodash": "^4.17.20",
"rollup-plugin-sourcemaps": "^0.6.3"
}
},
@ -5021,6 +5022,13 @@
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
"license": "MIT"
},
"node_modules/@types/lodash": {
"version": "4.17.20",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.20.tgz",
"integrity": "sha512-H3MHACvFUEiujabxhaI/ImO6gUrd8oOurg7LQtS7mbwIXA/cUqWrvBsaeJ23aZEPk1TAYkurjfMbSELfoCXlGA==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/node": {
"version": "24.0.3",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.3.tgz",

View File

@ -40,6 +40,7 @@
},
"devDependencies": {
"@nuxtjs/apollo": "^5.0.0-alpha.14",
"@types/lodash": "^4.17.20",
"rollup-plugin-sourcemaps": "^0.6.3"
}
}