2024-10-07 07:06:57 +00:00
|
|
|
import en from '@baserow/modules/dashboard/locales/en.json'
|
|
|
|
import fr from '@baserow/modules/dashboard/locales/fr.json'
|
|
|
|
import nl from '@baserow/modules/dashboard/locales/nl.json'
|
|
|
|
import de from '@baserow/modules/dashboard/locales/de.json'
|
|
|
|
import es from '@baserow/modules/dashboard/locales/es.json'
|
|
|
|
import it from '@baserow/modules/dashboard/locales/it.json'
|
|
|
|
import pl from '@baserow/modules/dashboard/locales/pl.json'
|
2024-11-26 17:53:07 +01:00
|
|
|
import ko from '@baserow/modules/dashboard/locales/ko.json'
|
2024-10-07 07:06:57 +00:00
|
|
|
|
2025-01-02 11:56:14 +00:00
|
|
|
import { registerRealtimeEvents } from '@baserow/modules/dashboard/realtime'
|
2024-10-07 07:06:57 +00:00
|
|
|
import { DashboardApplicationType } from '@baserow/modules/dashboard/applicationTypes'
|
2024-12-25 08:40:24 +00:00
|
|
|
import { SummaryWidgetType } from '@baserow/modules/dashboard/widgetTypes'
|
2024-10-14 16:13:26 +00:00
|
|
|
import dashboardApplicationStore from '@baserow/modules/dashboard/store/dashboardApplication'
|
2024-10-07 07:06:57 +00:00
|
|
|
import { FF_DASHBOARDS } from '@baserow/modules/core/plugins/featureFlags'
|
|
|
|
|
|
|
|
export default (context) => {
|
2024-10-14 16:13:26 +00:00
|
|
|
const { app, isDev, store } = context
|
2024-10-07 07:06:57 +00:00
|
|
|
|
|
|
|
// Allow locale file hot reloading in dev
|
|
|
|
if (isDev && app.i18n) {
|
|
|
|
const { i18n } = app
|
|
|
|
i18n.mergeLocaleMessage('en', en)
|
|
|
|
i18n.mergeLocaleMessage('fr', fr)
|
|
|
|
i18n.mergeLocaleMessage('nl', nl)
|
|
|
|
i18n.mergeLocaleMessage('de', de)
|
|
|
|
i18n.mergeLocaleMessage('es', es)
|
|
|
|
i18n.mergeLocaleMessage('it', it)
|
|
|
|
i18n.mergeLocaleMessage('pl', pl)
|
2024-11-26 17:53:07 +01:00
|
|
|
i18n.mergeLocaleMessage('ko', ko)
|
2024-10-07 07:06:57 +00:00
|
|
|
}
|
|
|
|
|
2025-01-02 11:56:14 +00:00
|
|
|
registerRealtimeEvents(app.$realtime)
|
|
|
|
|
2024-10-14 16:13:26 +00:00
|
|
|
store.registerModule('dashboardApplication', dashboardApplicationStore)
|
2025-01-07 17:32:50 +00:00
|
|
|
store.registerModule(
|
|
|
|
'template/dashboardApplication',
|
|
|
|
dashboardApplicationStore
|
|
|
|
)
|
2024-10-14 16:13:26 +00:00
|
|
|
|
2024-10-07 07:06:57 +00:00
|
|
|
if (app.$featureFlagIsEnabled(FF_DASHBOARDS)) {
|
|
|
|
app.$registry.register('application', new DashboardApplicationType(context))
|
2024-12-25 08:40:24 +00:00
|
|
|
app.$registry.register('dashboardWidget', new SummaryWidgetType(context))
|
2024-10-07 07:06:57 +00:00
|
|
|
}
|
|
|
|
}
|