Skip to content

Commit

Permalink
Fixed draggable/clickable area for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ozankaraali committed Mar 10, 2021
1 parent f236d64 commit 1eddc93
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 31 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "PiTV",
"version": "1.0.1",
"description": "STB Client",
"version": "1.0.2",
"description": "A cross-platform STB (IPTV) player client.",
"main": ".webpack/main",
"scripts": {
"start": "electron-forge start",
Expand Down
52 changes: 26 additions & 26 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,42 +54,42 @@ function App() {
remote.getCurrentWindow().close();
}}></a>
</div>
<div className="drag"></div>
<div className="columns is-gapless is-reversed-mobile">
<ChannelList reload={reload}/>
<div className="column drag">
<ChannelList reload={reload} />
<div className="column">
<div>
<div className="buttons is-right">
<button className="button is-info" onClick={() => setReload(!reload)}>Reload List</button>
<button className="button is-info first-button" onClick={() => setReload(!reload)}>Reload List</button>
<button className="button is-primary" onClick={() => toggleModal()}>Settings</button>
</div>

<Modal
closeModal={() => toggleModal()}
saveModal={() => saveData()}
modalState={modalState}
title="PiTV Settings"
>
<div>
<p>Server URL (http://example.com:1234):</p>
<input className="input" type="text" placeholder="Server URL" value={serverUrl} onChange={e => {
setServerUrl(e.target.value)
}}></input>
</div>
<p></p>
<div>
<p>MAC Address (00:1A:79:xx:xx:xx):</p>
<input className="input" type="text" placeholder="MAC Address" value={macAddress} onChange={e => {
setMacAddress(e.target.value)
}}></input>
</div>
</Modal>
</div>
<div class="no-drag center-absolute">
<div className="no-drag center-absolute">
<VideoPlayer />
</div>

</div>
</div>

<Modal
closeModal={() => toggleModal()}
saveModal={() => saveData()}
modalState={modalState}
title="PiTV Settings"
>
<div>
<p>Server URL (http://example.com:1234):</p>
<input className="input" type="text" placeholder="Server URL" value={serverUrl} onChange={e => {
setServerUrl(e.target.value)
}}></input>
</div>
<p></p>
<div>
<p>MAC Address (00:1A:79:xx:xx:xx):</p>
<input className="input" type="text" placeholder="MAC Address" value={macAddress} onChange={e => {
setMacAddress(e.target.value)
}}></input>
</div>
</Modal>
</div>
);
}
Expand Down
5 changes: 4 additions & 1 deletion src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@
.no-drag
.ui-button
.button {
-webkit-app-region: no-drag;
-webkit-app-region: no-drag !important;
}

.drag{
height: 28px;
width: 100%;
margin-left: 68px;
-webkit-app-region: drag;
}

Expand Down
2 changes: 1 addition & 1 deletion src/ChannelList.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
-webkit-app-region: drag;
text-align: center;
padding: 2vh;
margin-top: 8px;
// margin-top: 8px;
}
4 changes: 3 additions & 1 deletion src/Modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const Modal = ({ children, closeModal, saveModal, modalState, title }) => {

return (
<div className="modal is-active">
<div className="modal-background" onClick={closeModal} />
<div className="modal-background"
// onClick={closeModal}
/>
<div className="modal-card">
<header className="modal-card-head">
<p className="modal-card-title">{title}</p>
Expand Down

0 comments on commit 1eddc93

Please sign in to comment.