fraudTech commited on
Commit
d025cb8
Β·
1 Parent(s): e217d0f

modernised header

Browse files
Files changed (2) hide show
  1. src/App.css +64 -27
  2. src/App.js +17 -19
src/App.css CHANGED
@@ -21,61 +21,98 @@ body, html, #root {
21
 
22
  /* Header */
23
  .header {
24
- padding: 1rem 1.5rem;
25
  width: 100%;
26
- display: grid;
27
- grid-template-columns: 1fr auto 1fr;
28
  align-items: center;
29
- border-bottom: 1px solid rgba(255,255,255,0.1);
30
- gap: 10px;
 
 
31
  }
32
 
33
  .header-title {
34
- grid-column: 2;
35
- justify-self: center;
36
  margin: 0;
 
 
 
 
 
 
 
37
  }
38
 
39
  .header-actions {
40
- grid-column: 3;
41
- justify-self: end;
42
  display: flex;
43
  align-items: center;
44
- flex-wrap: wrap;
45
- gap: 10px;
46
  }
47
 
48
- .strict-toggle {
49
- font-size: 0.9rem;
 
 
 
 
 
 
 
 
 
50
  display: flex;
51
  align-items: center;
52
- gap: 5px;
 
 
 
 
 
 
53
  }
54
 
55
  .btn-secondary {
56
- padding: 0.5rem 1rem;
57
- background: rgba(255,255,255,0.1);
 
 
58
  color: white;
59
- border: 1px solid rgba(255,255,255,0.3);
60
- border-radius: 6px;
61
  cursor: pointer;
62
- font-size: 0.9rem;
63
- transition: background 0.2s;
 
 
 
64
  }
65
 
66
  .btn-secondary:hover {
67
- background: rgba(255,255,255,0.2);
 
 
68
  }
69
 
70
  .logout-btn {
71
- padding: 0.5rem 1rem;
72
- background: rgba(220,38,38,0.8);
 
 
73
  color: white;
74
- border: none;
75
- border-radius: 6px;
76
  cursor: pointer;
77
- font-size: 0.9rem;
78
- transition: background 0.2s;
 
 
 
 
 
 
 
 
 
79
  }
80
 
81
  .logout-btn:hover {
 
21
 
22
  /* Header */
23
  .header {
24
+ padding: 1rem 2rem;
25
  width: 100%;
26
+ display: flex;
27
+ justify-content: space-between;
28
  align-items: center;
29
+ background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.8));
30
+ border-bottom: 2px solid rgba(99, 102, 241, 0.3);
31
+ backdrop-filter: blur(10px);
32
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
33
  }
34
 
