mirror of
https://github.com/orangeglo/gbnp.git
synced 2026-07-04 17:49:21 -05:00
invalidate menu when uploading a new one, hide invalid text if menu not present
This commit is contained in:
parent
7f6fc77b76
commit
d8d06ac7f4
|
|
@ -23,7 +23,7 @@
|
|||
<p v-if="!menu.present()">
|
||||
Menu is not loaded. Please upload a menu ROM.
|
||||
</p>
|
||||
<p v-if="!menu.valid()">
|
||||
<p v-if="menu.present() && !menu.valid()">
|
||||
Menu is not valid. Please upload a valid menu ROM.
|
||||
</p>
|
||||
<p v-if="menu.loadedFromStorage && menu.valid()">
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ class Menu {
|
|||
}
|
||||
|
||||
setData(arrayBuffer) {
|
||||
this._valid = null;
|
||||
this.data = new Uint8Array(arrayBuffer);
|
||||
if (this.valid()) {
|
||||
localStorage.setItem('menuData', JSON.stringify({ data: Array.from(this.data) }));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user