diff options
author | Marco <marcoambrosini@icloud.com> | 2023-11-15 14:47:41 +0900 |
---|---|---|
committer | Andy Scherzinger <info@andy-scherzinger.de> | 2023-11-22 14:35:10 +0100 |
commit | cd26b919e45f2be82744c63d6b9ec75d4c16bde1 (patch) | |
tree | f3ebfa93f99bbd2cf76e3999dd467e3aad716951 /apps/files | |
parent | 9c3321c524be0da20f614ee19c664c98e048955a (diff) | |
download | nextcloud-server-cd26b919e45f2be82744c63d6b9ec75d4c16bde1.tar.gz nextcloud-server-cd26b919e45f2be82744c63d6b9ec75d4c16bde1.zip |
Move starring into actions menu
Signed-off-by: Marco <marcoambrosini@icloud.com>
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/src/views/Sidebar.vue | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/apps/files/src/views/Sidebar.vue b/apps/files/src/views/Sidebar.vue index b9804d7931e..50ac4597ea9 100644 --- a/apps/files/src/views/Sidebar.vue +++ b/apps/files/src/views/Sidebar.vue @@ -28,7 +28,6 @@ tabindex="0" @close="close" @update:active="setActiveTab" - @update:starred="toggleStarred" @[defaultActionListener].stop.prevent="onDefaultAction" @opening="handleOpening" @opened="handleOpened" @@ -50,6 +49,16 @@ <!-- Actions menu --> <template v-if="fileInfo" #secondary-actions> + <NcActionButton :close-after-click="true" + @click="toggleStarred(!fileInfo.isFavourited)"> + <template v-if="fileInfo.isFavourited" #icon> + <StarOutline :size="20" /> + </template> + <template v-else #icon> + <Star :size="20" /> + </template> + {{ fileInfo.isFavourited ? t('files', 'Add to favorites') : t('files', 'Remove from favorites') }} + </NcActionButton> <!-- TODO: create proper api for apps to register actions And inject themselves here. --> <NcActionButton v-if="isSystemTagsEnabled" @@ -98,6 +107,9 @@ import $ from 'jquery' import axios from '@nextcloud/axios' import moment from '@nextcloud/moment' +import Star from 'vue-material-design-icons/Star.vue' +import StarOutline from 'vue-material-design-icons/StarOutline.vue' + import NcAppSidebar from '@nextcloud/vue/dist/Components/NcAppSidebar.js' import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js' import NcEmptyContent from '@nextcloud/vue/dist/Components/NcEmptyContent.js' @@ -117,6 +129,8 @@ export default { NcEmptyContent, SidebarTab, SystemTags, + Star, + StarOutline, }, data() { @@ -246,7 +260,6 @@ export default { }, compact: this.hasLowHeight || !this.fileInfo.hasPreview || this.isFullScreen, loading: this.loading, - starred: this.fileInfo.isFavourited, subname: this.subtitle, subtitle: this.fullTime, name: this.fileInfo.name, |