Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarco <marcoambrosini@pm.me>2022-04-14 15:47:14 +0300
committermarco <marcoambrosini@pm.me>2022-04-25 11:03:18 +0300
commit592105aac34be046d3774f4c2c43ae02bdd40690 (patch)
tree48bd6e5535d80f44907f369877537e2ad8d9a372
parente69c1252bdf890cb2bcffdc4a214531cc9f6c964 (diff)
Initialise shared items browser
Signed-off-by: marco <marcoambrosini@pm.me>
-rw-r--r--src/components/RightSidebar/SharedItems/SharedItemsBrowser/SharedItemsBrowser.vue89
-rw-r--r--src/components/RightSidebar/SharedItems/SharedItemsTab.vue3
2 files changed, 92 insertions, 0 deletions
diff --git a/src/components/RightSidebar/SharedItems/SharedItemsBrowser/SharedItemsBrowser.vue b/src/components/RightSidebar/SharedItems/SharedItemsBrowser/SharedItemsBrowser.vue
new file mode 100644
index 000000000..1629f484c
--- /dev/null
+++ b/src/components/RightSidebar/SharedItems/SharedItemsBrowser/SharedItemsBrowser.vue
@@ -0,0 +1,89 @@
+<!--
+ - @copyright Copyright (c) 2022 Marco Ambrosini <marcoambrosini@pm.me>
+ -
+ - @author Marco Ambrosini <marcoambrosini@pm.me>
+ -
+ - @license GNU AGPL version 3 or any later version
+ -
+ - This program is free software: you can redistribute it and/or modify
+ - it under the terms of the GNU Affero General Public License as
+ - published by the Free Software Foundation, either version 3 of the
+ - License, or (at your option) any later version.
+ -
+ - This program is distributed in the hope that it will be useful,
+ - but WITHOUT ANY WARRANTY; without even the implied warranty of
+ - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ - GNU Affero General Public License for more details.
+ -
+ - You should have received a copy of the GNU Affero General Public License
+ - along with this program. If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<template>
+ <Modal size="large">
+ <div class="shared-items-browser__navigation">
+ <template v-for="type in sharedItemsOrder">
+ <Button v-if="sharedItems[type]"
+ :key="type"
+ type="tertiary"
+ @click="handleTabClick">
+ {{ type }}
+ </Button>
+ </template>
+ </div>
+ </Modal>
+</template>
+
+<script>
+import Modal from '@nextcloud/vue/dist/Components/Modal'
+import Button from '@nextcloud/vue/dist/Components/Button'
+
+export default {
+ name: 'SharedItemsBrowser',
+
+ components: {
+ Modal,
+ Button,
+ },
+
+ props: {
+ sharedItems: {
+ type: Object,
+ required: true,
+ },
+
+ sharedItemsOrder: {
+ type: Array,
+ required: true,
+ },
+
+ // The tab that is open upon opening the modal
+ initialTab: {
+ type: String,
+ default: 'media',
+ },
+ },
+
+ data() {
+ return {
+ activeTab: this.initialTab,
+ }
+ },
+
+ methods: {
+ handleTabClick() {
+ console.debug('Tab click')
+ },
+ },
+}
+</script>
+
+<style lang="scss" scoped>
+.shared-items-browser__navigation {
+ display: flex;
+ gap: 8px;
+ padding: 16px;
+ flex-wrap: wrap;
+ justify-content: center;
+}
+</style>
diff --git a/src/components/RightSidebar/SharedItems/SharedItemsTab.vue b/src/components/RightSidebar/SharedItems/SharedItemsTab.vue
index d3ee8db57..3ca544ec2 100644
--- a/src/components/RightSidebar/SharedItems/SharedItemsTab.vue
+++ b/src/components/RightSidebar/SharedItems/SharedItemsTab.vue
@@ -32,6 +32,7 @@
:id="token"
type="room"
:name="conversation.displayName" />
+ <SharedItemsBrowser :shared-items="sharedItems" :shared-items-order="sharedItemsOrder" />
</div>
</template>
@@ -40,6 +41,7 @@ import { CollectionList } from 'nextcloud-vue-collections'
import SharedItems from './SharedItems'
import { SHARED_ITEM } from '../../../constants'
import AppNavigationCaption from '@nextcloud/vue/dist/Components/AppNavigationCaption'
+import SharedItemsBrowser from './SharedItemsBrowser/SharedItemsBrowser.vue'
export default {
@@ -49,6 +51,7 @@ export default {
SharedItems,
CollectionList,
AppNavigationCaption,
+ SharedItemsBrowser,
},
props: {