Spaces:
Paused
Paused
Gemini CLI commited on
Commit ·
0fae7dc
1
Parent(s): bf75543
fix: refine cleanup logic, disable default self-destruct, and premium web redesign
Browse files- app.py +39 -23
- bot.py +18 -22
- static/style.css +161 -180
app.py
CHANGED
|
@@ -92,40 +92,56 @@ async def read_index(): return FileResponse("static/index.html")
|
|
| 92 |
# --- PROFESSIONAL UI TEMPLATES ---
|
| 93 |
UI_STYLE = """
|
| 94 |
<style>
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
|
| 103 |
-
.file-list { display: grid; gap: 12px;
|
| 104 |
-
.file-item {
|
| 105 |
-
|
|
|
|
|
|
|
|
|
|
| 106 |
|
| 107 |
-
.file-icon {
|
|
|
|
|
|
|
|
|
|
| 108 |
.file-details { flex: 1; margin-left: 15px; overflow: hidden; }
|
| 109 |
-
.file-name { font-weight:
|
| 110 |
-
.file-meta { font-size:
|
| 111 |
|
| 112 |
-
.actions { display: flex; gap:
|
| 113 |
-
.btn-sm { padding: 8px 16px; border-radius: 10px; font-size: 13px; font-weight:
|
| 114 |
.btn-get { background: var(--primary); color: #fff; }
|
| 115 |
-
.btn-
|
| 116 |
-
.btn-watch { background: #4CAF50; color: #fff; }
|
| 117 |
-
.btn-watch:hover { background: #388E3C; box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3); }
|
| 118 |
|
| 119 |
.password-form { text-align: center; }
|
| 120 |
-
input[type="password"] {
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
|
| 125 |
@media (max-width: 600px) {
|
| 126 |
.file-item { flex-direction: column; align-items: flex-start; gap: 15px; }
|
| 127 |
.actions { width: 100%; }
|
| 128 |
-
.btn-sm { flex: 1;
|
| 129 |
}
|
| 130 |
</style>
|
| 131 |
"""
|
|
|
|
| 92 |
# --- PROFESSIONAL UI TEMPLATES ---
|
| 93 |
UI_STYLE = """
|
| 94 |
<style>
|
| 95 |
+
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');
|
| 96 |
+
:root { --primary: #6366f1; --bg: #030712; --card: #0f172a; --text: #f8fafc; --text-dim: #94a3b8; --border: #334155; }
|
| 97 |
+
body {
|
| 98 |
+
font-family: 'Plus Jakarta Sans', sans-serif;
|
| 99 |
+
background: var(--bg);
|
| 100 |
+
background-image: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%);
|
| 101 |
+
color: var(--text);
|
| 102 |
+
margin: 0; display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem;
|
| 103 |
+
}
|
| 104 |
+
.container { width: 100%; max-width: 800px; animation: fadeIn 0.6s ease-out; }
|
| 105 |
+
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
|
| 106 |
+
.card { background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(12px); padding: 40px; border-radius: 28px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); border: 1px solid var(--border); }
|
| 107 |
+
h2 { font-size: 2rem; font-weight: 800; text-align: center; margin-bottom: 0.5rem; letter-spacing: -1px; }
|
| 108 |
+
p.subtitle { text-align: center; color: var(--text-dim); margin-bottom: 2.5rem; font-weight: 500; }
|
| 109 |
|
| 110 |
+
.file-list { display: grid; gap: 12px; }
|
| 111 |
+
.file-item {
|
| 112 |
+
background: rgba(30, 41, 59, 0.5); padding: 16px; border-radius: 20px; border: 1px solid var(--border);
|
| 113 |
+
display: flex; justify-content: space-between; align-items: center; transition: 0.3s;
|
| 114 |
+
}
|
| 115 |
+
.file-item:hover { border-color: var(--primary); background: rgba(99, 102, 241, 0.05); transform: translateX(5px); }
|
| 116 |
|
| 117 |
+
.file-icon {
|
| 118 |
+
width: 48px; height: 48px; background: var(--bg); border-radius: 14px;
|
| 119 |
+
display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 800; color: var(--primary);
|
| 120 |
+
}
|
| 121 |
.file-details { flex: 1; margin-left: 15px; overflow: hidden; }
|
| 122 |
+
.file-name { font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
| 123 |
+
.file-meta { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
|
| 124 |
|
| 125 |
+
.actions { display: flex; gap: 8px; }
|
| 126 |
+
.btn-sm { padding: 8px 16px; border-radius: 10px; font-size: 13px; font-weight: 700; text-decoration: none; transition: 0.2s; }
|
| 127 |
.btn-get { background: var(--primary); color: #fff; }
|
| 128 |
+
.btn-watch { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
|
|
|
|
|
|
|
| 129 |
|
| 130 |
.password-form { text-align: center; }
|
| 131 |
+
input[type="password"] {
|
| 132 |
+
background: var(--bg); border: 2px solid var(--border); color: #fff;
|
| 133 |
+
padding: 16px; border-radius: 16px; width: 100%; max-width: 320px; outline: none; transition: 0.3s; font-size: 1rem; margin-bottom: 20px;
|
| 134 |
+
}
|
| 135 |
+
input[type="password"]:focus { border-color: var(--primary); }
|
| 136 |
+
.btn-main {
|
| 137 |
+
background: var(--primary); color: white; border: none; padding: 16px 40px; border-radius: 16px;
|
| 138 |
+
cursor: pointer; font-weight: 800; font-size: 1rem; transition: 0.3s; box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
|
| 139 |
+
}
|
| 140 |
|
| 141 |
@media (max-width: 600px) {
|
| 142 |
.file-item { flex-direction: column; align-items: flex-start; gap: 15px; }
|
| 143 |
.actions { width: 100%; }
|
| 144 |
+
.btn-sm { flex: 1; text-align: center; }
|
| 145 |
}
|
| 146 |
</style>
|
| 147 |
"""
|
bot.py
CHANGED
|
@@ -13,7 +13,7 @@ print("--- 🚀 Initializing NexusShare Pro Engine ---")
|
|
| 13 |
|
| 14 |
# Session management
|
| 15 |
user_sessions = {} # {uid: {"mode": "zip", "files": [], "name": "custom", ...}}
|
| 16 |
-
user_settings = {} # {uid: {"auto_delete": 24, "password": None, "self_destruct":
|
| 17 |
user_locks = {}
|
| 18 |
|
| 19 |
def get_progress_bar(current, total, start_time):
|
|
@@ -132,10 +132,11 @@ else:
|
|
| 132 |
@bot.on_message(filters.command("settings") & filters.private)
|
| 133 |
async def settings_cmd(client, message: Message):
|
| 134 |
uid = message.from_user.id
|
| 135 |
-
s = user_settings.get(uid, {"auto_delete": 24, "password": None})
|
| 136 |
user_settings[uid] = s
|
| 137 |
kb = InlineKeyboardMarkup([
|
| 138 |
[InlineKeyboardButton(f"⏰ Auto-Delete: {s['auto_delete']}h", callback_data="set_del_cycle")],
|
|
|
|
| 139 |
[InlineKeyboardButton(f"🔐 Password: {'✅ Set' if s['password'] else '❌ None'}", callback_data="set_pass_init")],
|
| 140 |
[InlineKeyboardButton("🗑️ Clear My Storage", callback_data="confirm_clear")],
|
| 141 |
[InlineKeyboardButton("❌ Close", callback_data="close_settings")]
|
|
@@ -145,11 +146,13 @@ else:
|
|
| 145 |
@bot.on_callback_query(filters.regex("^set_"))
|
| 146 |
async def settings_callbacks(client, cb: CallbackQuery):
|
| 147 |
uid = cb.from_user.id
|
| 148 |
-
s = user_settings.get(uid, {"auto_delete": 24, "password": None})
|
| 149 |
|
| 150 |
if cb.data == "set_del_cycle":
|
| 151 |
opts = [1, 6, 12, 24, 48]
|
| 152 |
s["auto_delete"] = opts[(opts.index(s.get("auto_delete", 24)) + 1) % len(opts)]
|
|
|
|
|
|
|
| 153 |
elif cb.data == "set_pass_init":
|
| 154 |
user_sessions[uid] = {"waiting_pass": True, "target": "settings", "status_msg_id": cb.message.id}
|
| 155 |
return await cb.answer("⌨️ Send the password as a text message.", show_alert=True)
|
|
@@ -157,6 +160,7 @@ else:
|
|
| 157 |
user_settings[uid] = s
|
| 158 |
kb = InlineKeyboardMarkup([
|
| 159 |
[InlineKeyboardButton(f"⏰ Auto-Delete: {s['auto_delete']}h", callback_data="set_del_cycle")],
|
|
|
|
| 160 |
[InlineKeyboardButton(f"🔐 Password: {'✅ Set' if s['password'] else '❌ None'}", callback_data="set_pass_init")],
|
| 161 |
[InlineKeyboardButton("🗑️ Clear My Storage", callback_data="confirm_clear")],
|
| 162 |
[InlineKeyboardButton("❌ Close", callback_data="close_settings")]
|
|
@@ -321,23 +325,17 @@ else:
|
|
| 321 |
try: os.remove(fpath)
|
| 322 |
except: pass
|
| 323 |
sname = os.path.basename(opath)
|
| 324 |
-
settings = user_settings.get(uid, {"password":None, "self_destruct":
|
| 325 |
-
set_metadata(sname, {
|
| 326 |
-
"password": settings.get("password"),
|
| 327 |
-
"self_destruct": settings.get("self_destruct", True)
|
| 328 |
-
})
|
| 329 |
durl = f"{BASE_URL}/download/user_{uid}/{sname}"
|
| 330 |
results_text += f"✅ `{fname}`\n└ 📊 Saved: `{saved:.1f}%` • [Link]({durl})\n\n"
|
| 331 |
else:
|
| 332 |
results_text += f"❌ `{fname}` - Compression failed.\n\n"
|
| 333 |
-
# Even if failed, if the user requested batch, we might want to clean up to save space
|
| 334 |
-
# try: os.remove(fpath) except: pass
|
| 335 |
|
| 336 |
await cb.message.edit_text(results_text, disable_web_page_preview=True)
|
| 337 |
del user_sessions[uid]
|
| 338 |
return
|
| 339 |
|
| 340 |
-
# ZIP and PDF Merge logic
|
| 341 |
ext = ".zip" if mode=="zip" else ".pdf"
|
| 342 |
oname = f"{sess['name']}{ext}" if sess.get("name") else f"{sess['batch_id']}_processed{ext}"
|
| 343 |
opath = os.path.join(UPLOAD_DIR, udir, oname)
|
|
@@ -359,9 +357,9 @@ else:
|
|
| 359 |
try: os.remove(f)
|
| 360 |
except: pass
|
| 361 |
|
| 362 |
-
settings = user_settings.get(uid, {"password":None, "self_destruct":
|
| 363 |
-
set_metadata(oname, {"password": settings.get("password"), "self_destruct": settings.get("self_destruct",
|
| 364 |
-
set_metadata(sess["batch_id"], {"password": settings.get("password")
|
| 365 |
|
| 366 |
durl = f"{BASE_URL}/download/{udir}/{oname}"
|
| 367 |
vurl = f"{BASE_URL}/view/{udir}/{sess['batch_id']}"
|
|
@@ -411,6 +409,9 @@ else:
|
|
| 411 |
|
| 412 |
try:
|
| 413 |
await client.download_media(message, file_name=fpath, progress=progress)
|
|
|
|
|
|
|
|
|
|
| 414 |
|
| 415 |
if is_tool:
|
| 416 |
if user_sessions[uid]["mode"] == "unzip":
|
|
@@ -437,7 +438,6 @@ else:
|
|
| 437 |
del user_sessions[uid]
|
| 438 |
return
|
| 439 |
|
| 440 |
-
# Batch processing for others
|
| 441 |
user_sessions[uid].setdefault("files", []).append(fpath)
|
| 442 |
await status.delete()
|
| 443 |
try:
|
|
@@ -457,18 +457,14 @@ else:
|
|
| 457 |
except: pass
|
| 458 |
return
|
| 459 |
else:
|
| 460 |
-
settings = user_settings.get(uid, {"password":None, "self_destruct":
|
| 461 |
-
set_metadata(os.path.basename(fpath), {
|
| 462 |
-
"password": settings.get("password"),
|
| 463 |
-
"self_destruct": settings.get("self_destruct", True)
|
| 464 |
-
})
|
| 465 |
durl = f"{BASE_URL}/download/user_{uid}/{os.path.basename(fpath)}"
|
| 466 |
|
| 467 |
-
# Fix for InlineKeyboardMarkup issue
|
| 468 |
btns = [[InlineKeyboardButton("📥 Download", url=durl)]]
|
| 469 |
if fname.lower().endswith(('.mp4', '.mkv', '.webm')):
|
| 470 |
btns.append([InlineKeyboardButton("🎬 Watch Online", url=f"{BASE_URL}/player/user_{uid}/{os.path.basename(fpath)}")])
|
| 471 |
|
| 472 |
kb = InlineKeyboardMarkup(btns)
|
| 473 |
-
await status.edit_text(f"✅ **Upload Success!**\n`{fname}`\n\n🛡️ Pass: `{'Yes' if settings
|
| 474 |
except Exception as e: await status.edit_text(f"❌ Error: {e}")
|
|
|
|
| 13 |
|
| 14 |
# Session management
|
| 15 |
user_sessions = {} # {uid: {"mode": "zip", "files": [], "name": "custom", ...}}
|
| 16 |
+
user_settings = {} # {uid: {"auto_delete": 24, "password": None, "self_destruct": False}}
|
| 17 |
user_locks = {}
|
| 18 |
|
| 19 |
def get_progress_bar(current, total, start_time):
|
|
|
|
| 132 |
@bot.on_message(filters.command("settings") & filters.private)
|
| 133 |
async def settings_cmd(client, message: Message):
|
| 134 |
uid = message.from_user.id
|
| 135 |
+
s = user_settings.get(uid, {"auto_delete": 24, "password": None, "self_destruct": False})
|
| 136 |
user_settings[uid] = s
|
| 137 |
kb = InlineKeyboardMarkup([
|
| 138 |
[InlineKeyboardButton(f"⏰ Auto-Delete: {s['auto_delete']}h", callback_data="set_del_cycle")],
|
| 139 |
+
[InlineKeyboardButton(f"💥 Self-Destruct: {'ON' if s['self_destruct'] else 'OFF'}", callback_data="set_sd_toggle")],
|
| 140 |
[InlineKeyboardButton(f"🔐 Password: {'✅ Set' if s['password'] else '❌ None'}", callback_data="set_pass_init")],
|
| 141 |
[InlineKeyboardButton("🗑️ Clear My Storage", callback_data="confirm_clear")],
|
| 142 |
[InlineKeyboardButton("❌ Close", callback_data="close_settings")]
|
|
|
|
| 146 |
@bot.on_callback_query(filters.regex("^set_"))
|
| 147 |
async def settings_callbacks(client, cb: CallbackQuery):
|
| 148 |
uid = cb.from_user.id
|
| 149 |
+
s = user_settings.get(uid, {"auto_delete": 24, "password": None, "self_destruct": False})
|
| 150 |
|
| 151 |
if cb.data == "set_del_cycle":
|
| 152 |
opts = [1, 6, 12, 24, 48]
|
| 153 |
s["auto_delete"] = opts[(opts.index(s.get("auto_delete", 24)) + 1) % len(opts)]
|
| 154 |
+
elif cb.data == "set_sd_toggle":
|
| 155 |
+
s["self_destruct"] = not s.get("self_destruct", False)
|
| 156 |
elif cb.data == "set_pass_init":
|
| 157 |
user_sessions[uid] = {"waiting_pass": True, "target": "settings", "status_msg_id": cb.message.id}
|
| 158 |
return await cb.answer("⌨️ Send the password as a text message.", show_alert=True)
|
|
|
|
| 160 |
user_settings[uid] = s
|
| 161 |
kb = InlineKeyboardMarkup([
|
| 162 |
[InlineKeyboardButton(f"⏰ Auto-Delete: {s['auto_delete']}h", callback_data="set_del_cycle")],
|
| 163 |
+
[InlineKeyboardButton(f"💥 Self-Destruct: {'ON' if s['self_destruct'] else 'OFF'}", callback_data="set_sd_toggle")],
|
| 164 |
[InlineKeyboardButton(f"🔐 Password: {'✅ Set' if s['password'] else '❌ None'}", callback_data="set_pass_init")],
|
| 165 |
[InlineKeyboardButton("🗑️ Clear My Storage", callback_data="confirm_clear")],
|
| 166 |
[InlineKeyboardButton("❌ Close", callback_data="close_settings")]
|
|
|
|
| 325 |
try: os.remove(fpath)
|
| 326 |
except: pass
|
| 327 |
sname = os.path.basename(opath)
|
| 328 |
+
settings = user_settings.get(uid, {"password":None, "self_destruct":False})
|
| 329 |
+
set_metadata(sname, {"password": settings.get("password"), "self_destruct": settings.get("self_destruct", False)})
|
|
|
|
|
|
|
|
|
|
| 330 |
durl = f"{BASE_URL}/download/user_{uid}/{sname}"
|
| 331 |
results_text += f"✅ `{fname}`\n└ 📊 Saved: `{saved:.1f}%` • [Link]({durl})\n\n"
|
| 332 |
else:
|
| 333 |
results_text += f"❌ `{fname}` - Compression failed.\n\n"
|
|
|
|
|
|
|
| 334 |
|
| 335 |
await cb.message.edit_text(results_text, disable_web_page_preview=True)
|
| 336 |
del user_sessions[uid]
|
| 337 |
return
|
| 338 |
|
|
|
|
| 339 |
ext = ".zip" if mode=="zip" else ".pdf"
|
| 340 |
oname = f"{sess['name']}{ext}" if sess.get("name") else f"{sess['batch_id']}_processed{ext}"
|
| 341 |
opath = os.path.join(UPLOAD_DIR, udir, oname)
|
|
|
|
| 357 |
try: os.remove(f)
|
| 358 |
except: pass
|
| 359 |
|
| 360 |
+
settings = user_settings.get(uid, {"password":None, "self_destruct": False})
|
| 361 |
+
set_metadata(oname, {"password": settings.get("password"), "self_destruct": settings.get("self_destruct", False)})
|
| 362 |
+
set_metadata(sess["batch_id"], {"password": settings.get("password")})
|
| 363 |
|
| 364 |
durl = f"{BASE_URL}/download/{udir}/{oname}"
|
| 365 |
vurl = f"{BASE_URL}/view/{udir}/{sess['batch_id']}"
|
|
|
|
| 409 |
|
| 410 |
try:
|
| 411 |
await client.download_media(message, file_name=fpath, progress=progress)
|
| 412 |
+
# Cleanup user message from chat to keep it clean
|
| 413 |
+
try: await message.delete()
|
| 414 |
+
except: pass
|
| 415 |
|
| 416 |
if is_tool:
|
| 417 |
if user_sessions[uid]["mode"] == "unzip":
|
|
|
|
| 438 |
del user_sessions[uid]
|
| 439 |
return
|
| 440 |
|
|
|
|
| 441 |
user_sessions[uid].setdefault("files", []).append(fpath)
|
| 442 |
await status.delete()
|
| 443 |
try:
|
|
|
|
| 457 |
except: pass
|
| 458 |
return
|
| 459 |
else:
|
| 460 |
+
settings = user_settings.get(uid, {"password":None, "self_destruct": False})
|
| 461 |
+
set_metadata(os.path.basename(fpath), {"password": settings.get("password"), "self_destruct": settings.get("self_destruct", False)})
|
|
|
|
|
|
|
|
|
|
| 462 |
durl = f"{BASE_URL}/download/user_{uid}/{os.path.basename(fpath)}"
|
| 463 |
|
|
|
|
| 464 |
btns = [[InlineKeyboardButton("📥 Download", url=durl)]]
|
| 465 |
if fname.lower().endswith(('.mp4', '.mkv', '.webm')):
|
| 466 |
btns.append([InlineKeyboardButton("🎬 Watch Online", url=f"{BASE_URL}/player/user_{uid}/{os.path.basename(fpath)}")])
|
| 467 |
|
| 468 |
kb = InlineKeyboardMarkup(btns)
|
| 469 |
+
await status.edit_text(f"✅ **Upload Success!**\n`{fname}`\n\n🛡️ Pass: `{'Yes' if settings.get('password') else 'No'}`", reply_markup=kb)
|
| 470 |
except Exception as e: await status.edit_text(f"❌ Error: {e}")
|
static/style.css
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
|
|
|
|
|
| 1 |
:root {
|
| 2 |
--primary: #6366f1;
|
| 3 |
-
--primary-
|
| 4 |
-
--bg: #
|
| 5 |
-
--card
|
|
|
|
| 6 |
--text: #f8fafc;
|
| 7 |
-
--text-
|
| 8 |
--border: #334155;
|
| 9 |
-
--success: #
|
| 10 |
--danger: #ef4444;
|
|
|
|
| 11 |
}
|
| 12 |
|
| 13 |
* {
|
|
@@ -17,296 +21,273 @@
|
|
| 17 |
}
|
| 18 |
|
| 19 |
body {
|
| 20 |
-
font-family: '
|
| 21 |
background-color: var(--bg);
|
|
|
|
|
|
|
|
|
|
| 22 |
color: var(--text);
|
| 23 |
line-height: 1.6;
|
| 24 |
display: flex;
|
| 25 |
justify-content: center;
|
| 26 |
-
padding: 2rem;
|
|
|
|
| 27 |
}
|
| 28 |
|
| 29 |
.container {
|
| 30 |
width: 100%;
|
| 31 |
-
max-width:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
}
|
| 33 |
|
| 34 |
header {
|
| 35 |
text-align: center;
|
| 36 |
-
margin-bottom:
|
| 37 |
}
|
| 38 |
|
| 39 |
header h1 {
|
| 40 |
-
font-size:
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
margin-bottom: 0.5rem;
|
| 43 |
}
|
| 44 |
|
| 45 |
header p {
|
| 46 |
-
color: var(--text-
|
|
|
|
|
|
|
| 47 |
}
|
| 48 |
|
| 49 |
.drop-zone {
|
| 50 |
-
background: var(--
|
|
|
|
|
|
|
| 51 |
border: 2px dashed var(--border);
|
| 52 |
-
border-radius:
|
| 53 |
-
padding:
|
| 54 |
text-align: center;
|
| 55 |
-
transition: all 0.
|
| 56 |
cursor: pointer;
|
| 57 |
-
margin-bottom:
|
|
|
|
| 58 |
}
|
| 59 |
|
| 60 |
.drop-zone:hover, .drop-zone.drag-over {
|
| 61 |
border-color: var(--primary);
|
| 62 |
-
background:
|
|
|
|
|
|
|
| 63 |
}
|
| 64 |
|
| 65 |
.drop-zone-content i {
|
| 66 |
color: var(--primary);
|
| 67 |
margin-bottom: 1.5rem;
|
|
|
|
| 68 |
}
|
| 69 |
|
| 70 |
.btn-primary {
|
| 71 |
-
background:
|
| 72 |
color: white;
|
| 73 |
border: none;
|
| 74 |
-
padding:
|
| 75 |
-
border-radius:
|
| 76 |
-
font-weight:
|
|
|
|
| 77 |
cursor: pointer;
|
| 78 |
-
margin-top:
|
| 79 |
-
transition:
|
|
|
|
| 80 |
}
|
| 81 |
|
| 82 |
.btn-primary:hover {
|
| 83 |
-
|
|
|
|
| 84 |
}
|
| 85 |
|
| 86 |
.hidden { display: none; }
|
| 87 |
|
| 88 |
.upload-progress-container {
|
| 89 |
-
background: var(--
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
|
|
|
| 93 |
border: 1px solid var(--border);
|
| 94 |
}
|
| 95 |
|
| 96 |
-
.progress-item {
|
| 97 |
-
margin-bottom: 1rem;
|
| 98 |
-
}
|
| 99 |
|
| 100 |
.progress-info {
|
| 101 |
display: flex;
|
| 102 |
justify-content: space-between;
|
| 103 |
-
margin-bottom: 0.
|
| 104 |
-
font-size: 0.
|
|
|
|
| 105 |
}
|
| 106 |
|
| 107 |
.progress-bar-bg {
|
| 108 |
-
background:
|
| 109 |
-
height:
|
| 110 |
-
border-radius:
|
| 111 |
overflow: hidden;
|
|
|
|
| 112 |
}
|
| 113 |
|
| 114 |
.progress-bar-fill {
|
| 115 |
-
background:
|
| 116 |
height: 100%;
|
| 117 |
width: 0%;
|
| 118 |
-
transition: width 0.
|
| 119 |
}
|
| 120 |
|
| 121 |
.cli-section {
|
| 122 |
-
background:
|
| 123 |
-
border-radius:
|
| 124 |
-
padding:
|
| 125 |
-
margin-bottom:
|
| 126 |
border: 1px solid var(--border);
|
| 127 |
}
|
| 128 |
|
| 129 |
-
.cli-section
|
| 130 |
-
font-size: 0.9rem;
|
| 131 |
-
margin-bottom: 0.75rem;
|
| 132 |
-
color: var(--text-muted);
|
| 133 |
-
}
|
| 134 |
|
| 135 |
-
.cli-section .
|
| 136 |
-
margin-top: 0.75rem;
|
| 137 |
-
font-size: 0.8rem;
|
| 138 |
-
font-style: italic;
|
| 139 |
-
}
|
| 140 |
|
| 141 |
.cli-section code {
|
| 142 |
-
background: #
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
}
|
| 144 |
|
| 145 |
.file-list-section {
|
| 146 |
-
background: var(--
|
| 147 |
-
|
| 148 |
-
|
|
|
|
| 149 |
border: 1px solid var(--border);
|
| 150 |
}
|
| 151 |
|
| 152 |
-
.section-header {
|
| 153 |
-
display: flex;
|
| 154 |
-
justify-content: space-between;
|
| 155 |
-
align-items: center;
|
| 156 |
-
margin-bottom: 1.5rem;
|
| 157 |
-
}
|
| 158 |
|
| 159 |
.btn-icon {
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
|
|
|
| 166 |
}
|
| 167 |
|
| 168 |
-
.btn-icon:hover { color: var(--primary); }
|
| 169 |
|
| 170 |
-
.file-list {
|
| 171 |
-
display: flex;
|
| 172 |
-
flex-direction: column;
|
| 173 |
-
gap: 1rem;
|
| 174 |
-
}
|
| 175 |
|
| 176 |
.file-item {
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
background: #0f172a;
|
| 181 |
-
border-radius: 0.75rem;
|
| 182 |
border: 1px solid var(--border);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 183 |
}
|
| 184 |
|
| 185 |
.file-icon {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
font-size: 1.5rem;
|
| 187 |
-
margin-right:
|
| 188 |
color: var(--primary);
|
| 189 |
}
|
| 190 |
|
| 191 |
-
.file-info {
|
| 192 |
-
flex-grow: 1;
|
| 193 |
-
}
|
| 194 |
|
| 195 |
.file-name {
|
| 196 |
-
font-
|
| 197 |
-
|
| 198 |
-
|
|
|
|
|
|
|
|
|
|
| 199 |
}
|
| 200 |
|
| 201 |
-
.file-
|
| 202 |
-
display: flex;
|
| 203 |
-
flex-direction: column;
|
| 204 |
-
gap: 0.5rem;
|
| 205 |
-
margin-top: 0.75rem;
|
| 206 |
-
}
|
| 207 |
|
| 208 |
-
.
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
gap: 0.5rem;
|
| 212 |
-
width: 100%;
|
| 213 |
-
}
|
| 214 |
|
| 215 |
.file-links code {
|
| 216 |
-
background: #
|
| 217 |
-
padding: 0.
|
| 218 |
-
border-radius:
|
| 219 |
-
font-size: 0.
|
| 220 |
color: var(--primary);
|
| 221 |
border: 1px solid var(--border);
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
text-overflow: ellipsis;
|
| 225 |
-
flex: 1;
|
| 226 |
-
min-width: 0;
|
| 227 |
}
|
| 228 |
|
| 229 |
.copy-btn {
|
| 230 |
-
|
| 231 |
-
|
|
|
|
|
|
|
|
|
|
| 232 |
border: 1px solid var(--border);
|
| 233 |
-
color: var(--text-
|
| 234 |
-
padding:
|
| 235 |
-
border-radius:
|
| 236 |
-
|
| 237 |
-
transition: all 0.2s;
|
| 238 |
-
font-size: 0.8rem;
|
| 239 |
-
display: flex;
|
| 240 |
-
align-items: center;
|
| 241 |
-
justify-content: center;
|
| 242 |
-
}
|
| 243 |
-
|
| 244 |
-
.copy-btn:hover {
|
| 245 |
-
border-color: var(--primary);
|
| 246 |
-
color: var(--primary);
|
| 247 |
-
}
|
| 248 |
-
|
| 249 |
-
.file-links code::before {
|
| 250 |
-
content: attr(class);
|
| 251 |
-
display: inline-block;
|
| 252 |
-
width: 50px;
|
| 253 |
-
font-weight: bold;
|
| 254 |
-
text-transform: uppercase;
|
| 255 |
-
font-size: 0.6rem;
|
| 256 |
-
color: var(--text-muted);
|
| 257 |
-
margin-right: 5px;
|
| 258 |
}
|
| 259 |
|
| 260 |
-
.file-actions {
|
| 261 |
-
display: flex;
|
| 262 |
-
gap: 0.5rem;
|
| 263 |
-
}
|
| 264 |
|
| 265 |
.action-btn {
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
border:
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
|
|
|
|
|
|
| 272 |
}
|
| 273 |
|
| 274 |
-
.download-btn { background: var(--
|
| 275 |
-
.delete-btn { background: var(--danger); }
|
| 276 |
|
| 277 |
-
.action-btn:hover {
|
| 278 |
|
| 279 |
-
footer {
|
| 280 |
-
text-align: center;
|
| 281 |
-
margin-top: 4rem;
|
| 282 |
-
color: var(--text-muted);
|
| 283 |
-
font-size: 0.9rem;
|
| 284 |
-
}
|
| 285 |
|
| 286 |
-
/* Mobile
|
| 287 |
-
@media (max-width:
|
| 288 |
-
|
| 289 |
-
.
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
.drop-zone { padding: 1.5rem; }
|
| 293 |
-
|
| 294 |
-
.file-item {
|
| 295 |
-
flex-direction: column;
|
| 296 |
-
align-items: stretch;
|
| 297 |
-
padding: 1rem;
|
| 298 |
-
gap: 1rem;
|
| 299 |
-
overflow: hidden;
|
| 300 |
-
}
|
| 301 |
-
|
| 302 |
-
.file-icon { display: none; }
|
| 303 |
-
|
| 304 |
-
.file-actions {
|
| 305 |
-
justify-content: flex-end;
|
| 306 |
-
padding-top: 0.75rem;
|
| 307 |
-
border-top: 1px solid var(--border);
|
| 308 |
-
}
|
| 309 |
-
|
| 310 |
-
.file-links code { font-size: 0.65rem; }
|
| 311 |
-
.file-links code::before { width: 40px; font-size: 0.55rem; }
|
| 312 |
}
|
|
|
|
| 1 |
+
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');
|
| 2 |
+
|
| 3 |
:root {
|
| 4 |
--primary: #6366f1;
|
| 5 |
+
--primary-glow: rgba(99, 102, 241, 0.4);
|
| 6 |
+
--bg: #030712;
|
| 7 |
+
--card: #0f172a;
|
| 8 |
+
--surface: #1e293b;
|
| 9 |
--text: #f8fafc;
|
| 10 |
+
--text-dim: #94a3b8;
|
| 11 |
--border: #334155;
|
| 12 |
+
--success: #10b981;
|
| 13 |
--danger: #ef4444;
|
| 14 |
+
--glass: rgba(15, 23, 42, 0.7);
|
| 15 |
}
|
| 16 |
|
| 17 |
* {
|
|
|
|
| 21 |
}
|
| 22 |
|
| 23 |
body {
|
| 24 |
+
font-family: 'Plus Jakarta Sans', sans-serif;
|
| 25 |
background-color: var(--bg);
|
| 26 |
+
background-image:
|
| 27 |
+
radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
|
| 28 |
+
radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.1) 0px, transparent 50%);
|
| 29 |
color: var(--text);
|
| 30 |
line-height: 1.6;
|
| 31 |
display: flex;
|
| 32 |
justify-content: center;
|
| 33 |
+
padding: 2rem 1rem;
|
| 34 |
+
min-height: 100vh;
|
| 35 |
}
|
| 36 |
|
| 37 |
.container {
|
| 38 |
width: 100%;
|
| 39 |
+
max-width: 1000px;
|
| 40 |
+
animation: fadeIn 0.8s ease-out;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
@keyframes fadeIn {
|
| 44 |
+
from { opacity: 0; transform: translateY(20px); }
|
| 45 |
+
to { opacity: 1; transform: translateY(0); }
|
| 46 |
}
|
| 47 |
|
| 48 |
header {
|
| 49 |
text-align: center;
|
| 50 |
+
margin-bottom: 4rem;
|
| 51 |
}
|
| 52 |
|
| 53 |
header h1 {
|
| 54 |
+
font-size: 3.5rem;
|
| 55 |
+
font-weight: 800;
|
| 56 |
+
letter-spacing: -1.5px;
|
| 57 |
+
background: linear-gradient(135deg, #fff 0%, #6366f1 100%);
|
| 58 |
+
-webkit-background-clip: text;
|
| 59 |
+
-webkit-text-fill-color: transparent;
|
| 60 |
margin-bottom: 0.5rem;
|
| 61 |
}
|
| 62 |
|
| 63 |
header p {
|
| 64 |
+
color: var(--text-dim);
|
| 65 |
+
font-weight: 500;
|
| 66 |
+
font-size: 1.1rem;
|
| 67 |
}
|
| 68 |
|
| 69 |
.drop-zone {
|
| 70 |
+
background: var(--glass);
|
| 71 |
+
backdrop-filter: blur(12px);
|
| 72 |
+
-webkit-backdrop-filter: blur(12px);
|
| 73 |
border: 2px dashed var(--border);
|
| 74 |
+
border-radius: 24px;
|
| 75 |
+
padding: 4rem 2rem;
|
| 76 |
text-align: center;
|
| 77 |
+
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
| 78 |
cursor: pointer;
|
| 79 |
+
margin-bottom: 2.5rem;
|
| 80 |
+
box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
|
| 81 |
}
|
| 82 |
|
| 83 |
.drop-zone:hover, .drop-zone.drag-over {
|
| 84 |
border-color: var(--primary);
|
| 85 |
+
background: rgba(99, 102, 241, 0.05);
|
| 86 |
+
box-shadow: 0 0 40px -5px var(--primary-glow);
|
| 87 |
+
transform: scale(1.01);
|
| 88 |
}
|
| 89 |
|
| 90 |
.drop-zone-content i {
|
| 91 |
color: var(--primary);
|
| 92 |
margin-bottom: 1.5rem;
|
| 93 |
+
filter: drop-shadow(0 0 10px var(--primary-glow));
|
| 94 |
}
|
| 95 |
|
| 96 |
.btn-primary {
|
| 97 |
+
background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
|
| 98 |
color: white;
|
| 99 |
border: none;
|
| 100 |
+
padding: 1rem 2.5rem;
|
| 101 |
+
border-radius: 14px;
|
| 102 |
+
font-weight: 700;
|
| 103 |
+
font-size: 1rem;
|
| 104 |
cursor: pointer;
|
| 105 |
+
margin-top: 1.5rem;
|
| 106 |
+
transition: all 0.3s;
|
| 107 |
+
box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
|
| 108 |
}
|
| 109 |
|
| 110 |
.btn-primary:hover {
|
| 111 |
+
transform: translateY(-2px);
|
| 112 |
+
box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
|
| 113 |
}
|
| 114 |
|
| 115 |
.hidden { display: none; }
|
| 116 |
|
| 117 |
.upload-progress-container {
|
| 118 |
+
background: var(--glass);
|
| 119 |
+
backdrop-filter: blur(10px);
|
| 120 |
+
border-radius: 20px;
|
| 121 |
+
padding: 2rem;
|
| 122 |
+
margin-bottom: 2.5rem;
|
| 123 |
border: 1px solid var(--border);
|
| 124 |
}
|
| 125 |
|
| 126 |
+
.progress-item { margin-bottom: 1.5rem; }
|
|
|
|
|
|
|
| 127 |
|
| 128 |
.progress-info {
|
| 129 |
display: flex;
|
| 130 |
justify-content: space-between;
|
| 131 |
+
margin-bottom: 0.75rem;
|
| 132 |
+
font-size: 0.95rem;
|
| 133 |
+
font-weight: 600;
|
| 134 |
}
|
| 135 |
|
| 136 |
.progress-bar-bg {
|
| 137 |
+
background: #0f172a;
|
| 138 |
+
height: 12px;
|
| 139 |
+
border-radius: 6px;
|
| 140 |
overflow: hidden;
|
| 141 |
+
border: 1px solid var(--border);
|
| 142 |
}
|
| 143 |
|
| 144 |
.progress-bar-fill {
|
| 145 |
+
background: linear-gradient(90deg, #6366f1, #a855f7);
|
| 146 |
height: 100%;
|
| 147 |
width: 0%;
|
| 148 |
+
transition: width 0.3s ease;
|
| 149 |
}
|
| 150 |
|
| 151 |
.cli-section {
|
| 152 |
+
background: rgba(30, 41, 59, 0.4);
|
| 153 |
+
border-radius: 20px;
|
| 154 |
+
padding: 2rem;
|
| 155 |
+
margin-bottom: 3rem;
|
| 156 |
border: 1px solid var(--border);
|
| 157 |
}
|
| 158 |
|
| 159 |
+
.cli-section h2 { font-size: 1.2rem; margin-bottom: 1rem; color: #fff; }
|
|
|
|
|
|
|
|
|
|
|
|
|
| 160 |
|
| 161 |
+
.cli-section p { font-size: 0.95rem; margin-bottom: 1rem; color: var(--text-dim); }
|
|
|
|
|
|
|
|
|
|
|
|
|
| 162 |
|
| 163 |
.cli-section code {
|
| 164 |
+
background: #000 !important;
|
| 165 |
+
padding: 1rem !important;
|
| 166 |
+
border-radius: 12px !important;
|
| 167 |
+
font-family: 'JetBrains Mono', monospace;
|
| 168 |
+
font-size: 0.85rem !important;
|
| 169 |
+
display: block;
|
| 170 |
+
margin: 1rem 0;
|
| 171 |
}
|
| 172 |
|
| 173 |
.file-list-section {
|
| 174 |
+
background: var(--glass);
|
| 175 |
+
backdrop-filter: blur(12px);
|
| 176 |
+
border-radius: 24px;
|
| 177 |
+
padding: 2.5rem;
|
| 178 |
border: 1px solid var(--border);
|
| 179 |
}
|
| 180 |
|
| 181 |
+
.section-header h2 { font-size: 1.75rem; font-weight: 800; color: #fff; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 182 |
|
| 183 |
.btn-icon {
|
| 184 |
+
width: 40px;
|
| 185 |
+
height: 40px;
|
| 186 |
+
border-radius: 10px;
|
| 187 |
+
background: var(--surface);
|
| 188 |
+
border: 1px solid var(--border);
|
| 189 |
+
color: var(--text-dim);
|
| 190 |
+
transition: all 0.2s;
|
| 191 |
}
|
| 192 |
|
| 193 |
+
.btn-icon:hover { color: #fff; background: var(--border); border-color: var(--primary); }
|
| 194 |
|
| 195 |
+
.file-list { display: grid; gap: 1rem; margin-top: 1rem; }
|
|
|
|
|
|
|
|
|
|
|
|
|
| 196 |
|
| 197 |
.file-item {
|
| 198 |
+
background: rgba(15, 23, 42, 0.5);
|
| 199 |
+
padding: 1.25rem;
|
| 200 |
+
border-radius: 18px;
|
|
|
|
|
|
|
| 201 |
border: 1px solid var(--border);
|
| 202 |
+
transition: 0.3s;
|
| 203 |
+
display: flex;
|
| 204 |
+
align-items: flex-start;
|
| 205 |
+
}
|
| 206 |
+
|
| 207 |
+
.file-item:hover {
|
| 208 |
+
border-color: var(--primary);
|
| 209 |
+
background: rgba(30, 41, 59, 0.5);
|
| 210 |
+
transform: translateX(5px);
|
| 211 |
}
|
| 212 |
|
| 213 |
.file-icon {
|
| 214 |
+
width: 50px;
|
| 215 |
+
height: 50px;
|
| 216 |
+
background: var(--surface);
|
| 217 |
+
border-radius: 14px;
|
| 218 |
+
display: flex;
|
| 219 |
+
align-items: center;
|
| 220 |
+
justify-content: center;
|
| 221 |
font-size: 1.5rem;
|
| 222 |
+
margin-right: 1.25rem;
|
| 223 |
color: var(--primary);
|
| 224 |
}
|
| 225 |
|
| 226 |
+
.file-info { flex: 1; min-width: 0; }
|
|
|
|
|
|
|
| 227 |
|
| 228 |
.file-name {
|
| 229 |
+
font-size: 1.1rem;
|
| 230 |
+
font-weight: 700;
|
| 231 |
+
color: #fff;
|
| 232 |
+
white-space: nowrap;
|
| 233 |
+
overflow: hidden;
|
| 234 |
+
text-overflow: ellipsis;
|
| 235 |
}
|
| 236 |
|
| 237 |
+
.file-meta { font-size: 0.85rem; color: var(--text-dim); font-weight: 500; margin-bottom: 1rem; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 238 |
|
| 239 |
+
.file-links { display: flex; flex-direction: column; gap: 0.75rem; }
|
| 240 |
+
|
| 241 |
+
.link-group { position: relative; width: 100%; }
|
|
|
|
|
|
|
|
|
|
| 242 |
|
| 243 |
.file-links code {
|
| 244 |
+
background: #000;
|
| 245 |
+
padding: 0.75rem 1rem;
|
| 246 |
+
border-radius: 10px;
|
| 247 |
+
font-size: 0.75rem;
|
| 248 |
color: var(--primary);
|
| 249 |
border: 1px solid var(--border);
|
| 250 |
+
display: block;
|
| 251 |
+
width: 100%;
|
|
|
|
|
|
|
|
|
|
| 252 |
}
|
| 253 |
|
| 254 |
.copy-btn {
|
| 255 |
+
position: absolute;
|
| 256 |
+
right: 8px;
|
| 257 |
+
top: 50%;
|
| 258 |
+
transform: translateY(-50%);
|
| 259 |
+
background: var(--surface);
|
| 260 |
border: 1px solid var(--border);
|
| 261 |
+
color: var(--text-dim);
|
| 262 |
+
padding: 6px 12px;
|
| 263 |
+
border-radius: 8px;
|
| 264 |
+
font-size: 0.7rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 265 |
}
|
| 266 |
|
| 267 |
+
.file-actions { display: flex; gap: 0.75rem; margin-top: 1rem; }
|
|
|
|
|
|
|
|
|
|
| 268 |
|
| 269 |
.action-btn {
|
| 270 |
+
flex: 1;
|
| 271 |
+
padding: 0.75rem;
|
| 272 |
+
border-radius: 12px;
|
| 273 |
+
font-weight: 700;
|
| 274 |
+
font-size: 0.85rem;
|
| 275 |
+
text-decoration: none;
|
| 276 |
+
text-align: center;
|
| 277 |
+
transition: 0.3s;
|
| 278 |
}
|
| 279 |
|
| 280 |
+
.download-btn { background: var(--primary); color: #fff; }
|
| 281 |
+
.delete-btn { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }
|
| 282 |
|
| 283 |
+
.action-btn:hover { filter: brightness(1.2); transform: translateY(-2px); }
|
| 284 |
|
| 285 |
+
footer { margin-top: 5rem; padding-bottom: 2rem; color: var(--text-dim); font-size: 0.9rem; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 286 |
|
| 287 |
+
/* Mobile */
|
| 288 |
+
@media (max-width: 768px) {
|
| 289 |
+
header h1 { font-size: 2.5rem; }
|
| 290 |
+
.file-item { flex-direction: column; }
|
| 291 |
+
.file-icon { margin-bottom: 1rem; }
|
| 292 |
+
.file-actions { width: 100%; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 293 |
}
|