mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-23 04:34:15 -04:00
(format) split long lines
This commit is contained in:
parent
f75d58ce7b
commit
cf91fdb13a
214
nuxt.config.ts
214
nuxt.config.ts
@ -348,54 +348,101 @@ const nuxtConfig: NuxtConfig = {
|
||||
router: {
|
||||
extendRoutes(routes, resolve) {
|
||||
if (config.pronouns.enabled) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.pronouns.route)}`, component: resolve(__dirname, 'routes/pronouns.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.pronouns.route)}`,
|
||||
component: resolve(__dirname, 'routes/pronouns.vue'),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.sources.enabled) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.sources.route)}`, component: resolve(__dirname, 'routes/sources.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.sources.route)}`,
|
||||
component: resolve(__dirname, 'routes/sources.vue'),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.nouns.enabled) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.nouns.route)}`, component: resolve(__dirname, 'routes/nouns.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.nouns.route)}`,
|
||||
component: resolve(__dirname, 'routes/nouns.vue'),
|
||||
});
|
||||
for (const subroute of config.nouns.subroutes || []) {
|
||||
routes.push({ path: `/${encodeURIComponent(subroute)}`, component: resolve(__dirname, `data/nouns/${subroute}.vue`) });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(subroute)}`,
|
||||
component: resolve(__dirname, `data/nouns/${subroute}.vue`),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (config.inclusive.enabled) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.inclusive.route)}`, component: resolve(__dirname, 'routes/inclusive.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.inclusive.route)}`,
|
||||
component: resolve(__dirname, 'routes/inclusive.vue'),
|
||||
});
|
||||
}
|
||||
if (config.terminology.enabled) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.terminology.route)}`, component: resolve(__dirname, 'routes/terminology.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.terminology.route)}`,
|
||||
component: resolve(__dirname, 'routes/terminology.vue'),
|
||||
});
|
||||
|
||||
// TODO remove later
|
||||
routes.push({ path: `/${encodeURIComponent(config.nouns.route)}/${encodeURIComponent(config.terminology.route)}`, component: resolve(__dirname, 'routes/terminology.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.nouns.route)}/${encodeURIComponent(config.terminology.route)}`,
|
||||
component: resolve(__dirname, 'routes/terminology.vue'),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.names.enabled) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.names.route)}`, component: resolve(__dirname, 'routes/names.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.names.route)}`,
|
||||
component: resolve(__dirname, 'routes/names.vue'),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.faq.enabled) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.faq.route)}`, component: resolve(__dirname, 'routes/faq.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.faq.route)}`,
|
||||
component: resolve(__dirname, 'routes/faq.vue'),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.links.enabled) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.links.route)}`, component: resolve(__dirname, 'routes/links.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.links.route)}`,
|
||||
component: resolve(__dirname, 'routes/links.vue'),
|
||||
});
|
||||
if (config.links.academicRoute) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.links.academicRoute)}`, component: resolve(__dirname, 'routes/academic.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.links.academicRoute)}`,
|
||||
component: resolve(__dirname, 'routes/academic.vue'),
|
||||
});
|
||||
}
|
||||
if (config.links.mediaRoute) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.links.mediaRoute)}`, component: resolve(__dirname, 'routes/media.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.links.mediaRoute)}`,
|
||||
component: resolve(__dirname, 'routes/media.vue'),
|
||||
});
|
||||
}
|
||||
if (config.links.translinguisticsRoute) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.links.translinguisticsRoute)}`, component: resolve(__dirname, 'routes/translinguistics.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.links.translinguisticsRoute)}`,
|
||||
component: resolve(__dirname, 'routes/translinguistics.vue'),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (config.links.blog) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.links.blogRoute)}`, component: resolve(__dirname, 'routes/blog.vue'), name: 'blog' });
|
||||
routes.push({ path: `/${encodeURIComponent(config.links.blogRoute)}/:slug`, component: resolve(__dirname, 'routes/blogEntry.vue'), name: 'blogEntry' });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.links.blogRoute)}`,
|
||||
component: resolve(__dirname, 'routes/blog.vue'),
|
||||
name: 'blog',
|
||||
});
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.links.blogRoute)}/:slug`,
|
||||
component: resolve(__dirname, 'routes/blogEntry.vue'),
|
||||
name: 'blogEntry',
|
||||
});
|
||||
if (config.blog && config.blog.shortcuts) {
|
||||
for (const shortcut in config.blog.shortcuts) {
|
||||
if (!config.blog.shortcuts.hasOwnProperty(shortcut)) {
|
||||
@ -405,39 +452,74 @@ const nuxtConfig: NuxtConfig = {
|
||||
if ((config.blog.keepFullPath || []).includes(slug)) {
|
||||
continue;
|
||||
}
|
||||
routes.push({ path: `/${encodeURIComponent(shortcut)}`, component: resolve(__dirname, 'routes/blogEntry.vue'), meta: { slug }, name: `blogEntryShortcut:${shortcut}` });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(shortcut)}`,
|
||||
component: resolve(__dirname, 'routes/blogEntry.vue'),
|
||||
meta: { slug },
|
||||
name: `blogEntryShortcut:${shortcut}`,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (config.links.zine && config.links.zine.enabled) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.links.zine.route)}`, component: resolve(__dirname, 'routes/zine.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.links.zine.route)}`,
|
||||
component: resolve(__dirname, 'routes/zine.vue'),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.people.enabled) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.people.route)}`, component: resolve(__dirname, 'routes/people.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.people.route)}`,
|
||||
component: resolve(__dirname, 'routes/people.vue'),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.english.enabled) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.english.route)}`, component: resolve(__dirname, 'routes/english.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.english.route)}`,
|
||||
component: resolve(__dirname, 'routes/english.vue'),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.contact.enabled) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.contact.route)}`, component: resolve(__dirname, 'routes/contact.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.contact.route)}`,
|
||||
component: resolve(__dirname, 'routes/contact.vue'),
|
||||
});
|
||||
}
|
||||
if (config.contact.team.enabled) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.contact.team.route)}`, component: resolve(__dirname, 'routes/team.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.contact.team.route)}`,
|
||||
component: resolve(__dirname, 'routes/team.vue'),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.census.enabled) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.census.route)}`, component: resolve(__dirname, 'routes/census.vue') });
|
||||
routes.push({ path: `/${encodeURIComponent(config.census.route)}/admin`, component: resolve(__dirname, 'routes/censusModeration.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.census.route)}`,
|
||||
component: resolve(__dirname, 'routes/census.vue'),
|
||||
});
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.census.route)}/admin`,
|
||||
component: resolve(__dirname, 'routes/censusModeration.vue'),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.user.enabled) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.user.route)}`, component: resolve(__dirname, 'routes/user.vue') });
|
||||
routes.push({ path: `/${encodeURIComponent(config.user.termsRoute)}`, component: resolve(__dirname, 'routes/terms.vue') });
|
||||
routes.push({ path: `/${encodeURIComponent(config.user.privacyRoute)}`, component: resolve(__dirname, 'routes/privacy.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.user.route)}`,
|
||||
component: resolve(__dirname, 'routes/user.vue'),
|
||||
});
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.user.termsRoute)}`,
|
||||
component: resolve(__dirname, 'routes/terms.vue'),
|
||||
});
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.user.privacyRoute)}`,
|
||||
component: resolve(__dirname, 'routes/privacy.vue'),
|
||||
});
|
||||
}
|
||||
routes.push({ path: '/license', component: resolve(__dirname, 'routes/license.vue') });
|
||||
routes.push({ path: '/design', component: resolve(__dirname, 'routes/design.vue') });
|
||||
@ -446,17 +528,41 @@ const nuxtConfig: NuxtConfig = {
|
||||
|
||||
routes.push({ path: '/admin/users', component: resolve(__dirname, 'routes/adminUsers.vue') });
|
||||
routes.push({ path: '/admin/profiles', component: resolve(__dirname, 'routes/adminProfiles.vue') });
|
||||
routes.push({ path: '/admin/audit-log/:username/:id', component: resolve(__dirname, 'routes/adminAuditLog.vue') });
|
||||
routes.push({
|
||||
path: '/admin/audit-log/:username/:id',
|
||||
component: resolve(__dirname, 'routes/adminAuditLog.vue'),
|
||||
});
|
||||
|
||||
routes.push({ path: '/admin/timesheets', component: resolve(__dirname, 'routes/adminTimesheets.vue') });
|
||||
routes.push({ path: '/admin/timesheets/overview', component: resolve(__dirname, 'routes/adminTimesheetsOverview.vue') });
|
||||
routes.push({
|
||||
path: '/admin/timesheets',
|
||||
component: resolve(__dirname, 'routes/adminTimesheets.vue'),
|
||||
});
|
||||
routes.push({
|
||||
path: '/admin/timesheets/overview',
|
||||
component: resolve(__dirname, 'routes/adminTimesheetsOverview.vue'),
|
||||
});
|
||||
|
||||
routes.push({ path: '/admin/moderation', component: resolve(__dirname, 'routes/adminModeration.vue') });
|
||||
routes.push({ path: '/admin/abuse-reports', component: resolve(__dirname, 'routes/adminAbuseReports.vue') });
|
||||
routes.push({ path: '/admin/pending-bans', component: resolve(__dirname, 'routes/adminPendingBans.vue') });
|
||||
routes.push({
|
||||
path: '/admin/moderation',
|
||||
component: resolve(__dirname, 'routes/adminModeration.vue'),
|
||||
});
|
||||
routes.push({
|
||||
path: '/admin/abuse-reports',
|
||||
component: resolve(__dirname, 'routes/adminAbuseReports.vue'),
|
||||
});
|
||||
routes.push({
|
||||
path: '/admin/pending-bans',
|
||||
component: resolve(__dirname, 'routes/adminPendingBans.vue'),
|
||||
});
|
||||
|
||||
routes.push({ path: '/admin/translations/missing', component: resolve(__dirname, 'routes/adminTranslationsMissing.vue') });
|
||||
routes.push({ path: '/admin/translations/awaiting', component: resolve(__dirname, 'routes/adminTranslationsAwaiting.vue') });
|
||||
routes.push({
|
||||
path: '/admin/translations/missing',
|
||||
component: resolve(__dirname, 'routes/adminTranslationsMissing.vue'),
|
||||
});
|
||||
routes.push({
|
||||
path: '/admin/translations/awaiting',
|
||||
component: resolve(__dirname, 'routes/adminTranslationsAwaiting.vue'),
|
||||
});
|
||||
|
||||
if (config.profile.enabled) {
|
||||
routes.push({ path: '/u/*', component: resolve(__dirname, 'routes/profile.vue') });
|
||||
@ -469,27 +575,51 @@ const nuxtConfig: NuxtConfig = {
|
||||
|
||||
if (config.pronouns.enabled) {
|
||||
for (const prefix of [...config.pronouns?.sentence?.prefixes || [], config.pronouns?.prefix || '']) {
|
||||
routes.push({ path: `${prefix}/${encodeURIComponent(config.pronouns.any)}`, component: resolve(__dirname, 'routes/any.vue') });
|
||||
routes.push({ path: `${prefix}/${encodeURIComponent(config.pronouns.any)}::group`, component: resolve(__dirname, 'routes/any.vue') });
|
||||
routes.push({
|
||||
path: `${prefix}/${encodeURIComponent(config.pronouns.any)}`,
|
||||
component: resolve(__dirname, 'routes/any.vue'),
|
||||
});
|
||||
routes.push({
|
||||
path: `${prefix}/${encodeURIComponent(config.pronouns.any)}::group`,
|
||||
component: resolve(__dirname, 'routes/any.vue'),
|
||||
});
|
||||
if (config.pronouns.null && config.pronouns.null.routes) {
|
||||
for (const route of config.pronouns.null.routes) {
|
||||
routes.push({ path: `${prefix}/${encodeURIComponent(route)}`, component: resolve(__dirname, 'routes/avoiding.vue') });
|
||||
routes.push({
|
||||
path: `${prefix}/${encodeURIComponent(route)}`,
|
||||
component: resolve(__dirname, 'routes/avoiding.vue'),
|
||||
});
|
||||
}
|
||||
}
|
||||
if (config.pronouns.mirror) {
|
||||
routes.push({ path: `${prefix}/${encodeURIComponent(config.pronouns.mirror.route)}`, component: resolve(__dirname, 'routes/mirror.vue') });
|
||||
routes.push({
|
||||
path: `${prefix}/${encodeURIComponent(config.pronouns.mirror.route)}`,
|
||||
component: resolve(__dirname, 'routes/mirror.vue'),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (config.calendar && config.calendar.enabled) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.calendar.route)}`, component: resolve(__dirname, 'routes/calendar.vue') });
|
||||
routes.push({ path: `/${encodeURIComponent(config.calendar.route)}/:year(\\d\\d\\d\\d)`, component: resolve(__dirname, 'routes/calendar.vue') });
|
||||
routes.push({ path: `/${encodeURIComponent(config.calendar.route)}/:year(\\d\\d\\d\\d)-:month(\\d\\d)-:day(\\d\\d)`, component: resolve(__dirname, 'routes/calendarDay.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.calendar.route)}`,
|
||||
component: resolve(__dirname, 'routes/calendar.vue'),
|
||||
});
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.calendar.route)}/:year(\\d\\d\\d\\d)`,
|
||||
component: resolve(__dirname, 'routes/calendar.vue'),
|
||||
});
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.calendar.route)}/:year(\\d\\d\\d\\d)-:month(\\d\\d)-:day(\\d\\d)`,
|
||||
component: resolve(__dirname, 'routes/calendarDay.vue'),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.workshops && config.workshops.enabled) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.workshops.route)}`, component: resolve(__dirname, 'routes/workshops.vue') });
|
||||
routes.push({
|
||||
path: `/${encodeURIComponent(config.workshops.route)}`,
|
||||
component: resolve(__dirname, 'routes/workshops.vue'),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.api !== null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user