Skip to content

Commit

Permalink
Sidebar: removed
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Pagel <jonny_tischbein@systemli.org>
  • Loading branch information
theatischbein committed Mar 25, 2023
1 parent 28400c3 commit 8944561
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 286 deletions.
2 changes: 0 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
</div>
</NcAppContent>
<router-view v-else />

<router-view name="sidebar" />
</NcContent>
</template>

Expand Down
12 changes: 0 additions & 12 deletions src/components/NavigationNoteItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
<NcActionButton :icon="actionFavoriteIcon" @click="onToggleFavorite">
{{ actionFavoriteText }}
</NcActionButton>
<NcActionButton icon="icon-details" @click="onToggleSidebar">
<SidebarIcon slot="icon" :size="20" />
{{ t('notes', 'Details') }}
</NcActionButton>
<NcActionButton v-if="!note.readonly" :icon="actionDeleteIcon" @click="onDeleteNote">
{{ t('notes', 'Delete note') }}
</NcActionButton>
Expand All @@ -36,9 +32,7 @@ import {
NcActionSeparator,
NcAppNavigationItem,
} from '@nextcloud/vue'
import SidebarIcon from 'vue-material-design-icons/PageLayoutSidebarRight.vue'
import { showError } from '@nextcloud/dialogs'
import store from '../store.js'
import { setFavorite, setTitle, fetchNote, deleteNote } from '../NotesService.js'
import { categoryLabel, routeIsNewNote } from '../Util.js'
Expand All @@ -50,7 +44,6 @@ export default {
NcActionButton,
NcActionSeparator,
NcAppNavigationItem,
SidebarIcon,
},
props: {
Expand Down Expand Up @@ -124,11 +117,6 @@ export default {
this.$emit('category-selected', this.note.category)
},
onToggleSidebar() {
this.actionsOpen = false
store.commit('setSidebarOpen', !store.state.app.sidebarOpen)
},
onRename(newTitle) {
this.loading.note = true
setTitle(this.note.id, newTitle)
Expand Down
22 changes: 1 addition & 21 deletions src/components/NotePlain.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<NcAppContent :class="{ loading: loading || isManualSave, 'icon-error': !loading && (!note || note.error), 'sidebar-open': sidebarOpen }">
<NcAppContent :class="{ loading: loading || isManualSave, 'icon-error': !loading && (!note || note.error)}">
<div v-if="!loading && note && !note.error && !note.deleting"
id="note-container"
class="note-container"
Expand Down Expand Up @@ -47,13 +47,6 @@
</div>
<span class="action-buttons">
<NcActions :open.sync="actionsOpen" container=".action-buttons" menu-align="right">
<NcActionButton v-show="!sidebarOpen && !fullscreen"
icon="icon-details"
@click="onToggleSidebar"
>
<SidebarIcon slot="icon" :size="20" />
{{ t('notes', 'Details') }}
</NcActionButton>
<NcActionButton
v-tooltip.left="t('notes', 'CTRL + /')"
@click="onTogglePreview"
Expand Down Expand Up @@ -109,7 +102,6 @@ import EditIcon from 'vue-material-design-icons/LeadPencil.vue'
import EyeIcon from 'vue-material-design-icons/Eye.vue'
import FullscreenIcon from 'vue-material-design-icons/Fullscreen.vue'
import NoEditIcon from 'vue-material-design-icons/PencilOff.vue'
import SidebarIcon from 'vue-material-design-icons/PageLayoutSidebarRight.vue'
import SyncAlertIcon from 'vue-material-design-icons/SyncAlert.vue'
import { config } from '../config.js'
Expand All @@ -133,7 +125,6 @@ export default {
NcAppContent,
NcModal,
NoEditIcon,
SidebarIcon,
SyncAlertIcon,
TheEditor,
ThePreview,
Expand Down Expand Up @@ -179,9 +170,6 @@ export default {
isManualSave() {
return store.state.app.isManualSave
},
sidebarOpen() {
return store.state.app.sidebarOpen
},
},
watch: {
Expand Down Expand Up @@ -293,11 +281,6 @@ export default {
this.actionsOpen = false
},
onToggleSidebar() {
store.commit('setSidebarOpen', !store.state.app.sidebarOpen)
this.actionsOpen = false
},
onVisibilityChange() {
if (document.visibilityState === 'visible') {
this.stopRefreshTimer()
Expand Down Expand Up @@ -436,9 +419,6 @@ export default {
transition-duration: var(--animation-quick);
transition-property: padding-right;
}
.sidebar-open .note-container {
padding-right: 0px;
}
}
/* distraction free styles */
Expand Down
5 changes: 1 addition & 4 deletions src/components/NoteRich.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<NcAppContent :class="{ loading: loading, 'icon-error': !loading && (!note || note.error), 'sidebar-open': sidebarOpen, 'is-mobile': isMobile }">
<NcAppContent :class="{ loading: loading, 'icon-error': !loading && (!note || note.error), 'is-mobile': isMobile }">
<div v-show="!loading" ref="editor" class="text-editor" />
</NcAppContent>
</template>
Expand Down Expand Up @@ -45,9 +45,6 @@ export default {
isNewNote() {
return routeIsNewNote(this.$route)
},
sidebarOpen() {
return store.state.app.sidebarOpen
},
},
watch: {
Expand Down
239 changes: 0 additions & 239 deletions src/components/Sidebar.vue

This file was deleted.

3 changes: 0 additions & 3 deletions src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { generateUrl } from '@nextcloud/router'
import Loading from './components/Loading.vue'
import Welcome from './components/Welcome.vue'
import Note from './components/Note.vue'
import Sidebar from './components/Sidebar.vue'

Vue.use(Router)

Expand All @@ -29,11 +28,9 @@ export default new Router({
name: 'note',
components: {
default: Note,
sidebar: Sidebar,
},
props: {
default: true,
sidebar: true,
},
},
],
Expand Down
Loading

0 comments on commit 8944561

Please sign in to comment.