Merge pull request #1945 from nextcloud/bugfix/noid/datetime
This commit is contained in:
73
package-lock.json
generated
73
package-lock.json
generated
@@ -3005,26 +3005,27 @@
|
||||
}
|
||||
},
|
||||
"@nextcloud/vue": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-1.5.0.tgz",
|
||||
"integrity": "sha512-z0KZP0PcWyHsD5zpzBJRusToGzC/1DTjapuDMrSAOSuA5lThg/Td7brmIQSwWTrw66OrL5MIRK+8HoKMWmQPAA==",
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-2.0.0.tgz",
|
||||
"integrity": "sha512-Y8OmsRHvskpRbfcBXUy8U6+Ctl8kyWK8qHkmsi1kWL85l0262OxcTA9BU/Qh9vAn9sqTrT7skXRAVnQckO4y0A==",
|
||||
"requires": {
|
||||
"@nextcloud/axios": "^1.1.0",
|
||||
"@nextcloud/l10n": "^1.1.0",
|
||||
"@nextcloud/router": "^1.0.0",
|
||||
"core-js": "^3.4.4",
|
||||
"@nextcloud/auth": "^1.2.3",
|
||||
"@nextcloud/axios": "^1.3.2",
|
||||
"@nextcloud/event-bus": "^1.1.4",
|
||||
"@nextcloud/l10n": "^1.2.3",
|
||||
"@nextcloud/router": "^1.0.2",
|
||||
"core-js": "^3.6.5",
|
||||
"debounce": "1.2.0",
|
||||
"escape-html": "^1.0.3",
|
||||
"hammerjs": "^2.0.8",
|
||||
"md5": "^2.2.1",
|
||||
"regenerator-runtime": "^0.13.3",
|
||||
"v-click-outside": "^3.0.0",
|
||||
"v-tooltip": "^2.0.0-rc.33",
|
||||
"vue": "^2.6.7",
|
||||
"vue-color": "^2.7.0",
|
||||
"vue-multiselect": "^2.1.3",
|
||||
"regenerator-runtime": "^0.13.5",
|
||||
"v-click-outside": "^3.0.1",
|
||||
"v-tooltip": "^2.0.3",
|
||||
"vue": "^2.6.11",
|
||||
"vue-color": "^2.7.1",
|
||||
"vue-multiselect": "^2.1.6",
|
||||
"vue-visible": "^1.0.2",
|
||||
"vue2-datepicker": "^3.3.1"
|
||||
"vue2-datepicker": "^3.4.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"core-js": {
|
||||
@@ -6224,9 +6225,9 @@
|
||||
}
|
||||
},
|
||||
"date-fns": {
|
||||
"version": "2.12.0",
|
||||
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.12.0.tgz",
|
||||
"integrity": "sha512-qJgn99xxKnFgB1qL4jpxU7Q2t0LOn1p8KMIveef3UZD7kqjT3tpFNNdXJelEHhE+rUgffriXriw/sOSU+cS1Hw=="
|
||||
"version": "2.14.0",
|
||||
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.14.0.tgz",
|
||||
"integrity": "sha512-1zD+68jhFgDIM0rF05rcwYO8cExdNqxjq4xP1QKM60Q45mnO6zaMWB4tOzrIr4M4GSLntsKeE4c9Bdl2jhL/yw=="
|
||||
},
|
||||
"date-format-parse": {
|
||||
"version": "0.2.5",
|
||||
@@ -13226,6 +13227,36 @@
|
||||
"@nextcloud/vue": "^1.3.0",
|
||||
"lodash": "^4.17.11",
|
||||
"vue": "^2.6.11"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nextcloud/vue": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-1.5.0.tgz",
|
||||
"integrity": "sha512-z0KZP0PcWyHsD5zpzBJRusToGzC/1DTjapuDMrSAOSuA5lThg/Td7brmIQSwWTrw66OrL5MIRK+8HoKMWmQPAA==",
|
||||
"requires": {
|
||||
"@nextcloud/axios": "^1.1.0",
|
||||
"@nextcloud/l10n": "^1.1.0",
|
||||
"@nextcloud/router": "^1.0.0",
|
||||
"core-js": "^3.4.4",
|
||||
"debounce": "1.2.0",
|
||||
"escape-html": "^1.0.3",
|
||||
"hammerjs": "^2.0.8",
|
||||
"md5": "^2.2.1",
|
||||
"regenerator-runtime": "^0.13.3",
|
||||
"v-click-outside": "^3.0.0",
|
||||
"v-tooltip": "^2.0.0-rc.33",
|
||||
"vue": "^2.6.7",
|
||||
"vue-color": "^2.7.0",
|
||||
"vue-multiselect": "^2.1.3",
|
||||
"vue-visible": "^1.0.2",
|
||||
"vue2-datepicker": "^3.3.1"
|
||||
}
|
||||
},
|
||||
"core-js": {
|
||||
"version": "3.6.5",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz",
|
||||
"integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"nice-try": {
|
||||
@@ -18806,9 +18837,9 @@
|
||||
"integrity": "sha512-yaX2its9XAJKGuQqf7LsiZHHSkxsIK8rmCOQOvEGEoF41blKRK8qr9my4qYoD6ikdLss4n8tKqYBecmaY0+WJg=="
|
||||
},
|
||||
"vue2-datepicker": {
|
||||
"version": "3.4.1",
|
||||
"resolved": "https://registry.npmjs.org/vue2-datepicker/-/vue2-datepicker-3.4.1.tgz",
|
||||
"integrity": "sha512-gCPZAwIyPLeN1P3xDg/Oj/UyQTIqnoFFzXw+yfvmUDxL430u/rHq1/JqFSGISEhTvJJu0brgHHrop3A7VBW6rA==",
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/vue2-datepicker/-/vue2-datepicker-3.5.0.tgz",
|
||||
"integrity": "sha512-E52TUjf57Qj2ZWtwtplS+BtYfz8wQFHnjux0q2X8N+ENvL3rHjp9pwEs0ukT1rDTouLdPtvACaXXLfDEy39mlw==",
|
||||
"requires": {
|
||||
"date-fns": "^2.0.1",
|
||||
"date-format-parse": "^0.2.5"
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"@nextcloud/l10n": "^1.2.3",
|
||||
"@nextcloud/moment": "^1.1.1",
|
||||
"@nextcloud/router": "^1.0.2",
|
||||
"@nextcloud/vue": "^1.5.0",
|
||||
"@nextcloud/vue": "^2.0.0",
|
||||
"blueimp-md5": "^2.16.0",
|
||||
"dompurify": "^2.0.11",
|
||||
"lodash": "^4.17.15",
|
||||
|
||||
@@ -104,6 +104,9 @@
|
||||
<DatetimePicker v-model="duedate"
|
||||
:placeholder="t('deck', 'Set a due date')"
|
||||
type="datetime"
|
||||
:minute-step="5"
|
||||
:show-second="false"
|
||||
:format="format"
|
||||
:disabled="saving || !canEdit"
|
||||
confirm />
|
||||
<Actions v-if="canEdit">
|
||||
@@ -203,6 +206,8 @@ import { formatFileSize } from '@nextcloud/files'
|
||||
import relativeDate from '../../mixins/relativeDate'
|
||||
import AttachmentList from './AttachmentList'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import { getLocale } from '@nextcloud/l10n'
|
||||
import moment from '@nextcloud/moment'
|
||||
|
||||
const markdownIt = new MarkdownIt({
|
||||
linkify: true,
|
||||
@@ -242,6 +247,7 @@ export default {
|
||||
addedLabelToCard: null,
|
||||
copiedCard: null,
|
||||
allLabels: null,
|
||||
locale: getLocale(),
|
||||
|
||||
saving: false,
|
||||
markdownIt: null,
|
||||
@@ -260,6 +266,10 @@ export default {
|
||||
hasActivity: capabilities && capabilities.activity,
|
||||
hasComments: !!OC.appswebroots['comments'],
|
||||
modalShow: false,
|
||||
format: {
|
||||
stringify: this.stringify,
|
||||
parse: this.parse,
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -485,6 +495,12 @@ export default {
|
||||
}
|
||||
this.$store.dispatch('removeLabel', data)
|
||||
},
|
||||
stringify(date) {
|
||||
return moment(date).locale(this.locale).format('LLL')
|
||||
},
|
||||
parse(value) {
|
||||
return moment(value, 'LLL', this.locale).toDate()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -42,12 +42,8 @@ if (!process.env.HOT) {
|
||||
}
|
||||
sync(store, router)
|
||||
|
||||
Vue.mixin({
|
||||
methods: {
|
||||
t: translate,
|
||||
n: translatePlural,
|
||||
},
|
||||
})
|
||||
Vue.prototype.t = translate
|
||||
Vue.prototype.n = translatePlural
|
||||
|
||||
Vue.directive('tooltip', Tooltip)
|
||||
Vue.directive('click-outside', ClickOutside)
|
||||
|
||||
Reference in New Issue
Block a user