diff --git a/ui/StatusQ/src/assets/png/browser/compass.png b/ui/StatusQ/src/assets/png/browser/compass.png deleted file mode 100644 index 929ace29efe..00000000000 Binary files a/ui/StatusQ/src/assets/png/browser/compass.png and /dev/null differ diff --git a/ui/StatusQ/src/assets/png/browser/pepehand.png b/ui/StatusQ/src/assets/png/browser/pepehand.png new file mode 100644 index 00000000000..e32f23925e5 Binary files /dev/null and b/ui/StatusQ/src/assets/png/browser/pepehand.png differ diff --git a/ui/StatusQ/src/assets/png/png.qrc b/ui/StatusQ/src/assets/png/png.qrc index 00d4161f611..78ee056d3d6 100644 --- a/ui/StatusQ/src/assets/png/png.qrc +++ b/ui/StatusQ/src/assets/png/png.qrc @@ -1,7 +1,7 @@ - browser/compass.png browser/chooseBrowserImage@2x.png + browser/pepehand.png community/airdrops8_1.png community/mint2_1.png community/permissions2_3.png diff --git a/ui/app/AppLayouts/Browser/views/BrowserWebEngineView.qml b/ui/app/AppLayouts/Browser/views/BrowserWebEngineView.qml index 0845089b9b3..24ff010744a 100644 --- a/ui/app/AppLayouts/Browser/views/BrowserWebEngineView.qml +++ b/ui/app/AppLayouts/Browser/views/BrowserWebEngineView.qml @@ -156,7 +156,7 @@ WebEngineView { Image { id: emptyPageImage - source: Theme.png("browser/compass") + source: Theme.png("browser/pepehand") width: 294 height: 294 anchors.horizontalCenter: parent.horizontalCenter diff --git a/ui/imports/utils/SearchEnginesConfig.qml b/ui/imports/utils/SearchEnginesConfig.qml index 8311388acb5..4b4291da9d3 100644 --- a/ui/imports/utils/SearchEnginesConfig.qml +++ b/ui/imports/utils/SearchEnginesConfig.qml @@ -7,14 +7,13 @@ QtObject { readonly property int browserSearchEngineNone: 0 readonly property int browserSearchEngineDuckDuckGo: 1 - readonly property int browserSearchEngineBrave: 2 - readonly property int browserSearchEngineQwant: 3 - readonly property int browserSearchEngineStartpage: 4 - readonly property int browserSearchEngineMojeek: 5 - readonly property int browserSearchEngineEcosia: 6 - readonly property int browserSearchEngineBing: 7 - readonly property int browserSearchEngineGoogle: 8 - readonly property int browserSearchEngineCustom: 9 + readonly property int browserSearchEngineQwant: 2 + readonly property int browserSearchEngineStartpage: 3 + readonly property int browserSearchEngineMojeek: 4 + readonly property int browserSearchEngineEcosia: 5 + readonly property int browserSearchEngineBing: 6 + readonly property int browserSearchEngineGoogle: 7 + readonly property int browserSearchEngineCustom: 8 readonly property ListModel engines: ListModel { ListElement { @@ -32,56 +31,49 @@ QtObject { urlTemplate: "https://duckduckgo.com/?q=%1" } ListElement { - engineId: 2 // browserSearchEngineBrave - name: "Brave Search" - description: "" - iconUrl: "search_engines/brave_search" - urlTemplate: "https://search.brave.com/search?q=%1" - } - ListElement { - engineId: 3 // browserSearchEngineQwant + engineId: 2 // browserSearchEngineQwant name: "Qwant" description: "" iconUrl: "search_engines/qwant" urlTemplate: "https://www.qwant.com/?q=%1" } ListElement { - engineId: 4 // browserSearchEngineStartpage + engineId: 3 // browserSearchEngineStartpage name: "Startpage" description: "" iconUrl: "search_engines/starpage" urlTemplate: "https://www.startpage.com/sp/search?q=%1" } ListElement { - engineId: 5 // browserSearchEngineMojeek + engineId: 4 // browserSearchEngineMojeek name: "Mojeek" description: "" iconUrl: "search_engines/mojeek" urlTemplate: "https://www.mojeek.com/search?q=%1" } ListElement { - engineId: 6 // browserSearchEngineEcosia + engineId: 5 // browserSearchEngineEcosia name: "Ecosia" description: "" iconUrl: "search_engines/ecosia" urlTemplate: "https://www.ecosia.org/search?q=%1" } ListElement { - engineId: 7 // browserSearchEngineBing + engineId: 6 // browserSearchEngineBing name: "Bing" description: "" iconUrl: "search_engines/bing" urlTemplate: "https://www.bing.com/search?q=%1" } ListElement { - engineId: 8 // browserSearchEngineGoogle + engineId: 7 // browserSearchEngineGoogle name: "Google" description: "" iconUrl: "search_engines/google" urlTemplate: "https://www.google.com/search?q=%1" } ListElement { - engineId: 9 // browserSearchEngineCustom + engineId: 8 // browserSearchEngineCustom name: qsTr("Custom") description: qsTr("Plug in your own search engine that follows the OpenSearch URL format") iconUrl: "search_engines/custom" @@ -98,25 +90,37 @@ QtObject { return null } - function getEngineName(engineId) { + function getEngineByIdOrDefault(engineId) { const engine = getEngineById(engineId) + if (!engine) { + console.warn("SearchEnginesConfig: Invalid engine ID", engineId, "- using DuckDuckGo as default") + return getEngineById(browserSearchEngineDuckDuckGo) + } + return engine + } + + function isValidEngineId(engineId) { + return getEngineById(engineId) !== null + } + + function getEngineName(engineId) { + const engine = getEngineByIdOrDefault(engineId) return engine ? engine.name : qsTr("None") } function getEngineDescription(engineId) { - const engine = getEngineById(engineId) + const engine = getEngineByIdOrDefault(engineId) return engine ? engine.description : "" } function formatSearchUrl(engineId, query, customUrl) { - const engine = getEngineById(engineId) + const engine = getEngineByIdOrDefault(engineId) if (!engine) { - console.warn("SearchEnginesConfig: Engine not found for id:", engineId) return "" } // Custom: append query to the custom URL prefix - if (engineId === browserSearchEngineCustom) { + if (engine.engineId === browserSearchEngineCustom) { if (!customUrl || customUrl === "") { console.warn("SearchEnginesConfig: Custom search engine selected but no URL configured") return ""