mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-21 02:19:59 +08:00
flag styling
This commit is contained in:
parent
ba48c1fa07
commit
7c20812a0d
@ -109,12 +109,12 @@ input.submit {
|
|||||||
input.submit:hover {
|
input.submit:hover {
|
||||||
background-color: #f39c12;
|
background-color: #f39c12;
|
||||||
}
|
}
|
||||||
.flagged {
|
.flag {
|
||||||
background-color: pink !important;
|
transition: background-color 100ms;
|
||||||
|
}
|
||||||
|
.flagged {
|
||||||
|
background-color: #e74c3c !important;
|
||||||
}
|
}
|
||||||
/* label:hover {
|
|
||||||
background-color: lightgray;
|
|
||||||
} */
|
|
||||||
.overlay {
|
.overlay {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
@ -191,8 +191,6 @@ function gradio(config, fn, target, example_file_path) {
|
|||||||
for (let output_interface of output_interfaces) {
|
for (let output_interface of output_interfaces) {
|
||||||
output_interface.clear();
|
output_interface.clear();
|
||||||
}
|
}
|
||||||
target.find(".flag").removeClass("flagged");
|
|
||||||
target.find(".flag").val("FLAG");
|
|
||||||
target.find(".flag_message").empty();
|
target.find(".flag_message").empty();
|
||||||
target.find(".loading").addClass("invisible");
|
target.find(".loading").addClass("invisible");
|
||||||
target.find(".loading_time").text("");
|
target.find(".loading_time").text("");
|
||||||
@ -498,8 +496,6 @@ function gradio(config, fn, target, example_file_path) {
|
|||||||
target.find(".submit").show();
|
target.find(".submit").show();
|
||||||
target.find(".submit").click(function() {
|
target.find(".submit").click(function() {
|
||||||
io_master.gather();
|
io_master.gather();
|
||||||
target.find(".flag").removeClass("flagged");
|
|
||||||
target.find(".flag").val("FLAG");
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (!config.show_input) {
|
if (!config.show_input) {
|
||||||
@ -509,7 +505,7 @@ function gradio(config, fn, target, example_file_path) {
|
|||||||
target.find(".flag").click(function() {
|
target.find(".flag").click(function() {
|
||||||
if (io_master.last_output) {
|
if (io_master.last_output) {
|
||||||
target.find(".flag").addClass("flagged");
|
target.find(".flag").addClass("flagged");
|
||||||
target.find(".flag").val("FLAGGED");
|
window.setTimeout(() => {target.find(".flag").removeClass("flagged");}, 100);
|
||||||
io_master.flag();
|
io_master.flag();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user