root пре 6 месеци
родитељ
комит
17dee2edd8
2 измењених фајлова са 20 додато и 1 уклоњено
  1. 13 0
      app.py
  2. 7 1
      templates/layout.html

+ 13 - 0
app.py

@@ -16,6 +16,19 @@ app.secret_key = "bind_pro_v108_modular_masterpiece"
 # Εκκίνηση του Background Daemon για τα Analytics
 # Εκκίνηση του Background Daemon για τα Analytics
 stats.start_stats_daemon()
 stats.start_stats_daemon()
 
 
+# --- AUTO VERSIONING ΑΠΟ ΤΟ GIT ---
+try:
+    # Διαβάζει το τελευταίο commit hash από το git (π.χ. "c0ad2a4")
+    git_hash = subprocess.check_output(["git", "rev-parse", "--short", "HEAD"], stderr=subprocess.DEVNULL).decode().strip()
+    APP_VERSION = f"v1.0.8 (Build {git_hash})"
+except:
+    APP_VERSION = "v1.0.8"
+
+@app.context_processor
+def inject_version():
+    # Αυτό κάνει τη μεταβλητή {{ app_version }} διαθέσιμη σε ΟΛΑ τα HTML templates!
+    return dict(app_version=APP_VERSION)
+    
 # --- DECORATORS & AUTH ---
 # --- DECORATORS & AUTH ---
 def login_required(f):
 def login_required(f):
     @wraps(f)
     @wraps(f)

+ 7 - 1
templates/layout.html

@@ -22,8 +22,14 @@
         <div class="p-6 border-b border-gray-800 flex items-center justify-center">
         <div class="p-6 border-b border-gray-800 flex items-center justify-center">
             <h1 class="text-3xl font-black text-blue-500 italic tracking-tighter">BIND<span class="text-white">PRO</span></h1>
             <h1 class="text-3xl font-black text-blue-500 italic tracking-tighter">BIND<span class="text-white">PRO</span></h1>
         </div>
         </div>
-        
+        <div class="mt-auto pt-6 border-t border-gray-800">
+			<div class="flex items-center justify-center gap-2 text-gray-500 opacity-50 hover:opacity-100 transition-opacity">
+				<svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"></path></svg>
+				<span class="text-[9px] font-mono font-black uppercase tracking-widest">{{ app_version }}</span>
+			</div>
+		</div>
         <nav class="flex-1 p-4 space-y-2 overflow-y-auto custom-scroll mt-4">
         <nav class="flex-1 p-4 space-y-2 overflow-y-auto custom-scroll mt-4">
+		
             <p class="px-4 text-[10px] font-black text-gray-600 uppercase tracking-widest mb-2">Main Menu</p>
             <p class="px-4 text-[10px] font-black text-gray-600 uppercase tracking-widest mb-2">Main Menu</p>
             <a href="/" class="flex items-center gap-3 px-4 py-3 text-sm font-bold text-gray-400 rounded-xl hover:bg-blue-600 hover:text-white transition group">
             <a href="/" class="flex items-center gap-3 px-4 py-3 text-sm font-bold text-gray-400 rounded-xl hover:bg-blue-600 hover:text-white transition group">
                 <svg class="w-5 h-5 group-hover:scale-110 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"></path></svg>
                 <svg class="w-5 h-5 group-hover:scale-110 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"></path></svg>