Skip to content

Commit

Permalink
Style fixes and conditions adjusting
Browse files Browse the repository at this point in the history
Signed-off-by: DorraJaouad <dorra.jaoued7@gmail.com>
  • Loading branch information
DorraJaouad committed Oct 6, 2023
1 parent 8aea99d commit 7d6bb30
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,27 +123,27 @@
@close="closeModal">
<NcEmptyContent>
<template #icon>
<Check v-if="!error && success && isPublic" :size="64" />
<div v-if="isLoading && !error && !success" class="icon-loading spinner" />
<AlertCircle v-if="error" :size="64" />
<LoadingComponent v-if="isLoading" />
<AlertCircle v-else-if="error" :size="64" />
<Check v-else-if="success && isPublic" :size="64" />
</template>

<template #description>
<p v-if="isLoading && !error && !success" class="confirmation__warning">
<p v-if="isLoading">
{{ t('spreed', 'Creating the conversation …') }}
</p>
<p v-if="!error && success && isPublic" class="confirmation__warning">
{{ t('spreed', 'All set, the conversation "{conversationName}" was created.', { conversationName }) }}
</p>
<p v-if="error" class="confirmation__warning">
<p v-else-if="error">
{{ t('spreed', 'Error while creating the conversation') }}
</p>
<p v-else-if="success && isPublic">
{{ t('spreed', 'All set, the conversation "{conversationName}" was created.', { conversationName }) }}
</p>
</template>

<template #action>
<NcButton v-if="error || isPublic"
<NcButton v-if="(error || isPublic) && !isLoading"
ref="closeButton"
type="primary"
type="tertiary"
@click="closeModal">
{{ t('spreed', 'Close') }}
</NcButton>
Expand All @@ -169,13 +169,14 @@ import AlertCircle from 'vue-material-design-icons/AlertCircle.vue'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
import NcEmptyContent from '@nextcloud/vue/dist/Components/NcEmptyContent.js'
import NcModal from '@nextcloud/vue/dist/Components/NcModal.js'
import NcPasswordField from '@nextcloud/vue/dist/Components/NcPasswordField.js'
import NcTextField from '@nextcloud/vue/dist/Components/NcTextField.js'
import ConversationAvatarEditor from '../../ConversationSettings/ConversationAvatarEditor.vue'
import ListableSettings from '../../ConversationSettings/ListableSettings.vue'
import NcEmptyContent from '@nextcloud/vue/dist/Components/NcEmptyContent.js'
import LoadingComponent from '../../LoadingComponent.vue'
import SetContacts from './SetContacts/SetContacts.vue'
import { useIsInCall } from '../../../composables/useIsInCall.js'
Expand Down Expand Up @@ -207,6 +208,7 @@ export default {
components: {
ConversationAvatarEditor,
ListableSettings,
LoadingComponent,
NcButton,
NcCheckboxRadioSwitch,
NcEmptyContent,
Expand Down Expand Up @@ -271,9 +273,6 @@ export default {
selectedParticipants() {
return this.$store.getters.selectedParticipants
},
getSize() {
return this.page === 2 ? '' : 'normal'
}
},
watch: {
Expand Down Expand Up @@ -403,6 +402,7 @@ export default {
}
this.success = true
this.isLoading = false
if (!this.isInCall) {
// Push the newly created conversation's route.
Expand Down Expand Up @@ -479,21 +479,6 @@ export default {
<style lang="scss" scoped>
.confirmation {
&__icon {
padding-top: 80px;
}
&__warning {
margin-top: 10px;
text-align: center;
}
&__copy-link {
margin: 50px auto 0 auto;
}
}
.new-group-conversation {
&__header {
flex-shrink: 0;
Expand Down Expand Up @@ -538,13 +523,11 @@ export default {
margin-left: auto;
}
}
.conversation-form{
:deep(.modal-wrapper .modal-container) {
.conversation-form :deep(.modal-wrapper .modal-container) {
display: flex !important;
flex-direction: column;
height: 90%;
overflow: hidden !important;
}
}
:deep(.app-settings-section__hint) {
Expand All @@ -558,6 +541,10 @@ export default {
}
}
:deep(.empty-content) {
padding: 20px;
}
:deep(.empty-content__action) {
gap: 10px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ export default {
selectedConversationToken: null,
showForwardedConfirmation: false,
forwardedMessageID: '',
error: false,
}
},
Expand Down Expand Up @@ -156,6 +155,9 @@ export default {
<style lang="scss" scoped>
:deep(.empty-content) {
padding: 20px;
}
:deep(.empty-content__action) {
gap: 10px;
}
Expand Down

0 comments on commit 7d6bb30

Please sign in to comment.