Skip to content

Commit

Permalink
Sidebar: removed
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Pagel <[email protected]>
  • Loading branch information
theatischbein authored and juliusknorr committed Nov 7, 2023
1 parent 82cdecb commit c76c689
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 327 deletions.
2 changes: 0 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
</div>
</NcAppContent>
<router-view v-else @note-deleted="onNoteDeleted" />

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

Expand Down
14 changes: 2 additions & 12 deletions src/components/NoteItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
<NcActionButton :icon="actionFavoriteIcon" @click="onToggleFavorite">
{{ actionFavoriteText }}
</NcActionButton>
<NcActionButton @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 @@ -45,14 +41,12 @@
</template>

<script>
import { NcListItem, NcActionButton } from '@nextcloud/vue'
import { NcListItem, NcActionButton, NcActionSeparator } from '@nextcloud/vue'
import AlertOctagonIcon from 'vue-material-design-icons/AlertOctagon.vue'
import FileDocumentOutlineIcon from 'vue-material-design-icons/FileDocumentOutline.vue'
import StarIcon from 'vue-material-design-icons/Star.vue'
import SidebarIcon from 'vue-material-design-icons/PageLayoutSidebarRight.vue'
import { categoryLabel, routeIsNewNote } from '../Util.js'
import { showError } from '@nextcloud/dialogs'
import store from '../store.js'
import { setFavorite, setTitle, fetchNote, deleteNote } from '../NotesService.js'
export default {
Expand All @@ -63,8 +57,8 @@ export default {
FileDocumentOutlineIcon,
NcActionButton,
NcListItem,
SidebarIcon,
StarIcon,
NcActionSeparator,
},
props: {
Expand Down Expand Up @@ -131,10 +125,6 @@ export default {
this.actionsOpen = false
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>
<div class="text-editor-wrapper" :class="{ loading: loading, 'icon-error': !loading && (!note || note.error), 'sidebar-open': sidebarOpen, 'is-mobile': isMobile }">
<div class="text-editor-wrapper" :class="{ loading: loading, 'icon-error': !loading && (!note || note.error), 'is-mobile': isMobile }">
<div v-show="!loading" ref="editor" class="text-editor" />
</div>
</template>
Expand Down Expand Up @@ -41,9 +41,6 @@ export default {
isNewNote() {
return routeIsNewNote(this.$route)
},
sidebarOpen() {
return store.state.app.sidebarOpen
},
},
watch: {
Expand Down
Loading

0 comments on commit c76c689

Please sign in to comment.