Skip to content

Commit

Permalink
change style of number field, remove task type name+desc, add title t…
Browse files Browse the repository at this point in the history
…o task type button in the selector

Signed-off-by: Julien Veyssier <[email protected]>
  • Loading branch information
julien-nc committed Jul 4, 2024
1 parent 088049e commit 0303112
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
9 changes: 3 additions & 6 deletions src/components/AssistantTextProcessingForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
@load-task="onHistoryLoadTask" />
</div>
<div v-else class="task-input-output-form">
<h2 v-if="selectedTaskType"
<!--h2 v-if="selectedTaskType"
class="task-name">
{{ selectedTaskType.name }}
</h2>
<span v-if="selectedTaskType"
class="task-description">
{{ selectedTaskType.description }}
</span>
</span-->
<AssistantFormInputs v-if="selectedTaskType"
:inputs.sync="myInputs"
:selected-task-type="selectedTaskType" />
Expand Down Expand Up @@ -90,7 +90,7 @@
<div class="footer--action-buttons">
<NcButton
v-if="showSubmit"
:type="submitButtonType"
type="primary"
class="submit-button"
:disabled="!canSubmit"
:title="syncSubmitButtonTitle"
Expand Down Expand Up @@ -224,9 +224,6 @@ export default {
: 0
})
},
submitButtonType() {
return this.hasOutput ? 'secondary' : 'primary'
},
showSubmit() {
return this.selectedTaskType
},
Expand Down
1 change: 1 addition & 0 deletions src/components/TaskTypeSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<NcButton v-for="(t, i) in buttonTypes"
:key="i + t.id"
:type="getButtonType(t)"
:title="t.description"
@click="onTaskSelected(t)">
{{ t.name }}
</NcButton>
Expand Down
16 changes: 3 additions & 13 deletions src/components/fields/NumberField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,21 @@
class="number-input-field"
:value="value ?? ''"
:label="field.name"
:title="field.description"
type="number"
:placeholder="t('assistant','Type some number')"
:placeholder="field.description || t('assistant','Type some number')"
@update:value="onUpdateValue" />
<NcButton type="tertiary"
:title="field.description">
<template #icon>
<HelpCircleIcon />
</template>
</NcButton>
</div>
</template>

<script>
import HelpCircleIcon from 'vue-material-design-icons/HelpCircle.vue'
import NcInputField from '@nextcloud/vue/dist/Components/NcInputField.js'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
export default {
name: 'NumberField',
components: {
NcInputField,
NcButton,
HelpCircleIcon,
},
props: {
Expand Down Expand Up @@ -84,7 +74,7 @@ export default {
align-items: end;
.number-input-field {
width: 200px;
width: 300px;
}
}
</style>

0 comments on commit 0303112

Please sign in to comment.