From 18a64279fddd65d3d555ad632d20c8d6b6f8ee6b Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 10 Jan 2026 19:18:24 +0900 Subject: [PATCH 1/9] Apply white BG and black color --- static/styles.css | 21 ++++++++++++--------- templates/dashboard.html | 1 + 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/static/styles.css b/static/styles.css index 6efaaf4..f8b689e 100644 --- a/static/styles.css +++ b/static/styles.css @@ -1,6 +1,6 @@ :root { --black: #000000; - --almost-black: #080708; + --almostBlack: #888888; --blue: #3772FF; --blue-light: #3787ff; --red: #DF2935; @@ -19,9 +19,8 @@ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; font-size: 22px; line-height: 1.5; - color: var(--white); - background: var(--black); - background-image: linear-gradient(to bottom right, var(--almost-black), var(--black)); + color: var(--black); + background: var(--white); display: flex; flex-direction: column; justify-content: center; @@ -37,14 +36,16 @@ body,html { align-items: flex-start; width: 80%; border: 1px solid rgb(40, 40, 40); + border-radius: 8px; padding-bottom: 40px; padding: 50px; + color: var(--black) !important; } .form-section { padding: 15px 0 0 15px; width: 100%; - color: var(--light); + color: var(--black); flex-shrink: 0; } @@ -167,7 +168,7 @@ button[type='button']:hover, .dashboard-container { padding: 15px 15px 15px 15px; width: 100%; - color: var(--light); + color: var(--black); flex-shrink: 0; } /* Table Styling */ @@ -279,6 +280,7 @@ select.fancy-select::-ms-expand { .quota-block { margin: 8px 0 18px; flex: 0 0 auto; + color: var(--almostBlack) !important; } .quota-donut { position: relative; @@ -293,7 +295,8 @@ select.fancy-select::-ms-expand { height: 100%; } .donut-ring { - stroke: rgba(255,255,255,0.06); + stroke: rgba(9, 9, 9, 0.1); + /* fill: black; */ stroke-linecap: round; vector-effect: non-scaling-stroke; shape-rendering: geometricPrecision; @@ -315,7 +318,7 @@ select.fancy-select::-ms-expand { align-items: center; justify-content: center; pointer-events: none; - color: var(--white); + color: var(--almostBlack); } .quota-percent { font-size: 18px; @@ -325,7 +328,7 @@ select.fancy-select::-ms-expand { .quota-number { font-size: 12px; font-weight: 700; - color: var(--light); + color: var(--almostBlack); } .quota-label { font-size: 11px; diff --git a/templates/dashboard.html b/templates/dashboard.html index f1db80d..a6c65bc 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -6,6 +6,7 @@ ADrive Share + From 8298a4bae53591bbffe8fa001ab058215fbd2c78 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 10 Jan 2026 19:18:53 +0900 Subject: [PATCH 2/9] remove existing table design --- static/styles.css | 48 ----------------------------------------------- 1 file changed, 48 deletions(-) diff --git a/static/styles.css b/static/styles.css index f8b689e..dca250d 100644 --- a/static/styles.css +++ b/static/styles.css @@ -171,55 +171,7 @@ button[type='button']:hover, color: var(--black); flex-shrink: 0; } -/* Table Styling */ -table { - width: 100%; - border-collapse: collapse; - margin: 20px 0; - background: rgba(20, 20, 20, 0.8); - border: 1px solid rgb(60, 60, 60); - border-radius: 6px; - overflow: hidden; - font-size: 16px; -} -table th { - background: linear-gradient(to bottom, rgb(50, 50, 50), rgb(40, 40, 40)); - padding: 14px 16px; - text-align: left; - font-weight: 600; - color: var(--white); - border-bottom: 2px solid rgb(80, 80, 80); - text-transform: uppercase; - letter-spacing: 0.5px; - font-size: 13px; -} - -table td { - padding: 12px 16px; - border-bottom: 1px solid rgb(40, 40, 40); - color: var(--light); -} - -table tr:last-child td { - border-bottom: none; -} - -table tr:hover { - background: rgba(55, 114, 255, 0.08); -} - -table a { - color: var(--blue); - text-decoration: none; - font-weight: 500; - transition: color 0.2s ease; -} - -table a:hover { - color: var(--blue-light); - text-decoration: underline; -} /* Styled select for forms */ .fancy-select, From f9fca8c044de2bd35aad958ac9cfc7f72b6d92cd Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 10 Jan 2026 19:21:29 +0900 Subject: [PATCH 3/9] Make a better LIGHT-MODE table styling --- static/styles.css | 7 +++++++ templates/dashboard.html | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/static/styles.css b/static/styles.css index dca250d..c18f1d3 100644 --- a/static/styles.css +++ b/static/styles.css @@ -172,6 +172,13 @@ button[type='button']:hover, flex-shrink: 0; } +/* Bootstrap-Friendly Table Design */ +table { + font-size: 15px; +} +table tr td { + font-weight: light; +} /* Styled select for forms */ .fancy-select, diff --git a/templates/dashboard.html b/templates/dashboard.html index a6c65bc..26790ab 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -77,7 +77,7 @@ - +
From 10b143193b2b91adab37f048e4e4791a2a42eb4e Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 10 Jan 2026 19:22:31 +0900 Subject: [PATCH 4/9] Make non-reusable files also deleteable without downloading at all times --- templates/dashboard.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/templates/dashboard.html b/templates/dashboard.html index 26790ab..3855aea 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -98,9 +98,7 @@ {% endif %} {% endfor %} From 25617cb3c37c05632f8acb686602ecf42220bd7c Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 10 Jan 2026 19:24:34 +0900 Subject: [PATCH 5/9] exclude instructions.txt from docker images --- .dockerignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index f17cd43..9adfe04 100644 --- a/.dockerignore +++ b/.dockerignore @@ -11,4 +11,5 @@ update_db.py logs *.log .vscode -uploads/ \ No newline at end of file +uploads/ +instructions.txt \ No newline at end of file From ab84dea51821b4610dfdd0a4631a640f36eadf3f Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 10 Jan 2026 20:07:23 +0900 Subject: [PATCH 6/9] show location of user --- app.py | 26 ++++++++++++++- static/script.js | 15 +-------- templates/upload.html | 75 +++++++++++++++++++++++++++++++++++++------ 3 files changed, 92 insertions(+), 24 deletions(-) diff --git a/app.py b/app.py index a053b61..7767e0f 100644 --- a/app.py +++ b/app.py @@ -5,7 +5,8 @@ from flask import ( request, url_for, send_from_directory, - flash + flash, + jsonify ) from utils import redirect, dbload, dbsave, udbload, udbsave from werkzeug.exceptions import RequestEntityTooLarge @@ -15,6 +16,7 @@ import os import random import threading import time +import requests import logging import logging.handlers @@ -32,6 +34,28 @@ logging.getLogger('werkzeug').addHandler(handler) app.logger.setLevel(logging.WARNING) app.logger.addHandler(handler) +@app.route('/get-location') +def get_location(): + # Get IP (handling Docker/Proxy headers) + user_ip = request.headers.get('X-Forwarded-For', request.remote_addr) + if user_ip and ',' in user_ip: + user_ip = user_ip.split(',')[0].strip() + + # Localhost testing fix + if user_ip in ['127.0.0.1', 'localhost', '::1']: + user_ip = '8.8.8.8' + + try: + # Use a fast, reliable API + response = requests.get(f'http://ip-api.com/json/{user_ip}', timeout=5) + return jsonify(response.json()) + except: + return jsonify({"status": "fail"}), 500 + +@app.route('/ping') +def ping(): + return jsonify({"status": "ok"}) + @app.route('/') def index(): return redirect(url_for('upload')) diff --git a/static/script.js b/static/script.js index caef571..acfd8cc 100644 --- a/static/script.js +++ b/static/script.js @@ -1,17 +1,4 @@ -if (localStorage.getItem("loaded")) { - document.getElementById("mirrorLogo").className = "fa-solid fa-circle-dot fa-2xs"; - document.getElementById("mirrorText").textContent = "drive.fybe.dev"; - document.getElementById("mirrorLogo").style.color = "#47cc00"; -} else { - setTimeout(() => { - document.getElementById("mirrorLogo").style.color = "#47cc00"; - document.getElementById("mirrorText").textContent = "drive.fybe.dev"; - setTimeout(() => { - document.getElementById("mirrorLogo").className = "fa-solid fa-circle-dot fa-2xs"; - localStorage.setItem("loaded", true); - }, 3000); - }, 3000); -} + document.addEventListener('DOMContentLoaded', function() { const form = document.getElementById('uploadForm'); diff --git a/templates/upload.html b/templates/upload.html index 0a092c1..6495773 100644 --- a/templates/upload.html +++ b/templates/upload.html @@ -41,18 +41,18 @@ {% if loggedIn %}

ADrive File Sharing {{ username }}

{% else %} -

ADrive File Sharing Guest

+

ADrive File Sharing Guest

{% endif %} - - + - Finding Nearby Mirror Ping: CONNECTINGms - - - --> + + - Location Not Found + Locating... ..ms @@ -63,7 +63,7 @@
- @@ -177,6 +177,63 @@ })(); + + +
Filename Code - {% if file.reusable %} Delete - {% endif %}