fix: Show tooltip for readable date
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -36,7 +36,7 @@
|
|||||||
@remove="removeUserFromCard" />
|
@remove="removeUserFromCard" />
|
||||||
|
|
||||||
<DueDateSelector :card="card"
|
<DueDateSelector :card="card"
|
||||||
:can-edit="canEdit && !saving"
|
:can-edit="canEdit"
|
||||||
@change="updateCardDue" />
|
@change="updateCardDue" />
|
||||||
|
|
||||||
<div v-if="projectsEnabled" class="section-wrapper">
|
<div v-if="projectsEnabled" class="section-wrapper">
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ import {
|
|||||||
NcButton,
|
NcButton,
|
||||||
NcDateTimePickerNative,
|
NcDateTimePickerNative,
|
||||||
} from '@nextcloud/vue'
|
} from '@nextcloud/vue'
|
||||||
|
import readableDate from '../../mixins/readableDate.js'
|
||||||
import { getDayNamesMin, getFirstDay, getMonthNamesShort } from '@nextcloud/l10n'
|
import { getDayNamesMin, getFirstDay, getMonthNamesShort } from '@nextcloud/l10n'
|
||||||
import moment from '@nextcloud/moment'
|
import moment from '@nextcloud/moment'
|
||||||
import ArchiveIcon from 'vue-material-design-icons/Archive.vue'
|
import ArchiveIcon from 'vue-material-design-icons/Archive.vue'
|
||||||
@@ -118,6 +119,9 @@ export default defineComponent({
|
|||||||
NcActionSeparator,
|
NcActionSeparator,
|
||||||
NcDateTimePickerNative,
|
NcDateTimePickerNative,
|
||||||
},
|
},
|
||||||
|
mixins: [
|
||||||
|
readableDate,
|
||||||
|
],
|
||||||
props: {
|
props: {
|
||||||
card: {
|
card: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@@ -225,9 +229,6 @@ export default defineComponent({
|
|||||||
archiveUnarchiveCard() {
|
archiveUnarchiveCard() {
|
||||||
this.$store.dispatch('archiveUnarchiveCard', { ...this.card, archived: !this.card.archived })
|
this.$store.dispatch('archiveUnarchiveCard', { ...this.card, archived: !this.card.archived })
|
||||||
},
|
},
|
||||||
formatReadableDate(date) {
|
|
||||||
return moment(date).format('lll')
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<div v-if="card" class="done">
|
<div v-if="card" class="done">
|
||||||
<transition name="zoom">
|
<transition name="zoom">
|
||||||
<div class="icon-check-circle">
|
<div class="icon-check-circle">
|
||||||
<CheckCircle :size="20" />
|
<CheckCircle :size="20" :title="formatReadableDate(card.done)" />
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
@@ -32,12 +32,16 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CheckCircle from 'vue-material-design-icons/CheckCircle.vue'
|
import CheckCircle from 'vue-material-design-icons/CheckCircle.vue'
|
||||||
|
import readableDate from '../../../mixins/readableDate.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Done',
|
name: 'Done',
|
||||||
components: {
|
components: {
|
||||||
CheckCircle,
|
CheckCircle,
|
||||||
},
|
},
|
||||||
|
mixins: [
|
||||||
|
readableDate,
|
||||||
|
],
|
||||||
props: {
|
props: {
|
||||||
card: {
|
card: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|||||||
33
src/mixins/readableDate.js
Normal file
33
src/mixins/readableDate.js
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
* @copyright Copyright (c) 2020 Julius Härtl <jus@bitgrid.net>
|
||||||
|
*
|
||||||
|
* @author Julius Härtl <jus@bitgrid.net>
|
||||||
|
*
|
||||||
|
* @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/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
import moment from '@nextcloud/moment'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
computed: {
|
||||||
|
formatReadableDate() {
|
||||||
|
return (timestamp) => {
|
||||||
|
return moment(timestamp).format('lll')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user