diff --git a/web-app/.eslintrc.cjs b/web-app/.eslintrc.cjs
index 753811d3..c3e9d504 100644
--- a/web-app/.eslintrc.cjs
+++ b/web-app/.eslintrc.cjs
@@ -1,7 +1,8 @@
module.exports = {
root: true,
env: {
- es2021: true
+ es2021: true,
+ browser: true
},
extends: [
'plugin:vue/essential',
@@ -42,8 +43,6 @@ module.exports = {
{
allowModifiers: true
}
- ],
- 'vue/multi-word-component-names': 'off',
- 'vue/no-v-model-argument': 'off',
+ ]
}
}
diff --git a/web-app/package.json b/web-app/package.json
index 476bf3a3..22a2385b 100755
--- a/web-app/package.json
+++ b/web-app/package.json
@@ -49,7 +49,7 @@
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.61.0",
- "@vitejs/plugin-vue": "^4.2.3",
+ "@vitejs/plugin-vue": "^4.6.2",
"@vitejs/plugin-vue2": "^2.2.0",
"@vue/eslint-config-standard": "^8.0.1",
"@vue/eslint-config-typescript": "^11.0.2",
diff --git a/web-app/packages/app/.eslintrc.cjs b/web-app/packages/app/.eslintrc.cjs
index c62b242c..9a294e26 100644
--- a/web-app/packages/app/.eslintrc.cjs
+++ b/web-app/packages/app/.eslintrc.cjs
@@ -1,11 +1,9 @@
module.exports = {
- env: {
- node: true
- },
extends: [
'plugin:vue/essential',
'eslint:recommended',
'@vue/typescript/recommended',
+ '../../.eslintrc.cjs'
],
parser: 'vue-eslint-parser',
parserOptions: {
@@ -16,7 +14,7 @@ module.exports = {
plugins: ['@typescript-eslint'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
- 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
+ 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
// Vue 3 opt https://v3-migration.vuejs.org/breaking-changes/key-attribute.html#with-template-v-for
'vue/no-v-for-template-key-on-child': 'error',
'vue/no-v-for-template-key': 'off',
diff --git a/web-app/packages/app/src/App.vue b/web-app/packages/app/src/App.vue
index 11058bb7..3f34f990 100644
--- a/web-app/packages/app/src/App.vue
+++ b/web-app/packages/app/src/App.vue
@@ -12,11 +12,9 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial
v-slot="{ Component, route }"
:key="$route.fullPath"
>
-
-
-
-
-
+
+
+
-
-
-
-
-
+
+
+
-
+
-
+
@@ -169,17 +165,8 @@ export default defineComponent({
diff --git a/web-app/packages/lib/src/common/components/AppPanelToggleable.vue b/web-app/packages/lib/src/common/components/AppPanelToggleable.vue
index 0a77edee..ac7247d9 100644
--- a/web-app/packages/lib/src/common/components/AppPanelToggleable.vue
+++ b/web-app/packages/lib/src/common/components/AppPanelToggleable.vue
@@ -7,7 +7,6 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial
-
+
+
+
+
-
+
diff --git a/web-app/packages/lib/src/common/components/AppSection.vue b/web-app/packages/lib/src/common/components/AppSection.vue
index 23adc2e8..931f6635 100644
--- a/web-app/packages/lib/src/common/components/AppSection.vue
+++ b/web-app/packages/lib/src/common/components/AppSection.vue
@@ -20,7 +20,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial
diff --git a/web-app/packages/lib/src/common/components/AppSidebarRight.vue b/web-app/packages/lib/src/common/components/AppSidebarRight.vue
index 9443da1d..a0da8864 100644
--- a/web-app/packages/lib/src/common/components/AppSidebarRight.vue
+++ b/web-app/packages/lib/src/common/components/AppSidebarRight.vue
@@ -59,8 +59,8 @@ const model = computed({
get() {
return props.modelValue
},
- set() {
- return emitModelValue('update:modelValue')
+ set(value) {
+ return emitModelValue('update:modelValue', value)
}
})
diff --git a/web-app/packages/lib/src/common/components/base/BaseItem.vue b/web-app/packages/lib/src/common/components/base/BaseItem.vue
deleted file mode 100644
index 459a16cd..00000000
--- a/web-app/packages/lib/src/common/components/base/BaseItem.vue
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/web-app/packages/lib/src/common/components/index.ts b/web-app/packages/lib/src/common/components/index.ts
index 9c838114..35dc9a88 100644
--- a/web-app/packages/lib/src/common/components/index.ts
+++ b/web-app/packages/lib/src/common/components/index.ts
@@ -2,13 +2,12 @@
//
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial
-export * from './base'
-
export { default as AppSection } from './AppSection.vue'
export { default as AppContainer } from './AppContainer.vue'
export { default as AppPanelToggleable } from './AppPanelToggleable.vue'
export { default as AppsidebarRight } from './AppSidebarRight.vue'
export { default as AppMenu } from './AppMenu.vue'
+export { default as AppDropdwown } from './AppDropdown.vue'
export { default as ActionButton } from './ActionButton.vue'
export { default as CustomPage } from './CustomPage.vue'
export { default as FullStorageWarning } from './FullStorageWarning.vue'
diff --git a/web-app/packages/lib/src/common/components/base/index.ts b/web-app/packages/lib/src/common/components/types.ts
similarity index 57%
rename from web-app/packages/lib/src/common/components/base/index.ts
rename to web-app/packages/lib/src/common/components/types.ts
index 2e184c3a..2001ddc2 100644
--- a/web-app/packages/lib/src/common/components/base/index.ts
+++ b/web-app/packages/lib/src/common/components/types.ts
@@ -2,4 +2,8 @@
//
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial
-export { default as BaseItem } from './BaseItem.vue'
+export interface DropdownOption {
+ value: string
+ label: string
+ description?: string
+}
diff --git a/web-app/packages/lib/src/common/route_utils.ts b/web-app/packages/lib/src/common/route_utils.ts
index 4889853a..74503788 100644
--- a/web-app/packages/lib/src/common/route_utils.ts
+++ b/web-app/packages/lib/src/common/route_utils.ts
@@ -4,28 +4,29 @@
import isEqual from 'lodash/isEqual'
import pick from 'lodash/pick'
-import { Route, NavigationGuardNext } from 'vue-router'
-
-import { useUserStore } from '@/modules/user/store'
+import { NavigationGuardNext, RouteLocationNormalized } from 'vue-router'
export type IsAuthenticatedGuardOptions = {
notAuthenticatedRedirectPath?: string
}
-export function isTheSameRoute(from: Route, to: Route) {
+export function isTheSameRoute(
+ from: RouteLocationNormalized,
+ to: RouteLocationNormalized
+) {
const properties = ['name', 'path', 'hash', 'params', 'query']
return isEqual(pick(from, properties), pick(to, properties))
}
-export function getTagsFromQuery(route: Route) {
+export function getTagsFromQuery(route: RouteLocationNormalized) {
const tags = route.query.tags
return tags ? (typeof tags === 'string' ? tags.split(',') : tags) : []
}
/** Handles redirect to /login when user is not authenticated. */
export function isAuthenticatedGuard(
- to: Route,
- from: Route,
+ to: RouteLocationNormalized,
+ from: RouteLocationNormalized,
next: NavigationGuardNext,
userStore,
options?: IsAuthenticatedGuardOptions
@@ -47,8 +48,8 @@ export function isAuthenticatedGuard(
/** Handles redirect to /login when user is not superUser. */
export function isSuperUser(
- to: Route,
- from: Route,
+ to: RouteLocationNormalized,
+ from: RouteLocationNormalized,
next: NavigationGuardNext,
userStore
) {
diff --git a/web-app/packages/lib/src/common/types.ts b/web-app/packages/lib/src/common/types.ts
index 992e06f2..ee5c592a 100644
--- a/web-app/packages/lib/src/common/types.ts
+++ b/web-app/packages/lib/src/common/types.ts
@@ -16,7 +16,7 @@ export type RouteOverrides = Record<
export interface ModuleService {
httpService?: HttpService
routerService?: Router
- [key: string]: any
+ [key: string]: unknown
}
export interface BaseModule {
@@ -62,7 +62,7 @@ export interface PaginatedResponse extends PaginatedResponseDefaults {
items: readonly T[]
}
-export interface ApiRequestSuccessInfo {
+export interface ApiRequestSuccessInfo {
success: boolean
message?: string
data?: T
diff --git a/web-app/packages/lib/src/modules/dialog/components/ConfirmDialog.vue b/web-app/packages/lib/src/modules/dialog/components/ConfirmDialog.vue
index 6a21b752..c272bd86 100644
--- a/web-app/packages/lib/src/modules/dialog/components/ConfirmDialog.vue
+++ b/web-app/packages/lib/src/modules/dialog/components/ConfirmDialog.vue
@@ -5,71 +5,80 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial
-->
-
- {{ headline }}
-
-
-
+
+
+ {{ text }}
+ {{ description }}
+
+
-
-
- {{ cancelText }}
-
-
+ {{ confirmField.label }}
+
+
+
+
+
+
+
{{ cancelText }}
+
+
{{ confirmText }}
-
-
-
+
+
+
-
diff --git a/web-app/packages/lib/src/modules/dialog/components/DialogWindows.vue b/web-app/packages/lib/src/modules/dialog/components/DialogWindows.vue
index bbcead49..f1be5a76 100644
--- a/web-app/packages/lib/src/modules/dialog/components/DialogWindows.vue
+++ b/web-app/packages/lib/src/modules/dialog/components/DialogWindows.vue
@@ -21,11 +21,14 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial
class: 'w-10 lg:w-4 border-round-2xl'
},
header: {
- class: 'text-sm border-none border-round-top-2xl',
+ class: 'border-none border-round-top-2xl',
style: {
color: 'var(--forest-color)'
}
},
+ title: {
+ class: 'text-base font-semibold'
+ },
closeButton: {
style: {
backgroundColor: 'var(--light-green-color)'
diff --git a/web-app/packages/lib/src/modules/dialog/types.ts b/web-app/packages/lib/src/modules/dialog/types.ts
index 1d7b1a5d..955e7012 100644
--- a/web-app/packages/lib/src/modules/dialog/types.ts
+++ b/web-app/packages/lib/src/modules/dialog/types.ts
@@ -4,6 +4,15 @@
import { Component } from 'vue'
+export interface ConfirmDialogProps {
+ text: string
+ severity?: 'primary' | 'danger'
+ confirmText?: string
+ cancelText?: string
+ description?: string
+ confirmField?: { label: string; expected: string }
+}
+
export interface DialogParams {
dialog: {
maxWidth?: number
@@ -13,7 +22,7 @@ export interface DialogParams {
}
// TODO: clear unknown based on 'on-listener' in template
listeners?: unknown | Record void>
- props?: Record
+ props?: Record | ConfirmDialogProps
}
export interface DialogPayload {
diff --git a/web-app/packages/lib/src/modules/layout/components/AppHeaderTemplate.vue b/web-app/packages/lib/src/modules/layout/components/AppHeaderTemplate.vue
index 3659d06f..67ccdf90 100644
--- a/web-app/packages/lib/src/modules/layout/components/AppHeaderTemplate.vue
+++ b/web-app/packages/lib/src/modules/layout/components/AppHeaderTemplate.vue
@@ -57,7 +57,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial