Enhance spoiler UI
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user