Skip to content
This repository has been archived by the owner on May 20, 2022. It is now read-only.

Commit

Permalink
fix: 💄 frame buttons are now clickable when app is loading
Browse files Browse the repository at this point in the history
  • Loading branch information
imxeno committed Dec 2, 2021
1 parent 7e187b3 commit 8a80e51
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 6 deletions.
28 changes: 25 additions & 3 deletions src/App.module.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.container {
position: relative;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
-webkit-app-region: drag;
display: flex;
flex-direction: column;
}

.container .webview {
Expand All @@ -13,3 +13,25 @@
border: none;
-webkit-app-region: no-drag;
}

.frameButtonBackgroundContainer {
width: 100%;
height: 30px;
display: flex;
justify-content: flex-end;
}

.frameButtonBackground {
/* Frame button dimensions */
height: 30px;
width: 138px;
-webkit-app-region: no-drag;
}

.spinnerContainer {
display: flex;
flex: 1;
justify-content: center;
align-items: center;
margin-bottom: 30px;
}
11 changes: 10 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,16 @@ export default function App() {
onLoadStart={onLoadStart}
allow="encrypted-media *;"
/>
{!shown && <Spinner />}
{!shown && (
<>
<div className={styles.frameButtonBackgroundContainer}>
<div className={styles.frameButtonBackground} />
</div>
<div className={styles.spinnerContainer}>
<Spinner />
</div>
</>
)}
</div>
);
}
2 changes: 0 additions & 2 deletions src/components/Spinner.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ div.spinner {
width: 54px;
height: 54px;
display: inline-block;
margin-left: 50%;
margin-right: 50%;
padding: 10px;
border-radius: 10px;
}
Expand Down

0 comments on commit 8a80e51

Please sign in to comment.