Brozy123 commited on
Commit
34c188d
·
verified ·
1 Parent(s): 93fafed

Update dashboard.html

Browse files
Files changed (1) hide show
  1. dashboard.html +524 -10
dashboard.html CHANGED
@@ -381,10 +381,476 @@ body {
381
  .log-line.error { color: var(--red); }
382
  .log-line.warn { color: var(--yellow); }
383
 
384
- /* Responsive */
385
  @media (max-width: 768px) {
386
- .sidebar { display: none; }
387
- .main { margin-left: 0; padding: 20px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
388
  }
389
 
390
  /* Scrollbar */
@@ -493,36 +959,39 @@ input:checked + .slider:before {
493
  <!-- ===== DASHBOARD ===== -->
494
  <div id="dashboard">
495
  <!-- Sidebar -->
496
- <div class="sidebar">
497
  <div class="sidebar-brand">
498
  <img src="/logo.png" alt="">
499
  <span>FriendlyBot</span>
 
 
 
500
  </div>
501
  <div class="sidebar-nav">
502
- <div class="nav-item active" onclick="showPage('overview', this)">
503
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg>
504
  Overview
505
  </div>
506
- <div class="nav-item" onclick="showPage('servers', this)">
507
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 12h-4l-3 9L9 3l-3 9H2"/></svg>
508
  Servers
509
  </div>
510
- <div class="nav-item" onclick="showPage('commands', this)">
511
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="4 17 10 11 4 5"/><line x1="12" y1="19" x2="20" y2="19"/></svg>
512
  Commands
513
  </div>
514
- <div class="nav-item" onclick="showPage('invite', this)">
515
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="8.5" cy="7" r="4"/><line x1="20" y1="8" x2="20" y2="14"/><line x1="23" y1="11" x2="17" y2="11"/></svg>
516
  Invite Bot
517
  </div>
518
- <div class="nav-item" onclick="showPage('premium', this)" style="color:var(--gold, #FFD700);">
519
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg>
520
  Premium
521
  </div>
522
  </div>
523
  </div>
524
  <div class="sidebar-footer">
525
- <div class="nav-item" onclick="logout()">
526
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" y1="12" x2="9" y2="12"/></svg>
527
  Sign Out
528
  </div>
@@ -1253,6 +1722,51 @@ async function loadPremium() {
1253
  }
1254
  } catch (e) {}
1255
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1256
  </script>
1257
  </body>
1258
  </html>
 
381
  .log-line.error { color: var(--red); }
382
  .log-line.warn { color: var(--yellow); }
383
 
384
+ /* Responsive - Tablets (768px and below) */
385
  @media (max-width: 768px) {
386
+ .sidebar {
387
+ width: 280px;
388
+ padding: 16px 12px;
389
+ }
390
+ .main {
391
+ margin-left: 280px;
392
+ padding: 20px 16px;
393
+ }
394
+ .topbar {
395
+ flex-direction: column;
396
+ align-items: flex-start;
397
+ gap: 12px;
398
+ }
399
+ .topbar h2 {
400
+ font-size: 22px;
401
+ }
402
+ .topbar-right {
403
+ width: 100%;
404
+ justify-content: space-between;
405
+ }
406
+ .stats-grid {
407
+ grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
408
+ gap: 12px;
409
+ }
410
+ .stat-card {
411
+ padding: 16px;
412
+ }
413
+ .stat-card .value {
414
+ font-size: 28px;
415
+ }
416
+ .stat-card .label {
417
+ font-size: 11px;
418
+ }
419
+ .panel {
420
+ margin-bottom: 16px;
421
+ }
422
+ .actions-grid {
423
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
424
+ padding: 16px;
425
+ gap: 12px;
426
+ }
427
+ .server-row {
428
+ flex-direction: column;
429
+ align-items: flex-start;
430
+ padding: 12px 16px;
431
+ gap: 8px;
432
+ }
433
+ .server-info {
434
+ width: 100%;
435
+ flex-direction: column;
436
+ }
437
+ .server-rank {
438
+ align-self: flex-start;
439
+ }
440
+ }
441
+
442
+ /* Responsive - Mobile Phones (600px and below) */
443
+ @media (max-width: 600px) {
444
+ :root {
445
+ --radius: 12px;
446
+ --radius-sm: 8px;
447
+ }
448
+
449
+ body {
450
+ font-size: 14px;
451
+ }
452
+
453
+ .sidebar {
454
+ position: fixed;
455
+ z-index: 200;
456
+ width: 100%;
457
+ height: auto;
458
+ max-height: 0;
459
+ overflow: hidden;
460
+ transition: max-height 0.3s ease;
461
+ border-right: none;
462
+ border-bottom: 1px solid var(--border);
463
+ padding: 0;
464
+ display: flex;
465
+ flex-direction: row;
466
+ background: var(--surface);
467
+ }
468
+
469
+ .sidebar.mobile-open {
470
+ max-height: 100vh;
471
+ padding: 16px;
472
+ overflow-y: auto;
473
+ flex-direction: column;
474
+ }
475
+
476
+ .sidebar-brand {
477
+ padding: 8px;
478
+ border: none;
479
+ margin: 0;
480
+ min-width: 120px;
481
+ }
482
+
483
+ .sidebar-brand img {
484
+ width: 32px;
485
+ }
486
+
487
+ .sidebar-brand span {
488
+ font-size: 14px;
489
+ }
490
+
491
+ .sidebar-nav {
492
+ display: none;
493
+ }
494
+
495
+ .sidebar.mobile-open .sidebar-nav {
496
+ display: flex;
497
+ }
498
+
499
+ .sidebar-footer {
500
+ display: none;
501
+ }
502
+
503
+ .sidebar.mobile-open .sidebar-footer {
504
+ display: block;
505
+ }
506
+
507
+ .mobile-menu-toggle {
508
+ display: flex;
509
+ align-items: center;
510
+ justify-content: center;
511
+ width: 40px;
512
+ height: 40px;
513
+ background: var(--surface2);
514
+ border: 1px solid var(--border);
515
+ border-radius: var(--radius-sm);
516
+ cursor: pointer;
517
+ padding: 0;
518
+ margin-left: auto;
519
+ color: var(--text);
520
+ }
521
+
522
+ .main {
523
+ margin-left: 0;
524
+ padding: 16px 12px;
525
+ margin-top: 0;
526
+ }
527
+
528
+ .main.sidebar-mobile-open {
529
+ margin-top: 60px;
530
+ }
531
+
532
+ .topbar {
533
+ flex-direction: column;
534
+ align-items: flex-start;
535
+ gap: 8px;
536
+ margin-bottom: 16px;
537
+ }
538
+
539
+ .topbar h2 {
540
+ font-size: 20px;
541
+ font-weight: 700;
542
+ }
543
+
544
+ .topbar-right {
545
+ width: 100%;
546
+ flex-wrap: wrap;
547
+ gap: 8px;
548
+ }
549
+
550
+ .refresh-btn {
551
+ padding: 6px;
552
+ width: 36px;
553
+ height: 36px;
554
+ }
555
+
556
+ .status-pill {
557
+ font-size: 12px;
558
+ padding: 6px 12px;
559
+ }
560
+
561
+ .user-pill {
562
+ padding: 6px 10px;
563
+ gap: 6px;
564
+ }
565
+
566
+ .user-pill img {
567
+ width: 24px;
568
+ height: 24px;
569
+ }
570
+
571
+ .user-pill span {
572
+ font-size: 12px;
573
+ }
574
+
575
+ .stats-grid {
576
+ grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
577
+ gap: 10px;
578
+ margin-bottom: 16px;
579
+ }
580
+
581
+ .stat-card {
582
+ padding: 12px;
583
+ border-radius: var(--radius-sm);
584
+ }
585
+
586
+ .stat-card .label {
587
+ font-size: 10px;
588
+ letter-spacing: 0px;
589
+ }
590
+
591
+ .stat-card .value {
592
+ font-size: 24px;
593
+ margin-top: 4px;
594
+ }
595
+
596
+ .stat-card .sub {
597
+ font-size: 10px;
598
+ margin-top: 4px;
599
+ }
600
+
601
+ .stat-card:hover {
602
+ transform: translateY(-1px);
603
+ }
604
+
605
+ .premium-locked::after {
606
+ font-size: 8px;
607
+ padding: 2px 4px;
608
+ top: 8px;
609
+ right: 8px;
610
+ }
611
+
612
+ .login-card {
613
+ width: 95vw;
614
+ max-width: 340px;
615
+ padding: 32px 20px;
616
+ border-radius: var(--radius);
617
+ }
618
+
619
+ .login-card img {
620
+ width: 64px;
621
+ margin-bottom: 16px;
622
+ }
623
+
624
+ .login-card h1 {
625
+ font-size: 20px;
626
+ margin-bottom: 4px;
627
+ }
628
+
629
+ .login-card p {
630
+ font-size: 13px;
631
+ margin-bottom: 20px;
632
+ }
633
+
634
+ .login-card input {
635
+ padding: 12px 14px;
636
+ font-size: 14px;
637
+ margin-bottom: 10px;
638
+ }
639
+
640
+ .login-card button {
641
+ padding: 12px;
642
+ font-size: 14px;
643
+ }
644
+
645
+ .login-card button svg {
646
+ width: 18px;
647
+ height: 18px;
648
+ }
649
+
650
+ .panel {
651
+ border-radius: var(--radius-sm);
652
+ margin-bottom: 12px;
653
+ }
654
+
655
+ .panel-header {
656
+ padding: 14px 16px;
657
+ font-size: 14px;
658
+ }
659
+
660
+ .panel-header h3 {
661
+ font-size: 14px;
662
+ }
663
+
664
+ .server-row {
665
+ flex-direction: column;
666
+ align-items: flex-start;
667
+ padding: 12px;
668
+ gap: 8px;
669
+ border-radius: var(--radius-sm);
670
+ background: var(--surface2);
671
+ margin: 8px;
672
+ }
673
+
674
+ .server-row:last-child {
675
+ border-bottom: none;
676
+ }
677
+
678
+ .server-row:hover {
679
+ background: var(--surface2);
680
+ }
681
+
682
+ .server-info {
683
+ width: 100%;
684
+ flex-direction: column;
685
+ gap: 6px;
686
+ }
687
+
688
+ .server-icon {
689
+ width: 36px;
690
+ height: 36px;
691
+ font-size: 14px;
692
+ }
693
+
694
+ .server-name {
695
+ font-size: 13px;
696
+ font-weight: 600;
697
+ }
698
+
699
+ .server-members {
700
+ font-size: 11px;
701
+ }
702
+
703
+ .server-rank {
704
+ font-size: 12px;
705
+ min-width: auto;
706
+ }
707
+
708
+ .member-badge {
709
+ padding: 4px 10px;
710
+ font-size: 11px;
711
+ }
712
+
713
+ .cmd-row {
714
+ flex-direction: column;
715
+ align-items: flex-start;
716
+ padding: 12px;
717
+ gap: 6px;
718
+ }
719
+
720
+ .cmd-row:hover {
721
+ background: var(--surface2);
722
+ }
723
+
724
+ .cmd-name {
725
+ font-size: 13px;
726
+ }
727
+
728
+ .cmd-desc {
729
+ font-size: 11px;
730
+ }
731
+
732
+ .cmd-badge {
733
+ padding: 3px 8px;
734
+ font-size: 10px;
735
+ }
736
+
737
+ .actions-grid {
738
+ grid-template-columns: 1fr;
739
+ padding: 12px;
740
+ gap: 10px;
741
+ }
742
+
743
+ .action-card {
744
+ padding: 16px;
745
+ border-radius: var(--radius-sm);
746
+ }
747
+
748
+ .action-card h4 {
749
+ font-size: 13px;
750
+ }
751
+
752
+ .action-card p {
753
+ font-size: 11px;
754
+ }
755
+
756
+ .action-icon {
757
+ font-size: 20px;
758
+ }
759
+
760
+ .invite-box {
761
+ padding: 24px 16px;
762
+ border-radius: var(--radius-sm);
763
+ margin-bottom: 16px;
764
+ }
765
+
766
+ .invite-box h3 {
767
+ font-size: 18px;
768
+ margin-bottom: 8px;
769
+ }
770
+
771
+ .invite-box p {
772
+ font-size: 13px;
773
+ margin-bottom: 16px;
774
+ }
775
+
776
+ .invite-btn {
777
+ padding: 12px 24px;
778
+ font-size: 13px;
779
+ width: 100%;
780
+ }
781
+
782
+ .log-area {
783
+ padding: 12px 14px;
784
+ font-size: 11px;
785
+ max-height: 300px;
786
+ }
787
+
788
+ .nav-item {
789
+ padding: 10px 12px;
790
+ font-size: 13px;
791
+ gap: 10px;
792
+ }
793
+
794
+ .nav-item svg {
795
+ width: 18px;
796
+ height: 18px;
797
+ }
798
+
799
+ .switch {
800
+ width: 44px;
801
+ height: 22px;
802
+ }
803
+
804
+ .slider:before {
805
+ height: 16px;
806
+ width: 16px;
807
+ }
808
+
809
+ input:checked + .slider:before {
810
+ transform: translateX(22px);
811
+ }
812
+ }
813
+
814
+ /* Ultra-small devices (480px and below) */
815
+ @media (max-width: 480px) {
816
+ .login-card {
817
+ width: 98vw;
818
+ padding: 24px 16px;
819
+ }
820
+
821
+ .stat-card {
822
+ min-height: 80px;
823
+ display: flex;
824
+ flex-direction: column;
825
+ justify-content: center;
826
+ }
827
+
828
+ .stats-grid {
829
+ grid-template-columns: repeat(2, 1fr);
830
+ gap: 8px;
831
+ }
832
+
833
+ .topbar h2 {
834
+ font-size: 18px;
835
+ }
836
+
837
+ .server-row,
838
+ .cmd-row {
839
+ margin: 6px;
840
+ padding: 10px;
841
+ }
842
+
843
+ .actions-grid {
844
+ padding: 8px;
845
+ }
846
+
847
+ .panel-header {
848
+ padding: 12px;
849
+ }
850
+
851
+ .main {
852
+ padding: 12px 8px;
853
+ }
854
  }
855
 
856
  /* Scrollbar */
 
959
  <!-- ===== DASHBOARD ===== -->
960
  <div id="dashboard">
961
  <!-- Sidebar -->
962
+ <div class="sidebar" id="sidebar">
963
  <div class="sidebar-brand">
964
  <img src="/logo.png" alt="">
965
  <span>FriendlyBot</span>
966
+ <button class="mobile-menu-toggle" onclick="toggleMobileMenu()" id="mobile-menu-toggle" title="Toggle Menu" style="display:none;">
967
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="4" y1="6" x2="20" y2="6"/><line x1="4" y1="12" x2="20" y2="12"/><line x1="4" y1="18" x2="20" y2="18"/></svg>
968
+ </button>
969
  </div>
970
  <div class="sidebar-nav">
971
+ <div class="nav-item active" onclick="showPage('overview', this); closeMobileMenu();">
972
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg>
973
  Overview
974
  </div>
975
+ <div class="nav-item" onclick="showPage('servers', this); closeMobileMenu();">
976
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 12h-4l-3 9L9 3l-3 9H2"/></svg>
977
  Servers
978
  </div>
979
+ <div class="nav-item" onclick="showPage('commands', this); closeMobileMenu();">
980
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="4 17 10 11 4 5"/><line x1="12" y1="19" x2="20" y2="19"/></svg>
981
  Commands
982
  </div>
983
+ <div class="nav-item" onclick="showPage('invite', this); closeMobileMenu();">
984
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="8.5" cy="7" r="4"/><line x1="20" y1="8" x2="20" y2="14"/><line x1="23" y1="11" x2="17" y2="11"/></svg>
985
  Invite Bot
986
  </div>
987
+ <div class="nav-item" onclick="showPage('premium', this); closeMobileMenu();" style="color:var(--gold, #FFD700);">
988
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg>
989
  Premium
990
  </div>
991
  </div>
992
  </div>
993
  <div class="sidebar-footer">
994
+ <div class="nav-item" onclick="logout(); closeMobileMenu();">
995
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" y1="12" x2="9" y2="12"/></svg>
996
  Sign Out
997
  </div>
 
1722
  }
1723
  } catch (e) {}
