fix(qml): correzioni Silica post-primo-test su device (v0.1.1)

Pagine non caricabili ("Impossibile caricare la pagina") per API
inesistenti nella Silica del kit Sailfish 5.1 / Qt 5.6 — verificate
sui docs ufficiali (pagine -members) e incrociate coi pattern
provati su device (tide/calibreweb/quill):

- TextField: rimosso onAccepted (segnale "accepted" inesistente)
  -> EnterKey.enabled/.onClicked (LoginPage, ChatPage)
- Button: rimosso "highlighted" (inesistente su Button) dal mic
- ComboBox: menu con MenuItem espliciti (via Repeater non provato)
- Theme.highlightDimmerColor -> Theme.rgba(highlightBackgroundColor)
- Azioni nei menu instradate via funzioni della Page (pattern tide)
- SessionsPage: titolo delegato piu' robusto (no "undefined")
This commit is contained in:
2026-09-12 08:09:30 +02:00
parent 9c6a1242f7
commit 98139be96a
7 changed files with 105 additions and 33 deletions
+25 -7
View File
@@ -55,21 +55,21 @@ Page {
}
MenuItem {
text: appSettings.ttsAutoRead ? qsTr("Auto-read: on") : qsTr("Auto-read: off")
onClicked: appSettings.ttsAutoRead = !appSettings.ttsAutoRead
onClicked: page.toggleAutoRead()
}
MenuItem {
text: qsTr("Stop playback")
visible: player.playing
onClicked: player.stop()
onClicked: page.stopPlayback()
}
MenuItem {
text: qsTr("Cancel run")
visible: chat.busy
onClicked: chat.cancel()
onClicked: page.cancelRun()
}
MenuItem {
text: qsTr("Resync")
onClicked: chat.resync()
onClicked: page.resync()
}
}
@@ -111,7 +111,7 @@ Page {
anchors.bottom: parent.bottom
anchors.bottomMargin: page.kbHeight
height: compCol.height + Theme.paddingMedium
color: Theme.highlightDimmerColor
color: Theme.rgba(Theme.highlightBackgroundColor, 0.15)
Column {
id: compCol
@@ -141,7 +141,7 @@ Page {
Button {
id: micBtn
text: recorder.recording ? qsTr("Stop") : qsTr("Mic")
highlighted: recorder.recording
// Button non ha "highlighted": lo stato è nel testo (Mic/Stop)
enabled: !api.transcribing && !chat.busy || recorder.recording
onClicked: {
if (recorder.recording)
@@ -157,7 +157,9 @@ Page {
id: input
width: parent.width - micBtn.width - sendBtn.width - 2 * parent.spacing
placeholderText: qsTr("Message…")
onAccepted: page.doSend()
// Invio con EnterKey (vedi LoginPage)
EnterKey.enabled: text.length > 0
EnterKey.onClicked: page.doSend()
}
Button {
@@ -226,6 +228,22 @@ Page {
api.speak(t)
}
function toggleAutoRead() {
appSettings.ttsAutoRead = !appSettings.ttsAutoRead
}
function stopPlayback() {
player.stop()
}
function cancelRun() {
chat.cancel()
}
function resync() {
chat.resync()
}
function showNotice(text) {
page.noticeText = text
noticeClear.restart()