Krish2606 commited on
Commit
a38ea02
·
1 Parent(s): b3e24e9

Optimize mobile main-content padding, prevent chat button shrink, and implement debounce lock on back navigation

Browse files
Files changed (2) hide show
  1. frontend/css/styles.css +5 -2
  2. frontend/js/router.js +4 -0
frontend/css/styles.css CHANGED
@@ -1156,7 +1156,7 @@ img {
1156
  .btn-icon {
1157
  width: 40px;
1158
  height: 40px;
1159
- padding: 0;
1160
  border-radius: 50%;
1161
  flex-shrink: 0 !important;
1162
  }
@@ -1813,6 +1813,7 @@ img {
1813
  justify-content: center;
1814
  font-size: 1.25rem;
1815
  transition: all var(--transition-fast);
 
1816
  }
1817
 
1818
  .chat-send-btn {
@@ -4839,7 +4840,7 @@ tr:hover td {
4839
 
4840
  .main-content {
4841
  margin-left: 0 !important;
4842
- padding-top: 5rem !important;
4843
  width: 100% !important;
4844
  }
4845
 
@@ -4869,6 +4870,8 @@ tr:hover td {
4869
  width: 46px !important;
4870
  height: 46px !important;
4871
  font-size: 1.25rem !important;
 
 
4872
  }
4873
 
4874
  .step-connector {
 
1156
  .btn-icon {
1157
  width: 40px;
1158
  height: 40px;
1159
+ padding: 0 !important;
1160
  border-radius: 50%;
1161
  flex-shrink: 0 !important;
1162
  }
 
1813
  justify-content: center;
1814
  font-size: 1.25rem;
1815
  transition: all var(--transition-fast);
1816
+ flex-shrink: 0 !important;
1817
  }
1818
 
1819
  .chat-send-btn {
 
4840
 
4841
  .main-content {
4842
  margin-left: 0 !important;
4843
+ padding: 5rem 0.75rem 1rem 0.75rem !important;
4844
  width: 100% !important;
4845
  }
4846
 
 
4870
  width: 46px !important;
4871
  height: 46px !important;
4872
  font-size: 1.25rem !important;
4873
+ padding: 0 !important;
4874
+ flex-shrink: 0 !important;
4875
  }
4876
 
4877
  .step-connector {
frontend/js/router.js CHANGED
@@ -28,6 +28,7 @@ const Router = {
28
  currentRoute: null,
29
  params: {},
30
  historyStack: [],
 
31
 
32
  /**
33
  * Initialize router
@@ -143,6 +144,9 @@ const Router = {
143
  * Go back
144
  */
145
  back() {
 
 
 
146
  if (this.historyStack.length > 1) {
147
  this.historyStack.pop(); // Remove current route
148
  const previousHash = this.historyStack.pop(); // Get previous route
 
28
  currentRoute: null,
29
  params: {},
30
  historyStack: [],
31
+ _backTimeout: null,
32
 
33
  /**
34
  * Initialize router
 
144
  * Go back
145
  */
146
  back() {
147
+ if (this._backTimeout) return;
148
+ this._backTimeout = setTimeout(() => { this._backTimeout = null; }, 300);
149
+
150
  if (this.historyStack.length > 1) {
151
  this.historyStack.pop(); // Remove current route
152
  const previousHash = this.historyStack.pop(); // Get previous route