diff options
author | 2023-02-08 21:13:21 +0530 | |
---|---|---|
committer | 2023-02-08 21:13:21 +0530 | |
commit | 2e043a983f4fc1abc6ba9e8b6816b696c95996f4 (patch) | |
tree | 5bfcf00b4881ef901b60fdf7bc4ef2012750160c /src/webview | |
parent | Merge branch 'develop' into release: Bump version to '6.2.4' (diff) | |
parent | 6.2.5-nightly.3 [skip ci] (diff) | |
download | ferdium-app-2e043a983f4fc1abc6ba9e8b6816b696c95996f4.tar.gz ferdium-app-2e043a983f4fc1abc6ba9e8b6816b696c95996f4.tar.zst ferdium-app-2e043a983f4fc1abc6ba9e8b6816b696c95996f4.zip |
Merge branch 'develop' into release and bump version in package.jsonv6.2.5-beta.1
Diffstat (limited to 'src/webview')
-rw-r--r-- | src/webview/darkmode.ts | 4 | ||||
-rw-r--r-- | src/webview/notifications.ts | 4 | ||||
-rw-r--r-- | src/webview/recipe.ts | 1 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/webview/darkmode.ts b/src/webview/darkmode.ts index 34f987b51..9944a7afa 100644 --- a/src/webview/darkmode.ts +++ b/src/webview/darkmode.ts | |||
@@ -19,10 +19,12 @@ export function darkModeStyleExists(recipePath: string) { | |||
19 | 19 | ||
20 | export function injectDarkModeStyle(recipePath: string) { | 20 | export function injectDarkModeStyle(recipePath: string) { |
21 | if (darkModeStyleExists(recipePath)) { | 21 | if (darkModeStyleExists(recipePath)) { |
22 | const data = readFileSync(darkModeFilePath(recipePath)); | 22 | const darkmodeCss = darkModeFilePath(recipePath); |
23 | const data = readFileSync(darkmodeCss); | ||
23 | const styles = document.createElement('style'); | 24 | const styles = document.createElement('style'); |
24 | styles.id = ID; | 25 | styles.id = ID; |
25 | styles.innerHTML = data.toString(); | 26 | styles.innerHTML = data.toString(); |
27 | debug('Loaded darkmode.css from: ', darkmodeCss); | ||
26 | 28 | ||
27 | document.querySelector('head')?.appendChild(styles); | 29 | document.querySelector('head')?.appendChild(styles); |
28 | 30 | ||
diff --git a/src/webview/notifications.ts b/src/webview/notifications.ts index 8b2831754..7f6ce01fd 100644 --- a/src/webview/notifications.ts +++ b/src/webview/notifications.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { ipcRenderer } from 'electron'; | 1 | import { ipcRenderer } from 'electron'; |
2 | 2 | ||
3 | import { v1 as uuidV1 } from 'uuid'; | 3 | import { v4 as uuidV4 } from 'uuid'; |
4 | 4 | ||
5 | const debug = require('../preload-safe-debug')('Ferdium:Notifications'); | 5 | const debug = require('../preload-safe-debug')('Ferdium:Notifications'); |
6 | 6 | ||
@@ -12,7 +12,7 @@ export class NotificationsHandler { | |||
12 | return new Promise(resolve => { | 12 | return new Promise(resolve => { |
13 | debug('New notification', title, options); | 13 | debug('New notification', title, options); |
14 | 14 | ||
15 | const notificationId = uuidV1(); | 15 | const notificationId = uuidV4(); |
16 | 16 | ||
17 | ipcRenderer.sendToHost( | 17 | ipcRenderer.sendToHost( |
18 | 'notification', | 18 | 'notification', |
diff --git a/src/webview/recipe.ts b/src/webview/recipe.ts index ed45192d3..36b8b7c98 100644 --- a/src/webview/recipe.ts +++ b/src/webview/recipe.ts | |||
@@ -265,6 +265,7 @@ class RecipeController { | |||
265 | if (pathExistsSync(userCss)) { | 265 | if (pathExistsSync(userCss)) { |
266 | const data = readFileSync(userCss); | 266 | const data = readFileSync(userCss); |
267 | styles.innerHTML += data.toString(); | 267 | styles.innerHTML += data.toString(); |
268 | debug('Loaded user.css from: ', userCss); | ||
268 | } | 269 | } |
269 | document.querySelector('head')?.append(styles); | 270 | document.querySelector('head')?.append(styles); |
270 | 271 | ||