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": []
|
"hiddenApps": []
|
||||||
},
|
},
|
||||||
"lock": {
|
"lock": {
|
||||||
"recolourLogo": false
|
"recolourLogo": false,
|
||||||
|
"hideNotifs": false
|
||||||
},
|
},
|
||||||
"notifs": {
|
"notifs": {
|
||||||
"actionOnClick": false,
|
"actionOnClick": false,
|
||||||
|
|
|
||||||
|
|
@ -395,6 +395,7 @@ Singleton {
|
||||||
recolourLogo: lock.recolourLogo,
|
recolourLogo: lock.recolourLogo,
|
||||||
enableFprint: lock.enableFprint,
|
enableFprint: lock.enableFprint,
|
||||||
maxFprintTries: lock.maxFprintTries,
|
maxFprintTries: lock.maxFprintTries,
|
||||||
|
hideNotifs: lock.hideNotifs,
|
||||||
sizes: {
|
sizes: {
|
||||||
heightMult: lock.sizes.heightMult,
|
heightMult: lock.sizes.heightMult,
|
||||||
ratio: lock.sizes.ratio,
|
ratio: lock.sizes.ratio,
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ JsonObject {
|
||||||
property bool recolourLogo: false
|
property bool recolourLogo: false
|
||||||
property bool enableFprint: true
|
property bool enableFprint: true
|
||||||
property int maxFprintTries: 3
|
property int maxFprintTries: 3
|
||||||
|
property bool hideNotifs: false
|
||||||
property Sizes sizes: Sizes {}
|
property Sizes sizes: Sizes {}
|
||||||
|
|
||||||
component Sizes: JsonObject {
|
component Sizes: JsonObject {
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ ColumnLayout {
|
||||||
Loader {
|
Loader {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
active: opacity > 0
|
active: opacity > 0
|
||||||
opacity: Notifs.list.length > 0 ? 0 : 1
|
opacity: Notifs.list.length > 0 && !Config.lock.hideNotifs ? 0 : 1
|
||||||
|
|
||||||
sourceComponent: ColumnLayout {
|
sourceComponent: ColumnLayout {
|
||||||
spacing: Appearance.spacing.large
|
spacing: Appearance.spacing.large
|
||||||
|
|
@ -61,7 +61,7 @@ ColumnLayout {
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
text: qsTr("No Notifications")
|
text: Config.lock.hideNotifs ? qsTr("Unlock for Notifications") : qsTr("No Notifications")
|
||||||
color: Colours.palette.m3outlineVariant
|
color: Colours.palette.m3outlineVariant
|
||||||
font.pointSize: Appearance.font.size.large
|
font.pointSize: Appearance.font.size.large
|
||||||
font.family: Appearance.font.family.mono
|
font.family: Appearance.font.family.mono
|
||||||
|
|
@ -78,7 +78,7 @@ ColumnLayout {
|
||||||
|
|
||||||
StyledListView {
|
StyledListView {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
visible: !Config.lock.hideNotifs
|
||||||
spacing: Appearance.spacing.small
|
spacing: Appearance.spacing.small
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue