Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI Patch Wizard #393

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
688d019
try using a stack-like representation of the selected top-level view
Edward-Larson Oct 16, 2023
fbc3f51
add C to supported script view languages, add rough custom form for O…
Edward-Larson Oct 16, 2023
10fa5b6
mockup of overall wizard and nice implementation for source code mana…
Edward-Larson Oct 16, 2023
ff3e2b5
build high level summary view and way to allocate segments
Edward-Larson Oct 17, 2023
365ab90
move layout around, make summary step-by-step
Edward-Larson Oct 18, 2023
b3970ca
intermediate commit setting up patch step invalidation
Edward-Larson Oct 18, 2023
bf65a33
make lots more things properly update and refresh
Edward-Larson Oct 18, 2023
a0cdb30
keep making patchmaker wizard resilient to intermediate state and sta…
Edward-Larson Oct 18, 2023
21d0ca5
fix annoying stuff with serialization
Edward-Larson Oct 20, 2023
7294048
split out some of the server stuff into generic utils, and begin impl…
Edward-Larson Oct 20, 2023
6165f34
start hooking up PatchMaker frontend to backend
Edward-Larson Oct 20, 2023
0b768d0
add live patchmaker log following
Edward-Larson Oct 23, 2023
1f1bd04
refactor serializer inputs to be split into component for each type o…
Edward-Larson Oct 24, 2023
4896a95
config serialization info touchups to go with previous commit
Edward-Larson Oct 24, 2023
2dd8d72
make log polling more reliable, remove some old print statements
Edward-Larson Oct 25, 2023
a23496c
rough but serviceable symbol inputs view
Edward-Larson Oct 26, 2023
3c276fa
allow saving/loading a patch in progress, propagate symbol updates pr…
Edward-Larson Oct 26, 2023
3d932d2
clean out unused styles and vars from serializer inputs
Edward-Larson Oct 26, 2023
fdb8f07
small cleanups to user symbol input styling
Edward-Larson Oct 26, 2023
0b74b58
log patchmaker errors better (should have committed with log fetching…
Edward-Larson Oct 27, 2023
daea593
make sure user symbols are ints, add backend for injecting patch and …
Edward-Larson Oct 27, 2023
0e351dc
elf extension and touch ups/cleanups for Patch Wizard
Edward-Larson Nov 3, 2023
74444c2
remove develoment constants
Edward-Larson Nov 3, 2023
c3f66ca
clear stubs bom directory
Edward-Larson Nov 9, 2023
72961c9
Merge branch 'master' into feature/gui_patch_wizard
Edward-Larson Nov 9, 2023
432361b
fix missing return in alignment helpers
Edward-Larson Nov 9, 2023
cd81cf1
switch wizard icon
Edward-Larson Nov 10, 2023
017bf59
fix typing problems
Edward-Larson Nov 10, 2023
efa93f2
rename class
Edward-Larson Nov 11, 2023
aed235e
clean up things that could have been removed after previous refactors
Edward-Larson Nov 11, 2023
8895400
fix bugs with component config serialization
Edward-Larson Nov 15, 2023
6782abf
Merge branch 'master' into feature/gui_patch_wizard
Edward-Larson Mar 4, 2024
f0e8e81
linting
Edward-Larson Mar 4, 2024
a4d14fb
update expected fields in get_config test
Edward-Larson Mar 4, 2024
0b1697e
lint
Edward-Larson Mar 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/public/icons/wizard.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 13 additions & 12 deletions frontend/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,23 @@
selectedResource,
settings,
dataLength,
viewCrumbs,
} from "./stores.js";
import { keyEventToString, shortcuts } from "./keyboard.js";

import RootWizardView from "./patch_wizard/RootWizardView.svelte";

printConsoleArt();

let showRootResource = false,
showProjectManager = false,
dataLenPromise = Promise.resolve([]),
let dataLenPromise = Promise.resolve([]),
useAssemblyView = false,
useTextView = false,
rootResourceLoadPromise = new Promise((resolve) => {}),
resources = {};
let currentResource, rootResource, modifierView, bottomLeftPane;

let topLevelView = null;

// TODO: Move to settings
let riddleAnswered = JSON.parse(window.localStorage.getItem("riddleSolved"));
if (riddleAnswered === null || riddleAnswered === undefined) {
Expand Down Expand Up @@ -154,12 +157,14 @@ Answer by running riddle.answer('your answer here') from the console.`);
$: docstyle.setProperty("--accent-text-color", $settings.accentText);
$: docstyle.setProperty("--last-modified-color", $settings.lastModified);
$: docstyle.setProperty("--all-modified-color", $settings.allModified);

$: topLevelView = $viewCrumbs[$viewCrumbs.length - 1];
</script>

<svelte:window on:popstate="{backButton}" on:keyup="{handleShortcut}" />
<Gamepad />

{#if showRootResource}
{#if topLevelView === "rootResource"}
{#await rootResourceLoadPromise}
<LoadingAnimation />
{:then _}
Expand All @@ -176,8 +181,6 @@ Answer by running riddle.answer('your answer here') from the console.`);
rootResource="{rootResource}"
bind:bottomLeftPane="{bottomLeftPane}"
bind:modifierView="{modifierView}"
bind:showProjectManager="{showProjectManager}"
bind:showRootResource="{showRootResource}"
/>
{/if}
</Pane>
Expand Down Expand Up @@ -207,19 +210,17 @@ Answer by running riddle.answer('your answer here') from the console.`);
<AudioPlayer />
</div>
{/if}
{:else if showProjectManager}
{:else if topLevelView === "projectManager"}
<ProjectManagerView
bind:rootResourceLoadPromise="{rootResourceLoadPromise}"
bind:rootResource="{rootResource}"
bind:resources="{resources}"
bind:showRootResource="{showRootResource}"
bind:showProjectManager="{showProjectManager}"
/>
{:else}
{:else if topLevelView === "patchWizard"}
<RootWizardView />
{:else if topLevelView === "start"}
<StartView
bind:rootResourceLoadPromise="{rootResourceLoadPromise}"
bind:showRootResource="{showRootResource}"
bind:showProjectManager="{showProjectManager}"
bind:resources="{resources}"
bind:rootResource="{rootResource}"
/>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/ofrak/remote_resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -646,15 +646,15 @@ export class RemoteResource extends Resource {
});
}

async run_component(component, configtype, response) {
async run_component(component, configtype, config) {
const result = await fetch(
`${this.uri}/run_component?component=${component}`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify([configtype, response]),
body: JSON.stringify(config),
}
).then(async (r) => {
if (!r.ok) {
Expand Down
Loading
Loading