mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-14 20:40:21 +02:00
fix styling on web titlebar style
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
width: 130px;
|
||||
height: 100%;
|
||||
-webkit-app-region: no-drag;
|
||||
background-color: var(--theme-colors-background);
|
||||
}
|
||||
|
||||
.windows-button {
|
||||
@@ -25,5 +26,7 @@
|
||||
}
|
||||
|
||||
.windows-button.exit-button {
|
||||
background: var(--theme-colors-state-error);
|
||||
&:hover {
|
||||
background: var(--theme-colors-state-error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,10 +7,6 @@ import styles from './window-controls.module.css';
|
||||
|
||||
const browser = isElectron() ? window.api.browser : null;
|
||||
|
||||
interface WindowControlsProps {
|
||||
style?: 'linux' | 'macos' | 'windows';
|
||||
}
|
||||
|
||||
const close = () => browser?.exit();
|
||||
|
||||
const minimize = () => browser?.minimize();
|
||||
@@ -19,7 +15,7 @@ const maximize = () => browser?.maximize();
|
||||
|
||||
const unmaximize = () => browser?.unmaximize();
|
||||
|
||||
export const WindowControls = ({ style }: WindowControlsProps) => {
|
||||
export const WindowControls = () => {
|
||||
const [max, setMax] = useState(false);
|
||||
|
||||
const handleMinimize = () => minimize();
|
||||
@@ -39,29 +35,29 @@ export const WindowControls = ({ style }: WindowControlsProps) => {
|
||||
<>
|
||||
{isElectron() && (
|
||||
<>
|
||||
{style === 'windows' && (
|
||||
<div className={styles.windowsButtonGroup}>
|
||||
<div
|
||||
onClick={handleMinimize}
|
||||
role="button"
|
||||
>
|
||||
<RiSubtractLine size={19} />
|
||||
</div>
|
||||
<div
|
||||
onClick={handleMaximize}
|
||||
role="button"
|
||||
>
|
||||
<RiCheckboxBlankLine size={13} />
|
||||
</div>
|
||||
<div
|
||||
className={clsx(styles.windowsButton, styles.exitButton)}
|
||||
onClick={handleClose}
|
||||
role="button"
|
||||
>
|
||||
<RiCloseLine size={19} />
|
||||
</div>
|
||||
<div className={styles.windowsButtonGroup}>
|
||||
<div
|
||||
className={styles.windowsButton}
|
||||
onClick={handleMinimize}
|
||||
role="button"
|
||||
>
|
||||
<RiSubtractLine size={19} />
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
className={styles.windowsButton}
|
||||
onClick={handleMaximize}
|
||||
role="button"
|
||||
>
|
||||
<RiCheckboxBlankLine size={13} />
|
||||
</div>
|
||||
<div
|
||||
className={clsx(styles.windowsButton, styles.exitButton)}
|
||||
onClick={handleClose}
|
||||
role="button"
|
||||
>
|
||||
<RiCloseLine size={19} />
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user