flag/screenshot btn fix

This commit is contained in:
aliabd 2020-08-03 11:57:42 -07:00
parent e5f7efdbe1
commit 4b69268414

View File

@ -125,12 +125,20 @@ function gradio(config, fn, target) {
io_master.last_input = null;
io_master.last_output = null;
});
if (config["allow_screenshot"]) {
if (config["allow_screenshot"] && !config["allow_flagging"]) {
target.find(".screenshot").css("visibility", "visible");
target.find(".flag").css("display", "none")
}
if(config["allow_flagging"]){
if (!config["allow_screenshot"] && config["allow_flagging"]) {
target.find(".flag").css("visibility", "visible");
target.find(".screenshot").css("display", "none")
}
if (config["allow_screenshot"] && config["allow_flagging"]) {
target.find(".screenshot").css("visibility", "visible");
target.find(".flag").css("visibility", "visible")
}
target.find(".screenshot").click(function() {
$(".screenshot").hide();
$(".screenshot_logo").show();