mirror of
https://github.com/whscullin/apple2js.git
synced 2024-01-12 14:14:38 +00:00
Feedback, cleanup
This commit is contained in:
parent
a55baa3f25
commit
f176dcb659
|
@ -168,7 +168,7 @@ export default class SmartPort implements Card, MassStorage<BlockFormat>, Restor
|
|||
* dumpBlock
|
||||
*/
|
||||
|
||||
dumpBlock(drive: DriveNumber, block: DriveNumber) {
|
||||
dumpBlock(drive: DriveNumber, block: number) {
|
||||
let result = '';
|
||||
let b;
|
||||
let jdx;
|
||||
|
|
|
@ -45,7 +45,7 @@ export const Apple2 = (props: Apple2Props) => {
|
|||
const [io, setIO] = useState<Apple2IO>();
|
||||
const [cpu, setCPU] = useState<CPU6502>();
|
||||
const [error, setError] = useState<unknown>();
|
||||
const drivesReady = useMemo(() => new Ready(), []);
|
||||
const drivesReady = useMemo(() => new Ready(setError), []);
|
||||
|
||||
useEffect(() => {
|
||||
if (screen.current) {
|
||||
|
|
|
@ -58,7 +58,6 @@ export const BlockFileModal = ({ smartPort, number, onClose, isOpen } : BlockFil
|
|||
setHandles(handles);
|
||||
}, []);
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<Modal title="Open File" isOpen={isOpen} onClose={onClose}>
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.inset button {
|
||||
min-width: 36px;
|
||||
margin: 0 2px;
|
||||
|
|
|
@ -161,7 +161,6 @@ const uiKitMap = {
|
|||
'UIKeyInputEscape': 0x1B
|
||||
} as const;
|
||||
|
||||
|
||||
export const isUiKitKey = (k: string): k is KnownKeys<typeof uiKitMap> => {
|
||||
return k in uiKitMap;
|
||||
};
|
||||
|
|
|
@ -22,10 +22,10 @@ export class Ready {
|
|||
|
||||
ready: Promise<unknown>;
|
||||
|
||||
constructor() {
|
||||
constructor(private errorHandler = console.error) {
|
||||
this.ready = new Promise((resolve, reject) => {
|
||||
this.onReady = resolve;
|
||||
this.onError = reject;
|
||||
}).catch(console.error);
|
||||
}).catch(this.errorHandler);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user