Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/custom themes #1409

Merged
merged 85 commits into from
Feb 16, 2025
Merged
Changes from 1 commit
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
148e577
feat: add theme page
Hachi-R Jan 23, 2025
44aed56
Merge branch 'feature/custom-themes' of https://github.com/hydralaunc…
Hachi-R Jan 23, 2025
6bf049d
Merge branch 'feat/migration-to-leveldb' into feature/custom-themes
Hachi-R Jan 23, 2025
58f63ca
feat: implement custom theme management
Hachi-R Jan 24, 2025
3e2d7a7
feat: use leveldb instead of localStorage
Hachi-R Jan 24, 2025
c8044f6
chore: update upload-build script
zamitto Jan 28, 2025
ab44348
Merge branch 'main' into feature/custom-themes
zamitto Jan 28, 2025
5a19e9f
feat: add theme editor with Monaco and custom CSS injection
Hachi-R Jan 29, 2025
b56fc4d
refactor: lint
Hachi-R Jan 29, 2025
1fe6abb
refactor: convert theme author span to button
Hachi-R Jan 29, 2025
a42975a
refactor: move hex color validation to theme types
Hachi-R Jan 29, 2025
613d8ca
Merge branch 'feature/custom-themes' of https://github.com/hydralaunc…
Hachi-R Jan 29, 2025
56e686f
fix: close dev tools when editor window closes
Hachi-R Jan 29, 2025
5510036
lint
Hachi-R Jan 29, 2025
f542b2d
fix: handle null user preferences in get-user-preferences
Hachi-R Jan 29, 2025
e49a321
feat: fix editor theme load
Hachi-R Jan 30, 2025
61d4910
feat: prevent multiple editor windows for the same theme
Hachi-R Jan 30, 2025
13eeb2c
feat: add active theme handling in theme deletion modals
Hachi-R Jan 30, 2025
afcd99a
refactor: sonar issues
Hachi-R Jan 30, 2025
d91d8dd
refactor: remove unused ThemesManager export
Hachi-R Jan 30, 2025
964e9bb
feat: close theme editor if the theme was deleted
Hachi-R Jan 30, 2025
6a6e3ca
feat: add F12 shortcut to toggle dev tools
Hachi-R Jan 30, 2025
4758b8c
fix: open dev tools on main window when editor window is ready
Hachi-R Jan 30, 2025
4535ebc
fix: prevent error when injecting empty theme CSS
Hachi-R Jan 30, 2025
15746a5
feat: disable delete all themes button when no themes exist
Hachi-R Feb 1, 2025
e4631bb
refactor: reset default theme colors to empty strings
Hachi-R Feb 1, 2025
f6e4852
refactor: remove vanilla-extract
Hachi-R Feb 1, 2025
f288870
Merge branch 'main' into feature/custom-themes
Hachi-R Feb 1, 2025
b9e04de
chore: remove vanilla-extract plugin from Electron Vite config
Hachi-R Feb 1, 2025
47e6d88
refactor: replace inline styles with CSS classes
Hachi-R Feb 1, 2025
0f0e27e
feat: removing crypto from level
thegrannychaseroperation Feb 15, 2025
0a37ce4
feat: removing crypto from level
thegrannychaseroperation Feb 15, 2025
ec638d1
refactor: simplify theme structure and remove color-related code
Hachi-R Feb 15, 2025
1fe7e23
feat: i18n
zamitto Feb 16, 2025
c0c78b5
feat: i18n
zamitto Feb 16, 2025
418ad71
chore: bump version
zamitto Feb 16, 2025
740d3ff
feat: add deep link theme installation support
Hachi-R Feb 16, 2025
ce95dbb
lint
Hachi-R Feb 16, 2025
821149b
Merge branch 'feature/custom-themes' of https://github.com/hydralaunc…
Hachi-R Feb 16, 2025
9314b17
feat: updating translations
thegrannychaseroperation Feb 16, 2025
730184d
feat: updating translations
thegrannychaseroperation Feb 16, 2025
ae159a4
feat: redirecting to web store
thegrannychaseroperation Feb 16, 2025
543528b
feat: i18n
zamitto Feb 16, 2025
b202daf
Merge branch 'main' into feature/custom-themes
zamitto Feb 16, 2025
0511cc0
fix: editor window use correct dev tools
zamitto Feb 16, 2025
3271de0
fix: dev tools
zamitto Feb 16, 2025
39ceb8e
fix: editor window hash path
zamitto Feb 16, 2025
ba6eb2e
fix: fixing download cancel
thegrannychaseroperation Feb 16, 2025
6158108
fix: fixing download cancel
thegrannychaseroperation Feb 16, 2025
22e5674
fix: showing form errors when creating theme
thegrannychaseroperation Feb 16, 2025
d7d88ec
feat: add deep link theme import functionality
Hachi-R Feb 16, 2025
bf3905f
lint
Hachi-R Feb 16, 2025
3f6315f
Merge branch 'feature/custom-themes' of https://github.com/hydralaunc…
Hachi-R Feb 16, 2025
c36aff8
fix: updating themes when installing
thegrannychaseroperation Feb 16, 2025
9449d7c
Merge branch 'feature/custom-themes' of github.com:hydralauncher/hydr…
thegrannychaseroperation Feb 16, 2025
484fa86
fix: fixing stale state
thegrannychaseroperation Feb 16, 2025
d1dc27a
fix: fixing stale state
thegrannychaseroperation Feb 16, 2025
ca75ad6
feat: improve theme import with dynamic author information
Hachi-R Feb 16, 2025
ef28337
feat: enhance theme import flow with redirect and modal
Hachi-R Feb 16, 2025
569c80c
refactor: simplify theme import handling and remove redundant code
Hachi-R Feb 16, 2025
4cfecf8
lint
Hachi-R Feb 16, 2025
e3a4f12
feat: adding deeplink for profile
thegrannychaseroperation Feb 16, 2025
74c7668
Merge branch 'feature/custom-themes' of github.com:hydralauncher/hydr…
thegrannychaseroperation Feb 16, 2025
a13e991
feat: add theme import translations and modal improvements
Hachi-R Feb 16, 2025
cd48acc
feat: adding hydra shop constant
thegrannychaseroperation Feb 16, 2025
f428c52
feat: adding hydra shop constant
thegrannychaseroperation Feb 16, 2025
6e35600
feat: adding hydra shop constant
thegrannychaseroperation Feb 16, 2025
21684ef
fix: fixing submit on new theme
thegrannychaseroperation Feb 16, 2025
b74e093
fix: ensure objectId exists before removing game from favorites
Hachi-R Feb 16, 2025
002f814
feat: adding lower case to theme
thegrannychaseroperation Feb 16, 2025
a372afc
fix: prevent adding game to favorites without objectId
Hachi-R Feb 16, 2025
043062e
remove whitespace
Hachi-R Feb 16, 2025
5d48ce8
Merge branch 'feature/custom-themes' of https://github.com/hydralaunc…
Hachi-R Feb 16, 2025
401e61a
fix: fixing toast bottom
thegrannychaseroperation Feb 16, 2025
b999da3
fix: fixing update of inactive theme
thegrannychaseroperation Feb 16, 2025
4f725d0
Merge branch 'feature/custom-themes' of github.com:hydralauncher/hydr…
thegrannychaseroperation Feb 16, 2025
7064da8
feat: update theme installation with author details
Hachi-R Feb 16, 2025
d1a77dc
lint
Hachi-R Feb 16, 2025
cc14562
fix: add space in Torbox tab label
Hachi-R Feb 16, 2025
f7acb44
refactor: improve Torbox tab label rendering
Hachi-R Feb 16, 2025
5a6f66a
feat: add theme import translations
Hachi-R Feb 16, 2025
f1e47fc
feat: killing port on start
thegrannychaseroperation Feb 16, 2025
777f857
Merge branch 'feature/custom-themes' of github.com:hydralauncher/hydr…
thegrannychaseroperation Feb 16, 2025
2246775
feat: clearing theme
thegrannychaseroperation Feb 16, 2025
e8d5c62
fix: improve theme import modal close behavior
Hachi-R Feb 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: prevent multiple editor windows for the same theme
Hachi-R committed Jan 30, 2025
commit 61d4910b6dd3cb639dff6affa28c4e52bce48d5f
14 changes: 14 additions & 0 deletions src/main/services/window-manager.ts
Original file line number Diff line number Diff line change
@@ -23,6 +23,8 @@ import { AuthPage } from "@shared";
export class WindowManager {
public static mainWindow: Electron.BrowserWindow | null = null;

private static editorWindows: Map<string, BrowserWindow> = new Map();

private static loadMainWindowURL(hash = "") {
// HMR for renderer base on electron-vite cli.
// Load the remote URL for development or the local html file for production.
@@ -196,6 +198,15 @@ export class WindowManager {

public static openEditorWindow(themeId: string) {
if (this.mainWindow) {
const existingWindow = this.editorWindows.get(themeId);
if (existingWindow) {
if (existingWindow.isMinimized()) {
existingWindow.restore();
}
existingWindow.focus();
return;
}

const editorWindow = new BrowserWindow({
width: 600,
height: 720,
@@ -217,6 +228,8 @@ export class WindowManager {
show: false,
});

this.editorWindows.set(themeId, editorWindow);

editorWindow.removeMenu();

if (is.dev && process.env["ELECTRON_RENDERER_URL"]) {
@@ -237,6 +250,7 @@ export class WindowManager {

editorWindow.on("close", () => {
WindowManager.mainWindow?.webContents.closeDevTools();
this.editorWindows.delete(themeId);
});
}
}
Loading