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

Introduce window modes with overlay and transparent overlay #355

Merged
merged 19 commits into from
Sep 9, 2024

Conversation

fperera123
Copy link
Contributor

Fixes #332

Special thanks to @rizvanaga for the inspiring idea behind these updates

Change Log

Added Window Mode Management

Files Affected:

  • src/main/main.ts
  • src/main/windowHandler.ts
  • src/main/windowMode.ts
  • src/main/windowState.ts
  • src/renderer/lib/utils.ts
  • src/renderer/config/app.ts
  • src/renderer/pages/dashboard.tsx
  • src/renderer/pages/login.tsx
  • src/renderer/pages/settings/general.tsx

Changes:

  • Introduced the WindowModeManager to handle multiple window modes (overlay, overlayTransparent, windowed) and persist state using local storage.
  • Added logic to retrieve, store, and set the window mode across different components and pages, enhancing the UX by allowing seamless switching between modes.
  • Implemented a getWindowOptions function that adjusts window behavior based on the mode (e.g., transparent overlays, drag areas, always-on-top properties).
  • Updated the dashboard and settings pages to allow real-time switching between window modes, with a dedicated setting in the Settings General Page.
  • Added a feature to force exit from overlay mode when the user needs to authenticate, improving security and user experience during critical actions.

Improved UI/UX for Overlay and Transparent Modes

Files Affected:

  • src/renderer/pages/dashboard.tsx
  • src/renderer/globals.css

Changes:

  • Added support for a draggable overlay window with transparent backgrounds, catering to users who prefer a minimal, non-intrusive window experience.
  • Incorporated CSS enhancements for shadow effects and responsiveness, especially for the transparent overlay mode, making the UI visually clearer in smaller and dynamic layouts.

Enhanced Responsiveness and UI Scaling

Files Affected:

  • tailwind.config.js
  • src/renderer/pages/dashboard.tsx
  • src/renderer/pages/settings/general.tsx

Changes:

  • Improved responsiveness by introducing new breakpoints (2xs, xs) in the Tailwind configuration, allowing better scaling for smaller devices.
  • Refined UI elements such as buttons and icons to ensure clear visibility and usability in smaller window modes like the transparent overlay.

Business Logic Improvements and Error Handling

Files Affected:

  • src/main/main.ts
  • src/renderer/pages/login.tsx
  • src/renderer/lib/utils.ts

Changes:

  • Introduced safeguards in the login page to automatically revert to windowed mode if the user is in an overlay, preventing authentication errors in transparent or overlay windows.

@CrazyMarvin CrazyMarvin merged commit 1ee902b into Crazy-Marvin:development Sep 9, 2024
8 of 9 checks passed
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.

Adding alwaysOnTop, removing the frame and making the window draggable
2 participants