Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
645e9e4
Empty ProjectManager with button to enter it
Jun 28, 2023
4435ff7
Some arrangement
Jun 29, 2023
8226e37
Scrolling, unified project view
Jun 30, 2023
03fda5e
initial adventure/project implementation
Edward-Larson Jun 30, 2023
e5f516d
Exclusive checkboxes with focus
Jun 30, 2023
8cefac5
iterate a bit on adventure data structure
Edward-Larson Jun 30, 2023
bded40e
Do checkbox better
Jun 30, 2023
4c6357a
tests, rename to projects, more implementation
Edward-Larson Jul 5, 2023
9b2318f
Mostly focusing elemetns and css
Jul 7, 2023
836d432
Use panes and some other small changes
Jul 11, 2023
f11c6e1
Move titles outside of content boxes
Jul 11, 2023
e167116
Merge pull request #60 from EdwardLarson/feature/ofrak_project_backends
dannyp303 Jul 12, 2023
12ff557
Use panes and some other things
Jul 12, 2023
e78dee0
Merge branch 'feature/ofrak-projects' of github.com:dannyp303/ofrak i…
Jul 12, 2023
ac03ac4
Merge branch 'master' of github.com:dannyp303/ofrak into feature/proj…
Jul 12, 2023
be005f0
Hookedup project creation to backend
Jul 18, 2023
c410752
Missed something
Jul 18, 2023
4e1ec0a
Add proper response to server routes
Jul 18, 2023
e150a17
Use project given from server
Jul 18, 2023
96a46f5
Get scripts from server
Jul 18, 2023
52862f2
Run a project, but resource view does not open automatically
Jul 18, 2023
c2f9158
Script runs on project start
Jul 18, 2023
89f875b
Run project opens resource view
Jul 18, 2023
4a60c53
Accidentally deleted script element
Jul 19, 2023
6b1e0c2
Select any project from frontend
Jul 19, 2023
918de39
Can clone project from git
Jul 19, 2023
796f39c
Little bit of startview css
Jul 19, 2023
080a504
Startview css and formatting things
Jul 19, 2023
6089132
Better toolbar
Jul 20, 2023
6de3b2e
Back button, some fortmatting, css etc
Jul 20, 2023
7fcf43a
Back buttons
Jul 20, 2023
6a41b69
Changeable project location, and some other things
Jul 25, 2023
fef65f2
check for existence of project dir, and only slurp it up when interac…
Edward-Larson Jul 28, 2023
0cf1e22
disable project management buttons when inputs not populated
Edward-Larson Jul 28, 2023
64b4691
Remove package-lock.json
Jul 28, 2023
71843f3
Merge pull request #62 from dannyp303/feature/project-management-fron…
dannyp303 Jul 28, 2023
d18d3c8
Merge pull request #63 from EdwardLarson/bugfix/check_for_project_dir
dannyp303 Jul 31, 2023
7dda453
Add project metadata and save option
Aug 1, 2023
ea8d3d5
Merge pull request #64 from dannyp303/feature/project_metadata
dannyp303 Aug 1, 2023
c30d5a2
add frontend/backend support to list project scripts in RunScript dro…
Edward-Larson Aug 2, 2023
f7d05f7
Added ability to delete files
Aug 3, 2023
c54e5a6
see/change which scripts are associated with each binary
Edward-Larson Aug 4, 2023
0a113db
Merge pull request #65 from EdwardLarson/feature/show_project_scripts
dannyp303 Aug 4, 2023
4a63da5
Merge branch 'feature/project_focus_fixups' into feature/associated_s…
Edward-Larson Aug 4, 2023
4b5b687
Hide project option if no project and add .trash when deleting
Aug 4, 2023
1ba884a
remove leading /
Aug 4, 2023
5563210
another leading slash
Aug 4, 2023
583feab
Merge branch 'feature/projects' of github.com:dannyp303/ofrak into fe…
Aug 4, 2023
a49ec44
Merge pull request #66 from dannyp303/feature/project_focus_fixups
dannyp303 Aug 4, 2023
19587ec
postmerge cleanups
Edward-Larson Aug 4, 2023
df8fb03
remove unused imports
Edward-Larson Aug 4, 2023
7b81048
oops
Aug 4, 2023
be0b6f0
Do mypy's bidding
Aug 4, 2023
c290a71
make associated script checkboxes work with script reset
Edward-Larson Aug 4, 2023
712ef2d
Merge branch 'feature/projects' into feature/associated_scripts
Edward-Larson Aug 4, 2023
f02d564
Merge branch 'master' into feature/projects
Edward-Larson Aug 4, 2023
32d6aef
Merge branch 'feature/associated_scripts' into feature/projects
Edward-Larson Aug 4, 2023
e41cebc
core init script functionality
Edward-Larson Aug 4, 2023
70e9b4b
removing debug print
Edward-Larson Aug 4, 2023
bc765db
refactor ProjectManagerCheckbox.svelte a bit, better styling
Edward-Larson Aug 4, 2023
a00f446
add some on-hover hints for checkboxes, rename "Run" to "Launch"
Edward-Larson Aug 5, 2023
e43adae
Merge pull request #68 from EdwardLarson/feature/projects
dannyp303 Aug 7, 2023
715fffd
only show project options if experimental settings enabled
Edward-Larson Aug 7, 2023
01d5c71
correct script options to binary options
Edward-Larson Aug 7, 2023
2bb9dc4
Merge pull request #67 from EdwardLarson/feature/associated_scripts
dannyp303 Aug 7, 2023
c6fabb5
Merge pull request #69 from EdwardLarson/feature/init_scripts
dannyp303 Aug 7, 2023
c1115f5
Some tests for projects
Aug 7, 2023
2fe0bb1
Merge branch 'feature/projects' of github.com:dannyp303/ofrak into fe…
Aug 7, 2023
59e28cc
save project test
Aug 8, 2023
d4bdaee
test delete
Aug 8, 2023
f6a0d01
test get project script
Aug 8, 2023
ddd5788
Test git clone
Aug 8, 2023
e1c1a6e
Test open project
Aug 8, 2023
5be2e68
linting
Aug 8, 2023
545da2b
remove empty test, use HTTPS instead of git URLs, fix project id to s…
Edward-Larson Aug 8, 2023
f5ab597
Merge pull request #71 from EdwardLarson/feature/project-tests
dannyp303 Aug 8, 2023
d2963a1
Merge pull request #70 from dannyp303/feature/project-tests
dannyp303 Aug 8, 2023
8c22a91
Merge branch 'master' into feature/projects
dannyp303 Aug 8, 2023
3747c75
Changelog
Aug 8, 2023
29dc911
frontend lint from merge conflict
Aug 8, 2023
2811e14
update old project tests, fix minor bugs, use init script by default
Edward-Larson Aug 8, 2023
c495743
finish renaming "adventure" to "project"
Edward-Larson Aug 8, 2023
cc5bc09
Merge pull request #72 from EdwardLarson/bugfix/minor_project_fixes
dannyp303 Aug 8, 2023
ea13a0e
fix very dumb typo
Edward-Larson Aug 8, 2023
529c07d
Merge pull request #73 from EdwardLarson/bugfix/dump_project_typo
dannyp303 Aug 8, 2023
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
35 changes: 35 additions & 0 deletions frontend/public/icons/back-arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions frontend/public/icons/binary.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions frontend/public/icons/briefcase.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions frontend/public/icons/disk.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions frontend/public/icons/reset.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions frontend/public/icons/trash.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions frontend/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@
import { keyEventToString, shortcuts } from "./keyboard.js";

