config: add option to hide notifications on lockscreen (#1211)

This commit is contained in:
八奈見 レイ 2026-03-15 13:02:32 +05:30 committed by GitHub
parent eed6adb0e4
commit e304846421
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 4 deletions

View file

@ -567,7 +567,8 @@ default, you must create it manually.
"hiddenApps": []
},
"lock": {
"recolourLogo": false
"recolourLogo": false,
"hideNotifs": false
},
"notifs": {
"actionOnClick": false,

View file

@ -395,6 +395,7 @@ Singleton {
recolourLogo: lock.recolourLogo,
enableFprint: lock.enableFprint,
maxFprintTries: lock.maxFprintTries,
hideNotifs: lock.hideNotifs,
sizes: {
heightMult: lock.sizes.heightMult,
ratio: lock.sizes.ratio,

View file

@ -4,6 +4,7 @@ JsonObject {
property bool recolourLogo: false
property bool enableFprint: true
property int maxFprintTries: 3
property bool hideNotifs: false
property Sizes sizes: Sizes {}
component Sizes: JsonObject {

View file

@ -41,7 +41,7 @@ ColumnLayout {
Loader {
anchors.centerIn: parent
active: opacity > 0
opacity: Notifs.list.length > 0 ? 0 : 1
opacity: Notifs.list.length > 0 && !Config.lock.hideNotifs ? 0 : 1
sourceComponent: ColumnLayout {
spacing: Appearance.spacing.large
@ -61,7 +61,7 @@ ColumnLayout {
StyledText {
Layout.alignment: Qt.AlignHCenter
text: qsTr("No Notifications")
text: Config.lock.hideNotifs ? qsTr("Unlock for Notifications") : qsTr("No Notifications")
color: Colours.palette.m3outlineVariant
font.pointSize: Appearance.font.size.large
font.family: Appearance.font.family.mono
@ -78,7 +78,7 @@ ColumnLayout {
StyledListView {
anchors.fill: parent
visible: !Config.lock.hideNotifs
spacing: Appearance.spacing.small
clip: true