Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLOWS-228] Fix: ChatGPT modal height #351

Merged
merged 4 commits into from
Dec 1, 2023
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
55 changes: 37 additions & 18 deletions src/components/config/external/chatgpt/Setup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
@close="closePopUp"
@click.stop
:closeIcon="false"
:text="$t('ChatGPT.setup.title')"
:description="$t('ChatGPT.setup.description')"
>
<div slot="message" class="chatgpt-modal__content">
<span class="chatgpt-modal__content__title">{{ $t('ChatGPT.setup.title') }}</span>
<span class="chatgpt-modal__content__description">{{ $t('ChatGPT.setup.description') }}</span>

<div class="chatgpt-modal__content__form">
<unnnic-input
class="chatgpt-modal__content__form__input__name"
Expand Down Expand Up @@ -152,27 +151,37 @@

<style lang="scss" scoped>
.chatgpt-modal {
::v-deep .unnnic-modal-container-background-body-description {
padding-bottom: $unnnic-spacing-stack-xs;
}
::v-deep {
.container {
padding: $unnnic-squish-md !important;
}

&__content {
display: flex;
flex-direction: column;
.header {
margin-bottom: $unnnic-spacing-stack-nano !important;
}

&__title {
font-family: $unnnic-font-family-secondary;
color: $unnnic-color-neutral-darkest;
font-weight: $unnnic-font-weight-black;
font-size: $unnnic-font-size-title-sm;
line-height: ($unnnic-font-size-title-sm + $unnnic-line-height-medium);
padding: $unnnic-spacing-stack-md 0;
.unnnic-modal-container-background {
display: flex;
flex-direction: column;
overflow: hidden;
padding: 0 $unnnic-spacing-md;
max-height: 95vh;
}

&__description {
margin-bottom: $unnnic-spacing-stack-lg;
.unnnic-modal-container-background-body {
border-radius: $unnnic-border-radius-sm $unnnic-border-radius-sm 0px 0px;
}

.unnnic-modal-container-background-body-description-container {
padding-bottom: $unnnic-spacing-md;
}
}

&__content {
display: flex;
flex-direction: column;
overflow: auto;

&__form {
display: flex;
flex-direction: column;
Expand All @@ -194,5 +203,15 @@
}
}
}

&__buttons {
display: flex;
flex: 1;
margin-top: $unnnic-spacing-md;

* {
flex: 1;
}
}
}
</style>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`components/config/external/chatgpt/Setup.vue should be rendered properly 1`] = `
<unnnicmodal-stub showmodal="true" class="chatgpt-modal">
<div class="chatgpt-modal__content"><span class="chatgpt-modal__content__title">Integrate with ChatGPT</span> <span class="chatgpt-modal__content__description">To integrate, create a name, insert your API-Token and select one of the available versions</span>
<unnnicmodal-stub text="Integrate with ChatGPT" description="To integrate, create a name, insert your API-Token and select one of the available versions" showmodal="true" class="chatgpt-modal">
<div class="chatgpt-modal__content">
<div class="chatgpt-modal__content__form">
<unnnic-input-stub placeholder="Insert a name" type="normal" value="" nativetype="text" label="Name" size="md" mask="" class="chatgpt-modal__content__form__input__name"></unnnic-input-stub>
<unnnic-input-stub placeholder="Insert the Token" type="normal" value="" nativetype="text" label="Token" size="md" mask="" class="chatgpt-modal__content__form__input__token"></unnnic-input-stub>
Expand Down
Loading