Skip to content
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
6 changes: 4 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ module.exports = defineConfig([{
},

rules: {
// Allow unused i18n functions (t, n) — imported for future translation wiring
'no-unused-vars': ['error', { varsIgnorePattern: '^(t|n)$', argsIgnorePattern: '^_' }],
// Allow unused i18n functions (t, n) — imported for future translation wiring.
// Also allow leading-underscore vars (idiomatic "discarded destructure" —
// `const { foo: _foo, ...rest } = x` to strip a key while keeping the rest).
'no-unused-vars': ['error', { varsIgnorePattern: '^(t|n|_)', argsIgnorePattern: '^_' }],
'jsdoc/require-jsdoc': 'off',
'vue/first-attribute-linebreak': 'off',
'@typescript-eslint/no-explicit-any': 'off',
Expand Down
18 changes: 17 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"pinia": "^2.1.7",
"vue": "^2.7.14",
"vue-material-design-icons": "^5.3.0",
"vue-router": "^3.6.5"
"vue-router": "^3.6.5",
"vuedraggable": "^2.24.3"
},
"overrides": {
"libxmljs2": "^0.37.0"
Expand Down
27 changes: 27 additions & 0 deletions src/components/page-editor/ChatPageEditor.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- SPDX-License-Identifier: EUPL-1.2 -->
<!--
- ChatPageEditor — v1.1 stub. Task 4.6 deferred.
-->
<template>
<StubPageEditor
:title="t('openbuilt', 'Chat page')"
:message="t('openbuilt', 'Structured chat editor (conversationSource OR postUrl one-of plus optional schema) coming in v1.1. For now, edit the raw JSON below or use the Raw JSON tab.')"
:config="config"
@update:config="$emit('update:config', $event)" />
</template>

<script>
import StubPageEditor from './StubPageEditor.vue'

export default {
name: 'ChatPageEditor',
components: { StubPageEditor },
props: {
config: {
type: Object,
default: () => ({}),
},
},
emits: ['update:config'],
}
</script>
27 changes: 27 additions & 0 deletions src/components/page-editor/CustomPageEditor.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- SPDX-License-Identifier: EUPL-1.2 -->
<!--
- CustomPageEditor — v1.1 stub. Task 4.9 deferred.
-->
<template>
<StubPageEditor
:title="t('openbuilt', 'Custom page')"
:message="t('openbuilt', 'Structured custom-page editor (customComponents registry picker + free-form config) coming in v1.1. For now, edit the raw JSON below or use the Raw JSON tab.')"
:config="config"
@update:config="$emit('update:config', $event)" />
</template>

<script>
import StubPageEditor from './StubPageEditor.vue'

export default {
name: 'CustomPageEditor',
components: { StubPageEditor },
props: {
config: {
type: Object,
default: () => ({}),
},
},
emits: ['update:config'],
}
</script>
78 changes: 78 additions & 0 deletions src/components/page-editor/DashboardPageEditor.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<!-- SPDX-License-Identifier: EUPL-1.2 -->
<!--
- DashboardPageEditor — widgets list + layout grid editor. Reuses
- WidgetBuilder.vue + LayoutItemBuilder.vue.
-->
<template>
<div class="dashboard-page-editor">
<h3 class="dashboard-page-editor__title">
{{ t('openbuilt', 'Dashboard page') }}
</h3>

<fieldset class="dashboard-page-editor__fieldset">
<legend>{{ t('openbuilt', 'Widgets') }}</legend>
<WidgetBuilder
:model-value="config.widgets || []"
@update:modelValue="update('widgets', $event)" />
</fieldset>

<fieldset class="dashboard-page-editor__fieldset">
<legend>{{ t('openbuilt', 'Layout') }}</legend>
<LayoutItemBuilder
:model-value="config.layout || []"
@update:modelValue="update('layout', $event)" />
</fieldset>
</div>
</template>

<script>
import WidgetBuilder from './fields/WidgetBuilder.vue'
import LayoutItemBuilder from './fields/LayoutItemBuilder.vue'

export default {
name: 'DashboardPageEditor',
components: { WidgetBuilder, LayoutItemBuilder },
props: {
config: {
type: Object,
default: () => ({}),
},
},
emits: ['update:config'],
methods: {
update(key, value) {
const next = { ...this.config }
if (!value || (Array.isArray(value) && value.length === 0)) {
delete next[key]
} else {
next[key] = value
}
this.$emit('update:config', next)
},
},
}
</script>

<style scoped>
.dashboard-page-editor {
display: flex;
flex-direction: column;
gap: 12px;
padding: 12px;
}
.dashboard-page-editor__title {
margin: 0;
font-size: 16px;
font-weight: 600;
}
.dashboard-page-editor__fieldset {
border: 1px solid var(--color-border);
border-radius: var(--border-radius);
padding: 8px;
}
.dashboard-page-editor__fieldset legend {
padding: 0 6px;
font-weight: 600;
font-size: 13px;
}
</style>
Loading
Loading