Spaces:
Sleeping
Sleeping
Update webui/run_app.py
Browse files- webui/run_app.py +1 -33
webui/run_app.py
CHANGED
|
@@ -143,38 +143,6 @@ def format_time(seconds):
|
|
| 143 |
|
| 144 |
update_online_status()
|
| 145 |
|
| 146 |
-
def check_access_permission(user_role="guest"):
|
| 147 |
-
if st.session_state.has_slot:
|
| 148 |
-
return True
|
| 149 |
-
|
| 150 |
-
if user_role == "vip":
|
| 151 |
-
acquired = vip_semaphore.acquire(blocking=False)
|
| 152 |
-
else:
|
| 153 |
-
acquired = guest_semaphore.acquire(blocking=False)
|
| 154 |
-
|
| 155 |
-
if not acquired:
|
| 156 |
-
return False
|
| 157 |
-
|
| 158 |
-
st.session_state.has_slot = True
|
| 159 |
-
st.session_state.user_role = user_role
|
| 160 |
-
|
| 161 |
-
active_registry[session_id] = {
|
| 162 |
-
"role": user_role,
|
| 163 |
-
"last_seen": time.time()
|
| 164 |
-
}
|
| 165 |
-
|
| 166 |
-
waiting_registry.pop(session_id, None)
|
| 167 |
-
|
| 168 |
-
return True
|
| 169 |
-
|
| 170 |
-
def format_time(seconds):
|
| 171 |
-
seconds = int(seconds)
|
| 172 |
-
minutes = seconds // 60
|
| 173 |
-
secs = seconds % 60
|
| 174 |
-
return f"{minutes:02d}:{secs:02d}"
|
| 175 |
-
|
| 176 |
-
update_online_status()
|
| 177 |
-
|
| 178 |
# =========================================================
|
| 179 |
# GIAO DIỆN
|
| 180 |
# =========================================================
|
|
@@ -209,7 +177,7 @@ st.markdown("""
|
|
| 209 |
|
| 210 |
.info-box {
|
| 211 |
background: rgba(255,255,255,0.05);
|
| 212 |
-
border: 1px solid rgba(255,255,
|
| 213 |
padding: 24px;
|
| 214 |
border-radius: 20px;
|
| 215 |
backdrop-filter: blur(10px);
|
|
|
|
| 143 |
|
| 144 |
update_online_status()
|
| 145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
# =========================================================
|
| 147 |
# GIAO DIỆN
|
| 148 |
# =========================================================
|
|
|
|
| 177 |
|
| 178 |
.info-box {
|
| 179 |
background: rgba(255,255,255,0.05);
|
| 180 |
+
border: 1px solid rgba(255,255,25,0.1);
|
| 181 |
padding: 24px;
|
| 182 |
border-radius: 20px;
|
| 183 |
backdrop-filter: blur(10px);
|