]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: Minor @nc/vue usage errors
authorLouis Chemineau <louis@chmn.me>
Thu, 3 Oct 2024 13:02:47 +0000 (15:02 +0200)
committerLouis <louis@chmn.me>
Wed, 9 Oct 2024 17:49:07 +0000 (19:49 +0200)
Signed-off-by: Louis Chemineau <louis@chmn.me>
apps/files_sharing/src/components/SharingInput.vue
apps/files_versions/src/components/Version.vue

index 807350d7ca7934e2feb37f54f434056427d81712..66a6044f7c27ab6bb941b77c99b246028b55dfdd 100644 (file)
@@ -17,6 +17,7 @@
                        :clear-search-on-blur="() => false"
                        :user-select="true"
                        :options="options"
+                       :label-outside="true"
                        @search="asyncFind"
                        @option:selected="onSelected">
                        <template #no-options="{ search }">
index 7c3bb4758de342bb4c117d1666f3af6d08369a20..177a9fef807d8ad13780723c646d45e7113a12f8 100644 (file)
@@ -5,6 +5,7 @@
 <template>
        <NcListItem class="version"
                :force-display-actions="true"
+               :actions-aria-label="t('files_versions', 'Actions for version from {versionHumanExplicitDate}', { versionHumanExplicitDate })"
                :data-files-versions-version="version.fileVersion"
                @click="click">
                <!-- Icon -->
                </template>
        </NcListItem>
 </template>
-
 <script lang="ts">
 import type { PropType } from 'vue'
 import type { Version } from '../utils/versions'
 
+import { defineComponent } from 'vue'
+
 import BackupRestore from 'vue-material-design-icons/BackupRestore.vue'
 import Delete from 'vue-material-design-icons/Delete.vue'
 import Download from 'vue-material-design-icons/Download.vue'
@@ -128,13 +130,12 @@ import NcDateTime from '@nextcloud/vue/dist/Components/NcDateTime.js'
 import NcListItem from '@nextcloud/vue/dist/Components/NcListItem.js'
 import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip.js'
 
+import moment from '@nextcloud/moment'
 import { getRootUrl, generateOcsUrl } from '@nextcloud/router'
 import { joinPaths } from '@nextcloud/paths'
 import { loadState } from '@nextcloud/initial-state'
 import { Permission, formatFileSize } from '@nextcloud/files'
 import { translate as t } from '@nextcloud/l10n'
-import { defineComponent } from 'vue'
-
 import axios from '@nextcloud/axios'
 
 const hasPermission = (permissions: number, permission: number): boolean => (permissions & permission) !== 0
@@ -225,6 +226,10 @@ export default defineComponent({
                        return label
                },
 
+               versionHumanExplicitDate(): string {
+                       return moment(this.version.mtime).format('LLLL')
+               },
+
                downloadURL(): string {
                        if (this.isCurrent) {
                                return getRootUrl() + joinPaths('/remote.php/webdav', this.fileInfo.path, this.fileInfo.name)