mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-11 16:22:09 -04:00
plugins: fix plugin confirm third part repo window
This commit is contained in:
@@ -270,7 +270,9 @@ FloatingWindow {
|
|||||||
root.updateFilteredPlugins();
|
root.updateFilteredPlugins();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
thirdPartyConfirmModal.visible = true;
|
thirdPartyConfirmLoader.active = true;
|
||||||
|
if (thirdPartyConfirmLoader.item)
|
||||||
|
thirdPartyConfirmLoader.item.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -668,119 +670,132 @@ FloatingWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FloatingWindow {
|
LazyLoader {
|
||||||
id: thirdPartyConfirmModal
|
id: thirdPartyConfirmLoader
|
||||||
|
active: false
|
||||||
|
|
||||||
objectName: "thirdPartyConfirm"
|
FloatingWindow {
|
||||||
title: I18n.tr("Third-Party Plugin Warning")
|
id: thirdPartyConfirmModal
|
||||||
implicitWidth: 500
|
|
||||||
implicitHeight: 350
|
|
||||||
color: Theme.surfaceContainer
|
|
||||||
visible: false
|
|
||||||
|
|
||||||
FocusScope {
|
function show() {
|
||||||
anchors.fill: parent
|
visible = true;
|
||||||
focus: true
|
|
||||||
|
|
||||||
Keys.onPressed: event => {
|
|
||||||
if (event.key === Qt.Key_Escape) {
|
|
||||||
thirdPartyConfirmModal.visible = false;
|
|
||||||
event.accepted = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
function hide() {
|
||||||
|
visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
objectName: "thirdPartyConfirm"
|
||||||
|
title: I18n.tr("Third-Party Plugin Warning")
|
||||||
|
implicitWidth: 500
|
||||||
|
implicitHeight: 350
|
||||||
|
color: Theme.surfaceContainer
|
||||||
|
visible: false
|
||||||
|
|
||||||
|
FocusScope {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: Theme.spacingL
|
focus: true
|
||||||
spacing: Theme.spacingL
|
|
||||||
|
|
||||||
Row {
|
Keys.onPressed: event => {
|
||||||
width: parent.width
|
if (event.key === Qt.Key_Escape) {
|
||||||
spacing: Theme.spacingM
|
thirdPartyConfirmModal.hide();
|
||||||
|
event.accepted = true;
|
||||||
DankIcon {
|
|
||||||
name: "warning"
|
|
||||||
size: Theme.iconSize
|
|
||||||
color: Theme.warning
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
|
||||||
text: I18n.tr("Third-Party Plugin Warning")
|
|
||||||
font.pixelSize: Theme.fontSizeLarge
|
|
||||||
font.weight: Font.Medium
|
|
||||||
color: Theme.surfaceText
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
|
||||||
width: parent.width - parent.spacing * 2 - Theme.iconSize - parent.children[1].implicitWidth - closeConfirmBtn.width
|
|
||||||
height: 1
|
|
||||||
}
|
|
||||||
|
|
||||||
DankActionButton {
|
|
||||||
id: closeConfirmBtn
|
|
||||||
iconName: "close"
|
|
||||||
iconSize: Theme.iconSize - 2
|
|
||||||
iconColor: Theme.outline
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
onClicked: thirdPartyConfirmModal.visible = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
width: parent.width
|
|
||||||
text: I18n.tr("Third-party plugins are created by the community and are not officially supported by DankMaterialShell.\n\nThese plugins may pose security and privacy risks - install at your own risk.")
|
|
||||||
font.pixelSize: Theme.fontSizeMedium
|
|
||||||
color: Theme.surfaceText
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
width: parent.width
|
anchors.fill: parent
|
||||||
spacing: Theme.spacingS
|
anchors.margins: Theme.spacingL
|
||||||
|
spacing: Theme.spacingL
|
||||||
|
|
||||||
StyledText {
|
Row {
|
||||||
text: I18n.tr("• Plugins may contain bugs or security issues")
|
width: parent.width
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
spacing: Theme.spacingM
|
||||||
color: Theme.surfaceVariantText
|
|
||||||
|
DankIcon {
|
||||||
|
name: "warning"
|
||||||
|
size: Theme.iconSize
|
||||||
|
color: Theme.warning
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
text: I18n.tr("Third-Party Plugin Warning")
|
||||||
|
font.pixelSize: Theme.fontSizeLarge
|
||||||
|
font.weight: Font.Medium
|
||||||
|
color: Theme.surfaceText
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
width: parent.width - parent.spacing * 2 - Theme.iconSize - parent.children[1].implicitWidth - closeConfirmBtn.width
|
||||||
|
height: 1
|
||||||
|
}
|
||||||
|
|
||||||
|
DankActionButton {
|
||||||
|
id: closeConfirmBtn
|
||||||
|
iconName: "close"
|
||||||
|
iconSize: Theme.iconSize - 2
|
||||||
|
iconColor: Theme.outline
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
onClicked: thirdPartyConfirmModal.hide()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: I18n.tr("• Review code before installation when possible")
|
width: parent.width
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
text: I18n.tr("Third-party plugins are created by the community and are not officially supported by DankMaterialShell.\n\nThese plugins may pose security and privacy risks - install at your own risk.")
|
||||||
color: Theme.surfaceVariantText
|
font.pixelSize: Theme.fontSizeMedium
|
||||||
|
color: Theme.surfaceText
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
Column {
|
||||||
text: I18n.tr("• Install only from trusted sources")
|
width: parent.width
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
spacing: Theme.spacingS
|
||||||
color: Theme.surfaceVariantText
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
StyledText {
|
||||||
width: parent.width
|
text: I18n.tr("• Plugins may contain bugs or security issues")
|
||||||
height: parent.height - parent.spacing * 3 - y
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
}
|
color: Theme.surfaceVariantText
|
||||||
|
}
|
||||||
|
|
||||||
Row {
|
StyledText {
|
||||||
anchors.right: parent.right
|
text: I18n.tr("• Review code before installation when possible")
|
||||||
spacing: Theme.spacingM
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
|
color: Theme.surfaceVariantText
|
||||||
|
}
|
||||||
|
|
||||||
DankButton {
|
StyledText {
|
||||||
text: I18n.tr("Cancel")
|
text: I18n.tr("• Install only from trusted sources")
|
||||||
iconName: "close"
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
onClicked: thirdPartyConfirmModal.visible = false
|
color: Theme.surfaceVariantText
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DankButton {
|
Item {
|
||||||
text: I18n.tr("I Understand")
|
width: parent.width
|
||||||
iconName: "check"
|
height: parent.height - parent.spacing * 3 - y
|
||||||
onClicked: {
|
}
|
||||||
SessionData.setShowThirdPartyPlugins(true);
|
|
||||||
root.updateFilteredPlugins();
|
Row {
|
||||||
thirdPartyConfirmModal.visible = false;
|
anchors.right: parent.right
|
||||||
|
spacing: Theme.spacingM
|
||||||
|
|
||||||
|
DankButton {
|
||||||
|
text: I18n.tr("Cancel")
|
||||||
|
iconName: "close"
|
||||||
|
onClicked: thirdPartyConfirmModal.hide()
|
||||||
|
}
|
||||||
|
|
||||||
|
DankButton {
|
||||||
|
text: I18n.tr("I Understand")
|
||||||
|
iconName: "check"
|
||||||
|
onClicked: {
|
||||||
|
SessionData.setShowThirdPartyPlugins(true);
|
||||||
|
root.updateFilteredPlugins();
|
||||||
|
thirdPartyConfirmModal.hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user