|
80 | 80 | display: flex;
|
81 | 81 | flex-direction: column;
|
82 | 82 | position: relative;
|
83 |
| - margin-bottom: 122px; |
| 83 | + } |
| 84 | + |
| 85 | + .fill-area { |
| 86 | + height: 10px |
84 | 87 | }
|
85 | 88 |
|
86 | 89 | .dialog-card {
|
|
96 | 99 |
|
97 | 100 | .input-config {
|
98 | 101 | width: auto;
|
99 |
| - position: absolute; |
| 102 | + position: fixed; |
100 | 103 | margin-left: 19px;
|
101 | 104 | bottom: 0;
|
102 | 105 | border-radius: 20px;
|
|
130 | 133 | margin-bottom: 1px;
|
131 | 134 | }
|
132 | 135 |
|
133 |
| - .input-fab { |
134 |
| - margin: 0 10px 37px 10px; |
135 |
| - /* top left bot right*/ |
136 |
| - } |
137 |
| - |
138 | 136 | .input-icon {
|
139 |
| - margin-bottom: 30px; |
140 |
| - margin-right: 20px; |
| 137 | + margin: 0 10px 34px 10px; |
| 138 | + /* top left bot right*/ |
141 | 139 | }
|
142 | 140 | }
|
143 | 141 |
|
144 | 142 | .chat-images {
|
145 |
| - width: 30px; |
| 143 | + width: 25px; |
146 | 144 | max-height: 40px;
|
147 | 145 | transition: all 0.2s;
|
148 | 146 | /* margin-bottom: 20px; */
|
|
309 | 307 | </v-row>
|
310 | 308 | </v-col>
|
311 | 309 |
|
312 |
| - <v-sheet elevation="0" class="input-panel d-flex align-end px-1"> |
313 | 310 |
|
314 |
| - <v-textarea class="input-box" dirty color="primary" type="text" variant="solo" counter |
315 |
| - @keydown="messageStore.handleKeydown" v-model="messageStore.userMessage" :label="" |
316 |
| - @focus="settingStore.setInputRow(3,0)" @blur="settingStore.setInputRow(1,150)" |
317 |
| - :rows="settingStore.inputRow" auto-grow max-rows="15"> |
318 |
| - <template v-slot:prepend-inner> |
319 |
| - <v-img v-show=messageStore.base64 class="chat-images" :src="messageStore.base64" |
320 |
| - @click="messageStore.images=[]"></v-img> |
321 |
| - </template> |
322 |
| - </v-textarea> |
323 | 311 |
|
324 |
| - <div class="input-fab"> |
325 |
| - <v-file-input accept="image/*" hide-input v-model="messageStore.images"></v-file-input> |
326 |
| - </div> |
| 312 | + <v-sheet elevation="0" class="input-panel d-flex align-end px-1"> |
| 313 | + <v-container> |
| 314 | + <v-row> |
| 315 | + <v-spacer></v-spacer> |
| 316 | + <v-div class='ma-1'> |
| 317 | + <v-file-input accept="image/*" hide-input v-model="messageStore.images" |
| 318 | + prepend-icon="mdi-plus-circle-outline"></v-file-input> |
| 319 | + </v-div> |
| 320 | + <v-btn class='ma-1' size="21" icon="$error" @click="messageStore.clear()"> |
| 321 | + </v-btn> |
| 322 | + </v-row> |
| 323 | + <v-row> |
| 324 | + <v-textarea class="input-box" dirty color="primary" type="text" variant="solo" counter |
| 325 | + @keydown="messageStore.handleKeydown" v-model="messageStore.userMessage" :label="" |
| 326 | + @focus="settingStore.setInputRow(2,0)" @blur="settingStore.setInputRow(1,150)" |
| 327 | + :rows="settingStore.inputRow" auto-grow max-rows="15"> |
| 328 | + <template v-slot:prepend-inner> |
| 329 | + <v-img v-show=messageStore.base64 class="chat-images" :src="messageStore.base64" |
| 330 | + @click="messageStore.images=[]"></v-img> |
| 331 | + </template> |
| 332 | + </v-textarea> |
| 333 | + </v-row> |
| 334 | + </v-container> |
327 | 335 | <div class="input-icon">
|
328 | 336 | <v-btn v-if="messageStore.userMessage" size="small" color="primary" variant="elevated"
|
329 | 337 | @click="messageStore.sendMessage" icon="mdi-arrow-up">
|
|
334 | 342 | variant="elevated" @click="messageStore.resendMessage" icon="mdi-autorenew"></v-btn>
|
335 | 343 | <v-btn v-else size="small" color="grey" variant="elevated" icon="mdi-arrow-up">
|
336 | 344 | </v-btn>
|
337 |
| - </div> |
338 |
| - |
339 | 345 |
|
| 346 | + </div> |
340 | 347 | </v-sheet>
|
341 |
| - |
342 | 348 | </div>
|
343 | 349 |
|
344 | 350 | <!-- snackbar -->
|
@@ -1046,6 +1052,10 @@ <h5 class="font-weight-bold">{{ column.key }}</h5>
|
1046 | 1052 | snackbarStore.showSuccessMessage("Added new session.")
|
1047 | 1053 | }
|
1048 | 1054 | },
|
| 1055 | + clear() { |
| 1056 | + this.userMessage = ""; |
| 1057 | + this.images = []; |
| 1058 | + }, |
1049 | 1059 | handleKeydown(e) {
|
1050 | 1060 | if (e.key === "Enter" && (e.altKey || e.shiftKey || e.ctrlKey)) {
|
1051 | 1061 | // Alt/Shift + Enter, insert a \n
|
@@ -1099,9 +1109,7 @@ <h5 class="font-weight-bold">{{ column.key }}</h5>
|
1099 | 1109 | }
|
1100 | 1110 | },
|
1101 | 1111 | startInference: async function () {
|
1102 |
| - this.userMessage = ""; |
1103 |
| - this.images = []; |
1104 |
| - |
| 1112 | + this.clear(); |
1105 | 1113 | // Clear the input
|
1106 | 1114 | // Create a completion
|
1107 | 1115 | if (this.conversation.length == 1) {
|
|
0 commit comments