config: add option to hide notifications on lockscreen (#1211)
This commit is contained in:
parent
eed6adb0e4
commit
e304846421
4 changed files with 7 additions and 4 deletions
|
|
@ -567,7 +567,8 @@ default, you must create it manually.
|
|||
"hiddenApps": []
|
||||
},
|
||||
"lock": {
|
||||
"recolourLogo": false
|
||||
"recolourLogo": false,
|
||||
"hideNotifs": false
|
||||
},
|
||||
"notifs": {
|
||||
"actionOnClick": false,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue