Enhance spoiler UI

This commit is contained in:
2026-05-25 21:46:33 -05:00
parent e60a4c4d57
commit 1e364f8af5
13 changed files with 664 additions and 68 deletions
+5 -3
View File
@@ -111,10 +111,12 @@ export default defineComponent({
try {
const parsed_yaml = yaml.load(reader.result, { schema: yaml.FAILSAFE_SCHEMA });
const errors = this.yamlErrors(parsed_yaml);
if (errors) {
console.log("GWAA");
if (errors.length > 0) {
this.uploaded_yaml = null;
this.yaml_error = errors.join("\\\n");
} else {
console.log("GWAA");
this.uploaded_yaml = reader.result;
this.yaml_error = null;
}
@@ -156,11 +158,11 @@ export default defineComponent({
<div class="card-footer">
<div class="nav nav-pills nav-fill" role="group">
<button type="button" class="m-1 nav-item btn btn-outline-danger"
@click="generate(true);" :disabled="uploaded_yaml == null || yaml_error">
@click="generate(true);" :disabled="uploaded_yaml == null">
Generate Race Mystery
</button>
<button type="button" class="m-1 nav-item btn btn-outline-primary"
@click="generate(false);" :disabled="uploaded_yaml == null || yaml_error">
@click="generate(false);" :disabled="uploaded_yaml == null">
Generate Mystery
</button>
</div>