Skip to content

Commit 7bbfef5

Browse files
committed
remove form header title blink animation, use the copy button in text output fields to show the user we are streaming
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 parent 8a9ae4d commit 7bbfef5

2 files changed

Lines changed: 10 additions & 22 deletions

File tree

src/components/AssistantTextProcessingForm.vue

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -889,14 +889,6 @@ export default {
889889
flex-wrap: wrap;
890890
width: 100%;
891891
padding: 4px 0 4px 10px;
892-
> label {
893-
animation: blink 2s infinite;
894-
}
895-
@media (prefers-reduced-motion: reduce) {
896-
> label {
897-
animation: none;
898-
}
899-
}
900892
}
901893
902894
&__provider {
@@ -945,18 +937,6 @@ export default {
945937
min-height: 0;
946938
}
947939
}
948-
949-
@keyframes blink {
950-
0% {
951-
opacity: 1;
952-
}
953-
50% {
954-
opacity: 0;
955-
}
956-
100% {
957-
opacity: 1;
958-
}
959-
}
960940
</style>
961941
962942
<style lang="scss">

src/components/fields/TextInput.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,16 @@
2828
:title="t('assistant', 'Copy output')"
2929
@click="onCopy">
3030
<template #icon>
31-
<ClipboardCheckOutlineIcon v-if="copied" />
31+
<NcLoadingIcon v-if="streaming()" />
32+
<ClipboardCheckOutlineIcon v-else-if="copied" />
3233
<ContentCopyIcon v-else />
3334
</template>
34-
{{ t('assistant', 'Copy') }}
35+
<span v-if="streaming()">
36+
{{ t('assistant', 'Getting results...') }}
37+
</span>
38+
<span v-else>
39+
{{ t('assistant', 'Copy') }}
40+
</span>
3541
</NcButton>
3642
<NcButton v-if="!isOutput && !hasValue && showChooseButton"
3743
class="choose-file-button"
@@ -52,6 +58,7 @@ import ContentCopyIcon from 'vue-material-design-icons/ContentCopy.vue'
5258
5359
import NcButton from '@nextcloud/vue/components/NcButton'
5460
import NcRichContenteditable from '@nextcloud/vue/components/NcRichContenteditable'
61+
import { NcLoadingIcon } from '@nextcloud/vue'
5562
5663
import isMobile from '../../mixins/isMobile.js'
5764
@@ -78,6 +85,7 @@ export default {
7885
components: {
7986
NcRichContenteditable,
8087
NcButton,
88+
NcLoadingIcon,
8189
FileDocumentOutlineIcon,
8290
ClipboardCheckOutlineIcon,
8391
ContentCopyIcon,

0 commit comments

Comments
 (0)