mirror of
https://github.com/whscullin/apple1js.git
synced 2024-11-26 17:49:44 +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" id="input-modal" aria-hidden="true">
|
||||||
<div class="modal__overlay" tabindex="-1" data-micromodal-close>
|
<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">
|
<header class="modal__header">
|
||||||
<span class="modal__title" id="options-modal-title">
|
<span class="modal__title" id="input-modal-title">
|
||||||
Input Text
|
Input Text
|
||||||
</span>
|
</span>
|
||||||
<button class="modal__close" aria-label="Close modal" data-micromodal-close>
|
<button class="modal__close" aria-label="Close modal" data-micromodal-close>
|
||||||
@ -179,10 +179,27 @@ var tapes = {};
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="local" title="Load Local File" style="display: none">
|
<div class="modal" id="local-modal" aria-hidden="true">
|
||||||
<form action="#">
|
<div class="modal__overlay" tabindex="-1" data-micromodal-close>
|
||||||
<input type="file" id="local_file" />
|
<div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="Load Local File">
|
||||||
</form>
|
<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>
|
</div>
|
||||||
<script type="text/javascript" src="dist/apple1.js"></script>
|
<script type="text/javascript" src="dist/apple1.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
@ -99,17 +99,13 @@ export function doLoadLocal() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
aci.buffer = buf;
|
aci.buffer = buf;
|
||||||
MicroModal.close('local');
|
MicroModal.close('local-modal');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
fileReader.readAsArrayBuffer(file);
|
fileReader.readAsArrayBuffer(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function openLoadLocal() {
|
|
||||||
MicroModal.open('local');
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateKHz() {
|
function updateKHz() {
|
||||||
var now = Date.now();
|
var now = Date.now();
|
||||||
var ms = now - startTime;
|
var ms = now - startTime;
|
||||||
@ -317,7 +313,7 @@ export function openOptions() {
|
|||||||
|
|
||||||
export function openLoadText(event) {
|
export function openLoadText(event) {
|
||||||
if (event && event.altKey) {
|
if (event && event.altKey) {
|
||||||
MicroModal.show('local');
|
MicroModal.show('local-modal');
|
||||||
} else {
|
} else {
|
||||||
MicroModal.show('input-modal');
|
MicroModal.show('input-modal');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user