Skip to content

Commit

Permalink
fix: Minor @nc/vue usage errors
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <louis@chmn.me>
  • Loading branch information
artonge committed Oct 9, 2024
1 parent c0e5635 commit 2582b6a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions apps/files_sharing/src/components/SharingInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 }">
Expand Down
11 changes: 8 additions & 3 deletions apps/files_versions/src/components/Version.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 -->
Expand Down Expand Up @@ -109,11 +110,12 @@
</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'
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 2582b6a

Please sign in to comment.