Skip to content

Commit

Permalink
Merge branch 'main' into fullscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCBakerPhD authored Oct 13, 2023
2 parents efbc985 + dae1183 commit c46afb2
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 66 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/Build-and-deploy-linux.yml

This file was deleted.

21 changes: 1 addition & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,7 @@ Run the `.dmg` file and follow all instructions to move the file into your Appli

### Ubuntu

#### Graphical Interface

Right-click the `.AppImage` file, navigate to `permissions`, and check any box which mentions 'run as executable'.

#### Ubuntu - CLI

From the terminal, simply type

```
chmod +x nwb-guide-X.Y.Z.AppImage
```

Where you are using version `X.Y.Z`; then execute by calling

```
./nwb-guide-X.Y.Z.AppImage
```

> **Note:** If you're running the `.AppImage` and the app window clears to a white screen within a few seconds of starting, you will need to follow the [Developer Instructions](#developer-installation) on the [linux-fix](https://github.com/neurodatawithoutborders/nwb-guide/tree/linux-fix) branch of the NWB GUIDE.
Please follow the [Developer Instructions](#developer-installation) on the [linux-fix](https://github.com/neurodatawithoutborders/nwb-guide/tree/linux-fix) branch of the NWB GUIDE.



Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
"win": {
"asar": false,
"target": "nsis",
"icon": "src/renderer/assets/app-icon/logo-guide-draft.ico"
"icon": "src/renderer/assets/app-icon/logo-guide-draft.ico",
"requestedExecutionLevel": "requireAdministrator"
},
"mac": {
"asar": true,
Expand Down
1 change: 1 addition & 0 deletions schemas/json/dandi/upload.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
},
"cleanup": {
"type": "boolean",
"title": "Delete Local Files After Upload",
"default": false
}
},
Expand Down
16 changes: 11 additions & 5 deletions src/renderer/src/stories/JSONSchemaForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,9 @@ export class JSONSchemaForm extends LitElement {
return true;
};

#get = (path, object = this.resolved) => {
#get = (path, object = this.resolved, omitted = []) => {
// path = path.slice(this.base.length); // Correct for base path
return path.reduce((acc, curr) => (acc = acc[curr]), object);
return path.reduce((acc, curr) => (acc = acc[curr] ?? acc?.[omitted.find((str) => acc[str])]?.[curr]), object);
};

#checkRequiredAfterChange = async (localPath) => {
Expand All @@ -375,7 +375,7 @@ export class JSONSchemaForm extends LitElement {
if (indexOf !== -1) path = path.slice(indexOf + 1);
}

const resolved = this.#get(path, schema);
const resolved = this.#get(path, schema, ["properties"]);
if (resolved["$ref"]) return this.getSchema(resolved["$ref"].split("/").slice(1)); // NOTE: This assumes reference to the root of the schema

return resolved;
Expand Down Expand Up @@ -432,7 +432,7 @@ export class JSONSchemaForm extends LitElement {
? "conditional"
: ""}"
>
<label class="guided--form-label">${header(name)}</label>
<label class="guided--form-label">${info.title ?? header(name)}</label>
${interactiveInput}
<div class="errors"></div>
<div class="warnings"></div>
Expand Down Expand Up @@ -619,7 +619,13 @@ export class JSONSchemaForm extends LitElement {
} else {
// For non-links, throw a basic requirement error if the property is required
if (!errors.length && isRequired && !parent[name]) {
errors.push({ message: `${name} is a required property.`, type: "error", missing: true }); // Throw at least a basic error if the property is required
const schema = this.getSchema(localPath);
console.log(schema);
errors.push({
message: `${schema.title ?? header(name)} is a required property.`,
type: "error",
missing: true,
}); // Throw at least a basic error if the property is required
}
}

Expand Down
1 change: 0 additions & 1 deletion src/renderer/src/stories/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export class Main extends LitElement {
// Go to home screen if there is no next page
if (!info.next)
footer = {
next: "Back to Home Screen",
exit: false,
onNext: () => this.toRender.page.to("/"),
};
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/stories/pages/guided-mode/GuidedFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class GuidedFooter extends LitElement {
constructor({
back = "Back",
next = "Next",
exit = "Exit",
exit = "Return to Home Screen",
onBack = () => this.to(-1),
onNext = () => this.to(1),
onExit = () => this.to("/"),
Expand Down

0 comments on commit c46afb2

Please sign in to comment.