Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Vue app names #48536

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions apps/files_reminders/src/components/SetCustomReminderModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,16 @@ export default Vue.extend({
},

computed: {
fileId(): number {
return this.node.fileid
fileId(): number|undefined {
return this.node?.fileid
},

fileName(): string {
return this.node.basename
fileName(): string|undefined {
return this.node?.basename
},

name() {
return t('files_reminders', 'Set reminder for "{fileName}"', { fileName: this.fileName })
return this.fileName ? t('files_reminders', 'Set reminder for "{fileName}"', { fileName: this.fileName }) : ''
},

label(): string {
Expand Down
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
10 changes: 8 additions & 2 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 {versionRelativeDate}', { versionRelativeDate })"
:data-files-versions-version="version.fileVersion"
@click="click">
<!-- Icon -->
Expand Down Expand Up @@ -114,6 +115,8 @@
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 @@ -133,9 +136,8 @@ 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'
import moment from '@nextcloud/moment'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should move away from moment, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can already use useFormatDateTime from nc/vue but can be done in followup too

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes for new stuff do not use Moment, but as Pytal mentioned could be done in a follow up

const hasPermission = (permissions: number, permission: number): boolean => (permissions & permission) !== 0
Expand Down Expand Up @@ -225,6 +227,10 @@ export default defineComponent({
return label
},
versionRelativeDate(): string {
return moment(this.version.mtime).fromNow()
},
downloadURL(): string {
if (this.isCurrent) {
return getRootUrl() + joinPaths('/remote.php/webdav', this.fileInfo.path, this.fileInfo.name)
Expand Down
1 change: 1 addition & 0 deletions core/src/components/ContactsMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const setUp = () => {
if (mountPoint) {
// eslint-disable-next-line no-new
new Vue({
name: 'ContactsMenuRoot',
el: mountPoint,
render: h => h(ContactsMenu),
})
Expand Down
1 change: 1 addition & 0 deletions core/src/components/UserMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const setUp = () => {
if (mountPoint) {
// eslint-disable-next-line no-new
new Vue({
name: 'AccountMenuRoot',
el: mountPoint,
render: h => h(AccountMenu),
})
Expand Down
2 changes: 2 additions & 0 deletions dist/4757-4757.js

Large diffs are not rendered by default.

Loading
Loading