Poorpoor6976 commited on
Commit
ee2aef4
·
verified ·
1 Parent(s): 9cb446e

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +156 -81
templates/index.html CHANGED
@@ -67,6 +67,48 @@ font-size:0.7em;
67
  margin-top:8px;
68
  font-weight:600;
69
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  .accordion{
71
  margin-bottom:12px;
72
  border-radius:var(--radius);
@@ -147,6 +189,7 @@ input[type="number"],
147
  input[type="url"],
148
  input[type="email"],
149
  input[type="color"],
 
150
  select,
151
  textarea{
152
  width:100%;
@@ -175,6 +218,9 @@ padding:4px;
175
  height:42px;
176
  cursor:pointer;
177
  }
 
 
 
178
  select{
179
  cursor:pointer;
180
  appearance:none;
@@ -413,24 +459,7 @@ gap:0;
413
  </style>
414
  </head>
415
  <body>
416
- <header>
417
- <div style="background: rgba(0, 230, 118, 0.1); border: 1px solid var(--success); padding: 15px; border-radius: 8px; margin-bottom: 20px; text-align: center;">
418
- <strong style="color: var(--success); display: block; margin-bottom: 5px;">Your Permanent SHA-1 Fingerprint (Copy this to Google Console):</strong>
419
- <code id="master-sha1" style="font-size: 1.1em; color: #fff; user-select: all;">Loading...</code>
420
- </div>
421
-
422
- <script>
423
- // جلب البصمة الثابتة عند فتح الصفحة
424
- fetch('/get_master_sha1')
425
- .then(response => response.json())
426
- .then(data => {
427
- document.getElementById('master-sha1').textContent = data.sha1 || "Error loading SHA-1";
428
- })
429
- .catch(err => {
430
- document.getElementById('master-sha1').textContent = "Failed to connect to server.";
431
- });
432
- </script>
433
-
434
  <h1>Android APK/AAB Builder</h1>
435
  <p>Build production-ready Android apps from any URL</p>
436
  <span class="badge">45+ Features &bull; Cloud Build</span>
@@ -439,6 +468,42 @@ gap:0;
439
  <div class="container">
440
  <form id="buildForm" autocomplete="off">
441
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
442
  <div class="accordion open" id="acc-core">
443
  <div class="accordion-header" onclick="toggleAccordion('acc-core')">
444
  <span class="section-icon">&#9881;</span>
@@ -458,7 +523,7 @@ gap:0;
458
  </div>
459
  <div class="form-group">
460
  <label>Target Web URL <span class="required">*</span></label>
461
- <input type="url" name="target_url" value="https://www.google.com" required>
462
  </div>
463
  <div class="grid-2">
464
  <div class="form-group">
@@ -501,33 +566,7 @@ gap:0;
501
  </div>
502
  </div>
503
 
504
- <div class="accordion" id="acc-auth">
505
- <div class="accordion-header" onclick="toggleAccordion('acc-auth')">
506
- <span class="section-icon">&#128273;</span>
507
- <span class="section-title">Authentication &amp; Backend</span>
508
- <span class="section-count">3 options</span>
509
- <span class="accordion-arrow">&#9660;</span>
510
- </div>
511
- <div class="accordion-body">
512
- <div class="accordion-content">
513
- <div class="form-group">
514
- <label>Google Web Client ID <small>(For Native Google Auth)</small></label>
515
- <input type="text" name="google_web_client_id" placeholder="xxxxxxx.apps.googleusercontent.com">
516
- </div>
517
- <div class="grid-2">
518
- <div class="form-group">
519
- <label>Supabase URL</label>
520
- <input type="text" name="supabase_url" placeholder="https://xxxx.supabase.co">
521
- </div>
522
- <div class="form-group">
523
- <label>Supabase Anon Key</label>
524
- <input type="text" name="supabase_anon_key" placeholder="eyJhbGciOiJIUzI1NiIsInR5c...">
525
- </div>
526
- </div>
527
- </div>
528
- </div>
529
- </div>
530
-
531
  <div class="accordion" id="acc-branding">
532
  <div class="accordion-header" onclick="toggleAccordion('acc-branding')">
533
  <span class="section-icon">&#127912;</span>
@@ -550,7 +589,7 @@ gap:0;
550
  <div class="toggle-row">
551
  <div class="toggle-label">
552
  Splash Screen
553
- <small>Show a splash screen before loading the WebView</small>
554
  </div>
555
  <label class="switch">
556
  <input type="checkbox" name="splash_enabled" id="splashToggle" onchange="toggleSplashOptions()">
@@ -592,7 +631,7 @@ Splash Screen
592
  <div class="toggle-row">
593
  <div class="toggle-label">
594
  Bottom Navigation Bar
595
- <small>Home, Refresh, and Back buttons</small>
596
  </div>
597
  <label class="switch">
598
  <input type="checkbox" name="bottom_nav_enabled">
@@ -603,6 +642,7 @@ Bottom Navigation Bar
603
  </div>
604
  </div>
605
 
 
606
  <div class="accordion" id="acc-webengine">
607
  <div class="accordion-header" onclick="toggleAccordion('acc-webengine')">
608
  <span class="section-icon">&#9889;</span>
@@ -615,7 +655,7 @@ Bottom Navigation Bar
615
  <div class="toggle-row">
616
  <div class="toggle-label">
617
  Enable JavaScript
618
- <small>Required for most modern websites</small>
619
  </div>
620
  <label class="switch">
621
  <input type="checkbox" name="enable_javascript" checked>
@@ -625,7 +665,7 @@ Enable JavaScript
625
  <div class="toggle-row">
626
  <div class="toggle-label">
627
  Enable DOM Storage
628
- <small>Local Storage for sessions and data persistence</small>
629
  </div>
630
  <label class="switch">
631
  <input type="checkbox" name="enable_dom_storage" checked>
@@ -635,7 +675,7 @@ Enable DOM Storage
635
  <div class="toggle-row">
636
  <div class="toggle-label">
637
  Allow File Access
638
- <small>Upload/Download files from WebView</small>
639
  </div>
640
  <label class="switch">
641
  <input type="checkbox" name="allow_file_access" checked>
@@ -645,7 +685,7 @@ Allow File Access
645
  <div class="toggle-row">
646
  <div class="toggle-label">
647
  Media Auto-play
648
- <small>Auto-play audio/video without user gesture</small>
649
  </div>
650
  <label class="switch">
651
  <input type="checkbox" name="media_autoplay">
@@ -655,7 +695,7 @@ Media Auto-play
655
  <div class="toggle-row">
656
  <div class="toggle-label">
657
  Enable Zoom Controls
658
- <small>Pinch-to-zoom and built-in zoom buttons</small>
659
  </div>
660
  <label class="switch">
661
  <input type="checkbox" name="enable_zoom">
@@ -669,7 +709,7 @@ Enable Zoom Controls
669
  <div class="toggle-row">
670
  <div class="toggle-label">
671
  Pull-to-Refresh
672
- <small>SwipeRefreshLayout for page reload</small>
673
  </div>
674
  <label class="switch">
675
  <input type="checkbox" name="pull_to_refresh" checked>
@@ -679,7 +719,7 @@ Pull-to-Refresh
679
  <div class="toggle-row">
680
  <div class="toggle-label">
681
  Multiple Windows Support
682
- <small>JavaScript can open windows automatically</small>
683
  </div>
684
  <label class="switch">
685
  <input type="checkbox" name="multi_windows">
@@ -689,7 +729,7 @@ Multiple Windows Support
689
  <div class="toggle-row">
690
  <div class="toggle-label">
691
  Deep Link &amp; Intent Interception
692
- <small>Open OAuth URLs (Google, Facebook, WhatsApp) externally</small>
693
  </div>
694
  <label class="switch">
695
  <input type="checkbox" name="deep_link_intercept" checked>
@@ -700,6 +740,7 @@ Deep Link &amp; Intent Interception
700
  </div>
701
  </div>
702
 
 
703
  <div class="accordion" id="acc-security">
704
  <div class="accordion-header" onclick="toggleAccordion('acc-security')">
705
  <span class="section-icon">&#128274;</span>
@@ -712,17 +753,17 @@ Deep Link &amp; Intent Interception
712
  <div class="toggle-row">
713
  <div class="toggle-label">
714
  ProGuard / R8 Obfuscation
715
- <small>Minify and obfuscate release code</small>
716
  </div>
717
  <label class="switch">
718
- <input type="checkbox" name="proguard_enabled">
719
  <span class="slider"></span>
720
  </label>
721
  </div>
722
  <div class="toggle-row">
723
  <div class="toggle-label">
724
  Root &amp; Emulator Detection
725
- <small>Auto-exit if device is rooted or emulated</small>
726
  </div>
727
  <label class="switch">
728
  <input type="checkbox" name="root_detection">
@@ -732,7 +773,7 @@ Root &amp; Emulator Detection
732
  <div class="toggle-row">
733
  <div class="toggle-label">
734
  Prevent Screenshots
735
- <small>FLAG_SECURE blocks screen capture</small>
736
  </div>
737
  <label class="switch">
738
  <input type="checkbox" name="prevent_screenshots">
@@ -742,7 +783,7 @@ Prevent Screenshots
742
  <div class="toggle-row">
743
  <div class="toggle-label">
744
  Clear Cache on Exit
745
- <small>Wipe WebView cache when app closes</small>
746
  </div>
747
  <label class="switch">
748
  <input type="checkbox" name="clear_cache_exit">
@@ -752,7 +793,7 @@ Clear Cache on Exit
752
  <div class="toggle-row">
753
  <div class="toggle-label">
754
  Clear Cookies on Exit
755
- <small>Wipe all cookies &amp; sessions on close</small>
756
  </div>
757
  <label class="switch">
758
  <input type="checkbox" name="clear_cookies_exit">
@@ -762,7 +803,7 @@ Clear Cookies on Exit
762
  <div class="toggle-row">
763
  <div class="toggle-label">
764
  Keep Screen On
765
- <small>Prevent screen from sleeping</small>
766
  </div>
767
  <label class="switch">
768
  <input type="checkbox" name="keep_screen_on">
@@ -772,7 +813,7 @@ Keep Screen On
772
  <div class="toggle-row">
773
  <div class="toggle-label">
774
  Fullscreen Immersive Mode
775
- <small>Hide nav/status bars, fix notch cutout</small>
776
  </div>
777
  <label class="switch">
778
  <input type="checkbox" name="fullscreen_mode">
@@ -782,7 +823,7 @@ Fullscreen Immersive Mode
782
  <div class="toggle-row">
783
  <div class="toggle-label">
784
  Enforce HTTPS Only
785
- <small>Block mixed content (HTTP resources)</small>
786
  </div>
787
  <label class="switch">
788
  <input type="checkbox" name="enforce_https" checked>
@@ -792,7 +833,7 @@ Enforce HTTPS Only
792
  <div class="toggle-row">
793
  <div class="toggle-label">
794
  Tamper Protection
795
- <small>Basic APK signature verification check</small>
796
  </div>
797
  <label class="switch">
798
  <input type="checkbox" name="tamper_protection">
@@ -803,6 +844,7 @@ Tamper Protection
803
  </div>
804
  </div>
805
 
 
806
  <div class="accordion" id="acc-monetize">
807
  <div class="accordion-header" onclick="toggleAccordion('acc-monetize')">
808
  <span class="section-icon">&#128176;</span>
@@ -815,7 +857,7 @@ Tamper Protection
815
  <div class="toggle-row">
816
  <div class="toggle-label">
817
  Firebase Integration
818
- <small>Analytics &amp; Cloud Messaging</small>
819
  </div>
820
  <label class="switch">
821
  <input type="checkbox" name="firebase_enabled" id="firebaseToggle" onchange="toggleFirebaseOptions()">
@@ -825,7 +867,7 @@ Firebase Integration
825
  <div id="firebaseOptions" style="display:none">
826
  <div class="form-group">
827
  <label>google-services.json content <small>(paste JSON)</small></label>
828
- <textarea name="firebase_json" placeholder='{"project_info":{"project_number":"..."},...}'></textarea>
829
  </div>
830
  </div>
831
  <div class="form-group" style="margin-top:12px">
@@ -835,7 +877,7 @@ Firebase Integration
835
  <div class="toggle-row">
836
  <div class="toggle-label">
837
  AdMob Ads
838
- <small>Enable Google AdMob monetization</small>
839
  </div>
840
  <label class="switch">
841
  <input type="checkbox" name="admob_enabled" id="admobToggle" onchange="toggleAdmobOptions()">
@@ -856,6 +898,7 @@ AdMob Ads
856
  </div>
857
  </div>
858
 
 
859
  <div class="accordion" id="acc-perms">
860
  <div class="accordion-header" onclick="toggleAccordion('acc-perms')">
861
  <span class="section-icon">&#128272;</span>
@@ -869,7 +912,7 @@ AdMob Ads
869
  <div class="toggle-row">
870
  <div class="toggle-label">
871
  INTERNET
872
- <small>Network access (always enabled)</small>
873
  </div>
874
  <label class="switch">
875
  <input type="checkbox" checked disabled>
@@ -879,7 +922,7 @@ INTERNET
879
  <div class="toggle-row">
880
  <div class="toggle-label">
881
  CAMERA
882
- <small>Camera access for photo/video capture</small>
883
  </div>
884
  <label class="switch">
885
  <input type="checkbox" name="perm_camera">
@@ -889,7 +932,7 @@ CAMERA
889
  <div class="toggle-row">
890
  <div class="toggle-label">
891
  RECORD_AUDIO (Microphone)
892
- <small>Microphone access for audio recording</small>
893
  </div>
894
  <label class="switch">
895
  <input type="checkbox" name="perm_microphone">
@@ -899,7 +942,7 @@ RECORD_AUDIO (Microphone)
899
  <div class="toggle-row">
900
  <div class="toggle-label">
901
  LOCATION (Fine &amp; Coarse)
902
- <small>GPS and network location access</small>
903
  </div>
904
  <label class="switch">
905
  <input type="checkbox" name="perm_location">
@@ -909,7 +952,7 @@ LOCATION (Fine &amp; Coarse)
909
  <div class="toggle-row">
910
  <div class="toggle-label">
911
  STORAGE (Read/Write)
912
- <small>External storage file access</small>
913
  </div>
914
  <label class="switch">
915
  <input type="checkbox" name="perm_storage">
@@ -919,7 +962,7 @@ STORAGE (Read/Write)
919
  <div class="toggle-row">
920
  <div class="toggle-label">
921
  VIBRATE
922
- <small>Device vibration feedback</small>
923
  </div>
924
  <label class="switch">
925
  <input type="checkbox" name="perm_vibrate">
@@ -929,7 +972,7 @@ VIBRATE
929
  <div class="toggle-row">
930
  <div class="toggle-label">
931
  READ_CONTACTS
932
- <small>Access device contacts</small>
933
  </div>
934
  <label class="switch">
935
  <input type="checkbox" name="perm_contacts">
@@ -939,7 +982,7 @@ READ_CONTACTS
939
  <div class="toggle-row">
940
  <div class="toggle-label">
941
  POST_NOTIFICATIONS (Android 13+)
942
- <small>Auto-prompt for notification permission</small>
943
  </div>
944
  <label class="switch">
945
  <input type="checkbox" name="perm_notifications" checked>
@@ -951,6 +994,7 @@ POST_NOTIFICATIONS (Android 13+)
951
  </div>
952
  </div>
953
 
 
954
  <div class="accordion" id="acc-resilience">
955
  <div class="accordion-header" onclick="toggleAccordion('acc-resilience')">
956
  <span class="section-icon">&#129302;</span>
@@ -963,7 +1007,7 @@ POST_NOTIFICATIONS (Android 13+)
963
  <div class="toggle-row">
964
  <div class="toggle-label">
965
  Offline Mode
966
- <small>Show local offline.html when no internet detected</small>
967
  </div>
968
  <label class="switch">
969
  <input type="checkbox" name="offline_mode" checked>
@@ -973,7 +1017,7 @@ Offline Mode
973
  <div class="toggle-row">
974
  <div class="toggle-label">
975
  AI Log Analyzer
976
- <small>Automatic Arabic diagnosis of build errors</small>
977
  </div>
978
  <label class="switch">
979
  <input type="checkbox" checked disabled>
@@ -1004,7 +1048,7 @@ AI Log Analyzer
1004
 
1005
  </div>
1006
 
1007
- <footer>
1008
  <p>Android APK/AAB Builder SaaS &bull; Powered by Gradle &amp; Flask</p>
1009
  </footer>
1010
 
@@ -1078,6 +1122,37 @@ document.querySelector('#splashUploadZone p').textContent=file.name;
1078
  reader.readAsDataURL(file);
1079
  }
1080
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1081
  var currentBuildId=null;
1082
  var eventSource=null;
1083
 
@@ -1156,7 +1231,7 @@ if(msg.indexOf('ERROR')!==-1||msg.indexOf('FAILED')!==-1||msg.indexOf('error')!=
1156
  span.className='error-line';
1157
  }else if(msg.indexOf('BUILD SUCCESSFUL')!==-1||msg.indexOf('success')!==-1){
1158
  span.className='success-line';
1159
- }else if(msg.indexOf('AI Log Analysis')!==-1||msg.indexOf('خطأ')!==-1||msg.indexOf('تم البناء')!==-1||msg.indexOf('لم يتم')!==-1||msg.indexOf('راجع')!==-1||msg.indexOf('تحقق')!==-1||msg.indexOf('فشل')!==-1||msg.indexOf('IMPORTANT')!==-1){
1160
  span.className='ai-line';
1161
  }
1162
  span.textContent=msg+'\n';
 
67
  margin-top:8px;
68
  font-weight:600;
69
  }
