mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 09:01:54 +08:00
separate busy and uploading flag
This commit is contained in:
@@ -128,7 +128,7 @@ function Msd() {
|
||||
$("msd-another-another-user-uploads").style.display = "none";
|
||||
$("msd-led").className = "led-green";
|
||||
$("msd-status").innerHTML = $("msd-led").title = "Connected to Server";
|
||||
} else if (__state.busy) {
|
||||
} else if (__state.uploading) {
|
||||
if (!__upload_http) {
|
||||
$("msd-another-another-user-uploads").style.display = "block";
|
||||
}
|
||||
@@ -147,17 +147,17 @@ function Msd() {
|
||||
$("msd-offline").style.display = (__state.online ? "none" : "block");
|
||||
$("msd-current-image-broken").style.display = (
|
||||
__state.online && __state.info.image &&
|
||||
!__state.info.image.complete && !__state.busy ? "block" : "none"
|
||||
!__state.info.image.complete && !__state.uploading ? "block" : "none"
|
||||
);
|
||||
|
||||
$("msd-current-image-name").innerHTML = (__state.online && __state.info.image ? __state.info.image.name : "None");
|
||||
$("msd-current-image-size").innerHTML = (__state.online && __state.info.image ? __formatSize(__state.info.image.size) : "None");
|
||||
$("msd-storage-size").innerHTML = (__state.online ? __formatSize(__state.info.size) : "Unavailable");
|
||||
|
||||
wm.switchDisabled($("msd-switch-to-kvm-button"), (!__state.online || __state.connected_to === "kvm" || __state.busy));
|
||||
wm.switchDisabled($("msd-switch-to-server-button"), (!__state.online || __state.connected_to === "server" || __state.busy));
|
||||
wm.switchDisabled($("msd-select-new-image-button"), (!__state.online || __state.connected_to !== "kvm" || __state.busy || __upload_http));
|
||||
wm.switchDisabled($("msd-upload-new-image-button"), (!__state.online || __state.connected_to !== "kvm" || __state.busy || !__image_file));
|
||||
wm.switchDisabled($("msd-switch-to-kvm-button"), (!__state.online || __state.connected_to === "kvm" || __state.uploading));
|
||||
wm.switchDisabled($("msd-switch-to-server-button"), (!__state.online || __state.connected_to === "server" || __state.uploading));
|
||||
wm.switchDisabled($("msd-select-new-image-button"), (!__state.online || __state.connected_to !== "kvm" || __state.uploading || __upload_http));
|
||||
wm.switchDisabled($("msd-upload-new-image-button"), (!__state.online || __state.connected_to !== "kvm" || __state.uploading || !__image_file));
|
||||
wm.switchDisabled($("msd-abort-uploading-button"), (!__state.online || !__upload_http));
|
||||
wm.switchDisabled($("msd-reset-button"), (!__state.enabled || __state.busy));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user