mirror of
https://codeberg.org/demostf/frontend.git
synced 2026-06-03 18:24:12 +02:00
improve nojs messages
This commit is contained in:
parent
637f53ac06
commit
f70103367a
5 changed files with 12 additions and 6 deletions
|
|
@ -5,6 +5,7 @@ import {count_ticks} from "./edit/tools";
|
|||
import {Editor} from "./edit/EditPage";
|
||||
|
||||
ready(async () => {
|
||||
document.querySelectorAll('.onlyscript').forEach(e => e.classList.remove('onlyscript'));
|
||||
const fileInput: HTMLInputElement | null = document.querySelector(`.dropzone input[type="file"]`);
|
||||
const drop_text = document.querySelector(`.dropzone .text`);
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import {render} from "solid-js/web";
|
|||
import {Analyser} from "./viewer/Analyse/Analyser";
|
||||
|
||||
ready(async () => {
|
||||
document.querySelectorAll('.onlyscript').forEach(e => e.classList.remove('onlyscript'));
|
||||
const fileInput: HTMLInputElement | null = document.querySelector(`.dropzone input[type="file"]`);
|
||||
const urlInput: HTMLInputElement | null = document.querySelector(`.viewer-page input[name="url"]`);
|
||||
const drop_text = document.querySelector(`.dropzone .text`);
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@ impl Page for EditorPage {
|
|||
}
|
||||
.dropzone role = "button" {
|
||||
noscript {
|
||||
"Javascript is required to view a demo."
|
||||
"Javascript is required to edit a demo."
|
||||
}
|
||||
span.text { "Drop files or click to view" }
|
||||
input type = "file" {}
|
||||
span.text.onlyscript { "Drop files or click to view" }
|
||||
input.onlyscript type = "file" {}
|
||||
}
|
||||
.placeholder {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,11 +57,11 @@ impl Page for ViewerPage<'_> {
|
|||
noscript {
|
||||
"Javascript is required to view a demo."
|
||||
}
|
||||
span.text { "Drop files or click to view" }
|
||||
input type = "file" {}
|
||||
span.text.onlyscript { "Drop files or click to view" }
|
||||
input.onlyscript type = "file" {}
|
||||
}
|
||||
}
|
||||
progress.parse min = "0" max = "100" value = "0" {}
|
||||
progress.parse.onlyscript min = "0" max = "100" value = "0" {}
|
||||
}
|
||||
script module src = (script) type = "text/javascript" {}
|
||||
link rel="stylesheet" type="text/css" href=(style_url);
|
||||
|
|
|
|||
|
|
@ -229,4 +229,8 @@ p.page-note {
|
|||
|
||||
table {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.onlyscript {
|
||||
display:none;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue