forked from javamachr/quest-sidenoder
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from MikeRatcliffe/add-prettier
- Loading branch information
Showing
9 changed files
with
72 additions
and
49 deletions.
There are no files selected for viewing
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 @@ | ||
npm run prettier:check |
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 |
---|---|---|
|
@@ -2830,4 +2830,3 @@ async function changeConfig(key, value) { | |
|
||
return value; | ||
} | ||
|
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 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 |
---|---|---|
|
@@ -8,25 +8,36 @@ | |
content="width=device-width, initial-scale=1, shrink-to-fit=no" | ||
> | ||
|
||
<script>window.$ = window.jQuery = require('jquery');</script> | ||
<script> | ||
window.$ = window.jQuery = require('jquery'); | ||
</script> | ||
|
||
<!-- A simple hack that makes it possible to use jQueryUI with Electron --> | ||
<script src="../node_modules/jquery-ui/dist/jquery-ui.min.js"></script> | ||
<!-- A simple hack that makes it possible to use jQueryUI with Electron --> | ||
<script src="../node_modules/jquery-ui/dist/jquery-ui.min.js"></script> | ||
|
||
<!-- <script src="https://unpkg.com/@popperjs/core@2" crossorigin="anonymous"></script> --> | ||
<!-- <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" crossorigin="anonymous"></script> --> | ||
<script src="js/bootstrap.min.js"></script> | ||
<script src="js/main.js"></script> | ||
<!-- | ||
<script src="https://unpkg.com/@popperjs/core@2" crossorigin="anonymous"></script> | ||
--> | ||
<!-- | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" crossorigin="anonymous"></script> | ||
--> | ||
<script src="js/bootstrap.min.js"></script> | ||
<script src="js/main.js"></script> | ||
|
||
<!-- Bootstrap CSS --> | ||
<!-- | ||
<link rel="stylesheet" href="css/bootstrap.min.css" crossorigin="anonymous"> | ||
--> | ||
|
||
<link rel="stylesheet" href="css/bootstrap-slate.min.css"> | ||
<!-- <link rel="stylesheet" href="https://bootswatch.com/4/sandstone/bootstrap.min.css"> --> | ||
<link rel="stylesheet" href="../node_modules/@fortawesome/fontawesome-free/css/all.min.css"> | ||
<link rel="stylesheet" href="css/main.css"> | ||
<link rel="stylesheet" href="css/bootstrap-slate.min.css"> | ||
<!-- | ||
<link rel="stylesheet" href="https://bootswatch.com/4/sandstone/bootstrap.min.css"> | ||
--> | ||
<link | ||
rel="stylesheet" | ||
href="../node_modules/@fortawesome/fontawesome-free/css/all.min.css" | ||
> | ||
<link rel="stylesheet" href="css/main.css"> | ||
|
||
<title>Quest-Sideloader</title> | ||
|
||
|
@@ -37,18 +48,17 @@ | |
const { ipcRenderer, /*remote, */ shell } = electron; | ||
const { dialog } = remote; | ||
function loadInclude(template, id = null, complete = null) { | ||
$(document).trigger("newTemplate" ); | ||
function loadInclude(template, id = null, complete = null) { | ||
$(document).trigger('newTemplate'); | ||
if (!id) { | ||
$id('mainbody') | ||
// .html('') | ||
.load(template, complete); | ||
} | ||
else { | ||
$(`#${id}`).load(template, complete); | ||
if (!id) { | ||
$id('mainbody') | ||
// .html('') | ||
.load(template, complete); | ||
} else { | ||
$(`#${id}`).load(template, complete); | ||
} | ||
} | ||
} | ||
function formatEta(seconds) { | ||
if (seconds == null) { | ||
|
@@ -251,27 +261,34 @@ | |
ipcRenderer.send('sideload_read_queue', ''); | ||
});*/ | ||
document.addEventListener('dragover', (ev) => ev.preventDefault()); | ||
document.addEventListener('drop', (ev) => ev.preventDefault()); | ||
document.addEventListener('dragover', (ev) => ev.preventDefault()); | ||
document.addEventListener('drop', (ev) => ev.preventDefault()); | ||
document.body.addEventListener('drop', (ev) => { | ||
ev.preventDefault(); | ||
if (!ev.dataTransfer.files || !ev.dataTransfer.files.length) return; | ||
if (ev.dataTransfer.files[0].path.endsWith('.apk')) { | ||
ipcRenderer.send('filedrop', ev.dataTransfer.files[0].path.replace(/\\/g, '/')); | ||
} | ||
}, false); | ||
document.body.addEventListener( | ||
'drop', | ||
(ev) => { | ||
ev.preventDefault(); | ||
if (!ev.dataTransfer.files || !ev.dataTransfer.files.length) return; | ||
window.addEventListener("resize", () => { | ||
const navPanel = document.querySelector("#nav-panel"); | ||
if (!navPanel) { | ||
return; | ||
} | ||
if (ev.dataTransfer.files[0].path.endsWith('.apk')) { | ||
ipcRenderer.send( | ||
'filedrop', | ||
ev.dataTransfer.files[0].path.replace(/\\/g, '/'), | ||
); | ||
} | ||
}, | ||
false, | ||
); | ||
window.addEventListener('resize', () => { | ||
const navPanel = document.querySelector('#nav-panel'); | ||
if (!navPanel) { | ||
return; | ||
} | ||
// fix navbar position | ||
navPanel.style.top = $("#topbar").height() + "px"; | ||
}); | ||
// fix navbar position | ||
navPanel.style.top = $('#topbar').height() + 'px'; | ||
}); | ||
// actions | ||
|
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