1724
  }
1725
+
1726
+ // Mobile Menu Toggle
1727
+ function toggleMobileMenu() {
1728
+ const sidebar = document.getElementById('sidebar');
1729
+ const main = document.querySelector('.main');
1730
+ sidebar.classList.toggle('mobile-open');
1731
+ main.classList.toggle('sidebar-mobile-open');
1732
+ }
1733
+
1734
+ function closeMobileMenu() {
1735
+ const sidebar = document.getElementById('sidebar');
1736
+ const main = document.querySelector('.main');
1737
+ if (window.innerWidth <= 600) {
1738
+ sidebar.classList.remove('mobile-open');
1739
+ main.classList.remove('sidebar-mobile-open');
1740
+ }
1741
+ }
1742
+
1743
+ function updateMobileMenuVisibility() {
1744
+ const toggle = document.getElementById('mobile-menu-toggle');
1745
+ if (window.innerWidth <= 600) {
1746
+ toggle.style.display = 'flex';
1747
+ } else {
1748
+ toggle.style.display = 'none';
1749
+ const sidebar = document.getElementById('sidebar');
1750
+ const main = document.querySelector('.main');
1751
+ sidebar.classList.remove('mobile-open');
1752
+ main.classList.remove('sidebar-mobile-open');
1753
+ }
1754
+ }
1755
+
1756
+ window.addEventListener('resize', updateMobileMenuVisibility);
1757
+ document.addEventListener('DOMContentLoaded', updateMobileMenuVisibility);
1758
+
1759
+ // Close mobile menu when clicking outside
1760
+ document.addEventListener('click', function(event) {
1761
+ const sidebar = document.getElementById('sidebar');
1762
+ const toggle = document.getElementById('mobile-menu-toggle');
1763
+ if (window.innerWidth <= 600 &&
1764
+ !sidebar.contains(event.target) &&
1765
+ !toggle.contains(event.target) &&
1766
+ sidebar.classList.contains('mobile-open')) {
1767
+ closeMobileMenu();
1768
+ }
1769
+ });
1770
  </script>
1771
  </body>
1772
  </html>