70
+ .sha1-card{
71
+ background:linear-gradient(135deg,#1a1a3e,#2a2a5a);
72
+ border:1px solid var(--accent);
73
+ border-radius:var(--radius);
74
+ padding:16px;
75
+ margin-bottom:20px;
76
+ text-align:center;
77
+ }
78
+ .sha1-card h3{
79
+ font-size:0.9em;
80
+ color:var(--accent2);
81
+ margin-bottom:8px;
82
+ }
83
+ .sha1-value{
84
+ font-family:'Courier New',monospace;
85
+ font-size:1.1em;
86
+ color:var(--success);
87
+ background:rgba(0,230,118,0.1);
88
+ padding:8px 12px;
89
+ border-radius:8px;
90
+ display:inline-block;
91
+ word-break:break-all;
92
+ margin-bottom:10px;
93
+ }
94
+ .copy-btn{
95
+ background:var(--accent);
96
+ color:#fff;
97
+ border:none;
98
+ padding:8px 20px;
99
+ border-radius:6px;
100
+ font-size:0.85em;
101
+ cursor:pointer;
102
+ transition:all 0.3s;
103
+ }
104
+ .copy-btn:hover{
105
+ background:#c73652;
106
+ transform:translateY(-1px);
107
+ }
108
+ .copy-btn.copied{
109
+ background:var(--success);
110
+ color:#000;
111
+ }
112
  .accordion{
113
  margin-bottom:12px;
114
  border-radius:var(--radius);
 
189
  input[type="url"],
190
  input[type="email"],
191
  input[type="color"],
192
+ input[type="password"],
193
  select,
194
  textarea{
195
  width:100%;
 
218
  height:42px;
219
  cursor:pointer;
220
  }
221
+ input[type="password"]{
222
+ font-family:'Courier New',monospace;
223
+ }
224
  select{
225
  cursor:pointer;
226
  appearance:none;
 
459
  </style>
460
  </head>
461
  <body>
462
+ <<header>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
463
  <h1>Android APK/AAB Builder</h1>
464
  <p>Build production-ready Android apps from any URL</p>
465
  <span class="badge">45+ Features &bull; Cloud Build</span>
 
468
  <div class="container">
469
  <form id="buildForm" autocomplete="off">
470
 
471
+ <!-- SHA-1 Fingerprint Card -->
472
+ <div class="sha1-card" id="sha1Card" style="display:none">
473
+ <h3>🔐 Keystore SHA-1 Fingerprint</h3>
474
+ <div class="sha1-value" id="sha1Value">Loading...</div>
475
+ <br>
476
+ <button type="button" class="copy-btn" id="copySha1Btn" onclick="copySha1()">Copy to Clipboard</button>
477
+ <p style="font-size:0.75em;color:var(--text2);margin-top:8px">Add this fingerprint to Google Cloud Console &gt; Credentials &gt; OAuth 2.0</p>
478
+ </div>
479
+
480
+ <!-- SECTION 0: Security Keys -->
481
+ <div class="accordion open" id="acc-security-keys">
482
+ <div class="accordion-header" onclick="toggleAccordion('acc-security-keys')">
483
+ <span class="section-icon">&#128272;</span>
484
+ <span class="section-title">Security Keys (OAuth & Supabase)</span>
485
+ <span class="section-count">3 options</span>
486
+ <span class="accordion-arrow">&#9660;</span>
487
+ </div>
488
+ <div class="accordion-body">
489
+ <div class="accordion-content">
490
+ <div class="form-group">
491
+ <label>Supabase Project URL <span class="required">*</span></label>
492
+ <input type="url" name="supabase_url" placeholder="https://abcdefgh12345678.supabase.co" required>
493
+ </div>
494
+ <div class="form-group">
495
+ <label>Supabase Anon Key <span class="required">*</span></label>
496
+ <input type="password" name="supabase_anon_key" placeholder="eyJhbGciOiJIUzI1NiIs..." required>
497
+ </div>
498
+ <div class="form-group">
499
+ <label>Google Web Client ID <span class="required">*</span></label>
500
+ <input type="text" name="google_web_client_id" placeholder="123456789012-abcdef.apps.googleusercontent.com" required>
501
+ </div>
502
+ </div>
503
+ </div>
504
+ </div>
505
+
506
+ <!-- SECTION 1: Core Basics -->
507
  <div class="accordion open" id="acc-core">
508
  <div class="accordion-header" onclick="toggleAccordion('acc-core')">
509
  <span class="section-icon">&#9881;</span>
 
523
  </div>
524
  <div class="form-group">
525
  <label>Target Web URL <span class="required">*</span></label>
526
+ <input type="url" name="target_url" value="https://skydata.bond/login.html" required>
527
  </div>
528
  <div class="grid-2">
529
  <div class="form-group">
 
566
  </div>
567
  </div>
568
 
569
+ <!-- SECTION 2: Branding & UI -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
570
  <div class="accordion" id="acc-branding">
571
  <div class="accordion-header" onclick="toggleAccordion('acc-branding')">
572
  <span class="section-icon">&#127912;</span>
 
589
  <div class="toggle-row">
590
  <div class="toggle-label">
591
  Splash Screen
592
+ <<small>Show a splash screen before loading the WebView</small>
593
  </div>
594
  <label class="switch">
595
  <input type="checkbox" name="splash_enabled" id="splashToggle" onchange="toggleSplashOptions()">
 
631
  <div class="toggle-row">
632
  <div class="toggle-label">
633
  Bottom Navigation Bar
634
+ <<small>Home, Refresh, and Back buttons</small>
635
  </div>
636
  <label class="switch">
637
  <input type="checkbox" name="bottom_nav_enabled">
 
642
  </div>
643
  </div>
644
 
645
+ <!-- SECTION 3: Advanced Web Engine & UX -->
646
  <div class="accordion" id="acc-webengine">
647
  <div class="accordion-header" onclick="toggleAccordion('acc-webengine')">
648
  <span class="section-icon">&#9889;</span>
 
655
  <div class="toggle-row">
656
  <div class="toggle-label">
657
  Enable JavaScript
658
+ <<small>Required for most modern websites</small>
659
  </div>
660
  <label class="switch">
661
  <input type="checkbox" name="enable_javascript" checked>
 
665
  <div class="toggle-row">
666
  <div class="toggle-label">
667
  Enable DOM Storage
668
+ <<small>Local Storage for sessions and data persistence</small>
669
  </div>
670
  <label class="switch">
671
  <input type="checkbox" name="enable_dom_storage" checked>
 
675
  <div class="toggle-row">
676
  <div class="toggle-label">
677
  Allow File Access
678
+ <<small>Upload/Download files from WebView</small>
679
  </div>
680
  <label class="switch">
681
  <input type="checkbox" name="allow_file_access" checked>
 
685
  <div class="toggle-row">
686
  <div class="toggle-label">
687
  Media Auto-play
688
+ <<small>Auto-play audio/video without user gesture</small>
689
  </div>
690
  <label class="switch">
691
  <input type="checkbox" name="media_autoplay">
 
695
  <div class="toggle-row">
696
  <div class="toggle-label">
697
  Enable Zoom Controls
698
+ <<small>Pinch-to-zoom and built-in zoom buttons</small>
699
  </div>
700
  <label class="switch">
701
  <input type="checkbox" name="enable_zoom">
 
709
  <div class="toggle-row">
710
  <div class="toggle-label">
711
  Pull-to-Refresh
712
+ <<small>SwipeRefreshLayout for page reload</small>
713
  </div>
714
  <label class="switch">
715
  <input type="checkbox" name="pull_to_refresh" checked>
 
719
  <div class="toggle-row">
720
  <div class="toggle-label">
721
  Multiple Windows Support
722
+ <<small>JavaScript can open windows automatically</small>
723
  </div>
724
  <label class="switch">
725
  <input type="checkbox" name="multi_windows">
 
729
  <div class="toggle-row">
730
  <div class="toggle-label">
731
  Deep Link &amp; Intent Interception
732
+ <<small>Open OAuth URLs (Google, Facebook, WhatsApp) externally</small>
733
  </div>
734
  <label class="switch">
735
  <input type="checkbox" name="deep_link_intercept" checked>
 
740
  </div>
741
  </div>
742
 
743
+ <!-- SECTION 4: Security & Protection -->
744
  <div class="accordion" id="acc-security">
745
  <div class="accordion-header" onclick="toggleAccordion('acc-security')">
746
  <span class="section-icon">&#128274;</span>
 
753
  <div class="toggle-row">
754
  <div class="toggle-label">
755
  ProGuard / R8 Obfuscation
756
+ <<small>Minify and obfuscate release code</small>
757
  </div>
758
  <label class="switch">
759
+ <input type="checkbox" name="proguard_enabled" checked>
760
  <span class="slider"></span>
761
  </label>
762
  </div>
763
  <div class="toggle-row">
764
  <div class="toggle-label">
765
  Root &amp; Emulator Detection
766
+ <<small>Auto-exit if device is rooted or emulated</small>
767
  </div>
768
  <label class="switch">
769
  <input type="checkbox" name="root_detection">
 
773
  <div class="toggle-row">
774
  <div class="toggle-label">
775
  Prevent Screenshots
776
+ <<small>FLAG_SECURE blocks screen capture</small>
777
  </div>
778
  <label class="switch">
779
  <input type="checkbox" name="prevent_screenshots">
 
783
  <div class="toggle-row">
784
  <div class="toggle-label">
785
  Clear Cache on Exit
786
+ <<small>Wipe WebView cache when app closes</small>
787
  </div>
788
  <label class="switch">
789
  <input type="checkbox" name="clear_cache_exit">
 
793
  <div class="toggle-row">
794
  <div class="toggle-label">
795
  Clear Cookies on Exit
796
+ <<small>Wipe all cookies &amp; sessions on close</small>
797
  </div>
798
  <label class="switch">
799
  <input type="checkbox" name="clear_cookies_exit">
 
803
  <div class="toggle-row">
804
  <div class="toggle-label">
805
  Keep Screen On
806
+ <<small>Prevent screen from sleeping</small>
807
  </div>
808
  <label class="switch">
809
  <input type="checkbox" name="keep_screen_on">
 
813
  <div class="toggle-row">
814
  <div class="toggle-label">
815
  Fullscreen Immersive Mode
816
+ <<small>Hide nav/status bars, fix notch cutout</small>
817
  </div>
818
  <label class="switch">
819
  <input type="checkbox" name="fullscreen_mode">
 
823
  <div class="toggle-row">
824
  <div class="toggle-label">
825
  Enforce HTTPS Only
826
+ <<small>Block mixed content (HTTP resources)</small>
827
  </div>
828
  <label class="switch">
829
  <input type="checkbox" name="enforce_https" checked>
 
833
  <div class="toggle-row">
834
  <div class="toggle-label">
835
  Tamper Protection
836
+ <<small>Basic APK signature verification check</small>
837
  </div>
838
  <label class="switch">
839
  <input type="checkbox" name="tamper_protection">
 
844
  </div>
845
  </div>
846
 
847
+ <!-- SECTION 5: Monetization & Services -->
848
  <div class="accordion" id="acc-monetize">
849
  <div class="accordion-header" onclick="toggleAccordion('acc-monetize')">
850
  <span class="section-icon">&#128176;</span>
 
857
  <div class="toggle-row">
858
  <div class="toggle-label">
859
  Firebase Integration
860
+ <<small>Analytics &amp; Cloud Messaging</small>
861
  </div>
862
  <label class="switch">
863
  <input type="checkbox" name="firebase_enabled" id="firebaseToggle" onchange="toggleFirebaseOptions()">
 
867
  <div id="firebaseOptions" style="display:none">
868
  <div class="form-group">
869
  <label>google-services.json content <small>(paste JSON)</small></label>
870
+ <<textarea name="firebase_json" placeholder='{"project_info":{"project_number":"..."},...}'></textarea>
871
  </div>
872
  </div>
873
  <div class="form-group" style="margin-top:12px">
 
877
  <div class="toggle-row">
878
  <div class="toggle-label">
879
  AdMob Ads
880
+ <<small>Enable Google AdMob monetization</small>
881
  </div>
882
  <label class="switch">
883
  <input type="checkbox" name="admob_enabled" id="admobToggle" onchange="toggleAdmobOptions()">
 
898
  </div>
899
  </div>
900
 
901
+ <!-- SECTION 6: Permissions -->
902
  <div class="accordion" id="acc-perms">
903
  <div class="accordion-header" onclick="toggleAccordion('acc-perms')">
904
  <span class="section-icon">&#128272;</span>
 
912
  <div class="toggle-row">
913
  <div class="toggle-label">
914
  INTERNET
915
+ <<small>Network access (always enabled)</small>
916
  </div>
917
  <label class="switch">
918
  <input type="checkbox" checked disabled>
 
922
  <div class="toggle-row">
923
  <div class="toggle-label">
924
  CAMERA
925
+ <<small>Camera access for photo/video capture</small>
926
  </div>
927
  <label class="switch">
928
  <input type="checkbox" name="perm_camera">
 
932
  <div class="toggle-row">
933
  <div class="toggle-label">
934
  RECORD_AUDIO (Microphone)
935
+ <<small>Microphone access for audio recording</small>
936
  </div>
937
  <label class="switch">
938
  <input type="checkbox" name="perm_microphone">
 
942
  <div class="toggle-row">
943
  <div class="toggle-label">
944
  LOCATION (Fine &amp; Coarse)
945
+ <<small>GPS and network location access</small>
946
  </div>
947
  <label class="switch">
948
  <input type="checkbox" name="perm_location">
 
952
  <div class="toggle-row">
953
  <div class="toggle-label">
954
  STORAGE (Read/Write)
955
+ <<small>External storage file access</small>
956
  </div>
957
  <label class="switch">
958
  <input type="checkbox" name="perm_storage">
 
962
  <div class="toggle-row">
963
  <div class="toggle-label">
964
  VIBRATE
965
+ <<small>Device vibration feedback</small>
966
  </div>
967
  <label class="switch">
968
  <input type="checkbox" name="perm_vibrate">
 
972
  <div class="toggle-row">
973
  <div class="toggle-label">
974
  READ_CONTACTS
975
+ <<small>Access device contacts</small>
976
  </div>
977
  <label class="switch">
978
  <input type="checkbox" name="perm_contacts">
 
982
  <div class="toggle-row">
983
  <div class="toggle-label">
984
  POST_NOTIFICATIONS (Android 13+)
985
+ <<small>Auto-prompt for notification permission</small>
986
  </div>
987
  <label class="switch">
988
  <input type="checkbox" name="perm_notifications" checked>
 
994
  </div>
995
  </div>
996
 
997
+ <!-- SECTION 7: Resilience & AI -->
998
  <div class="accordion" id="acc-resilience">
999
  <div class="accordion-header" onclick="toggleAccordion('acc-resilience')">
1000
  <span class="section-icon">&#129302;</span>
 
1007
  <div class="toggle-row">
1008
  <div class="toggle-label">
1009
  Offline Mode
1010
+ <<small>Show local offline.html when no internet detected</small>
1011
  </div>
1012
  <label class="switch">
1013
  <input type="checkbox" name="offline_mode" checked>
 
1017
  <div class="toggle-row">
1018
  <div class="toggle-label">
1019
  AI Log Analyzer
1020
+ <<small>Automatic Arabic diagnosis of build errors</small>
1021
  </div>
1022
  <label class="switch">
1023
  <input type="checkbox" checked disabled>
 
1048
 
1049
  </div>
1050
 
1051
+ <<footer>
1052
  <p>Android APK/AAB Builder SaaS &bull; Powered by Gradle &amp; Flask</p>
1053
  </footer>
1054
 
 
1122
  reader.readAsDataURL(file);
1123
  }
1124
 
1125
+ function loadSha1(){
1126
+ fetch('/sha1')
1127
+ .then(function(r){return r.json()})
1128
+ .then(function(data){
1129
+ if(data.sha1){
1130
+ var card=document.getElementById('sha1Card');
1131
+ var val=document.getElementById('sha1Value');
1132
+ card.style.display='block';
1133
+ val.textContent=data.formatted;
1134
+ }
1135
+ })
1136
+ .catch(function(err){
1137
+ console.log('SHA-1 load error:',err);
1138
+ });
1139
+ }
1140
+
1141
+ function copySha1(){
1142
+ var val=document.getElementById('sha1Value').textContent;
1143
+ navigator.clipboard.writeText(val).then(function(){
1144
+ var btn=document.getElementById('copySha1Btn');
1145
+ btn.textContent='Copied!';
1146
+ btn.classList.add('copied');
1147
+ setTimeout(function(){
1148
+ btn.textContent='Copy to Clipboard';
1149
+ btn.classList.remove('copied');
1150
+ },2000);
1151
+ });
1152
+ }
1153
+
1154
+ window.addEventListener('load',loadSha1);
1155
+
1156
  var currentBuildId=null;
1157
  var eventSource=null;
1158
 
 
1231
  span.className='error-line';
1232
  }else if(msg.indexOf('BUILD SUCCESSFUL')!==-1||msg.indexOf('success')!==-1){
1233
  span.className='success-line';
1234
+ }else if(msg.indexOf('AI Log Analysis')!==-1||msg.indexOf('خطأ')!==-1||msg.indexOf('تم البناء')!==-1||msg.indexOf('لم يتم')!==-1||msg.indexOf('راجع')!==-1||msg.indexOf('تحقق')!==-1||msg.indexOf('فشل')!==-1){
1235
  span.className='ai-line';
1236
  }
1237
  span.textContent=msg+'\n';