This repository has been archived by the owner on Dec 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: uploading files to Meteor (not using it yet)
- Loading branch information
1 parent
8e652fd
commit b88af2a
Showing
9 changed files
with
374 additions
and
39 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -35,9 +35,8 @@ h6 { | |
padding: 2rem; | ||
} | ||
|
||
p, | ||
button { | ||
margin: var(--size-6); | ||
p { | ||
margin: 1 auto; | ||
} | ||
|
||
body > picture, | ||
|
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,23 @@ | ||
use leptos::*; | ||
use thaw::{Button, FileList, Upload}; | ||
use web_sys::File; | ||
|
||
/// Displays the Meteor emulator text output. | ||
#[component] | ||
pub fn MeteorOutput( | ||
_started: ReadSignal<bool>, | ||
_binary: ReadSignal<Option<File>>, | ||
) -> impl IntoView { | ||
view! { | ||
<textarea class="meteor-output" name="output" rows="24" cols="80" disabled></textarea> | ||
} | ||
} | ||
|
||
#[component] | ||
pub fn MeteorFileInput(#[prop(into)] callback: Callback<FileList, ()>) -> impl IntoView { | ||
view! { | ||
<Upload custom_request=callback accept=".bin,application/octet-stream"> | ||
<Button>"Load binary"</Button> | ||
</Upload> | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1 @@ | ||
pub mod meteor_component; | ||
pub mod meteor; |
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
use aphelion_util::io::Port; | ||
|
||
const _OUTPUT: Port = Port(10); |
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