Skip to content
Merged
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
13 changes: 10 additions & 3 deletions src/components/LeftSidebar/LeftSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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')
Expand All @@ -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.')
Expand Down Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
tabindex="1"
variant="primary"
:aria-label="removeAriaLabel"
@click="$emit('removeFile', file.id)">
@click.stop.prevent="handleClick">
<template #icon>
<IconClose />
</template>
Expand Down Expand Up @@ -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) {
Expand Down
3 changes: 3 additions & 0 deletions src/components/RightSidebar/Participants/Participant.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/RightSidebar/RightSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
14 changes: 3 additions & 11 deletions src/components/RoomSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -197,23 +197,15 @@ export default {
},

close() {
if (this.isPlugin) {
this.$root.$emit('close')
} else {
this.$emit('close')
}
this.$emit('close')
},

onSelect(item) {
this.selectedRoom = item
},

onSubmit() {
if (this.isPlugin) {
this.$root.$emit('select', this.selectedRoom)
} else {
this.$emit('select', this.selectedRoom)
}
this.$emit('select', this.selectedRoom)
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/UIShared/StaticDateTime.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}
Expand Down
4 changes: 2 additions & 2 deletions src/utils/davUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/utils/requestRoomSelection.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/

import { createApp, defineAsyncComponent } from 'vue'
import pinia from '../stores/pinia.ts'
import { NextcloudGlobalsVuePlugin } from './NextcloudGlobalsVuePlugin.js'

/**
Expand Down Expand Up @@ -34,7 +35,7 @@ export function requestRoomSelection(containerId, roomSelectorProps) {
app.unmount()
resolve(conversation)
},
}).use(NextcloudGlobalsVuePlugin)
}).use(pinia).use(NextcloudGlobalsVuePlugin)
app.mount(container)
})
}