import { writable } from "svelte/store";
import ProjectManagerView from "./ProjectManager/ProjectManagerView.svelte";

printConsoleArt();

let showRootResource = false,
showProjectManager = false,
dataLenPromise = Promise.resolve([]),
hexScrollY = writable({}),
useAssemblyView = false,
Expand Down Expand Up @@ -188,6 +190,8 @@ Answer by running riddle.answer('your answer here') from the console.`);
bind:bottomLeftPane="{bottomLeftPane}"
bind:resourceNodeDataMap="{resourceNodeDataMap}"
bind:modifierView="{modifierView}"
bind:showProjectManager="{showProjectManager}"
bind:showRootResource="{showRootResource}"
/>
{/if}
</Pane>
Expand Down Expand Up @@ -251,10 +255,19 @@ Answer by running riddle.answer('your answer here') from the console.`);
<AudioPlayer />
</div>
{/if}
{:else if showProjectManager}
<ProjectManagerView
bind:rootResourceLoadPromise="{rootResourceLoadPromise}"
bind:rootResource="{rootResource}"
bind:resources="{resources}"
bind:showRootResource="{showRootResource}"
bind:showProjectManager="{showProjectManager}"
/>
{:else}
<StartView
bind:rootResourceLoadPromise="{rootResourceLoadPromise}"
bind:showRootResource="{showRootResource}"
bind:showProjectManager="{showProjectManager}"
bind:resources="{resources}"
bind:rootResource="{rootResource}"
bind:resourceNodeDataMap="{resourceNodeDataMap}"
Expand Down
23 changes: 23 additions & 0 deletions frontend/src/ExclusiveCheckbox.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script>
import Checkbox from "./Checkbox.svelte";

export let selectedValue,
ownValue,
leftbox = false,
nomargin = false;

let thisSelected;

$: if (thisSelected) {
selectedValue = ownValue;
}
</script>

<Checkbox
leftbox="{leftbox}"
nomargin="{nomargin}"
checked="{selectedValue === ownValue}"
bind:value="{thisSelected}"
>
<slot />
</Checkbox>
1 change: 0 additions & 1 deletion frontend/src/FileBrowser.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

