mbkauthe 4.7.0 → 4.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/public/main.js CHANGED
@@ -37,14 +37,18 @@ async function selectiveCacheClear() {
37
37
  'sessionId',
38
38
  'mbkauthe.sid',
39
39
  'fullName',
40
- '_csrf'
40
+ '_csrf',
41
+ 'profileImageUser',
42
+ 'profileImageUrl'
41
43
  ];
42
44
 
43
45
  const localStorageToClear = [
44
46
  'sessionId',
45
47
  'mbkauthe.sid',
46
48
  'fullName',
47
- '_csrf'
49
+ '_csrf',
50
+ 'profileImageUser',
51
+ 'profileImageUrl'
48
52
  ];
49
53
 
50
54
  // 1. Clear selected localStorage keys
@@ -5,6 +5,7 @@
5
5
  <meta name="keywords" content="MBK Tech, authentication, login, secure portal, 2FA, OAuth">
6
6
  <meta name="robots" content="index,follow,max-image-preview:large">
7
7
  <meta name="author" content="MBK Tech">
8
+ <meta name="color-scheme" content="dark light">
8
9
  <meta property="og:title" content="{{#if pageTitle}}{{pageTitle}}{{else}}{{#if pageCode}}{{pageCode}}{{/if}}{{#if pageError}} - {{pageError}}{{/if}}{{/if}} | MBK Tech Portal" />
9
10
  <meta property="og:description" content="{{#if description}}{{description}}{{else}}Secure authentication portal for MBK Tech accounts, project access, and session management.{{/if}}" />
10
11
  <meta property="og:type" content="website" />
@@ -13,6 +14,17 @@
13
14
  <meta property="og:url" content="{{#if ogUrl}}{{ogUrl}}{{else}}/mbkauthe/login{{/if}}">
14
15
  <link rel="canonical" href="{{#if ogUrl}}{{ogUrl}}{{else}}/mbkauthe/login{{/if}}">
15
16
  <title>{{#if pageTitle}}{{pageTitle}}{{else}}{{#if pageCode}}{{pageCode}}{{/if}}{{#if pageError}} - {{pageError}}{{/if}}{{/if}} | MBK Tech Portal</title>
17
+ <script>
18
+ (() => {
19
+ const storedTheme = localStorage.getItem('mbkauthe-theme');
20
+ const prefersLight = window.matchMedia && window.matchMedia('(prefers-color-scheme: light)').matches;
21
+ const resolvedTheme = storedTheme === 'light' || storedTheme === 'dark'
22
+ ? storedTheme
23
+ : (prefersLight ? 'light' : 'dark');
24
+
25
+ document.documentElement.setAttribute('data-theme', resolvedTheme);
26
+ })();
27
+ </script>
16
28
  <link rel="icon" type="image/png" href="/icon.png">
17
29
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
18
30
  {{> sharedStyles}}
@@ -16,7 +16,7 @@
16
16
  <div class="login-sidebar">
17
17
  <div class="sidebar-content">
18
18
  <div class="brand-section">
19
- <div class="logo" style="justify-content: center;margin-bottom: 1rem;">
19
+ <div class="logo logo-centered">
20
20
  <img src="/icon.svg" alt="Logo" class="logo-image">
21
21
  <span class="logo-text">BK <span>Tech</span></span>
22
22
  </div>
@@ -54,10 +54,9 @@
54
54
  </div>
55
55
  </div>
56
56
 
57
- <div id="emptyState" class="empty-state" style="display:none;">
57
+ <div id="emptyState" class="empty-state hidden-by-default">
58
58
  <p>No signed-in accounts found.</p>
59
- <a href="/mbkauthe/login" class="btn-login"
60
- style="text-decoration: none; display: inline-block; margin-top: 10px; text-align: center; line-height: 40px;">Go
59
+ <a href="/mbkauthe/login" class="btn-login btn-login-inline">Go
61
60
  to Login</a>
62
61
  </div>
63
62
 
@@ -120,8 +119,8 @@
120
119
  align-items: center;
121
120
  gap: 16px;
122
121
  padding: 14px 20px;
123
- background: rgba(0, 0, 0, .3);
124
- border: 2px solid rgba(0, 184, 148, 0.1);
122
+ background: var(--input-bg);
123
+ border: 2px solid color-mix(in srgb, var(--accent) 22%, transparent 78%);
125
124
  border-radius: var(--border-radius);
126
125
  cursor: pointer;
127
126
  transition: var(--transition);
@@ -132,7 +131,7 @@
132
131
  }
133
132
 
134
133
  .account-item:hover {
135
- background: rgba(0, 0, 0, .4);
134
+ background: var(--input-bg-focus);
136
135
  border-color: var(--accent);
137
136
  box-shadow: 0 4px 15px rgba(0, 184, 148, 0.15);
138
137
  }
@@ -217,9 +216,9 @@
217
216
  }