35
  .header-title {
 
 
36
  margin: 0;
37
+ font-size: 1.75rem;
38
+ font-weight: 700;
39
+ background: linear-gradient(135deg, #818cf8, #c084fc);
40
+ -webkit-background-clip: text;
41
+ -webkit-text-fill-color: transparent;
42
+ background-clip: text;
43
+ letter-spacing: 0.5px;
44
  }
45
 
46
  .header-actions {
 
 
47
  display: flex;
48
  align-items: center;
49
+ gap: 8px;
 
50
  }
51
 
52
+ .strict-toggle-btn {
53
+ padding: 0.6rem;
54
+ min-width: 44px;
55
+ height: 44px;
56
+ background: rgba(255,255,255,0.08);
57
+ color: white;
58
+ border: 1px solid rgba(255,255,255,0.2);
59
+ border-radius: 10px;
60
+ cursor: pointer;
61
+ font-size: 1.2rem;
62
+ transition: all 0.3s ease;
63
  display: flex;
64
  align-items: center;
65
+ justify-content: center;
66
+ }
67
+
68
+ .strict-toggle-btn:hover {
69
+ background: rgba(255,255,255,0.15);
70
+ transform: translateY(-2px);
71
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
72
  }
73
 
74
  .btn-secondary {
75
+ padding: 0.6rem;
76
+ min-width: 44px;
77
+ height: 44px;
78
+ background: rgba(255,255,255,0.08);
79
  color: white;
80
+ border: 1px solid rgba(255,255,255,0.2);
81
+ border-radius: 10px;
82
  cursor: pointer;
83
+ font-size: 1.2rem;
84
+ transition: all 0.3s ease;
85
+ display: flex;
86
+ align-items: center;
87
+ justify-content: center;
88
  }
89
 
90
  .btn-secondary:hover {
91
+ background: rgba(255,255,255,0.15);
92
+ transform: translateY(-2px);
93
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
94
  }
95
 
96
  .logout-btn {
97
+ padding: 0.6rem;
98
+ min-width: 44px;
99
+ height: 44px;
100
+ background: linear-gradient(135deg, rgba(220,38,38,0.7), rgba(185,28,28,0.8));
101
  color: white;
102
+ border: 1px solid rgba(220,38,38,0.5);
103
+ border-radius: 10px;
104
  cursor: pointer;
105
+ font-size: 1.2rem;
106
+ transition: all 0.3s ease;
107
+ display: flex;
108
+ align-items: center;
109
+ justify-content: center;
110
+ }
111
+
112
+ .logout-btn:hover {
113
+ background: linear-gradient(135deg, rgba(220,38,38,0.9), rgba(185,28,28,1));
114
+ transform: translateY(-2px);
115
+ box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
116
  }
117
 
118
  .logout-btn:hover {
src/App.js CHANGED
@@ -578,31 +578,26 @@ function App() {
578
  <header className="header">
579
  <h1 className="header-title">Prolog AI</h1>
580
  <div className="header-actions">
581
- <label className="strict-toggle" style={{
582
- padding: "0.5rem 1rem",
583
- background: strictMode ? "rgba(220, 38, 38, 0.2)" : "rgba(34, 197, 94, 0.2)",
584
- border: `1px solid ${strictMode ? "rgba(220, 38, 38, 0.5)" : "rgba(34, 197, 94, 0.5)"}`,
585
- borderRadius: "6px",
586
- cursor: "pointer"
587
- }}>
588
- <input
589
- type="checkbox"
590
- checked={strictMode}
591
- onChange={(e) => setStrictMode(e.target.checked)}
592
- />{" "}
593
- {strictMode ? "πŸ”’ Strict KB Mode" : "πŸ”“ Flexible Mode"}
594
- </label>
595
  <button
596
  className="btn-secondary"
597
  onClick={() => setShowUpload(!showUpload)}
 
598
  >
599
- πŸ“€ Upload KB
600
  </button>
601
  <button
602
  className="btn-secondary"
603
  onClick={() => setShowQueryPanel(!showQueryPanel)}
 
604
  >
605
- πŸ” Query KB
606
  </button>
607
  <button
608
  className="btn-secondary"
@@ -611,8 +606,9 @@ function App() {
611
  setShowQueryPanel(false);
612
  setShowRegisterPanel(false);
613
  }}
 
614
  >
615
- 🧠 Session Memory
616
  </button>
617
  {me && me.is_admin && (
618
  <button
@@ -621,8 +617,9 @@ function App() {
621
  setShowRegisterPanel((v) => !v);
622
  setShowQueryPanel(false);
623
  }}
 
624
  >
625
- πŸ‘€ Register User
626
  </button>
627
  )}
628
  <button
@@ -636,8 +633,9 @@ function App() {
636
  setShowSessionPanel(false);
637
  setRegisterStatus(null);
638
  }}
 
639
  >
640
- Logout
641
  </button>
642
  </div>
643
  </header>
 
578
  <header className="header">
579
  <h1 className="header-title">Prolog AI</h1>
580
  <div className="header-actions">
581
+ <button
582
+ className="strict-toggle-btn"
583
+ onClick={() => setStrictMode(!strictMode)}
584
+ title={strictMode ? "Strict KB Mode (click to disable)" : "Flexible Mode (click to enable strict mode)"}
585
+ >
586
+ {strictMode ? "πŸ”’" : "πŸ”“"}
587
+ </button>
 
 
 
 
 
 
 
588
  <button
589
  className="btn-secondary"
590
  onClick={() => setShowUpload(!showUpload)}
591
+ title="Upload KB"
592
  >
593
+ πŸ“€
594
  </button>
595
  <button
596
  className="btn-secondary"
597
  onClick={() => setShowQueryPanel(!showQueryPanel)}
598
+ title="Query KB"
599
  >
600
+ πŸ”
601
  </button>
602
  <button
603
  className="btn-secondary"
 
606
  setShowQueryPanel(false);
607
  setShowRegisterPanel(false);
608
  }}
609
+ title="Session Memory"
610
  >
611
+ 🧠
612
  </button>
613
  {me && me.is_admin && (
614
  <button
 
617
  setShowRegisterPanel((v) => !v);
618
  setShowQueryPanel(false);
619
  }}
620
+ title="Register User"
621
  >
622
+ πŸ‘€
623
  </button>
624
  )}
625
  <button
 
633
  setShowSessionPanel(false);
634
  setRegisterStatus(null);
635
  }}
636
+ title="Logout"
637
  >
638
+ πŸšͺ
639
  </button>
640
  </div>
641
  </header>