Browse Source

Merge pull request #30157 from nextcloud/fix/datepicker-share-lang

tags/v24.0.0beta1
John Molakvoæ 2 years ago
parent
commit
d851e58782
No account linked to committer's email address

+ 2
- 2
apps/files_sharing/js/dist/files_sharing_tab.js
File diff suppressed because it is too large
View File


+ 1
- 1
apps/files_sharing/js/dist/files_sharing_tab.js.map
File diff suppressed because it is too large
View File


+ 0
- 1
apps/files_sharing/src/components/SharingEntry.vue View File

@@ -100,7 +100,6 @@
}"
:class="{ error: errors.expireDate}"
:disabled="saving"
:first-day-of-week="firstDay"
:lang="lang"
:value="share.expireDate"
value-type="format"

+ 1
- 2
apps/files_sharing/src/components/SharingEntryLink.vue View File

@@ -105,7 +105,7 @@
}"
class="share-link-expire-date"
:disabled="saving"
:first-day-of-week="firstDay"
:lang="lang"
icon=""
type="date"
@@ -251,7 +251,6 @@
class="share-link-expire-date"
:class="{ error: errors.expireDate}"
:disabled="saving"
:first-day-of-week="firstDay"
:lang="lang"
:value="share.expireDate"
value-type="format"

+ 15
- 21
apps/files_sharing/src/mixins/SharesMixin.js View File

@@ -110,30 +110,24 @@ export default {
return moment().add(1, 'days')
},

/**
* Datepicker lang values
* https://github.com/nextcloud/nextcloud-vue/pull/146
* TODO: have this in vue-components
*
* @returns {int}
*/
firstDay() {
return window.firstDay
? window.firstDay
: 0 // sunday as default
},
// Datepicker language
lang() {
// fallback to default in case of unavailable data
const weekdaysShort = window.dayNamesShort
? window.dayNamesShort // provided by nextcloud
: ['Sun.', 'Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.', 'Sat.']
const monthsShort = window.monthNamesShort
? window.monthNamesShort // provided by nextcloud
: ['Jan.', 'Feb.', 'Mar.', 'Apr.', 'May.', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Oct.', 'Nov.', 'Dec.']
const firstDayOfWeek = window.firstDay ? window.firstDay : 0

return {
days: window.dayNamesShort
? window.dayNamesShort // provided by nextcloud
: ['Sun.', 'Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.', 'Sat.'],
months: window.monthNamesShort
? window.monthNamesShort // provided by nextcloud
: ['Jan.', 'Feb.', 'Mar.', 'Apr.', 'May.', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Oct.', 'Nov.', 'Dec.'],
placeholder: {
date: 'Select Date', // TODO: Translate
formatLocale: {
firstDayOfWeek,
monthsShort,
weekdaysMin: weekdaysShort,
weekdaysShort,
},
monthFormat: 'MMM',
}
},


Loading…
Cancel
Save