Commit 3d2365bc authored by Jonah Brüchert's avatar Jonah Brüchert
Browse files

WebView: Request correct repesentation of websites on all platforms

On mobile devices angelfish still requests the mobile website,
but also requests the desktop representation on desktop platforms.
parent cd9658c8
...@@ -30,13 +30,20 @@ WebEngineView { ...@@ -30,13 +30,20 @@ WebEngineView {
property string errorCode: "" property string errorCode: ""
property string errorString: "" property string errorString: ""
property string userAgent: "Mozilla/5.0 (Linux; Plasma Mobile, like Android 9.0 ) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/69.0.3497.128 Mobile Safari/537.36" property string mobileUserAgent: "Mozilla/5.0 (Linux; Plasma Mobile, like Android 9.0 ) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/69.0.3497.128 Mobile Safari/537.36"
property string desktopUserAgent: profile.httpUserAgent
width: pageWidth width: pageWidth
height: pageHeight height: pageHeight
profile { profile {
httpUserAgent: userAgent httpUserAgent: {
if (Kirigami.Settings.isMobile)
return mobileUserAgent
else
return desktopUserAgent
}
onDownloadRequested: { onDownloadRequested: {
showPassiveNotification(i18n("Do you want to download this file?"), "long", "Download", function() { showPassiveNotification(i18n("Do you want to download this file?"), "long", "Download", function() {
download.accept download.accept
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment