From 3eb801d16c011853af300a5805fe53565771dde9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= <danxuliu@gmail.com>
Date: Fri, 27 Dec 2019 14:33:05 +0100
Subject: Add dummy call view to the Files sidebar
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Currently the dummy call view is simply shown when the user is in the
call and hidden otherwise.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
---
 src/FilesSidebarCallViewApp.vue | 56 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 src/FilesSidebarCallViewApp.vue

(limited to 'src/FilesSidebarCallViewApp.vue')

diff --git a/src/FilesSidebarCallViewApp.vue b/src/FilesSidebarCallViewApp.vue
new file mode 100644
index 000000000..f172245b9
--- /dev/null
+++ b/src/FilesSidebarCallViewApp.vue
@@ -0,0 +1,56 @@
+<!--
+  - @copyright Copyright (c) 2019, Daniel Calviño Sánchez <danxuliu@gmail.com>
+  -
+  - @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>
+	<p v-show="isInCall">
+		Call in progress
+	</p>
+</template>
+
+<script>
+import { PARTICIPANT } from './constants'
+
+export default {
+
+	name: 'FilesSidebarCallViewApp',
+
+	computed: {
+		token() {
+			return this.$store.getters.getToken()
+		},
+
+		isInCall() {
+			const participantIndex = this.$store.getters.getParticipantIndex(this.token, this.$store.getters.getParticipantIdentifier())
+			if (participantIndex === -1) {
+				return false
+			}
+
+			const participant = this.$store.getters.getParticipant(this.token, participantIndex)
+
+			return participant.inCall !== PARTICIPANT.CALL_FLAG.DISCONNECTED
+		},
+	},
+
+	methods: {
+		setFileInfo(fileInfo) {
+		},
+	},
+}
+</script>
-- 
cgit v1.2.3

