mirror of
https://github.com/whscullin/apple1js.git
synced 2024-12-27 19:30:02 +00:00
Fix load local.
This commit is contained in:
parent
3f141c63b1
commit
fba5e34315
@ -151,9 +151,9 @@ var tapes = {};
|
||||
|
||||
<div class="modal" id="input-modal" aria-hidden="true">
|
||||
<div class="modal__overlay" tabindex="-1" data-micromodal-close>
|
||||
<div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="Options">
|
||||
<div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="Input Text">
|
||||
<header class="modal__header">
|
||||
<span class="modal__title" id="options-modal-title">
|
||||
<span class="modal__title" id="input-modal-title">
|
||||
Input Text
|
||||
</span>
|
||||
<button class="modal__close" aria-label="Close modal" data-micromodal-close>
|
||||
@ -179,10 +179,27 @@ var tapes = {};
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="local" title="Load Local File" style="display: none">
|
||||
<form action="#">
|
||||
<input type="file" id="local_file" />
|
||||
</form>
|
||||
<div class="modal" id="local-modal" aria-hidden="true">
|
||||
<div class="modal__overlay" tabindex="-1" data-micromodal-close>
|
||||
<div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="Load Local File">
|
||||
<header class="modal__header">
|
||||
<span class="modal__title" id="local-modal-title">
|
||||
Load Local File
|
||||
</span>
|
||||
<button class="modal__close" aria-label="Close modal" data-micromodal-close>
|
||||
</button>
|
||||
</header>
|
||||
<main class="modal__content" id="input-modal-content">
|
||||
<form action="#">
|
||||
<input type="file" id="local_file" />
|
||||
</form>
|
||||
</main>
|
||||
<footer class="modal__footer">
|
||||
<button class="modal__btn" aria-label="Load local file" onclick="Apple1.doLoadLocal()">OK</button>
|
||||
<button class="modal__btn" data-micromodal-close aria-label="Close this dialog window">Close</button>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="dist/apple1.js"></script>
|
||||
</body>
|
||||
|
@ -99,17 +99,13 @@ export function doLoadLocal() {
|
||||
}
|
||||
}
|
||||
aci.buffer = buf;
|
||||
MicroModal.close('local');
|
||||
MicroModal.close('local-modal');
|
||||
});
|
||||
};
|
||||
fileReader.readAsArrayBuffer(file);
|
||||
}
|
||||
}
|
||||
|
||||
export function openLoadLocal() {
|
||||
MicroModal.open('local');
|
||||
}
|
||||
|
||||
function updateKHz() {
|
||||
var now = Date.now();
|
||||
var ms = now - startTime;
|
||||
@ -317,7 +313,7 @@ export function openOptions() {
|
||||
|
||||
export function openLoadText(event) {
|
||||
if (event && event.altKey) {
|
||||
MicroModal.show('local');
|
||||
MicroModal.show('local-modal');
|
||||
} else {
|
||||
MicroModal.show('input-modal');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user