Skip to content

Commit

Permalink
Merge branch 'feature/custom-themes' into feat/polychrome
Browse files Browse the repository at this point in the history
  • Loading branch information
Hachi-R committed Jan 21, 2025
1 parent 0f0a67b commit d4c414b
Show file tree
Hide file tree
Showing 174 changed files with 4,789 additions and 4,124 deletions.
136 changes: 136 additions & 0 deletions src/renderer/src/app.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
@use "./scss/globals.scss";

* {
box-sizing: border-box;
}

::-webkit-scrollbar {
width: 9px;
background-color: globals.$dark-background-color;
}

::-webkit-scrollbar-track {
background-color: rgba(255, 255, 255, 0.03);
}

::-webkit-scrollbar-thumb {
background-color: rgba(255, 255, 255, 0.08);
border-radius: 24px;
}

::-webkit-scrollbar-thumb:hover {
background-color: rgba(255, 255, 255, 0.16);
}

html,
body,
#root,
main {
height: 100%;
}

body {
overflow: hidden;
user-select: none;
font-family:
Noto Sans,
sans-serif;
font-size: globals.$body-font-size;
color: globals.$body-color;
margin: 0;
}

button {
padding: 0;
background-color: transparent;
border: none;
font-family: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
margin: 0;
}

p {
line-height: 20px;
}

#root,
main {
display: flex;
}

#root {
flex-direction: column;
}

main {
overflow: hidden;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}

label {
font-size: globals.$body-font-size;
}

img {
-webkit-user-drag: none;
}

progress[value] {
-webkit-appearance: none;
}

.container {
width: 100%;
height: 100%;
overflow: hidden;
display: flex;
flex-direction: column;
container-name: globals.$app-container;
container-type: inline-size;

&__content {
overflow-y: auto;
align-items: center;
display: flex;
flex-direction: column;
position: relative;
height: 100%;
background: linear-gradient(
0deg,
globals.$dark-background-color 50%,
globals.$background-color 100%
);
}
}

.title-bar {
display: flex;
width: 100%;
height: 35px;
min-height: 35px;
background-color: globals.$dark-background-color;
align-items: center;
padding: 0 calc(globals.$spacing-unit * 2);
-webkit-app-region: drag;
z-index: 4;
border-bottom: 1px solid globals.$border-color;

&__cloud-text {
background: linear-gradient(270deg, #16b195 50%, #3e62c0 100%);
background-clip: text;
color: transparent;
}
}
12 changes: 6 additions & 6 deletions src/renderer/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import {
useUserDetails,
} from "@renderer/hooks";

import * as styles from "./app.css";

import { Outlet, useLocation, useNavigate } from "react-router-dom";
import {
setUserPreferences,
Expand All @@ -30,6 +28,8 @@ import { downloadSourcesTable } from "./dexie";
import { useSubscription } from "./hooks/use-subscription";
import { HydraCloudModal } from "./pages/shared-modals/hydra-cloud/hydra-cloud-modal";

import "./app.scss";

export interface AppProps {
children: React.ReactNode;
}
Expand Down Expand Up @@ -240,11 +240,11 @@ export function App() {
return (
<>
{window.electron.platform === "win32" && (
<div className={styles.titleBar}>
<div className="title-bar">
<h4>
Hydra
{hasActiveSubscription && (
<span className={styles.cloudText}> Cloud</span>
<span className="title-bar__cloud-text"> Cloud</span>
)}
</h4>
</div>
Expand Down Expand Up @@ -275,10 +275,10 @@ export function App() {
<main>
<Sidebar />

<article className={styles.container}>
<article className="container">
<Header />

<section ref={contentRef} className={styles.content}>
<section ref={contentRef} className="container__content">
<Outlet />
</section>
</article>
Expand Down
54 changes: 0 additions & 54 deletions src/renderer/src/components/backdrop/backdrop.css.ts

This file was deleted.

50 changes: 50 additions & 0 deletions src/renderer/src/components/backdrop/backdrop.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
@use "../../scss/globals.scss";

.backdrop {
animation-name: backdrop-fade-in;
animation-duration: 0.4s;
background-color: rgba(0, 0, 0, 0.7);
position: absolute;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
z-index: globals.$backdrop-z-index;
top: 0;
padding: calc(globals.$spacing-unit * 3);
backdrop-filter: blur(2px);
transition: all ease 0.2s;

&--closing {
animation-name: backdrop-fade-out;
backdrop-filter: blur(0px);
background-color: rgba(0, 0, 0, 0);
}

&--windows {
padding-top: calc(#{globals.$spacing-unit * 3} + 35);
}
}

@keyframes backdrop-fade-in {
0% {
backdrop-filter: blur(0px);
background-color: rgba(0, 0, 0, 0.5);
}
100% {
backdrop-filter: blur(2px);
background-color: rgba(0, 0, 0, 0.7);
}
}

@keyframes backdrop-fade-out {
0% {
backdrop-filter: blur(2px);
background-color: rgba(0, 0, 0, 0.7);
}
100% {
backdrop-filter: blur(0px);
background-color: rgba(0, 0, 0, 0);
}
}
9 changes: 5 additions & 4 deletions src/renderer/src/components/backdrop/backdrop.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as styles from "./backdrop.css";
import "./backdrop.scss";
import cn from "classnames";

export interface BackdropProps {
isClosing?: boolean;
Expand All @@ -8,9 +9,9 @@ export interface BackdropProps {
export function Backdrop({ isClosing = false, children }: BackdropProps) {
return (
<div
className={styles.backdrop({
closing: isClosing,
windows: window.electron.platform === "win32",
className={cn("backdrop", {
"backdrop--closing": isClosing,
"backdrop--windows": window.electron.platform === "win32",
})}
>
{children}
Expand Down
57 changes: 0 additions & 57 deletions src/renderer/src/components/checkbox-field/checkbox-field.css.ts

This file was deleted.

Loading

0 comments on commit d4c414b

Please sign in to comment.