зеркало из https://github.com/nextcloud/spreed.git
Remove unnecessary template element
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
This commit is contained in:
Родитель
f3475c2d13
Коммит
eee7fa16a1
|
@ -21,6 +21,7 @@
|
|||
|
||||
<template>
|
||||
<div class="set-contacts">
|
||||
<!-- Search -->
|
||||
<div class="icon-search" />
|
||||
<input
|
||||
ref="setContacts"
|
||||
|
@ -30,21 +31,21 @@
|
|||
type="text"
|
||||
:placeholder="t('spreed', 'Search participants')"
|
||||
@input="handleInput">
|
||||
<template>
|
||||
<Caption v-if="contactsLoading"
|
||||
:title="t('spreed', 'Loading contacts')" />
|
||||
<Caption v-if="!contactsLoading"
|
||||
:title="t('spreed', 'Select participants')" />
|
||||
<ParticipantsList
|
||||
:add-on-click="false"
|
||||
height="200px"
|
||||
:loading="contactsLoading"
|
||||
:no-results="noResults"
|
||||
:items="searchResults"
|
||||
:display-search-hint="!contactsLoading"
|
||||
@updateSelectedParticipants="handleUpdateSelectedParticipants"
|
||||
@clickSearchHint="focusInput" />
|
||||
</template>
|
||||
<!-- Loading state -->
|
||||
<Caption v-if="contactsLoading"
|
||||
:title="t('spreed', 'Loading contacts')" />
|
||||
<!-- List of possilbe participants -->
|
||||
<Caption v-if="!contactsLoading"
|
||||
:title="t('spreed', 'Select participants')" />
|
||||
<ParticipantsList
|
||||
:add-on-click="false"
|
||||
height="200px"
|
||||
:loading="contactsLoading"
|
||||
:no-results="noResults"
|
||||
:items="searchResults"
|
||||
:display-search-hint="!contactsLoading"
|
||||
@updateSelectedParticipants="handleUpdateSelectedParticipants"
|
||||
@clickSearchHint="focusInput" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -113,7 +114,10 @@ export default {
|
|||
OCP.Toast.error(t('spreed', 'An error occurred while performing the search'))
|
||||
}
|
||||
},
|
||||
// Forward the event from the children to the parent
|
||||
/**
|
||||
* Forward the event from the children to the parent with thenew selected participants
|
||||
* @param {array} selectedParticipants the selected participants array
|
||||
*/
|
||||
handleUpdateSelectedParticipants(selectedParticipants) {
|
||||
this.$emit('updateSelectedParticipants', selectedParticipants)
|
||||
},
|
||||
|
@ -125,7 +129,7 @@ export default {
|
|||
},
|
||||
focusInput() {
|
||||
this.$refs.setContacts.focus()
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -137,6 +141,7 @@ export default {
|
|||
width: 100%;
|
||||
font-size: 16px;
|
||||
padding-left: 28px;
|
||||
line-height: 34px;
|
||||
}
|
||||
&__icon {
|
||||
margin-top: 40px;
|
||||
|
|
|
@ -64,5 +64,7 @@ export default {
|
|||
.conversation-name {
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
line-height: 34px;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -203,7 +203,7 @@ export default {
|
|||
},
|
||||
handleClickHint() {
|
||||
this.$emit('clickSearchHint')
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче