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
2 changes: 1 addition & 1 deletion src/PublicShareSidebarTrigger.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const props = defineProps<{
}>()

const emit = defineEmits<{
(event: 'click'): void
click: []
}>()

const ariaLabel = computed(() => {
Expand Down
6 changes: 3 additions & 3 deletions src/components/AdminSettings/SignalingServers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ const props = defineProps<{
}>()

const emit = defineEmits<{
(e: 'update:servers', value: InitialState['spreed']['signaling_servers']['servers']): void
(e: 'update:secret', value: InitialState['spreed']['signaling_servers']['secret']): void
(e: 'update:hideWarning', value: InitialState['spreed']['signaling_servers']['hideWarning']): void
'update:servers': [value: InitialState['spreed']['signaling_servers']['servers']]
'update:secret': [value: InitialState['spreed']['signaling_servers']['secret']]
'update:hideWarning': [value: InitialState['spreed']['signaling_servers']['hideWarning']]
}>()

const isCacheConfigured = loadState('spreed', 'has_cache_configured')
Expand Down
3 changes: 0 additions & 3 deletions src/components/CalendarEventsDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ const props = defineProps<{
token: string
container?: string
}>()
const emit = defineEmits<{
(event: 'close'): void
}>()

const hideTriggers = (triggers: string[]) => [...triggers, 'click']

Expand Down
2 changes: 1 addition & 1 deletion src/components/ImportEmailsDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const props = defineProps<{
}>()

const emit = defineEmits<{
(event: 'close'): void
close: []
}>()

const loading = ref(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const props = defineProps<{
}>()

const emit = defineEmits<{
(event: 'select', item: Conversation): void
select: [item: Conversation]
}>()

const itemHeight = AVATAR.SIZE.DEFAULT + 2 * 4 + 2 * 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ const props = defineProps<{
}>()

const emit = defineEmits<{
(event: 'abort-search'): void
(event: 'create-new-conversation', searchText: string): void
(event: 'create-and-join-conversation', item: TypeConversation | ParticipantSearchResult): void
abortSearch: []
createNewConversation: [searchText: string]
createAndJoinConversation: [item: TypeConversation | ParticipantSearchResult]
}>()

const isCirclesEnabled = loadState('spreed', 'circles_enabled')
Expand Down Expand Up @@ -249,13 +249,13 @@ const iconSize = computed(() => isCompact.value ? AVATAR.SIZE.COMPACT : AVATAR.S
:ref="`conversation-${item.data.object.token}`"
:item="item.data.object"
:compact="isCompact"
@click="emit('abort-search')" />
@click="emit('abortSearch')" />
<NcListItem
v-else-if="item.data.type === 'action'"
:name="searchText"
:compact="isCompact"
data-nav-id="conversation_create_new"
@click="emit('create-new-conversation', searchText)">
@click="emit('createNewConversation', searchText)">
<template #icon>
<IconChatPlusOutline :size="iconSize" />
</template>
Expand All @@ -268,7 +268,7 @@ const iconSize = computed(() => isCompact.value ? AVATAR.SIZE.COMPACT : AVATAR.S
:item="item.data.object"
is-search-result
:compact="isCompact"
@click="emit('abort-search')" />
@click="emit('abortSearch')" />
<NcAppNavigationCaption
v-else-if="item.data.type === 'caption'"
:name="item.data.name"
Expand All @@ -286,7 +286,7 @@ const iconSize = computed(() => isCompact.value ? AVATAR.SIZE.COMPACT : AVATAR.S
:data-nav-id="`user_${item.data.id}`"
:name="item.data.object.label"
:compact="isCompact"
@click="emit('create-and-join-conversation', item.data.object)">
@click="emit('createAndJoinConversation', item.data.object)">
<template #icon>
<!-- @vue-expect-error: incomplete props from v-bind -->
<AvatarWrapper
Expand All @@ -302,7 +302,7 @@ const iconSize = computed(() => isCompact.value ? AVATAR.SIZE.COMPACT : AVATAR.S
:data-nav-id="`group_${item.data.id}`"
:name="item.data.object.label"
:compact="isCompact"
@click="emit('create-and-join-conversation', item.data.object)">
@click="emit('createAndJoinConversation', item.data.object)">
<template #icon>
<ConversationIcon
:key="`group_${item.data.id}`"
Expand All @@ -318,7 +318,7 @@ const iconSize = computed(() => isCompact.value ? AVATAR.SIZE.COMPACT : AVATAR.S
:data-nav-id="`circle_${item.data.id}`"
:name="item.data.object.label"
:compact="isCompact"
@click="emit('create-and-join-conversation', item.data.object)">
@click="emit('createAndJoinConversation', item.data.object)">
<template #icon>
<ConversationIcon
:key="`circle_${item.data.id}`"
Expand All @@ -334,7 +334,7 @@ const iconSize = computed(() => isCompact.value ? AVATAR.SIZE.COMPACT : AVATAR.S
:data-nav-id="`federated_${item.data.id}`"
:name="item.data.object.label"
:compact="isCompact"
@click="emit('create-and-join-conversation', item.data.object)">
@click="emit('createAndJoinConversation', item.data.object)">
<template #icon>
<!-- @vue-expect-error: incomplete props from v-bind -->
<AvatarWrapper
Expand Down
4 changes: 2 additions & 2 deletions src/components/MediaSettings/MediaDevicesSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ const props = withDefaults(defineProps<{
})

const emit = defineEmits<{
(event: 'refresh'): void
(event: 'update:deviceId', value: string | null | undefined): void
refresh: []
'update:deviceId': [value: string | null]
}>()

const deviceOptions = computed<NcSelectOption[]>(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/MediaSettings/MediaSettingsTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const props = defineProps<{
}>()

const emit = defineEmits<{
(event: 'update:active', value?: string): void
'update:active': [value?: string]
}>()

/** Whether the tab panel is open */
Expand Down
8 changes: 4 additions & 4 deletions src/components/MediaSettings/TransitionExpand.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ defineProps<{
}>()

const emit = defineEmits<{
(event: 'after-enter'): void
(event: 'after-leave'): void
afterEnter: []
afterLeave: []
}>()
</script>

<template>
<Transition
:name="`expand-${direction}`"
@after-enter="emit('after-enter')"
@after-leave="emit('after-leave')">
@after-enter="emit('afterEnter')"
@after-leave="emit('afterLeave')">
<div v-show="show" class="expand-wrapper">
<div class="expand-wrapper__content">
<slot />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const props = defineProps<{
}>()

const emit = defineEmits<{
(event: 'update:isActionMenuOpen', value: boolean): void
(event: 'edit'): void
'update:isActionMenuOpen': [value: boolean]
edit: []
}>()

const getMessagesListScroller = inject('getMessagesListScroller', () => undefined)
Expand Down
3 changes: 2 additions & 1 deletion src/components/PollViewer/PollDraftHandler.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ const props = defineProps<{
editorOpened?: boolean
container?: string
}>()

const emit = defineEmits<{
(event: 'close'): void
close: []
}>()

const pollsStore = usePollsStore()
Expand Down
4 changes: 3 additions & 1 deletion src/components/PollViewer/PollEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,11 @@ const props = defineProps<{
canCreatePollDrafts: boolean
container?: string
}>()

const emit = defineEmits<{
(event: 'close'): void
close: []
}>()

defineExpose({
fillPollEditorFromDraft,
})
Expand Down
4 changes: 3 additions & 1 deletion src/components/RightSidebar/RightSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@
<template #icon>
<NcIconSvgWrapper :svg="IconPermMediaOutline" :size="20" inline />
</template>
<SharedItemsTab :active="activeTab === 'shared-items'" @update:state="handleUpdateState" />
<SharedItemsTab
:active="activeTab === 'shared-items'"
@show-threads-tab="handleUpdateState('threads')" />
</NcAppSidebarTab>
</template>
</NcAppSidebar>
Expand Down
4 changes: 2 additions & 2 deletions src/components/RightSidebar/RightSidebarContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ const props = defineProps<{
}>()

const emit = defineEmits<{
(event: 'update:state', value: SidebarContentState): void
(event: 'update:mode', value: 'compact' | 'preview' | 'full'): void
'update:state': [value: SidebarContentState]
'update:mode': [value: 'compact' | 'preview' | 'full']
}>()

const supportsAvatar = hasTalkFeature('local', 'avatar')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ import CancelableRequest from '../../../utils/cancelableRequest.js'
const props = defineProps<{
isActive: boolean
}>()

const emit = defineEmits<{
(event: 'close'): void
close: []
}>()

const searchMessagesTab = ref<HTMLElement | null>(null)
Expand Down
4 changes: 2 additions & 2 deletions src/components/RightSidebar/SharedItems/SharedItemsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const props = defineProps<{
}>()

const emit = defineEmits<{
(event: 'update:state', value: 'threads'): void
showThreadsTab: []
}>()

const token = useGetToken()
Expand Down Expand Up @@ -135,7 +135,7 @@ function openPollDraftHandler() {
v-if="hasMoreThreads"
variant="tertiary"
class="shared-items-tab__more-button shared-items-tab__more-button--threads"
@click="emit('update:state', 'threads')">
@click="emit('showThreadsTab')">
<template #icon>
<IconDotsHorizontal :size="24" />
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/components/RightSidebar/Threads/ThreadsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { EventBus } from '../../../services/EventBus.ts'
import { useChatExtrasStore } from '../../../stores/chatExtras.ts'

const emit = defineEmits<{
(event: 'close'): void
close: []
}>()

const chatExtrasStore = useChatExtrasStore()
Expand Down
2 changes: 1 addition & 1 deletion src/components/UIShared/ConfirmDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const props = defineProps<NcDialogProps & {
}>()

const emit = defineEmits<{
(event: 'close', value?: unknown): void
close: [value?: unknown]
}>()

const inputValue = ref(props.inputProps?.value ?? '')
Expand Down
13 changes: 8 additions & 5 deletions src/components/UIShared/ContactSelectionBubble.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->

<script setup lang="ts">
<script setup lang="ts" generic="T extends Participant | ParticipantSearchResult">
import type { Ref } from 'vue'
import type { Participant, ParticipantSearchResult } from '../../types/index.ts'

Expand All @@ -14,12 +14,15 @@ import AvatarWrapper from '../AvatarWrapper/AvatarWrapper.vue'
import { AVATAR } from '../../constants.ts'

const props = defineProps<{
participant: Participant | ParticipantSearchResult
participant: T
}>()
const emit = defineEmits(['update'])

// Defines list of locked participants (can not be removed manually
const lockedParticipants = inject<Ref<(Participant | ParticipantSearchResult)[]>>('lockedParticipants', ref([]))
const emit = defineEmits<{
update: [participant: T]
}>()

// Defines list of locked participants (can not be removed manually)
const lockedParticipants = inject<Ref<T[]>>('lockedParticipants', ref([]))

const isLocked = computed(() => lockedParticipants.value.some((item) => {
if ('actorId' in props.participant) {
Expand Down