mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-17 21:12:20 +01:00
Merge pull request #15769 from nextcloud/fix/noid/fixups--from-tests
This commit is contained in:
commit
2965f7c556
9 changed files with 33 additions and 24 deletions
|
|
@ -184,7 +184,7 @@
|
|||
<template #list>
|
||||
<!-- Conversations List -->
|
||||
<template v-if="!isSearching">
|
||||
<NcEmptyContent v-if="conversationsInitialised && filteredConversationsList.length === 0"
|
||||
<NcEmptyContent v-if="showEmptyContent"
|
||||
:name="emptyContentLabel"
|
||||
:description="emptyContentDescription">
|
||||
<template #icon>
|
||||
|
|
@ -473,7 +473,9 @@ export default {
|
|||
},
|
||||
|
||||
emptyContentLabel() {
|
||||
if (this.isFiltered) {
|
||||
if (this.showThreadsList) {
|
||||
return t('spreed', 'No followed threads')
|
||||
} else if (this.isFiltered) {
|
||||
return t('spreed', 'No matches found')
|
||||
} else {
|
||||
return t('spreed', 'No conversations found')
|
||||
|
|
@ -484,7 +486,7 @@ export default {
|
|||
if (this.showArchived) {
|
||||
return t('spreed', 'You have no archived conversations.')
|
||||
} else if (this.showThreadsList) {
|
||||
return t('spreed', 'You have no followed threads.')
|
||||
return t('spreed', 'Subscribe to an existing thread or start your own.')
|
||||
}
|
||||
if (this.filters.length === 1 && this.filters[0] === 'mentions') {
|
||||
return t('spreed', 'You have no unread mentions.')
|
||||
|
|
@ -551,6 +553,11 @@ export default {
|
|||
conversationsInitialised() {
|
||||
return this.$store.getters.conversationsInitialised
|
||||
},
|
||||
|
||||
showEmptyContent() {
|
||||
return (this.conversationsInitialised && !this.filteredConversationsList.length)
|
||||
|| (this.showThreadsList && !this.followedThreads.length)
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
|
|
|||
|
|
@ -142,10 +142,9 @@
|
|||
{{ t('spreed', 'Download file') }}
|
||||
</NcActionLink>
|
||||
</template>
|
||||
<NcActionSeparator />
|
||||
<template v-if="supportThreads && !threadId">
|
||||
<template v-if="showThreadControls">
|
||||
<NcActionSeparator />
|
||||
<NcActionButton
|
||||
v-if="message.isThread && message.id === message.threadId"
|
||||
close-after-click
|
||||
@click="threadId = message.threadId">
|
||||
<template #icon>
|
||||
|
|
@ -646,6 +645,13 @@ export default {
|
|||
canReply() {
|
||||
return this.message.isReplyable && !this.isConversationReadOnly && (this.conversation.permissions & PARTICIPANT.PERMISSIONS.CHAT) !== 0
|
||||
},
|
||||
|
||||
showThreadControls() {
|
||||
return this.supportThreads
|
||||
&& !this.threadId
|
||||
&& this.message.isThread
|
||||
&& this.message.id !== this.message.threadId
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
tabindex="1"
|
||||
variant="primary"
|
||||
:aria-label="removeAriaLabel"
|
||||
@click="$emit('removeFile', file.id)">
|
||||
@click.stop.prevent="handleClick">
|
||||
<template #icon>
|
||||
<IconClose />
|
||||
</template>
|
||||
|
|
@ -458,7 +458,7 @@ export default {
|
|||
|
||||
mounted() {
|
||||
if (this.isTemporaryUpload && !this.isUploadEditor) {
|
||||
// this.uploadManager = getUploader()
|
||||
this.uploadManager = getUploader()
|
||||
}
|
||||
|
||||
if (this.file.blurhash && this.file.width && this.file.height) {
|
||||
|
|
|
|||
|
|
@ -712,6 +712,9 @@ export default {
|
|||
canBeDemoted() {
|
||||
return this.canBeModerated
|
||||
&& [PARTICIPANT.TYPE.MODERATOR, PARTICIPANT.TYPE.GUEST_MODERATOR].includes(this.participantType)
|
||||
&& (this.participant.actorType === ATTENDEE.ACTOR_TYPE.USERS
|
||||
|| this.participant.actorType === ATTENDEE.ACTOR_TYPE.GUESTS
|
||||
|| this.participant.actorType === ATTENDEE.ACTOR_TYPE.EMAILS)
|
||||
},
|
||||
|
||||
canBePromoted() {
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@
|
|||
:order="5"
|
||||
:name="t('spreed', 'Shared items')">
|
||||
<template #icon>
|
||||
<NcIconSvgWrapper :svg="IconPermMediaOutline" :size="20" />
|
||||
<NcIconSvgWrapper :svg="IconPermMediaOutline" :size="20" inline />
|
||||
</template>
|
||||
<SharedItemsTab :active="activeTab === 'shared-items'" @update:state="handleUpdateState" />
|
||||
</NcAppSidebarTab>
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ export default {
|
|||
},
|
||||
|
||||
/**
|
||||
* Whether component is used as plugin and should emit on $root.
|
||||
* Whether component is used as plugin and should not check conversation token.
|
||||
*/
|
||||
isPlugin: {
|
||||
type: Boolean,
|
||||
|
|
@ -197,11 +197,7 @@ export default {
|
|||
},
|
||||
|
||||
close() {
|
||||
if (this.isPlugin) {
|
||||
this.$root.$emit('close')
|
||||
} else {
|
||||
this.$emit('close')
|
||||
}
|
||||
this.$emit('close')
|
||||
},
|
||||
|
||||
onSelect(item) {
|
||||
|
|
@ -209,11 +205,7 @@ export default {
|
|||
},
|
||||
|
||||
onSubmit() {
|
||||
if (this.isPlugin) {
|
||||
this.$root.$emit('select', this.selectedRoom)
|
||||
} else {
|
||||
this.$emit('select', this.selectedRoom)
|
||||
}
|
||||
this.$emit('select', this.selectedRoom)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ const absoluteDateOptions = computed(() => {
|
|||
const isSameYear = new Date(+props.time).getFullYear() === new Date().getFullYear()
|
||||
const format: Intl.DateTimeFormatOptions = {
|
||||
dateStyle: undefined,
|
||||
year: isSameYear ? 'numeric' : undefined,
|
||||
year: !isSameYear ? 'numeric' : undefined,
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
import { getCurrentUser } from '@nextcloud/auth'
|
||||
import { davRemoteURL } from '@nextcloud/files'
|
||||
import { defaultRemoteURL } from '@nextcloud/files/dav'
|
||||
|
||||
/**
|
||||
* Generate a WebDAV url to a user files
|
||||
|
|
@ -16,7 +16,7 @@ export function generateUserFileUrl(filepath: string, userid: string | undefined
|
|||
if (!userid) {
|
||||
throw new TypeError('Cannot generate /files/<user>/ URL without a user')
|
||||
}
|
||||
return davRemoteURL + '/files/' + encodeURI(userid) + '/' + encodeURI(filepath)
|
||||
return defaultRemoteURL + '/files/' + encodeURI(userid) + '/' + encodeURI(filepath)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
|
||||
import { createApp, defineAsyncComponent } from 'vue'
|
||||
import pinia from '../stores/pinia.ts'
|
||||
import { NextcloudGlobalsVuePlugin } from './NextcloudGlobalsVuePlugin.js'
|
||||
|
||||
/**
|
||||
|
|
@ -34,7 +35,7 @@ export function requestRoomSelection(containerId, roomSelectorProps) {
|
|||
app.unmount()
|
||||
resolve(conversation)
|
||||
},
|
||||
}).use(NextcloudGlobalsVuePlugin)
|
||||
}).use(pinia).use(NextcloudGlobalsVuePlugin)
|
||||
app.mount(container)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue