Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions l10n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,28 @@
"Failed to delete project": "Failed to delete project",
"An error occurred during project deletion": "An error occurred during project deletion",
"Saving\u2026": "Saving\u2026",
"User search results": "User search results"
"User search results": "User search results",
"Default project configuration": "Default project configuration",
"Configure the default column set for new projects": "Configure the default column set for new projects",
"Column name": "Column name",
"Move up": "Move up",
"Move down": "Move down",
"Remove column": "Remove column",
"Add column": "Add column",
"Register setup": "Register setup",
"OpenRegister schema and register initialization for Planix": "OpenRegister schema and register initialization for Planix",
"OpenRegister is available": "OpenRegister is available",
"OpenRegister is not installed or enabled": "OpenRegister is not installed or enabled",
"Initializing...": "Initializing...",
"Initialize register": "Initialize register",
"Default columns saved successfully": "Default columns saved successfully",
"Failed to save default columns": "Failed to save default columns",
"Register initialized successfully": "Register initialized successfully",
"Initialization failed": "Initialization failed",
"Version information": "Version information",
"Information about the current Planix installation": "Information about the current Planix installation",
"Support": "Support",
"For support, contact us at": "For support, contact us at"
},
"plurals": ""
"plurals": {}
}
25 changes: 23 additions & 2 deletions l10n/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,28 @@
"Failed to delete project": "Verwijderen van project mislukt",
"An error occurred during project deletion": "Er is een fout opgetreden bij het verwijderen van het project",
"Saving\u2026": "Opslaan\u2026",
"User search results": "Gebruikerszoekresultaten"
"User search results": "Gebruikerszoekresultaten",
"Default project configuration": "Standaard projectconfiguratie",
"Configure the default column set for new projects": "Configureer de standaardkolommenset voor nieuwe projecten",
"Column name": "Kolomnaam",
"Move up": "Omhoog verplaatsen",
"Move down": "Omlaag verplaatsen",
"Remove column": "Kolom verwijderen",
"Add column": "Kolom toevoegen",
"Register setup": "Register instellen",
"OpenRegister schema and register initialization for Planix": "OpenRegister-schema en registerinitialisatie voor Planix",
"OpenRegister is available": "OpenRegister is beschikbaar",
"OpenRegister is not installed or enabled": "OpenRegister is niet ge\u00efnstalleerd of ingeschakeld",
"Initializing...": "Initialiseren...",
"Initialize register": "Register initialiseren",
"Default columns saved successfully": "Standaardkolommen succesvol opgeslagen",
"Failed to save default columns": "Opslaan van standaardkolommen mislukt",
"Register initialized successfully": "Register succesvol ge\u00efnitialiseerd",
"Initialization failed": "Initialisatie mislukt",
"Version information": "Versie-informatie",
"Information about the current Planix installation": "Informatie over de huidige Planix-installatie",
"Support": "Ondersteuning",
"For support, contact us at": "Voor ondersteuning, neem contact met ons op via"
},
"plurals": ""
"plurals": {}
}
6 changes: 5 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
</NcAppContent>
</template>
<template v-else-if="storesReady && hasOpenRegisters">
<MainMenu />
<MainMenu @open-settings="settingsOpen = true" />
<UserSettings :open="settingsOpen" @update:open="settingsOpen = $event" />
<NcAppContent>
<router-view />
</NcAppContent>
Expand All @@ -49,6 +50,7 @@ import { generateUrl, imagePath } from '@nextcloud/router'
import { initializeStores } from './store/store.js'
import { useSettingsStore } from './store/modules/settings.js'
import MainMenu from './navigation/MainMenu.vue'
import UserSettings from './views/settings/UserSettings.vue'