.filelabel span {
width: 100%;
margin-left: 2ch;
background: inherit;
color: inherit;
/* border-bottom: 1px solid var(--main-fg-color); */
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<style>
.add-file {
display: flex;
flex-direction: row;
justify-content: space-around;
}

button {
margin: 1em, 0;
padding-top: 0.5em;
padding-bottom: 0.5em;
padding-left: 1em;
padding-right: 1em;
background-color: var(--main-bg-color);
color: var(--main-fg-color);
border: 1px solid var(--main-fg-color);
border-radius: 0;
font-size: smaller;
overflow: hidden;
box-shadow: none;
}
button:hover,
button:focus {
outline: none;
box-shadow: inset 1px 1px 0 var(--main-fg-color),
inset -1px -1px 0 var(--main-fg-color);
}

button:active {
box-shadow: inset 2px 2px 0 var(--main-fg-color),
inset -2px -2px 0 var(--main-fg-color);
}
</style>

<script>
import FileBrowser from "../FileBrowser.svelte";
import Icon from "../Icon.svelte";
import { selectedProject, settings } from "../stores";
let files, f;

$: if (files) {
f = files[0];
files = null;
}
async function addBinaryToProject() {
await fetch(
`${$settings.backendUrl}/add_binary_to_project?id=${$selectedProject.session_id}&name=${f.name}`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: await f.arrayBuffer(),
}
).then(async (r) => {
if (!r.ok) {
throw Error(JSON.stringify(await r.json(), undefined, 2));
}
$selectedProject = await fetch(
`${$settings.backendUrl}/get_project_by_id?id=${$selectedProject.session_id}`
).then((r) => {
if (!r.ok) {
throw Error(r.statusText);
}
return r.json();
});
return await r.json();
});
}
</script>

<div class="add-file">
<FileBrowser bind:files="{files}" />
{#if f}
<button on:click="{addBinaryToProject}"
><Icon url="/icons/binary.svg" /> Add Binary to Project</button
>
{/if}
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<style>
.add-file {
display: flex;
flex-direction: row;
justify-content: space-around;
}

button {
margin: 1em, 0;
padding-top: 0.5em;
padding-bottom: 0.5em;
padding-left: 1em;
padding-right: 1em;
background-color: var(--main-bg-color);
color: var(--main-fg-color);
border: 1px solid var(--main-fg-color);
border-radius: 0;
font-size: smaller;
overflow: hidden;
box-shadow: none;
}
</style>

<script>
import FileBrowser from "../FileBrowser.svelte";
import Icon from "../Icon.svelte";
import { selectedProject, settings } from "../stores";
let files, f;

$: if (files) {
f = files[0];
files = null;
}

async function addScriptToProject() {
return await fetch(
`${$settings.backendUrl}/add_script_to_project?id=${$selectedProject.session_id}&name=${f.name}`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: await f.arrayBuffer(),
}
).then(async (r) => {
if (!r.ok) {
throw Error(JSON.stringify(await r.json(), undefined, 2));
}
$selectedProject = await fetch(
`${$settings.backendUrl}/get_project_by_id?id=${$selectedProject.session_id}`
).then((r) => {
if (!r.ok) {
throw Error(r.statusText);
}
return r.json();
});
return await r.json();
});
}
</script>

<div class="add-file">
<FileBrowser bind:files="{files}" />
{#if f}
<button on:click="{addScriptToProject}"
><Icon url="/icons/document.svg" /> Add Script to Project</button
>
{/if}
</div>
68 changes: 68 additions & 0 deletions frontend/src/ProjectManager/ProjectManagerBinaryOptions.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<style>
button {
margin-bottom: 1em;
margin-left: 1em;
padding-top: 0.5em;
padding-bottom: 0.5em;
padding-left: 1em;
padding-right: 1em;
background-color: var(--main-bg-color);
color: var(--main-fg-color);
border: 1px solid var(--main-fg-color);
border-radius: 0;
font-size: smaller;
overflow: hidden;
box-shadow: none;
}

button:hover,
button:focus {
outline: none;
box-shadow: inset 1px 1px 0 var(--main-fg-color),
inset -1px -1px 0 var(--main-fg-color);
}

button:active {
box-shadow: inset 2px 2px 0 var(--main-fg-color),
inset -2px -2px 0 var(--main-fg-color);
}
</style>

<script>
import { selectedProject, settings, selected } from "../stores";
import Icon from "../Icon.svelte";

export let name;

async function deleteBinary() {
await fetch(`${$settings.backendUrl}/delete_binary_from_project`, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
id: $selectedProject.session_id,
binary: name,
}),
}).then(async (r) => {
if (!r.ok) {
throw Error(JSON.stringify(await r.json(), undefined, 2));
}
$selectedProject = await fetch(
`${$settings.backendUrl}/get_project_by_id?id=${$selectedProject.session_id}`
).then((r) => {
if (!r.ok) {
throw Error(r.statusText);
}
return r.json();
});
return await r.json();
});
}
</script>

<div>
<button on:click|stopPropagation="{deleteBinary}"
><Icon url="/icons/trash.svg" />Delete {name} from project.</button
>
</div>
Loading