@olares/lares-mobile 0.15.20 → 0.15.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/App.vue +1 -5
- package/src/chat/Composer.vue +34 -0
- package/src/desktop/DesktopComposer.vue +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olares/lares-mobile",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.22",
|
|
4
4
|
"description": "Lares chat component for LarePass",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"vue": "^3.2.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@olares/lares-core": "0.15.
|
|
31
|
+
"@olares/lares-core": "0.15.22",
|
|
32
32
|
"markdown-it": "^14.3.0"
|
|
33
33
|
}
|
|
34
34
|
}
|
package/src/App.vue
CHANGED
|
@@ -102,10 +102,6 @@
|
|
|
102
102
|
@pick-command="pickCommand"
|
|
103
103
|
@toggle-speak="toggleSpeak"
|
|
104
104
|
/>
|
|
105
|
-
<div v-if="voicePanelState?.readAloudError" class="lares-speak-notice" role="alert">
|
|
106
|
-
{{ voiceReadAloudError }}
|
|
107
|
-
<button type="button" @click="voicePanel.retryReadAloud()">{{ t('dictation.retry') }}</button>
|
|
108
|
-
</div>
|
|
109
105
|
<LaresVoicePanel v-if="voicePanelState" :view="voicePanelState" :t="t"
|
|
110
106
|
@close="runVoicePanel('close')" @edit="voicePanel.edit($event)" @preset="voicePanel.selectPreset($event, true).catch(() => {})"
|
|
111
107
|
@complete="runVoicePanel('complete')" @discard="runVoicePanel('discard')" />
|
|
@@ -534,7 +530,6 @@ export default {
|
|
|
534
530
|
modelBlocked() {
|
|
535
531
|
return !modelState(this.modelStatus).valid;
|
|
536
532
|
},
|
|
537
|
-
voiceReadAloudError() { return this.t("settings.readAloudSyncFailed"); },
|
|
538
533
|
voiceErrorText() {
|
|
539
534
|
return this.voiceError ? messageFromCode(this.t, this.voiceError, "error.voice_failed") : "";
|
|
540
535
|
},
|
|
@@ -1304,6 +1299,7 @@ export default {
|
|
|
1304
1299
|
await this.voicePanel.open({ mode: this.voiceDefaultMode, sessionId: this.sessionId || null });
|
|
1305
1300
|
},
|
|
1306
1301
|
onVoiceAction({ action, value }) {
|
|
1302
|
+
if (action === "retryReadAloud") { void this.voicePanel.retryReadAloud(); return; }
|
|
1307
1303
|
if (action === "stopPlayback") { void this.voicePanel.conversation?.controller.stopPlayback().catch(() => {}); return; }
|
|
1308
1304
|
if (action === "setCancelArmed") { this.voicePanel.setCancelArmed(value); return; }
|
|
1309
1305
|
if (["holdStart", "holdEnd", "finish", "start", "close"].includes(action)) void Promise.resolve(this.voicePanel[action](value)).catch(() => {});
|
package/src/chat/Composer.vue
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<form class="lares-composer" :class="{ 'lares-composer--hero': hero }" @submit.prevent="onSend">
|
|
3
|
+
<div v-if="voiceView?.readAloudError" class="lares-composer__alert" role="alert">
|
|
4
|
+
<p>{{ t("settings.readAloudSyncFailed") }}</p>
|
|
5
|
+
<button type="button" @click="$emit('voice-action', { action: 'retryReadAloud' })">{{ t("dictation.retry") }}</button>
|
|
6
|
+
</div>
|
|
3
7
|
<div
|
|
4
8
|
class="lares-composer__card"
|
|
5
9
|
data-composer-card
|
|
@@ -446,6 +450,36 @@ export default {
|
|
|
446
450
|
padding: 0;
|
|
447
451
|
}
|
|
448
452
|
|
|
453
|
+
.lares-composer__alert {
|
|
454
|
+
display: flex;
|
|
455
|
+
align-items: center;
|
|
456
|
+
gap: 12px;
|
|
457
|
+
padding: 8px 12px;
|
|
458
|
+
border-radius: 12px;
|
|
459
|
+
background: var(--q-background-1);
|
|
460
|
+
color: var(--q-orange-default);
|
|
461
|
+
font-size: 13px;
|
|
462
|
+
line-height: 18px;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.lares-composer__alert p {
|
|
466
|
+
flex: 1;
|
|
467
|
+
min-width: 0;
|
|
468
|
+
margin: 0;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.lares-composer__alert button {
|
|
472
|
+
flex: none;
|
|
473
|
+
border: 0;
|
|
474
|
+
border-radius: 8px;
|
|
475
|
+
padding: 6px 10px;
|
|
476
|
+
background: var(--q-blue-alpha);
|
|
477
|
+
color: var(--q-blue-default);
|
|
478
|
+
font: inherit;
|
|
479
|
+
font-size: 13px;
|
|
480
|
+
font-weight: 600;
|
|
481
|
+
}
|
|
482
|
+
|
|
449
483
|
.lares-composer__card {
|
|
450
484
|
position: relative;
|
|
451
485
|
display: flex;
|
|
@@ -133,6 +133,10 @@
|
|
|
133
133
|
:t="t"
|
|
134
134
|
@action="(itemId, action) => $emit('queue-action', itemId, action)"
|
|
135
135
|
/>
|
|
136
|
+
<div v-if="state.voicePanelState?.readAloudError" class="desktop-composer__alert" role="alert">
|
|
137
|
+
<p>{{ t("settings.readAloudSyncFailed") }}</p>
|
|
138
|
+
<button type="button" @click="$emit('voice-action', { action: 'retryReadAloud' })">{{ t("dictation.retry") }}</button>
|
|
139
|
+
</div>
|
|
136
140
|
|
|
137
141
|
<Transition name="lares-panel" mode="out-in">
|
|
138
142
|
<div v-if="state.approval" key="approval" class="desktop-composer__approval">
|
|
@@ -910,6 +914,9 @@ export default {
|
|
|
910
914
|
margin: 0 auto;
|
|
911
915
|
padding: 8px 0 20px;
|
|
912
916
|
}
|
|
917
|
+
.desktop-composer__alert { display:flex; align-items:center; gap:12px; margin:0 0 8px; padding:8px 12px; border-radius:12px; background:var(--q-background-1); color:var(--q-orange-default); font-size:13px; line-height:18px; }
|
|
918
|
+
.desktop-composer__alert p { flex:1; min-width:0; margin:0; }
|
|
919
|
+
.desktop-composer__alert button { flex:none; border:0; border-radius:8px; padding:6px 10px; background:var(--q-blue-alpha); color:var(--q-blue-default); font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
|
|
913
920
|
.desktop-composer__model-row { display:flex; justify-content:flex-end; gap:2px; min-height:28px; margin-bottom:6px; }
|
|
914
921
|
.desktop-composer[data-hero="true"] .desktop-composer__model-row { justify-content:space-between; }
|
|
915
922
|
.desktop-composer__model,
|