Skip to content

Commit

Permalink
Merge pull request #367 from matt8707/notifications
Browse files Browse the repository at this point in the history
Add sidebar persistent notifications, closes #203
  • Loading branch information
matt8707 authored Feb 13, 2024
2 parents c134dc6 + 3d9dbc9 commit 1a012c5
Show file tree
Hide file tree
Showing 75 changed files with 525 additions and 78 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
"@types/express": "^4.17.21",
"@types/js-yaml": "^4.0.9",
"@types/promise-fs": "^2.1.5",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.1",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.35.1",
"prettier": "^3.2.5",
"prettier-plugin-svelte": "^3.1.2",
"prettier-plugin-svelte": "^3.2.0",
"svelte": "^4.2.10",
"svelte-check": "^3.6.4",
"svelte-fast-dimension": "^1.1.0",
Expand All @@ -52,7 +52,7 @@
"d3-array": "^3.2.4",
"d3-scale": "^4.0.2",
"d3-shape": "^3.2.0",
"dotenv": "^16.4.2",
"dotenv": "^16.4.3",
"express": "^4.18.2",
"home-assistant-js-websocket": "^9.1.0",
"http-proxy-middleware": "^2.0.6",
Expand Down
140 changes: 74 additions & 66 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions scripts/translations/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ def process_dir(_dir, _output, _keys):
("update_install", ["ui.dialogs.more_info_control.update.install"]),
("back", ["ui.common.back"]),
("service_data", ["ui.components.service-control.data"]),
("notifications_empty", ["ui.notification_drawer.empty"]),
("notifications", ["ui.notification_drawer.title"]),
("notifications_dismiss", ["ui.notification_toast.dismiss"]),
],
),
( # MEDIA_PLAYER
Expand Down
2 changes: 0 additions & 2 deletions src/lib/Modal/AlarmControlPanelModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
let reject: boolean;
let timeout: ReturnType<typeof setTimeout> | undefined;
let selectedService: string | undefined;
let unsubscribe: () => void;
function addCode(key: number) {
code += key;
Expand Down Expand Up @@ -56,7 +55,6 @@
}
onDestroy(() => {
unsubscribe?.();
clearTimeout(timeout);
});
Expand Down
1 change: 0 additions & 1 deletion src/lib/Modal/ConfigButtons.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@
class="options action"
on:click={() => {
handleChangeType();
$record();
}}
use:Ripple={$ripple}
>
Expand Down
11 changes: 11 additions & 0 deletions src/lib/Modal/MainItemConfig.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@
if (searchElement) {
searchElement.focus();
}
// if changing type reset object
if (sel) {
Object.keys(sel).forEach((key) => {
if (key !== 'id') {
delete (sel as any)[key];
}
});
sel.type = 'configure';
$dashboard = $dashboard;
}
});
$: filter = itemTypes
Expand Down
Loading

0 comments on commit 1a012c5

Please sign in to comment.