This repository was archived by the owner on Feb 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
✨ Added loading page and title bar
Calvin Rohloff
committed
Aug 28, 2024
1 parent
480d2d4
commit 22c6483
Showing
14 changed files
with
214 additions
and
110 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.topbar__bar { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: var(--topbar-height); | ||
-webkit-app-region: drag; | ||
z-index: 100; | ||
display: flex; | ||
flex-direction: row-reverse; | ||
gap: 6px; | ||
} | ||
|
||
.topbar__button { | ||
-webkit-app-region: no-drag; | ||
filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(329deg) | ||
brightness(104%) contrast(104%); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import MinimizeIcon from '../../../../assets/app/icons/topbar/minimize.svg'; | ||
import MaximizeIcon from '../../../../assets/app/icons/topbar/maximize.svg'; | ||
import CloseIcon from '../../../../assets/app/icons/topbar/x.svg'; | ||
import './Topbar.css'; | ||
|
||
export default function Topbar() { | ||
const handleMinimize = () => { | ||
window.electron.ipcRenderer.sendMessage('WINDOW_MINIMIZE'); | ||
}; | ||
|
||
const handleMaximize = () => { | ||
window.electron.ipcRenderer.sendMessage('WINDOW_MAXIMIZE'); | ||
}; | ||
|
||
const handleClose = () => { | ||
window.electron.ipcRenderer.sendMessage('APP_EXIT'); | ||
}; | ||
|
||
return ( | ||
<div className="topbar__bar"> | ||
<img | ||
className="topbar__button" | ||
src={CloseIcon} | ||
alt="Close Button" | ||
onClick={handleClose} | ||
role="presentation" | ||
/> | ||
<img | ||
className="topbar__button" | ||
src={MaximizeIcon} | ||
alt="Maximize Button" | ||
onClick={handleMaximize} | ||
role="presentation" | ||
/> | ||
<img | ||
className="topbar__button" | ||
src={MinimizeIcon} | ||
alt="Minimize Button" | ||
onClick={handleMinimize} | ||
role="presentation" | ||
/> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,24 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta | ||
http-equiv="Content-Security-Policy" | ||
content="script-src 'self' 'unsafe-inline'" | ||
content="default-src 'self'; | ||
script-src 'self'; | ||
font-src 'self' https://fonts.gstatic.com; | ||
style-src 'self' 'unsafe-inline' https://fonts.googleapis.com;" | ||
/> | ||
<title>Hello Electron React!</title> | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap" | ||
rel="stylesheet" | ||
/> | ||
|
||
<title>WaveCord</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<div id="root" style="width: 100vw; height: 100vh; margin: 0"></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
.loading__container { | ||
display: flex; | ||
flex-direction: column; | ||
width: 100%; | ||
height: 100%; | ||
align-items: center; | ||
justify-content: center; | ||
gap: 16px; | ||
} | ||
|
||
.loading__title { | ||
font-size: xxx-large; | ||
} | ||
|
||
.loading__loader { | ||
width: 48px; | ||
height: 48px; | ||
border-radius: 50%; | ||
display: inline-block; | ||
position: relative; | ||
background: linear-gradient(0deg, rgba(255, 61, 0, 0.2) 33%, #ff3d00 100%); | ||
box-sizing: border-box; | ||
animation: rotation 1s linear infinite; | ||
} | ||
|
||
.loading__loader::after { | ||
content: ''; | ||
box-sizing: border-box; | ||
position: absolute; | ||
left: 50%; | ||
top: 50%; | ||
transform: translate(-50%, -50%); | ||
width: 44px; | ||
height: 44px; | ||
border-radius: 50%; | ||
background: #263238; | ||
} | ||
|
||
@keyframes rotation { | ||
0% { | ||
transform: rotate(0deg); | ||
} | ||
100% { | ||
transform: rotate(360deg); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import './Loading.css'; | ||
|
||
export default function LoadingPage() { | ||
return ( | ||
<div className="loading__container"> | ||
<h1 className="loading__title">WaveCord</h1> | ||
<span className="loading__loader" /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
body { | ||
margin: 0; | ||
background: var(--background); | ||
color: var(--text); | ||
font-family: 'Inter', sans-serif; | ||
font-optical-sizing: auto; | ||
font-weight: 400; | ||
font-style: normal; | ||
} | ||
|
||
a, | ||
p, | ||
h1, | ||
h2, | ||
h3 { | ||
margin: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
:root[data-theme='light'] { | ||
--text: #0a101a; | ||
--background: #e2e9f4; | ||
--primary: #273f63; | ||
--secondary: #ce8298; | ||
--accent: #b57745; | ||
} | ||
:root { | ||
--text: #e5ebf5; | ||
--background: #0b121c; | ||
--primary: #9ab3d8; | ||
--secondary: #7c3045; | ||
--accent: #ba7d4b; | ||
|
||
--topbar-height: 26px; | ||
} |