Skip to content

Conversation

@roth-dev
Copy link
Collaborator

No description provided.

@roth-dev
Copy link
Collaborator Author

roth-dev commented Dec 15, 2024

Should be close: #10

@invisal
Copy link
Collaborator

invisal commented Dec 16, 2024

We need to set the dark mode here as well:

https://github.com/outerbase/studio-desktop/blob/master/electron/main.ts#L77

  const queryString = new URLSearchParams({ name: conn.name, theme: "dark" | "light" }).toString();

I believe you cannot use localStorage to do it. You need to write it to file.

You can check https://github.com/outerbase/studio-desktop/blob/master/electron/file-helper.ts#L5 on how to deal with which path to write. Try to write to setting.json.

Create setting class

const setting = new Setting();
setting.load();  // load the setting from file. If no file, make it
setting.get("theme") // get theme value
setting.set("theme", "dark"); // set dark mode and write to file

Then, you can use ipc to set it from renderer window.

@roth-dev
Copy link
Collaborator Author

We need to set the dark mode here as well:

https://github.com/outerbase/studio-desktop/blob/master/electron/main.ts#L77

  const queryString = new URLSearchParams({ name: conn.name, theme: "dark" | "light" }).toString();

I believe you cannot use localStorage to do it. You need to write it to file.

You can check https://github.com/outerbase/studio-desktop/blob/master/electron/file-helper.ts#L5 on how to deal with which path to write. Try to write to setting.json.

Create setting class

const setting = new Setting();
setting.load();  // load the setting from file. If no file, make it
setting.get("theme") // get theme value
setting.set("theme", "dark"); // set dark mode and write to file

Then, you can use ipc to set it from renderer window.

Let me change it.

@roth-dev
Copy link
Collaborator Author

All updated according to suggestion.

@invisal invisal merged commit fa9f8e9 into outerbase:master Dec 17, 2024
@roth-dev roth-dev mentioned this pull request Dec 17, 2024
@jccbbb
Copy link

jccbbb commented Jan 6, 2026

How do you activate darkmode in the Windows desktop app?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants