✨ feat(notification): implement notification center with persistent storage and DND support

This commit is contained in:
sankalp committed 2025-08-02 19:25:33 +05:45
1 parent 2e7207c4ac
commit 30ca6de913
15 files changed
+1260 -472

No files matched your search

+24 -24
View File
@@ -1,32 +1,32 @@
:vars {
--foreground: #f1dfdc;
--background: #1a1110;
--cursor: #f1dfdc;
--primary: #ffb4a8;
--on-primary: #561e17;
--secondary: #e7bdb6;
--on-secondary: #442925;
--tertiary: #dec48c;
--on-tertiary: #3e2e04;
--surface: #1a1110;
--surface-bright: #423735;
--foreground: #e4e1e9;
--background: #131318;
--cursor: #e4e1e9;
--primary: #bcc2ff;
--on-primary: #242b61;
--secondary: #c4c5dd;
--on-secondary: #2d2f42;
--tertiary: #e6bad6;
--on-tertiary: #45263d;
--surface: #131318;
--surface-bright: #39393f;
--error: #ffb4ab;
--error-dim: #ff8678;
--on-error: #690005;
--error-container: #93000a;
--outline: #a08c89;
--outline: #90909a;
--shadow: #000000;
--red: #ffb4a8;
--red-dim: #ff8875;
--green: #b7d085;
--green-dim: #a1c260;
--yellow: #dec56e;
--yellow-dim: #d5b444;
--blue: #cebdfe;
--blue-dim: #a98bfd;
--magenta: #fcb0d5;
--magenta-dim: #fa7fbb;
--cyan: #84d5c4;
--cyan-dim: #5ec8b2;
--red: #ffb2b9;
--red-dim: #ff7f8b;
--green: #95d5a7;
--green-dim: #70c789;
--yellow: #b8cf84;
--yellow-dim: #a3c15f;
--blue: #bdc2ff;
--blue-dim: #8a93ff;
--magenta: #e4b7f3;
--magenta-dim: #d48bec;
--cyan: #82d3e2;
--cyan-dim: #59c4d8;
--white: #82d3e0;
}
+74
View File
@@ -0,0 +1,74 @@
#noti-center-box {
background-color: alpha(#001, 0.3);
border: 1px solid alpha(#111, 0.3);
border-radius: 16px;
padding: 20px;
margin: 6px;
}
#noti-clear-button {
min-width: 10px;
min-height: 40px;
border-radius: 50px;
margin-top: 10px;
}
#noti-clear-button:hover {
background-color: var(--surface-bright);
}
/* Stacked notification group styles */
.stacked-notification-group {
margin: 8px 0;
}
.stacked-notification-container {
}
.stacked-notification-item {
background-color: alpha(#000, 0.4);
border: 0.5px solid alpha(#111, 0.4);
box-shadow:
inset 0 0 200px 0 alpha(#111, 0.5),
inset 0 0 0 0.5px alpha(#aaa, 0.4);
border-radius: 12px;
transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
#notif-clear-btn {
border-radius: 10px;
font-size: 12px;
padding: 2px;
}
#notif-clear-btn:hover {
background-color: var(--surface-bright);
}
#stacked-notification-item:hover {
background-color: alpha(#111, 0.5);
box-shadow:
inset 0 0 200px 0 alpha(#111, 0.5),
inset 0 0 0 0.5px alpha(#aaa, 0.4),
0 4px 12px alpha(#000, 0.3);
}
/* Stack count indicator */
#stack-count-indicator {
font-size: 10px;
color: rgba(255, 255, 255, 0.7);
margin: 2px 8px;
font-weight: 500;
}
/* Expanded view styles - notifications use their default styling */
#expanded-notification-list {
margin-top: 8px;
}
/* Make expanded notifications clickable with subtle hover effect */
#expanded-notification-list:hover {
background-color: alpha(#111, 0.1);
border-radius: 8px;
transition: background-color 0.2s ease;
}
+56 -38
View File
@@ -10,55 +10,73 @@
transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
#notification .summary {
font-size: 20px;
#notification-action-buttons button.start-action {
border-radius: 20px;
}
#notification-action-buttons button {
background-color: alpha(#000, 0.3);
padding: 8px;
border-radius: 20px;
transition: background-color 0.1s ease;
}
#notification-action-buttons button:hover {
background-color: var(--surface-bright);
}
#notification-action-buttons button:active {
background-color: var(--primary);
}
#notification-action-buttons button:active #button-label {
color: var(--shadow);
}
#notification-image image {
border-radius: 16px;
color: var(--on-surface);
}
#notification-summary,
#button-label {
font-weight: bold;
}
#notification .body {
color: #ddd;
margin-top: 0.5rem;
font-weight: normal;
#notification-summary {
font-weight: bold;
color: var(--primary);
}
#noti-image {
border-radius: 7px;
#notification-app-name {
color: var(--outline);
}
#env-noti-center {
border-radius: 1.25rem;
#action-button {
margin-top: 8px;
}
#notification-action {
background-color: #e0e0e0;
border: none;
border-radius: 6px;
padding: 6px 12px;
font-weight: 500;
font-size: 0.9rem;
transition:
background-color 0.2s ease,
color 0.2s ease;
}
#notification-action label {
color: #000000;
}
#notification-action:hover label {
color: #ffffff;
#notif-close-button {
background-color: var(--surface);
border-radius: 16px;
padding: 4px;
transition: background-color 0.1s ease;
}
#noti-image image {
border-radius: 25px;
}
#notification-action:hover {
background-color: #007aff; /* macOS-style blue */
color: #ffffff;
#notif-close-button:hover,
#notif-close-button:focus {
background-color: var(--surface-bright);
}
#notification-center {
background-color: alpha(#000, 0.3);
box-shadow: inset 0 0 0 1px alpha(#aaa, 0.4);
border: 1px solid alpha(#111, 0.4);
border-radius: 1.25rem;
padding: 1rem;
#notif-close-button:active {
background-color: var(--red-dim);
}
#notif-close-label {
color: var(--red-dim);
font-size: 20px;
}
#notif-close-button:active #notif-close-label {
color: var(--shadow);
}