Skip to content

Commit 4ba1b98

Browse files
authored
Merge pull request #181 from nextcloud/fix/noid/settings-style
Fix h2 and checkbox info style in the admin settings
2 parents f21c912 + a9a57fe commit 4ba1b98

File tree

1 file changed

+48
-52
lines changed

1 file changed

+48
-52
lines changed

src/components/AdminSettings.vue

Lines changed: 48 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -19,68 +19,68 @@
1919
@update:checked="onCheckboxChanged($event, 'assistant_enabled')">
2020
<div class="checkbox-text">
2121
{{ t('assistant', 'Top-right assistant') }}
22-
<div v-if="!state.text_processing_available" class="checkbox-text">
23-
<InformationOutlineIcon class="icon" />
24-
<span>
25-
{{ t('assistant', 'To be able to use this feature, please install at least one AI text processing provider.') }}
26-
</span>
27-
</div>
2822
</div>
2923
</NcCheckboxRadioSwitch>
24+
<NcNoteCard v-if="!state.text_processing_available" type="info">
25+
{{ t('assistant', 'To be able to use this feature, please install at least one AI task processing provider.') }}
26+
</NcNoteCard>
3027
<NcCheckboxRadioSwitch
3128
:checked="state.free_prompt_picker_enabled"
3229
:disabled="!state.free_prompt_task_type_available"
3330
@update:checked="onCheckboxChanged($event, 'free_prompt_picker_enabled')">
3431
<div class="checkbox-text">
3532
{{ t('assistant', 'AI text generation smart picker') }}
36-
<div v-if="!state.free_prompt_task_type_available" class="checkbox-text">
37-
<InformationOutlineIcon class="icon" />
38-
<span>
39-
{{ t('assistant', 'To enable this feature, please install an AI text processing provider for the free prompt task type:') }}
40-
</span>
41-
<ul>
42-
<li><a href="https://github.com/nextcloud/llm2#readme">Local Large language model app</a></li>
43-
<li><a href="https://apps.nextcloud.com/apps/integration_openai">OpenAI/LocalAI Integration</a></li>
44-
</ul>
45-
</div>
4633
</div>
4734
</NcCheckboxRadioSwitch>
35+
<NcNoteCard v-if="!state.free_prompt_task_type_available" type="info">
36+
<div class="checkbox-text">
37+
<span>
38+
{{ t('assistant', 'To enable this feature, please install an AI task processing provider for the free prompt task type:') }}
39+
</span>
40+
<ul>
41+
<li><a href="https://github.com/nextcloud/llm2#readme">Local Large language model app</a></li>
42+
<li><a href="https://apps.nextcloud.com/apps/integration_openai">OpenAI/LocalAI Integration</a></li>
43+
</ul>
44+
</div>
45+
</NcNoteCard>
4846
<NcCheckboxRadioSwitch
4947
:checked="state.text_to_image_picker_enabled"
5048
:disabled="!state.text_to_image_picker_available"
5149
@update:checked="onCheckboxChanged($event, 'text_to_image_picker_enabled')">
5250
<div class="checkbox-text">
5351
{{ t('assistant', 'Text-to-image smart picker') }}
54-
<div v-if="!state.text_to_image_picker_available" class="checkbox-text">
55-
<InformationOutlineIcon class="icon" />
56-
<span>
57-
{{ t('assistant', 'To enable this feature, please install a text-to-image provider:') }}
58-
</span>
59-
<ul>
60-
<li><a href="https://github.com/nextcloud/text2image_stablediffusion#readme">Local Text-To-Image StableDiffusion</a></li>
61-
<li><a href="https://apps.nextcloud.com/apps/integration_openai">OpenAI/LocalAI Integration</a></li>
62-
</ul>
63-
</div>
6452
</div>
6553
</NcCheckboxRadioSwitch>
54+
<NcNoteCard v-if="!state.text_to_image_picker_available" type="info">
55+
<div class="checkbox-text">
56+
<span>
57+
{{ t('assistant', 'To enable this feature, please install a text-to-image provider:') }}
58+
</span>
59+
<ul>
60+
<li><a href="https://github.com/nextcloud/text2image_stablediffusion#readme">Local Text-To-Image StableDiffusion</a></li>
61+
<li><a href="https://apps.nextcloud.com/apps/integration_openai">OpenAI/LocalAI Integration</a></li>
62+
</ul>
63+
</div>
64+
</NcNoteCard>
6665
<NcCheckboxRadioSwitch
6766
:checked="state.speech_to_text_picker_enabled"
6867
:disabled="!state.speech_to_text_picker_available"
6968
@update:checked="onCheckboxChanged($event, 'speech_to_text_picker_enabled')">
7069
<div class="checkbox-text">
7170
{{ t('assistant', 'Speech-to-text smart picker') }}
72-
<div v-if="!state.speech_to_text_picker_available" class="checkbox-text">
73-
<InformationOutlineIcon class="icon" />
74-
<span>
75-
{{ t('assistant', 'To enable this feature, please install a speech-to-text provider:') }}
76-
</span>
77-
<ul>
78-
<li><a href="https://github.com/nextcloud/stt_whisper2#readme">Local Speech-To-Text Whisper</a></li>
79-
<li><a href="https://apps.nextcloud.com/apps/integration_openai">OpenAI/LocalAI Integration</a></li>
80-
</ul>
81-
</div>
8271
</div>
8372
</NcCheckboxRadioSwitch>
73+
<NcNoteCard v-if="!state.speech_to_text_picker_available" type="info">
74+
<div class="checkbox-text">
75+
<span>
76+
{{ t('assistant', 'To enable this feature, please install a speech-to-text provider:') }}
77+
</span>
78+
<ul>
79+
<li><a href="https://github.com/nextcloud/stt_whisper2#readme">Local Speech-To-Text Whisper</a></li>
80+
<li><a href="https://apps.nextcloud.com/apps/integration_openai">OpenAI/LocalAI Integration</a></li>
81+
</ul>
82+
</div>
83+
</NcNoteCard>
8484
</div>
8585
<div class="chat-with-ai">
8686
<h2>
@@ -145,7 +145,6 @@
145145
</template>
146146

