diff --git a/packages/ui/@components/v-button.vue b/packages/ui/@components/v-button.vue index 8534506..97b45e4 100644 --- a/packages/ui/@components/v-button.vue +++ b/packages/ui/@components/v-button.vue @@ -1,6 +1,5 @@ @@ -73,7 +75,7 @@ export default { // *Loading the first project, if none were provided or found: if((!_project && this.project_vos?.length) || (!project && this.project_vos?.length)){ - this.$router.replace({ name: 'project', params: { _project: this.project_vos[0].id } }); + this.$router.replace({ name: 'project-home', params: { _project: this.project_vos[0].id } }); return; } @@ -84,6 +86,14 @@ export default { }, + beforeRouteEnter(to, from, next){ + if(to.name=='project') + next({ name: 'project-home' }); + else + next(); + }, + + methods: { ...mapMutations('project', [ 'setSelectedProjectVO' ]), }, @@ -99,8 +109,6 @@ export default { flex-direction: column; align-items: stretch; - padding: 2em var(--side-margins) 5em var(--side-margins); - overflow-y: auto; } @@ -108,11 +116,12 @@ export default { display: grid; align-items: center; - /*padding: 0.8em 0;*/ grid-template-columns: auto 1fr auto; grid-template-rows: auto; grid-template-areas: 'name-area ... actions'; + + padding: 2em var(--side-margins) 0.6em var(--side-margins); } .v-project-view > .-header > .-name-area{ grid-area: name-area; @@ -162,20 +171,34 @@ export default { .v-project-view > .-header > .-actions > .-action + .-action{ margin-left: 1.5em; } - - -.v-project-view > .-content{ - display: flex; - margin-top: 1.2em; -} -.v-project-view > .-content > .-log-panel + .-diff-panel{ - margin-left: 2.5em; -} -.v-project-view > .-content > .-log-panel{ - flex: 1 1 auto; -} -.v-project-view > .-content > .-diff-panel{ - flex: 0 0 auto; - width: 40%; -} +/*.v-project-view > .-header > .-actions > .-action::before{*/ +/* opacity: 0;*/ +/* content: '';*/ +/* position: absolute;*/ +/* left: 0;*/ +/* bottom: 0;*/ +/* width: 100%;*/ +/* height: 3px;*/ +/* transform: scaleX(0.9);*/ +/* background-color: var(--accent-bg--base);*/ +/* transition: opacity 0.15s ease-out;*/ +/*}*/ +/*.v-project-view > .-header > .-actions > .-action.--selected::before{*/ +/* opacity: 1;*/ +/*}*/ + + +/*.v-project-view > .-route{*/ +/* margin-top: 1.2em;*/ +/*}*/ +/*.v-project-view > .-content > .-log-panel + .-diff-panel{*/ +/* margin-left: 2.5em;*/ +/*}*/ +/*.v-project-view > .-content > .-log-panel{*/ +/* flex: 1 1 auto;*/ +/*}*/ +/*.v-project-view > .-content > .-diff-panel{*/ +/* flex: 0 0 auto;*/ +/* width: 40%;*/ +/*}*/ diff --git a/packages/ui/project/v-projects-page.vue b/packages/ui/project/v-projects-page.vue index 8c9e39e..652adda 100644 --- a/packages/ui/project/v-projects-page.vue +++ b/packages/ui/project/v-projects-page.vue @@ -4,7 +4,7 @@ diff --git a/packages/ui/router.mjs b/packages/ui/router.mjs index 5396f96..3e55d73 100644 --- a/packages/ui/router.mjs +++ b/packages/ui/router.mjs @@ -5,8 +5,10 @@ import VueRouter from 'vue-router' import AppSection from './v-app-section' // *Getting the app's pages: -import ProjectsPage from './project/v-projects-page' -import ProjectView from './project/v-project-view' +import ProjectsPage from './project/v-projects-page' +import ProjectView from './project/v-project-view' +import ProjectHome from './project/v-project-home' +import ProjectSettings from './project/settings/v-project-settings' @@ -27,7 +29,15 @@ const router = new VueRouter({ path: '/projects', component: ProjectsPage, children: [ - { name: 'project', path: '/projects/:_project', component: ProjectView } + { + name: 'project', + path: '/projects/:_project', + component: ProjectView, + children: [ + { name: 'project-settings', path: '/projects/:_project/settings', component: ProjectSettings }, + { name: 'project-home', path: '/projects/:_project', component: ProjectHome }, + ] + }, ] }, ]