Verified Commit f99c3709 authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

Handle more permission enum variants

parent 63276750
...@@ -2,7 +2,7 @@ project(angelfish) ...@@ -2,7 +2,7 @@ project(angelfish)
cmake_minimum_required(VERSION 2.8.12) cmake_minimum_required(VERSION 2.8.12)
set(KF5_MIN_VERSION "5.62.0") set(KF5_MIN_VERSION "5.62.0")
set(QT_MIN_VERSION "5.12.0") set(QT_MIN_VERSION "5.13.0")
option(BUILD_TESTING "Build test programs" ON) option(BUILD_TESTING "Build test programs" ON)
......
import org.kde.kirigami 2.4 as Kirigami import org.kde.kirigami 2.4 as Kirigami
import QtWebEngine 1.5 import QtWebEngine 1.9
Kirigami.InlineMessage { Kirigami.InlineMessage {
property int permission property int permission
...@@ -7,14 +7,29 @@ Kirigami.InlineMessage { ...@@ -7,14 +7,29 @@ Kirigami.InlineMessage {
id: permissionQuestion id: permissionQuestion
text: { text: {
if (permission === WebEngineView.Geolocation) switch(permission) {
case WebEngineView.Geolocation:
i18n("Do you want to allow the website to access the geo location?") i18n("Do you want to allow the website to access the geo location?")
else if (permission === WebEngineView.MediaAudioCapture) break
case WebEngineView.MediaAudioCapture:
i18n("Do you want to allow the website to access the microphone?") i18n("Do you want to allow the website to access the microphone?")
else if (permission === WebEngineView.MediaVideoCapture) break
case WebEngineView.MediaVideoCapture:
i18n("Do you want to allow the website to access the camera?") i18n("Do you want to allow the website to access the camera?")
else if (permission === WebEngineView.MediaAudioVideoCapture) break
case WebEngineView.MediaAudioVideoCapture:
i18n("Do you want to allow the website to access the camera and the microphone?") i18n("Do you want to allow the website to access the camera and the microphone?")
break
case WebEngineView.DesktopVideoCapture:
i18n("Do you want to allow the website to share your screen?")
break
case WebEngineView.DesktopAudioVideoCapture:
i18n("Do you want to allow the website to share the sound output?")
break
case WebEngineView.Notifications:
i18n("Do you want to allow the website to send you notifications?")
break
}
} }
showCloseButton: false showCloseButton: false
......
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