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
path: root/src
diff options
context:
space:
mode:
authorMarco Ambrosini <marcoambrosini@pm.me>2021-05-06 14:43:10 +0300
committerMarco Ambrosini <marcoambrosini@pm.me>2021-05-10 18:17:38 +0300
commitea335ae9e8a4d3ca5c153f428b5d8400c4e003cb (patch)
treeca29473dcb464f0affe016b14dd5ee184e0f11f1 /src
parentb858f28c2a041e409dea79f80eb4d94597c88541 (diff)
Create location component
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Diffstat (limited to 'src')
-rw-r--r--src/components/MessagesList/MessagesGroup/Message/Message.vue6
-rw-r--r--src/components/MessagesList/MessagesGroup/Message/MessagePart/Location.vue74
2 files changed, 80 insertions, 0 deletions
diff --git a/src/components/MessagesList/MessagesGroup/Message/Message.vue b/src/components/MessagesList/MessagesGroup/Message/Message.vue
index 0f40ffaef..3893cf82f 100644
--- a/src/components/MessagesList/MessagesGroup/Message/Message.vue
+++ b/src/components/MessagesList/MessagesGroup/Message/Message.vue
@@ -214,6 +214,7 @@ import {
TOAST_DEFAULT_TIMEOUT,
} from '@nextcloud/dialogs'
import { generateUrl } from '@nextcloud/router'
+import Location from './MessagePart/Location'
export default {
name: 'Message',
@@ -492,6 +493,11 @@ export default {
component: DeckCard,
props: this.messageParameters[p],
}
+ } else if (type === 'geo-location') {
+ richParameters[p] = {
+ component: Location,
+ props: this.messageParameters[p],
+ }
} else {
richParameters[p] = {
component: DefaultParameter,
diff --git a/src/components/MessagesList/MessagesGroup/Message/MessagePart/Location.vue b/src/components/MessagesList/MessagesGroup/Message/MessagePart/Location.vue
new file mode 100644
index 000000000..f7f6ceadc
--- /dev/null
+++ b/src/components/MessagesList/MessagesGroup/Message/MessagePart/Location.vue
@@ -0,0 +1,74 @@
+<!--
+ - @copyright Copyright (c) 2021 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>
+ <div class="location">
+ {{ name }}
+ <p>{{ id }}</p>
+ </div>
+</template>
+
+<script>
+export default {
+ name: 'Location',
+
+ props: {
+ /**
+ * The geolink for the location
+ */
+ id: {
+ type: String,
+ required: true,
+ },
+
+ /**
+ * The latitude of the location
+ */
+ latitude: {
+ type: String,
+ required: true,
+ },
+
+ /**
+ * The longitude of the location
+ */
+ longitude: {
+ type: String,
+ required: true,
+ },
+
+ /**
+ * The name of the location
+ */
+ name: {
+ type: String,
+ required: true,
+ },
+ },
+}
+</script>
+
+<style lang="scss" scoped>
+.location {
+ width: 400px;
+ background-color: lightgray;
+}
+</style>