Commit
·
c99bcca
1
Parent(s):
8c1b8eb
3. Okt. 2024, 05:10
Browse files- _res/_custom.js +11 -5
_res/_custom.js
CHANGED
@@ -87,7 +87,6 @@ function gradioCustomJS() {
|
|
87 |
alertModalElemP.id = "alertModalP"
|
88 |
alertModalElemP.append(alertModalElemI, alertModalElemSpan)
|
89 |
alertModalElem.id = "alertModal"
|
90 |
-
alertModalElem.style.display = "none"
|
91 |
alertModalElem.append(alertModalElemP, alertModalElemButton)
|
92 |
//alertModalElem.innerHTML = '<p></p>'
|
93 |
resolutionModalWrapper.appendChild(alertModalElem)
|
@@ -160,22 +159,29 @@ function gradioCustomJS() {
|
|
160 |
resolutionModalWrapper.style.opacity = "1"
|
161 |
alertModalElemSpan.textContent = "Diese Seite ist nicht für mobile Geräte optimiert. Bitte besuche diese Seite von einem Desktop-Computer aus."
|
162 |
alertModalElemButton.textContent = "Ok"
|
163 |
-
|
|
|
|
|
164 |
} else if (window.innerWidth < 1024) {
|
165 |
gradioContainer.classList.add("blur-container")
|
166 |
body.style.setProperty("--blur-value", "12px")
|
167 |
gradioApp.style.height = "calc(100vh - 120px)"
|
|
|
|
|
168 |
alertModalElemSpan.textContent = "Bildschirm Auflösung oder Fensterbreite zu gering. Bitte besuche diese Seite von einem Desktop-Computer aus."
|
169 |
alertModalElemButton.textContent = "Ok"
|
170 |
-
|
|
|
|
|
171 |
} else {
|
172 |
gradioContainer.classList.remove("blur-container")
|
173 |
body.style.setProperty("--blur-value", "0px")
|
174 |
gradioApp.style.height = ""
|
175 |
resolutionModalWrapper.style.backdropFilter = "blur(0px)"
|
176 |
resolutionModalWrapper.style.opacity = "0"
|
177 |
-
|
178 |
-
|
|
|
179 |
}
|
180 |
}
|
181 |
|
|
|
87 |
alertModalElemP.id = "alertModalP"
|
88 |
alertModalElemP.append(alertModalElemI, alertModalElemSpan)
|
89 |
alertModalElem.id = "alertModal"
|
|
|
90 |
alertModalElem.append(alertModalElemP, alertModalElemButton)
|
91 |
//alertModalElem.innerHTML = '<p></p>'
|
92 |
resolutionModalWrapper.appendChild(alertModalElem)
|
|
|
159 |
resolutionModalWrapper.style.opacity = "1"
|
160 |
alertModalElemSpan.textContent = "Diese Seite ist nicht für mobile Geräte optimiert. Bitte besuche diese Seite von einem Desktop-Computer aus."
|
161 |
alertModalElemButton.textContent = "Ok"
|
162 |
+
setTimeout(() => {
|
163 |
+
resolutionModalWrapper.style.display = ""
|
164 |
+
}, 400)
|
165 |
} else if (window.innerWidth < 1024) {
|
166 |
gradioContainer.classList.add("blur-container")
|
167 |
body.style.setProperty("--blur-value", "12px")
|
168 |
gradioApp.style.height = "calc(100vh - 120px)"
|
169 |
+
resolutionModalWrapper.style.backdropFilter = "blur(12px)"
|
170 |
+
resolutionModalWrapper.style.opacity = "1"
|
171 |
alertModalElemSpan.textContent = "Bildschirm Auflösung oder Fensterbreite zu gering. Bitte besuche diese Seite von einem Desktop-Computer aus."
|
172 |
alertModalElemButton.textContent = "Ok"
|
173 |
+
setTimeout(() => {
|
174 |
+
resolutionModalWrapper.style.display = ""
|
175 |
+
}, 400)
|
176 |
} else {
|
177 |
gradioContainer.classList.remove("blur-container")
|
178 |
body.style.setProperty("--blur-value", "0px")
|
179 |
gradioApp.style.height = ""
|
180 |
resolutionModalWrapper.style.backdropFilter = "blur(0px)"
|
181 |
resolutionModalWrapper.style.opacity = "0"
|
182 |
+
setTimeout(() => {
|
183 |
+
resolutionModalWrapper.style.display = "none"
|
184 |
+
}, 400)
|
185 |
}
|
186 |
}
|
187 |
|