зеркало из https://github.com/nextcloud/spreed.git
Detect guests app in listable settings dialog
Expose whether the guests app (guests accounts) are enabled in initial state. Hide the guests checkbox if the app is disabled. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
This commit is contained in:
Родитель
7b3760356d
Коммит
8f79234c42
|
@ -87,6 +87,11 @@ trait TInitialState {
|
|||
$appManager->isEnabledForUser('circles', $user)
|
||||
);
|
||||
|
||||
$this->initialStateService->provideInitialState(
|
||||
'talk', 'guests_accounts_enabled',
|
||||
$appManager->isEnabledForUser('guests', $user)
|
||||
);
|
||||
|
||||
$this->initialStateService->provideInitialState(
|
||||
'talk', 'read_status_privacy',
|
||||
$this->talkConfig->getUserReadPrivacy($user->getUID())
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<div id="moderation_settings_listable_conversation_hint" class="app-settings-section__hint">
|
||||
{{ t('spreed', 'This conversation will be shown in search results') }}
|
||||
</div>
|
||||
<div v-if="listable !== LISTABLE.NONE && isGuestAppEnabled">
|
||||
<div v-if="listable !== LISTABLE.NONE && isGuestsAccountsEnabled">
|
||||
<input id="listable_settings_guestapp_users_checkbox"
|
||||
type="checkbox"
|
||||
class="checkbox"
|
||||
|
@ -53,6 +53,7 @@
|
|||
<script>
|
||||
import { showError, showSuccess } from '@nextcloud/dialogs'
|
||||
import { CONVERSATION } from '../../constants'
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
|
||||
export default {
|
||||
name: 'ListableSettings',
|
||||
|
@ -74,6 +75,7 @@ export default {
|
|||
listable: null,
|
||||
isListableLoading: false,
|
||||
lastNotification: null,
|
||||
isGuestsAccountsEnabled: loadState('talk', 'guests_accounts_enabled'),
|
||||
LISTABLE: CONVERSATION.LISTABLE,
|
||||
}
|
||||
},
|
||||
|
@ -82,11 +84,6 @@ export default {
|
|||
conversation() {
|
||||
return this.$store.getters.conversation(this.token) || this.$store.getters.dummyConversation
|
||||
},
|
||||
|
||||
isGuestAppEnabled() {
|
||||
// TODO: how ?
|
||||
return true
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
|
Загрузка…
Ссылка в новой задаче