mirror of
https://github.com/baserow/baserow.git
synced 2026-12-06 01:08:32 +00:00
* fix nuxt.test.config for saas * add .nuxtrc * Enhance Nuxt configuration to ignore sourcemaps from node_modules * Add nuxt-prepare command to docker-entrypoint.sh for generating .nuxt directory * Refactor license.vue to use Composition API * Add korean language support * Add impersonate middleware to dashboard and workspace pages * Mount local backend/media folder in docker-compose for Caddy to serve uploaded files during development * Fix invitation related issues * Update email configuration for local development with Mailhog integration * Add moment-guess to optimizeDeps in Nuxt configuration to pre-bundle and avoid missing source map warnings * Refactor login components to use Composition API and improve routing structure for login pages * Update sidebar user context to conditionally display workspace creation option based on user permissions * Centralize locale definitions in a new config file * please linter
85 lines
1.9 KiB
JavaScript
85 lines
1.9 KiB
JavaScript
/*import path from 'path'
|
|
|
|
import { routes } from './routes'
|
|
import en from './locales/en.json'
|
|
import fr from './locales/fr.json'
|
|
import nl from './locales/nl.json'
|
|
import de from './locales/de.json'
|
|
import it from './locales/it.json'
|
|
import es from './locales/es.json'
|
|
import pl from './locales/pl.json'
|
|
import ko from './locales/ko.json'
|
|
|
|
export default function DatabaseModule(options) {
|
|
this.addPlugin({ src: path.resolve(__dirname, 'middleware.js') })
|
|
|
|
// Add the plugin to register the database application.
|
|
this.appendPlugin({
|
|
src: path.resolve(__dirname, 'plugin.js'),
|
|
})
|
|
|
|
// Add all the related routes.
|
|
this.extendRoutes((configRoutes) => {
|
|
configRoutes.push(...routes)
|
|
})
|
|
|
|
let alreadyExtended = false
|
|
this.nuxt.hook('i18n:extend-messages', function (additionalMessages) {
|
|
if (alreadyExtended) return
|
|
additionalMessages.push({ en, fr, nl, de, es, it, pl, ko })
|
|
alreadyExtended = true
|
|
})
|
|
}*/
|
|
|
|
import {
|
|
defineNuxtModule,
|
|
addPlugin,
|
|
createResolver,
|
|
addRouteMiddleware,
|
|
extendPages,
|
|
} from 'nuxt/kit'
|
|
import { routes } from './routes'
|
|
import { locales } from '../../config/locales.js'
|
|
|
|
export default defineNuxtModule({
|
|
meta: {
|
|
name: 'database',
|
|
},
|
|
|
|
setup(options, nuxt) {
|
|
const { resolve } = createResolver(import.meta.url)
|
|
|
|
// Register main plugin
|
|
addPlugin({
|
|
src: resolve('./plugin.js'),
|
|
})
|
|
addPlugin({
|
|
src: resolve('./plugin/store.js'),
|
|
})
|
|
addPlugin({
|
|
src: resolve('./plugin/realtime.js'),
|
|
})
|
|
|
|
addRouteMiddleware({
|
|
name: 'tableLoading',
|
|
path: resolve('./middleware/tableLoading'),
|
|
})
|
|
|
|
addRouteMiddleware({
|
|
name: 'selectWorkspaceDatabaseTable',
|
|
path: resolve('./middleware/selectWorkspaceDatabaseTable'),
|
|
})
|
|
|
|
extendPages((pages) => {
|
|
pages.push(...routes)
|
|
})
|
|
|
|
nuxt.hook('i18n:registerModule', (register) => {
|
|
register({
|
|
langDir: resolve('./locales'),
|
|
locales,
|
|
})
|
|
})
|
|
},
|
|
})
|