зеркало из https://github.com/nextcloud/spreed.git
Read-only conversation tweaks
Moved isConversationReadOnly condition on the reply action button instead of affecting all possible (future) actions. Now using `showError` instead of the global OC notification, the displayed border now has the correct color. Renamed "room" to "conversation" in the error message. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
This commit is contained in:
Родитель
03128181d1
Коммит
cbb16c00a5
|
@ -59,7 +59,7 @@ the main body of the message as well as a quote.
|
|||
{{ messageTime }}
|
||||
</h6>
|
||||
<Actions
|
||||
v-show="showActions && hasActions && !isConversationReadOnly"
|
||||
v-show="showActions && hasActions"
|
||||
class="message__main__right__actions">
|
||||
<ActionButton
|
||||
v-if="isReplyable"
|
||||
|
@ -217,7 +217,7 @@ export default {
|
|||
|
||||
computed: {
|
||||
hasActions() {
|
||||
return this.isReplyable
|
||||
return this.isReplyable && !this.isConversationReadOnly
|
||||
},
|
||||
|
||||
isConversationReadOnly() {
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
|
||||
<script>
|
||||
import AdvancedInput from './AdvancedInput/AdvancedInput'
|
||||
import { getFilePickerBuilder } from '@nextcloud/dialogs'
|
||||
import { getFilePickerBuilder, showError } from '@nextcloud/dialogs'
|
||||
import { postNewMessage } from '../../services/messagesService'
|
||||
import Quote from '../Quote'
|
||||
import Actions from '@nextcloud/vue/dist/Components/Actions'
|
||||
|
@ -277,15 +277,9 @@ export default {
|
|||
}
|
||||
// 403 when room is read-only, 412 when switched to lobby mode
|
||||
if (statusCode === 403 || statusCode === 412) {
|
||||
OC.Notification.show(
|
||||
t('spreed', 'No permission to post messages in this room'),
|
||||
{ type: 'error' }
|
||||
)
|
||||
showError(t('spreed', 'No permission to post messages in this conversation'))
|
||||
} else {
|
||||
OC.Notification.show(
|
||||
t('spreed', 'Could not post message: {errorMessage}', { errorMessage: error.message || error }),
|
||||
{ type: 'error' }
|
||||
)
|
||||
showError(t('spreed', 'Could not post message: {errorMessage}', { errorMessage: error.message || error }))
|
||||
}
|
||||
|
||||
// restore message to allow re-sending
|
||||
|
|
Загрузка…
Ссылка в новой задаче