Added update button to titlebar

This commit is contained in:
nizune 2021-08-01 18:35:10 +02:00
parent f1626b9c99
commit 6baaccd70d

View file

@ -1,4 +1,4 @@
import { X, Minus, Square } from "@styled-icons/boxicons-regular"; import { X, Minus, Square, CloudDownload } from "@styled-icons/boxicons-regular";
import { Wrench } from "@styled-icons/boxicons-solid"; import { Wrench } from "@styled-icons/boxicons-solid";
import styled from "styled-components"; import styled from "styled-components";
@ -7,6 +7,7 @@ export const USE_TITLEBAR = window.isNative && !window.native.getConfig().frame;
const TitlebarBase = styled.div` const TitlebarBase = styled.div`
height: var(--titlebar-height); height: var(--titlebar-height);
display: flex; display: flex;
gap: 6px;
user-select: none; user-select: none;
align-items: center; align-items: center;
@ -29,6 +30,17 @@ const TitlebarBase = styled.div`
} }
} }
.update-bar {
background: var(--success);
margin: 16px;
font-size: 12px;
border-radius: 60px;
padding: 2px 10px;
display: flex;
align-items: center;
gap: 2px;
}
.actions { .actions {
z-index: 100; z-index: 100;
display: flex; display: flex;
@ -72,6 +84,15 @@ export function Titlebar() {
</svg> </svg>
{window.native.getConfig().build === "dev" && <Wrench />} {window.native.getConfig().build === "dev" && <Wrench />}
</div> </div>
{/*<div class="update-bar">
<CloudDownload size={16} />
New update available!
</div>*/}
<div class="actions">
<div>
<CloudDownload size={22} color={`var(--success)`} />
</div>
</div>
<div class="actions"> <div class="actions">
<div onClick={window.native.min}> <div onClick={window.native.min}>
<Minus size={20} /> <Minus size={20} />