export default {
name: 'App',
Expand All @@ -59,6 +61,7 @@ export default {
NcEmptyContent,
NcLoadingIcon,
MainMenu,
UserSettings,
},

provide() {
Expand All @@ -76,6 +79,7 @@ export default {
data() {
return {
storesReady: false,
settingsOpen: false,
/** @type {object|null} Active sidebar component definition */
activeSidebar: null,
}
Expand Down
19 changes: 11 additions & 8 deletions src/navigation/MainMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,21 @@
</NcAppNavigationItem>
</template>
<template #footer>
<NcAppNavigationItem
:name="t('planix', 'Settings')"
:to="{ name: 'Settings' }">
<template #icon>
<CogIcon :size="20" />
</template>
</NcAppNavigationItem>
<NcAppNavigationSettings>
<NcAppNavigationItem
:name="t('planix', 'Settings')"
@click="$emit('open-settings')">
<template #icon>
<CogIcon :size="20" />
</template>
</NcAppNavigationItem>
</NcAppNavigationSettings>
</template>
</NcAppNavigation>
</template>

<script>
import { NcAppNavigation, NcAppNavigationItem } from '@nextcloud/vue'
import { NcAppNavigation, NcAppNavigationItem, NcAppNavigationSettings } from '@nextcloud/vue'
import BookOpenVariantOutline from 'vue-material-design-icons/BookOpenVariantOutline.vue'
import CogIcon from 'vue-material-design-icons/Cog.vue'
import FolderOutline from 'vue-material-design-icons/FolderOutline.vue'
Expand All @@ -48,6 +50,7 @@ export default {
components: {
NcAppNavigation,
NcAppNavigationItem,
NcAppNavigationSettings,
BookOpenVariantOutline,
CogIcon,
FolderOutline,
Expand Down
3 changes: 1 addition & 2 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Vue from 'vue'
import Router from 'vue-router'
import { generateUrl } from '@nextcloud/router'
import Dashboard from '../views/Dashboard.vue'
import AdminRoot from '../views/settings/AdminRoot.vue'

Vue.use(Router)

Expand All @@ -11,7 +10,7 @@ export default new Router({
base: generateUrl('/apps/planix'),
routes: [
{ path: '/', name: 'Dashboard', component: Dashboard },
{ path: '/settings', name: 'Settings', component: AdminRoot },
// Settings is a modal dialog (UserSettings.vue), not a route — see ADR-004
{
path: '/projects',
name: 'Projects',
Expand Down
2 changes: 1 addition & 1 deletion src/views/settings/AdminRoot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
:app-version="appVersion"
:is-up-to-date="true"
:show-update-button="true"
:title="t('planix', 'Version Information')"
:title="t('planix', 'Version information')"
:description="t('planix', 'Information about the current Planix installation')">
<template #footer>
<div class="cn-support-info">
Expand Down
20 changes: 10 additions & 10 deletions src/views/settings/Settings.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<div>
<!-- Default Project Configuration -->
<!-- Default project configuration -->
<CnSettingsSection
:name="t('planix', 'Default Project Configuration')"
:name="t('planix', 'Default project configuration')"
:description="t('planix', 'Configure the default column set for new projects')">
<form @submit.prevent="saveColumns">
<div class="columns-editor">
Expand Down Expand Up @@ -59,9 +59,9 @@
</form>
</CnSettingsSection>

<!-- Register Setup -->
<!-- Register setup -->
<CnSettingsSection
:name="t('planix', 'Register Setup')"
:name="t('planix', 'Register setup')"
:description="t('planix', 'OpenRegister schema and register initialization for Planix')">
<div class="register-status">
<span v-if="settings.openregisters" class="status-indicator status-ok">
Expand Down Expand Up @@ -190,9 +190,9 @@ export default {
default_columns: JSON.stringify(this.columnList.filter(c => c.trim() !== '')),
})
if (result) {
this.columnsSuccess = t('planix', 'Default columns saved successfully')
this.columnsSuccess = this.t('planix', 'Default columns saved successfully')
} else {
this.columnsError = t('planix', 'Failed to save default columns')
this.columnsError = this.t('planix', 'Failed to save default columns')
}
this.savingColumns = false
},
Expand All @@ -207,12 +207,12 @@ export default {
})
const data = await response.json()
if (data.success) {
this.initSuccess = t('planix', 'Register initialized successfully')
this.initSuccess = this.t('planix', 'Register initialized successfully')
} else {
this.initError = data.message || t('planix', 'Initialization failed')
this.initError = data.message || this.t('planix', 'Initialization failed')
}
} catch (e) {
this.initError = t('planix', 'Initialization failed')
this.initError = this.t('planix', 'Initialization failed')
}
this.initializing = false
},
Expand All @@ -222,7 +222,7 @@ export default {
const settingsStore = useSettingsStore()
const result = await settingsStore.saveSettings(this.form)
if (result) {
this.successMessage = t('planix', 'Settings saved successfully')
this.successMessage = this.t('planix', 'Settings saved successfully')
}
this.saving = false
},
Expand Down
46 changes: 23 additions & 23 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const fs = require('fs')
const webpack = require('webpack')
const webpackConfig = require('@nextcloud/webpack-vue-config')
const { VueLoaderPlugin } = require('vue-loader')
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')

const buildMode = process.env.NODE_ENV
const isDev = buildMode === 'development'
Expand All @@ -29,36 +30,35 @@ webpackConfig.entry = {
const localLib = path.resolve(__dirname, '../nextcloud-vue/src')
const useLocalLib = fs.existsSync(localLib)

webpackConfig.resolve = {
extensions: ['.vue', '.js'],
alias: {
'@': path.resolve(__dirname, 'src'),
...(useLocalLib ? { '@conduction/nextcloud-vue': localLib } : {}),
// Deduplicate shared packages so the aliased library source uses
// the same instances as the app (prevents dual-Pinia / dual-Vue bugs).
'vue$': path.resolve(__dirname, 'node_modules/vue'),
'pinia$': path.resolve(__dirname, 'node_modules/pinia'),
'@nextcloud/vue$': path.resolve(__dirname, 'node_modules/@nextcloud/vue'),
},
webpackConfig.resolve = webpackConfig.resolve || {}
webpackConfig.resolve.modules = [path.resolve(__dirname, 'node_modules'), 'node_modules']
webpackConfig.resolve.alias = {
...(webpackConfig.resolve.alias || {}),
'@': path.resolve(__dirname, 'src'),
...(useLocalLib ? { '@conduction/nextcloud-vue': localLib } : {}),
// Deduplicate shared packages so the aliased library source uses
// the same instances as the app (prevents dual-Pinia / dual-Vue bugs).
'vue$': path.resolve(__dirname, 'node_modules/vue'),
'pinia$': path.resolve(__dirname, 'node_modules/pinia'),
'@nextcloud/vue$': path.resolve(__dirname, 'node_modules/@nextcloud/vue'),
}

webpackConfig.module = {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
],
}
webpackConfig.module.rules.push(
{
test: /\.vue$/,
loader: 'vue-loader',
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
)

webpackConfig.plugins = [
new VueLoaderPlugin(),
new webpack.DefinePlugin({ appName: JSON.stringify(appId) }),
new webpack.DefinePlugin({ appVersion: JSON.stringify(process.env.npm_package_version) }),
new NodePolyfillPlugin({ additionalAliases: ['process'] }),
]

// Force @nextcloud/dialogs to resolve from this app's node_modules,
Expand Down
Loading