Skip to content

Commit

Permalink
move Sidebar from router.js to Forms.vue
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <[email protected]>
Signed-off-by: Christian Hartmann <[email protected]>
  • Loading branch information
Chartman123 committed Jan 29, 2025
1 parent 46b5fa8 commit d8e3cd4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 5 additions & 4 deletions src/Forms.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,11 @@
:form.sync="selectedForm"
:sidebar-opened.sync="sidebarOpened"
@open-sharing="openSharing" />
<router-view
<Sidebar
v-if="!selectedForm.partial && canEdit"
:form="selectedForm"
:sidebar-opened.sync="sidebarOpened"
:active.sync="sidebarActive"
name="sidebar" />
:active.sync="sidebarActive" />
</template>

<!-- Archived forms modal -->
Expand Down Expand Up @@ -162,8 +161,9 @@ import IconPlus from 'vue-material-design-icons/Plus.vue'
import ArchivedFormsModal from './components/ArchivedFormsModal.vue'
import AppNavigationForm from './components/AppNavigationForm.vue'
import FormsIcon from './components/Icons/FormsIcon.vue'
import PermissionTypes from './mixins/PermissionTypes.js'
import OcsResponse2Data from './utils/OcsResponse2Data.js'
import PermissionTypes from './mixins/PermissionTypes.js'
import Sidebar from './views/Sidebar.vue'
import logger from './utils/Logger.js'
import { FormState } from './models/FormStates.ts'

Expand All @@ -184,6 +184,7 @@ export default {
NcContent,
NcEmptyContent,
NcLoadingIcon,
Sidebar,
},

mixins: [PermissionTypes],
Expand Down
4 changes: 0 additions & 4 deletions src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { generateUrl } from '@nextcloud/router'

import Create from './views/Create.vue'
import Results from './views/Results.vue'
import Sidebar from './views/Sidebar.vue'
import Submit from './views/Submit.vue'

Vue.use(Router)
Expand Down Expand Up @@ -37,7 +36,6 @@ export default new Router({
path: '/:hash/edit',
components: {
default: Create,
sidebar: Sidebar,
},
name: 'edit',
props: { default: true },
Expand All @@ -46,7 +44,6 @@ export default new Router({
path: '/:hash/results',
components: {
default: Results,
sidebar: Sidebar,
},
name: 'results',
props: { default: true },
Expand All @@ -55,7 +52,6 @@ export default new Router({
path: '/:hash/submit',
components: {
default: Submit,
sidebar: Sidebar,
},
name: 'submit',
props: { default: true },
Expand Down

0 comments on commit d8e3cd4

Please sign in to comment.