summaryrefslogtreecommitdiffstats
path: root/src/components/Properties
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-03-04 09:55:40 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-03-04 10:53:36 +0100
commita207d5e2be8091ca9c93b450fdaa07c6ad5a78eb (patch)
treea9ee8d476dfc44fe9b86f0ee8aa124e121b22671 /src/components/Properties
parentbdd93836aa0613e5f9c61f2496505e4c45f1febc (diff)
Add REV on update
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'src/components/Properties')
-rw-r--r--src/components/Properties/PropertyRev.vue49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/components/Properties/PropertyRev.vue b/src/components/Properties/PropertyRev.vue
new file mode 100644
index 00000000..03bbff8b
--- /dev/null
+++ b/src/components/Properties/PropertyRev.vue
@@ -0,0 +1,49 @@
+<!--
+ - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
+ -
+ - @author John Molakvoæ <skjnldsv@protonmail.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>
+ <div class="property--rev">
+ {{ t('contacts', 'Last modified') }} {{ relativeDate }}
+ </div>
+</template>
+
+<script>
+import { VCardTime } from 'ical.js'
+
+export default {
+ name: 'PropertyRev',
+
+ props: {
+ value: {
+ type: VCardTime,
+ required: true,
+ default: null
+ }
+ },
+
+ computed: {
+ relativeDate() {
+ return OC.Util.relativeModifiedDate(this.value.toUnixTime() * 1000)
+ }
+ }
+}
+</script>