147147
<script>
148-
import InformationOutlineIcon from 'vue-material-design-icons/InformationOutline.vue'
149148
import AssistantIcon from './icons/AssistantIcon.vue'
150149
151150
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
@@ -169,7 +168,6 @@ export default {
169168
NcNoteCard,
170169
NcRichContenteditable,
171170
NcTextField,
172-
InformationOutlineIcon,
173171
},
174172
175173
data() {
@@ -224,7 +222,6 @@ export default {
224222
225223
<style scoped lang="scss">
226224
#assistant_prefs {
227-
h2,
228225
.line,
229226
.settings-hint {
230227
display: flex;
@@ -237,16 +234,15 @@ export default {
237234
238235
.checkbox-text {
239236
display: flex;
240-
flex-direction: row;
241-
242-
.icon {
243-
margin-right: 8px;
244-
margin-left: 24px;
245-
}
237+
flex-direction: column;
246238
}
247239
248-
h2 .icon {
249-
margin-right: 8px;
240+
h2 {
241+
justify-content: start;
242+
display: flex;
243+
align-items: center;
244+
gap: 8px;
245+
margin-top: 8px;
250246
}
251247
252248
.line {
@@ -264,6 +260,11 @@ export default {
264260
}
265261
}
266262
263+
.notecard,
264+
.text-field {
265+
max-width: 900px;
266+
}
267+
267268
.chat-with-ai {
268269
display: flex;
269270
flex-direction: column;
@@ -272,11 +273,6 @@ export default {
272273
width: 900px !important;
273274
font-weight: bold;
274275
}
275-
276-
.notecard,
277-
.text-field {
278-
max-width: 900px;
279-
}
280276
}
281277
}
282278
</style>

0 commit comments

Comments
 (0)