218
217
 
219
218
  .btn-logout {
220
- background: rgba(255, 255, 255, 0.05);
219
+ background: var(--surface-soft);
221
220
  color: var(--text-light);
222
- border-color: rgba(255, 255, 255, 0.15);
221
+ border-color: var(--muted-border);
223
222
  width: 100%;
224
223
  max-width: 420px;
225
224
  cursor: pointer;
@@ -233,6 +232,28 @@
233
232
  box-shadow: 0 4px 15px rgba(255, 118, 117, 0.15);
234
233
  }
235
234
 
235
+ [data-theme="light"] .account-item {
236
+ background: rgba(255, 255, 255, 0.95);
237
+ border-color: rgba(0, 184, 148, 0.18);
238
+ }
239
+
240
+ [data-theme="light"] .account-item:hover {
241
+ background: rgba(255, 255, 255, 1);
242
+ }
243
+
244
+ [data-theme="light"] .btn-social.btn-logout {
245
+ background: var(--accent);
246
+ color: #ffffff;
247
+ border-color: var(--accent);
248
+ }
249
+
250
+ [data-theme="light"] .btn-social.btn-logout:hover {
251
+ background: rgba(255, 118, 117, 0.1);
252
+ border-color: var(--danger);
253
+ color: var(--danger);
254
+ box-shadow: 0 4px 15px rgba(255, 118, 117, 0.15);
255
+ }
256
+
236
257
  .loading-spinner {
237
258
  display: flex;
238
259
  justify-content: center;
@@ -242,7 +263,7 @@
242
263
  .spinner {
243
264
  width: 30px;
244
265
  height: 30px;
245
- border: 3px solid rgba(255, 255, 255, 0.1);
266
+ border: 3px solid var(--muted-border);
246
267
  border-top-color: var(--accent);
247
268
  border-radius: 50%;
248
269
  animation: spin 0.8s linear infinite;
@@ -258,9 +279,9 @@
258
279
  text-align: center;
259
280
  padding: 30px;
260
281
  color: var(--text-light);
261
- background: rgba(0, 0, 0, 0.2);
282
+ background: var(--surface-muted);
262
283
  border-radius: var(--border-radius);
263
- border: 1px dashed rgba(255, 255, 255, 0.1);
284
+ border: 1px dashed var(--muted-border);
264
285
  }
265
286
 
266
287
  /* Mobile adjustments */
@@ -279,7 +300,7 @@
279
300
  gap: 12px;
280
301
  margin-top: 30px;
281
302
  padding-top: 20px;
282
- border-top: 1px solid rgba(255, 255, 255, 0.1);
303
+ border-top: 1px solid var(--muted-border);
283
304
  }
284
305
 
285
306
  .mobile-switch-btn,
@@ -298,13 +319,13 @@
298
319
  }
299
320
 
300
321
  .mobile-switch-btn {
301
- background: rgba(255, 255, 255, 0.05);
302
- border: 1px solid rgba(255, 255, 255, 0.15);
322
+ background: var(--surface-soft);
323
+ border: 1px solid var(--muted-border);
303
324
  color: var(--text);
304
325
  }
305
326
 
306
327
  .mobile-switch-btn:hover {
307
- background: rgba(255, 255, 255, 0.1);
328
+ background: color-mix(in srgb, var(--accent) 10%, var(--surface-soft) 90%);
308
329
  border-color: var(--accent);
309
330
  color: var(--accent);
310
331
  box-shadow: 0 4px 15px rgba(0, 184, 148, 0.15);