diff --git a/plasmoid/contents/ui/Disclaimer.qml b/plasmoid/contents/ui/Disclaimer.qml new file mode 100644 --- /dev/null +++ b/plasmoid/contents/ui/Disclaimer.qml @@ -0,0 +1,73 @@ +import QtQuick 2.7 +import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.components 2.0 as PlasmaComponents +import org.kde.plasma.extras 2.0 as PlasmaExtras + +Item { +anchors.fill: parent + + Text { + id: disclaimerHeading1 + width: 0 + height: 28 + text: "Let's Continue ?" + font.pointSize: 24 + elide: Text.ElideLeft + font.family: "Verdana" + wrapMode: Text.WrapAnywhere + font.bold: true + renderType: Text.QtRendering + horizontalAlignment: Text.AlignHCenter + anchors.right: parent.right + anchors.rightMargin: 0 + anchors.left: parent.left + anchors.leftMargin: 0 + color: "steelblue" + } + + + Text { + id: disclaimerBody1 + height: contentHeight + text: "Mycroft by default is powered by a cloud-based speech to text service. Mycroft gives you the ability to change speech to text services or use a locally configured one within their settings at home.mycroft.ai. If you agree to the default usage of Mycroft’s speech to text service, please continue. Also remember you can always choose to turn off or mute Mycroft when you do not wish to use it." + font.pointSize: 10 + font.family: "Verdana" + wrapMode: Text.Wrap + renderType: Text.QtRendering + horizontalAlignment: Text.AlignHCenter + anchors.top: disclaimerHeading1.bottom + anchors.topMargin: 18 + anchors.right: parent.right + anchors.rightMargin: 5 + anchors.left: parent.left + anchors.leftMargin: 5 + color: theme.textColor + } + + Rectangle { + id: noticemsg + anchors.top: disclaimerBody1.bottom + anchors.topMargin: 20 + anchors.right: parent.right + anchors.left: parent.left + color: theme.backgroundColor + height: disclaimerBody2.contentHeight + + Text { + id: disclaimerBody2 + height: contentHeight + text: "To start using Mycroft toggle the switch in the upper right corner!" + font.italic: true + font.pointSize: 10 + font.family: "Verdana" + wrapMode: Text.WrapAnywhere + renderType: Text.QtRendering + horizontalAlignment: Text.AlignHCenter + anchors.right: parent.right + anchors.rightMargin: 5 + anchors.left: parent.left + anchors.leftMargin: 5 + color: theme.textColor + } + } +} diff --git a/plasmoid/contents/ui/main.qml b/plasmoid/contents/ui/main.qml --- a/plasmoid/contents/ui/main.qml +++ b/plasmoid/contents/ui/main.qml @@ -177,8 +177,27 @@ } function wordIndex(){ + //var diclocation = '/usr/share/dict/' + //var path = diclocation + 'words'; + //var searchlist = readFile(path); + //searchIndex = searchlist.toString().split('\n'); + //searchIndex = searchIndex.filter(Boolean); searchIndex = ["Apache","Autoresponder","BitTorrent","Blog","Bookmark","Bot","Broadband","Captcha","Certificate","Client","Cloud","Cloud Computing","CMS","Cookie","CSS","Cyberspace","Denial of Service","Define","Earth","Facebook","Firefox","Firewall","FTP","Gateway","Google","Google Drive","Gopher","Hashtag","Hit","Home Page","Joke", "Japan", "Inbox","Internet","IP","IP Address","Moon","Meta Tag","Mars","Wallpaper","Mercury","Youtube","Alarm","Pi","News","Time","Distance","Weather","Song","Search Engine","Social Networking","Socket","Spam","Spider","Spoofing","SSH","SSL","Static Website","Twitter", "Venus","XHTML"]; } + + function readFile(filename) { + if (PlasmaLa.FileReader.file_exists_local(filename)) { + try { + var content = PlasmaLa.FileReader.read(filename).toString("utf-8"); + return content; + } catch (e) { + console.log('Mycroft UI - Read File' + e); + return 0; + } + } else { + return 0; + } + } function quicksearch(inputvalue){ var inputTerms = inputvalue @@ -322,16 +341,15 @@ onClicked: { //mycroftstartservicebutton.checked = !mycroftstartservicebutton.checked if (mycroftstartservicebutton.checked === false) { - //mycroftstartservicebutton.iconSource = "media-playback-start" PlasmaLa.LaunchApp.runCommand("bash", coreinstallstoppath); convoLmodel.clear() suggst.visible = true; socket.active = false; midbarAnim.showstatsId() } if (mycroftstartservicebutton.checked === true) { - //mycroftstartservicebutton.iconSource = "media-playback-pause" + disclaimbox.visible = false; PlasmaLa.LaunchApp.runCommand("bash", coreinstallstartpath); convoLmodel.clear() suggst.visible = true; @@ -420,16 +438,15 @@ if (mycroftStatusCheckSocket.status == WebSocket.Open && socket.status == WebSocket.Closed) { console.log("Activated") socket.active = true + disclaimbox.visible = false; mycroftstartservicebutton.checked = true - mycroftstartservicebutton.iconSource = "media-playback-pause" statusId.text = i18n("Mycroft is Ready") statusId.color = "green" statusId.visible = true } else if (mycroftStatusCheckSocket.status == WebSocket.Error) { mycroftstartservicebutton.checked = false - mycroftstartservicebutton.iconSource = "media-playback-start" statusId.text = i18n("Mycroft is Disabled") statusId.color = "#f4bf42" statusId.visible = true @@ -524,27 +541,56 @@ Layout.fillHeight: true Layout.fillWidth: true iconSource: "user-home" + + PlasmaCore.ToolTipArea { + id: tooltiptab1 + mainText: i18n("Home Tab") + anchors.fill: parent + } + } PlasmaComponents.TabButton { id: mycroftSkillsTab Layout.fillHeight: true Layout.fillWidth: true iconSource: "games-hint" + + PlasmaCore.ToolTipArea { + id: tooltiptab2 + mainText: i18n("Skills Tab") + anchors.fill: parent + } + } PlasmaComponents.TabButton { id: mycroftSettingsTab Layout.fillHeight: true Layout.fillWidth: true iconSource: "games-config-options" + + PlasmaCore.ToolTipArea { + id: tooltiptab3 + mainText: i18n("Settings Tab") + anchors.fill: parent + } + } PlasmaComponents.TabButton { id: mycroftMSMinstTab Layout.fillHeight: true Layout.fillWidth: true iconSource: "kmouth-phresebook-new" + + + PlasmaCore.ToolTipArea { + id: tooltiptab4 + mainText: i18n("Skill Installs Tab") + anchors.fill: parent + } + } } @@ -628,6 +674,12 @@ } } + + Disclaimer{ + id: disclaimbox + visible: true + } + ListModel{ id: convoLmodel }