Skip to content

Commit

Permalink
Merge pull request #147 from MerginMaps/redesing-settings
Browse files Browse the repository at this point in the history
Redesing settings
  • Loading branch information
MarcelGeo authored Jan 8, 2024
2 parents 7370a3d + e38a980 commit d74c08d
Show file tree
Hide file tree
Showing 47 changed files with 791 additions and 871 deletions.
7 changes: 3 additions & 4 deletions web-app/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module.exports = {
root: true,
env: {
es2021: true
es2021: true,
browser: true
},
extends: [
'plugin:vue/essential',
Expand Down Expand Up @@ -42,8 +43,6 @@ module.exports = {
{
allowModifiers: true
}
],
'vue/multi-word-component-names': 'off',
'vue/no-v-model-argument': 'off',
]
}
}
2 changes: 1 addition & 1 deletion web-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 2 additions & 4 deletions web-app/packages/app/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -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: {
Expand All @@ -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',
Expand Down
33 changes: 10 additions & 23 deletions web-app/packages/app/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial
v-slot="{ Component, route }"
:key="$route.fullPath"
>
<transition name="fade">
<div :key="route.name">
<component :is="Component" />
</div>
</transition>
<div :key="route.name">
<component :is="Component" />
</div>
</router-view>

<main
Expand All @@ -31,13 +29,11 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial
]"
>
<router-view name="header" v-slot="{ Component, route }">
<transition name="fade">
<div :key="route.name">
<component :is="Component" />
</div>
</transition>
<div :key="route.name">
<component :is="Component" />
</div>
</router-view>
<PDivider :pt="{ root: { class: 'm-0'}}"></PDivider>
<PDivider :pt="{ root: { class: 'm-0' } }"></PDivider>
<v-card
v-if="pingData && pingData.maintenance"
variant="outlined"
Expand All @@ -51,7 +47,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial
>
</v-card-text>
</v-card>
<router-view v-slot="{ Component, route }">
<router-view v-slot="{ Component }">
<transition name="fade">
<component :is="Component" />
</transition>
Expand Down Expand Up @@ -169,17 +165,8 @@ export default defineComponent({
</script>

<style lang="scss">
.fade-leave-active {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}

.fade-enter-active,
.fade-leave-active {
transition: opacity 0.25s;
.fade-enter-active {
transition: opacity ease-in 0.25s;
}

.fade-enter-from,
Expand Down
16 changes: 7 additions & 9 deletions web-app/packages/app/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@
import 'material-icons/iconfont/material-icons.scss'
import '@fortawesome/fontawesome-free/css/all.css'
import '@mdi/font/css/materialdesignicons.css'
import PrimeVue from 'primevue/config';
import "primevue/resources/primevue.min.css";
import "primeflex/primeflex.min.css"
import "@mergin/lib/dist/sass/themes/mm-theme-light/theme.scss"
import "@tabler/icons-webfont/tabler-icons.min.css"

import '@mergin/lib/dist/style.css'

import {
dateUtils,
textUtils,
Expand All @@ -22,6 +14,13 @@ import {
MerginComponentUuidMixin
} from '@mergin/lib'
import PortalVue from 'portal-vue'
import 'primevue/resources/primevue.min.css'
import 'primeflex/primeflex.min.css'
import '@mergin/lib/dist/sass/themes/mm-theme-light/theme.scss'
import '@tabler/icons-webfont/tabler-icons.min.css'
import '@mergin/lib/dist/style.css'
import PrimeVue from 'primevue/config'
import Tooltip from 'primevue/tooltip'
import { createApp } from 'vue'
import { createMetaManager } from 'vue-meta'

Expand All @@ -31,7 +30,6 @@ import { addRouterToPinia, getPiniaInstance } from './store'

import i18n from '@/plugins/i18n/i18n'
import vuetify from '@/plugins/vuetify/vuetify'
import Tooltip from 'primevue/tooltip';

const createMerginApp = () => {
const pinia = getPiniaInstance()
Expand Down
2 changes: 1 addition & 1 deletion web-app/packages/app/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
LayoutModule,
InstanceModule,
useInstanceStore,
initCsrfToken,
initCsrfToken
} from '@mergin/lib'

import { createMerginApp } from './app'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial
<template #content>
<dashboard-access-requests-row v-if="userStore.isGlobalWorkspaceAdmin">
<template v-slot:table="{ namespace }">
<project-access-request-table :namespace="namespace" />
<access-request-table :namespace="namespace" />
</template>
</dashboard-access-requests-row>
<dashboard-projects-row :canCreateProject="canCreateProject" />
Expand All @@ -29,7 +29,7 @@ import {
DashboardUsageInfoRow,
DashboardFullStorageWarningRow,
DashboardAccessRequestsRow,
ProjectAccessRequestTable,
AccessRequestTable,
FullStorageWarning,
useUserStore,
DashboardProjectsRow
Expand All @@ -43,7 +43,7 @@ export default defineComponent({
DashboardAccessRequestsRow,
DashboardFullStorageWarningRow,
DashboardUsageInfoRow,
ProjectAccessRequestTable,
AccessRequestTable,
FullStorageWarning,
DashboardProjectsRow
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial
-->

<template>
Hopaa
<!-- <project-settings-view-template
<project-settings-view-template
:namespace="namespace"
:projectName="projectName"
:asAdmin="asAdmin"
Expand All @@ -17,10 +16,10 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial
<project-permissions-template
v-model="settings.access"
:key="keyProp"
@save-project="saveProject(...arguments)"
@save-project="saveProject"
/>
</template>
</project-settings-view-template> -->
</project-settings-view-template>
</template>

<script lang="ts">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ export default defineComponent({
namespace: props.namespace,
project: props.projectName
}
const dialog = { maxWidth: 580, persistent: true, header: 'Clone project' }
const dialog = {
maxWidth: 580,
persistent: true,
header: 'Clone project'
}
const listeners = {
error: (error, data) => {
formStore.handleError({
Expand Down
2 changes: 1 addition & 1 deletion web-app/packages/app/src/modules/user/views/LoginView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default defineComponent({
currentRoute: payload.currentRoute
})
}
} catch(err) {
} catch (err) {
console.error(err)
}
}
Expand Down
10 changes: 4 additions & 6 deletions web-app/packages/app/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ import {
SideBarTemplate as SideBar
} from '@mergin/lib'
import { Pinia } from 'pinia'
import {
createWebHistory,
createRouter as createRouterInstance
} from 'vue-router'

import DashboardView from '@/modules/dashboard/views/DashboardView.vue'
import AppHeader from '@/modules/layout/components/AppHeader.vue'
Expand All @@ -22,10 +26,6 @@ import ProjectsListView from '@/modules/project/views/ProjectsListView.vue'
import ProjectView from '@/modules/project/views/ProjectView.vue'
import LoginView from '@/modules/user/views/LoginView.vue'
import ProfileView from '@/modules/user/views/ProfileView.vue'
import {
createWebHistory,
createRouter as createRouterInstance
} from 'vue-router'

export const createRouter = (pinia: Pinia) => {
const router = createRouterInstance({
Expand Down Expand Up @@ -146,7 +146,6 @@ export const createRouter = (pinia: Pinia) => {
}/tree${from.params.location ? `/${from.params.location}` : ''}`,
query: { file_path: to.params.location }
})
return
}
},
/** Redirect of unused /history/:version_id path to /history?version_id */
Expand All @@ -161,7 +160,6 @@ export const createRouter = (pinia: Pinia) => {
path: `/projects/${to.params.namespace}/${to.params.projectName}/history`,
query: { version_id: to.params.version_id }
})
return
}
},
{
Expand Down
6 changes: 2 additions & 4 deletions web-app/packages/lib/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
module.exports = {
env: {
node: true
},
extends: [
'plugin:vue/essential',
'eslint:recommended',
'@vue/typescript/recommended'
'@vue/typescript/recommended',
'../../.eslintrc.cjs'
],
parser: 'vue-eslint-parser',
parserOptions: {
Expand Down
2 changes: 0 additions & 2 deletions web-app/packages/lib/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ declare module 'vue' {
VChipGroup: typeof import('vuetify/components')['VChipGroup']
VCol: typeof import('vuetify/components')['VCol']
VContainer: typeof import('vuetify/components')['VContainer']
VDataTable: typeof import('vuetify/components')['VDataTable']
VDivider: typeof import('vuetify/components')['VDivider']
VForm: typeof import('vuetify/components')['VForm']
VIcon: typeof import('vuetify/components')['VIcon']
Expand All @@ -56,7 +55,6 @@ declare module 'vue' {
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
VResponsive: typeof import('vuetify/components')['VResponsive']
VRow: typeof import('vuetify/components')['VRow']
VSelect: typeof import('vuetify/components')['VSelect']
VSnackbar: typeof import('vuetify/components')['VSnackbar']
VSpacer: typeof import('vuetify/components')['VSpacer']
VTextField: typeof import('vuetify/components')['VTextField']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ $colors: (
--surface-f:#ffffff;
--text-color: #{map-get($colors , "night")};
--text-color-secondary:#aaacad;
--primary-color:$primaryColor;
--primary-color:#{$primaryColor};
--primary-color-text:#ffffff;
--font-family:inherit;
--surface-0: #ffffff;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ $inlineSpacing: .5rem;

/// Opacity of the disabled elements
/// @group general
$disabledOpacity: .8;
$disabledOpacity: .4;

/// Background of the modal layer
/// @group general
Expand Down
32 changes: 32 additions & 0 deletions web-app/packages/lib/src/assets/trash.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d74c08d

Please sign in to comment.