Ko-TTS-Arena Contributors Claude Sonnet 4.5 commited on
Commit
cb03ebc
·
1 Parent(s): 887a0d8

Remove all Hugging Face login buttons and prompts

Browse files

- Removed login link from base.html navigation
- Removed login tip overlay and mobile banner
- Removed login prompt from leaderboard.html
- Removed all login-related CSS and JavaScript
- Users can still use the app without login UI clutter

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

templates/arena.html CHANGED
@@ -585,88 +585,7 @@
585
  }
586
  }
587
 
588
- /* Login prompt overlay styles */
589
- .login-prompt-overlay {
590
- position: fixed;
591
- top: 0;
592
- left: 0;
593
- width: 100%;
594
- height: 100%;
595
- background-color: rgba(0, 0, 0, 0.7);
596
- z-index: 10000;
597
- display: flex;
598
- align-items: center;
599
- justify-content: center;
600
- }
601
-
602
- .login-prompt-content {
603
- background: white;
604
- border-radius: 12px;
605
- padding: 32px;
606
- max-width: 400px;
607
- width: 90%;
608
- text-align: center;
609
- box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
610
- }
611
-
612
- .login-prompt-content h3 {
613
- margin: 0 0 16px 0;
614
- color: var(--text-color);
615
- font-size: 24px;
616
- }
617
-
618
- .login-prompt-content p {
619
- margin: 0 0 24px 0;
620
- color: var(--text-secondary);
621
- line-height: 1.5;
622
- }
623
-
624
- .login-prompt-actions {
625
- display: flex;
626
- gap: 12px;
627
- justify-content: center;
628
- }
629
-
630
- .login-prompt-close {
631
- padding: 12px 24px;
632
- background: transparent;
633
- border: 1px solid var(--border-color);
634
- border-radius: 8px;
635
- color: var(--text-secondary);
636
- cursor: pointer;
637
- font-size: 14px;
638
- transition: all 0.2s;
639
- }
640
-
641
- .login-prompt-close:hover {
642
- background: var(--light-gray);
643
- }
644
-
645
- .login-prompt-btn {
646
- padding: 12px 24px;
647
- background: var(--primary-color);
648
- border: none;
649
- border-radius: 8px;
650
- color: white;
651
- text-decoration: none;
652
- font-size: 14px;
653
- font-weight: 500;
654
- transition: all 0.2s;
655
- display: inline-block;
656
- }
657
-
658
- .login-prompt-btn:hover {
659
- background: var(--primary-hover);
660
- transform: translateY(-1px);
661
- }
662
-
663
- /* Dark mode for login prompt */
664
- @media (prefers-color-scheme: dark) {
665
- .login-prompt-content {
666
- background: var(--bg-color);
667
- border: 1px solid var(--border-color);
668
- }
669
- }
670
  </style>
671
  {% endblock %}
672
 
 
585
  }
586
  }
587
 
588
+ /* Login prompt overlay removed */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
589
  </style>
590
  {% endblock %}
591
 
templates/base.html CHANGED
@@ -369,24 +369,7 @@
369
  transform: rotate(180deg);
370
  }
371
 
372
- .login-link {
373
- display: flex;
374
- align-items: center;
375
- padding: 12px 16px;
376
- border-top: 1px solid var(--border-color);
377
- text-decoration: none;
378
- color: var(--text-color);
379
- }
380
-
381
- .login-link:hover {
382
- background-color: var(--light-gray);
383
- }
384
-
385
- .login-link img {
386
- width: 24px;
387
- height: 24px;
388
- margin-right: 12px;
389
- }
390
 
391
  .sidebar-footer {
392
  margin-top: auto;
@@ -892,163 +875,7 @@
892
  }
893
  }
894
 
895
- /* Login tip overlay */
896
- .login-tip-overlay {
897
- position: absolute;
898
- background-color: white;
899
- border: 1px solid var(--border-color);
900
- border-radius: var(--radius);
901
- box-shadow: var(--shadow);
902
- padding: 16px;
903
- z-index: 1000;
904
- width: 280px;
905
- display: none;
906
- }
907
-
908
- .login-tip-overlay.show {
909
- display: block;
910
- }
911
-
912
- .login-tip-content {
913
- font-size: 14px;
914
- margin-bottom: 12px;
915
- }
916
-
917
- .login-tip-actions {
918
- display: flex;
919
- justify-content: space-between;
920
- }
921
-
922
- .login-tip-close {
923
- font-size: 13px;
924
- color: var(--text-color);
925
- opacity: 0.7;
926
- cursor: pointer;
927
- background: none;
928
- border: none;
929
- padding: 0;
930
- }
931
-
932
- .login-now-btn {
933
- font-size: 13px;
934
- background-color: var(--primary-color);
935
- color: white;
936
- border: none;
937
- border-radius: 4px;
938
- padding: 6px 12px;
939
- cursor: pointer;
940
- text-decoration: none;
941
- }
942
-
943
- .login-tip-overlay[data-popper-placement^='top'] .login-tip-caret {
944
- position: absolute;
945
- bottom: -8px;
946
- left: 50%;
947
- transform: translateX(-50%);
948
- width: 16px;
949
- height: 8px;
950
- overflow: hidden;
951
- }
952
-
953
- .login-tip-overlay[data-popper-placement^='top'] .login-tip-caret:after {
954
- content: '';
955
- position: absolute;
956
- width: 12px;
957
- height: 12px;
958
- background: white;
959
- border-right: 1px solid var(--border-color);
960
- border-bottom: 1px solid var(--border-color);
961
- top: -6px;
962
- left: 2px;
963
- transform: rotate(45deg);
964
- }
965
-
966
- @media (prefers-color-scheme: dark) {
967
- .login-tip-overlay {
968
- background-color: var(--light-gray);
969
- border-color: var(--border-color);
970
- }
971
-
972
- .login-tip-overlay[data-popper-placement^='top'] .login-tip-caret:after {
973
- background: var(--light-gray);
974
- border-color: var(--border-color);
975
- }
976
-
977
- .login-tip-close {
978
- color: var(--text-color);
979
- }
980
- }
981
-
982
- /* Mobile login banner */
983
- .login-banner {
984
- position: fixed;
985
- top: 50%;
986
- left: 50%;
987
- transform: translate(-50%, -50%);
988
- width: 85%;
989
- max-width: 320px;
990
- background-color: white;
991
- color: var(--text-color);
992
- border-radius: var(--radius);
993
- box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
994
- padding: 20px;
995
- display: none;
996
- z-index: 9998;
997
- text-align: center;
998
- border: 1px solid var(--border-color);
999
- }
1000
-
1001
- .login-banner-content {
1002
- margin-bottom: 16px;
1003
- font-size: 15px;
1004
- font-weight: 500;
1005
- }
1006
-
1007
- .login-banner-actions {
1008
- display: flex;
1009
- flex-direction: row;
1010
- justify-content: space-between;
1011
- gap: 12px;
1012
- align-items: center;
1013
- margin-top: 20px;
1014
- }
1015
-
1016
- .login-banner-close {
1017
- background: none;
1018
- border: 1px solid var(--border-color);
1019
- color: var(--text-color);
1020
- font-size: 14px;
1021
- cursor: pointer;
1022
- padding: 10px 16px;
1023
- border-radius: var(--radius);
1024
- flex: 1;
1025
- font-weight: 500;
1026
- }
1027
-
1028
- .login-banner-btn {
1029
- background-color: var(--primary-color);
1030
- color: white;
1031
- border: none;
1032
- border-radius: var(--radius);
1033
- padding: 10px 16px;
1034
- cursor: pointer;
1035
- font-weight: 500;
1036
- text-decoration: none;
1037
- flex: 1;
1038
- text-align: center;
1039
- }
1040
-
1041
- @media (prefers-color-scheme: dark) {
1042
- .login-banner {
1043
- background-color: var(--light-gray);
1044
- border-color: var(--border-color);
1045
- }
1046
-
1047
- .login-banner-close {
1048
- border-color: var(--border-color);
1049
- background-color: rgba(255, 255, 255, 0.05);
1050
- }
1051
- }
1052
  </style>
1053
  </head>
1054
 
@@ -1127,21 +954,7 @@
1127
  </div>
1128
  </div>
1129
  {% else %}
1130
- <a href="{{ url_for('auth.login', next=request.path) }}" class="login-link">
1131
- <img src="{{ url_for('static', filename='huggingface.svg') }}" alt="Hugging Face">
1132
- Login
1133
- </a>
1134
- <!-- Login tip overlay -->
1135
- <div id="login-tip-overlay" class="login-tip-overlay">
1136
- <div class="login-tip-content">
1137
- Log in to track your votes, see personalized leaderboards, and more!
1138
- </div>
1139
- <div class="login-tip-actions">
1140
- <button class="login-tip-close" onclick="dismissLoginTip()">Don't show again</button>
1141
- <a href="{{ url_for('auth.login', next=request.path) }}" class="login-now-btn">Login now</a>
1142
- </div>
1143
- <div class="login-tip-caret"></div>
1144
- </div>
1145
  {% endif %}
1146
  </div>
1147
  </div>
@@ -1170,18 +983,7 @@
1170
  <!-- Toast container -->
1171
  <div class="toast-container" id="toast-container"></div>
1172
 
1173
- {% if not current_user.is_authenticated %}
1174
- <!-- Mobile login banner -->
1175
- <div id="login-banner" class="login-banner">
1176
- <div class="login-banner-content">
1177
- Log in to track your votes and see personalized leaderboards!
1178
- </div>
1179
- <div class="login-banner-actions">
1180
- <button class="login-banner-close" onclick="dismissLoginTip()">No thanks</button>
1181
- <a href="{{ url_for('auth.login', next=request.path) }}" class="login-banner-btn">Login</a>
1182
- </div>
1183
- </div>
1184
- {% endif %}
1185
 
1186
  {% block extra_scripts %}{% endblock %}
1187
  <script src="https://unpkg.com/@popperjs/core@2"></script>
@@ -1201,155 +1003,10 @@
1201
  userDropdown.classList.toggle('active');
1202
  }
1203
 
1204
- // Function to check if the login tip has been dismissed
1205
- function isLoginTipDismissed() {
1206
- try {
1207
- return localStorage.getItem('login_tip_dismissed') === 'true';
1208
- } catch (error) {
1209
- // Fallback if localStorage is blocked
1210
- console.warn('localStorage access failed:', error);
1211
- return false;
1212
- }
1213
- }
1214
-
1215
- // Function to set localStorage when login tip is dismissed
1216
- function dismissLoginTip() {
1217
- try {
1218
- // Store the preference in localStorage
1219
- localStorage.setItem('login_tip_dismissed', 'true');
1220
-
1221
- // Hide all login notifications
1222
- const loginTip = document.getElementById('login-tip-overlay');
1223
- const loginBanner = document.getElementById('login-banner');
1224
- const backdrop = document.querySelector('.login-backdrop');
1225
-
1226
- if (loginTip) {
1227
- loginTip.classList.remove('show');
1228
- }
1229
-
1230
- if (loginBanner) {
1231
- loginBanner.style.display = 'none';
1232
- }
1233
-
1234
- if (backdrop) {
1235
- backdrop.style.display = 'none';
1236
- }
1237
- } catch (error) {
1238
- console.warn('localStorage write failed:', error);
1239
- // Still hide the tips even if localStorage fails
1240
- const loginTip = document.getElementById('login-tip-overlay');
1241
- const loginBanner = document.getElementById('login-banner');
1242
- const backdrop = document.querySelector('.login-backdrop');
1243
-
1244
- if (loginTip) {
1245
- loginTip.classList.remove('show');
1246
- }
1247
-
1248
- if (loginBanner) {
1249
- loginBanner.style.display = 'none';
1250
- }
1251
-
1252
- if (backdrop) {
1253
- backdrop.style.display = 'none';
1254
- }
1255
- }
1256
- }
1257
 
1258
  // Loading overlay functionality
1259
  document.addEventListener('DOMContentLoaded', function () {
1260
- // Show login tip if user is not logged in and hasn't dismissed it
1261
- const loginTipOverlay = document.getElementById('login-tip-overlay');
1262
- const loginBanner = document.getElementById('login-banner');
1263
- const loginLink = document.querySelector('.login-link');
1264
-
1265
- if (loginLink && !isLoginTipDismissed()) {
1266
- // Check screen width to determine which login notification to show
1267
- if (window.innerWidth <= 768) {
1268
- // Create and add a backdrop for the login banner
1269
- const backdrop = document.createElement('div');
1270
- backdrop.className = 'login-backdrop';
1271
- backdrop.style.position = 'fixed';
1272
- backdrop.style.top = '0';
1273
- backdrop.style.left = '0';
1274
- backdrop.style.width = '100%';
1275
- backdrop.style.height = '100%';
1276
- backdrop.style.backgroundColor = 'rgba(0, 0, 0, 0.5)';
1277
- backdrop.style.zIndex = '9997';
1278
- backdrop.style.display = 'none';
1279
- document.body.appendChild(backdrop);
1280
-
1281
- // Show mobile banner with backdrop
1282
- if (loginBanner) {
1283
- loginBanner.style.display = 'block';
1284
- backdrop.style.display = 'block';
1285
-
1286
- // Add event listener to close banner when clicking backdrop
1287
- backdrop.addEventListener('click', function() {
1288
- dismissLoginTip();
1289
- });
1290
- }
1291
- } else {
1292
- // Show desktop popover
1293
- if (loginTipOverlay) {
1294
- // Position the overlay with Popper.js
1295
- const popperInstance = Popper.createPopper(loginLink, loginTipOverlay, {
1296
- placement: 'top',
1297
- modifiers: [
1298
- {
1299
- name: 'offset',
1300
- options: {
1301
- offset: [0, 10],
1302
- },
1303
- },
1304
- ],
1305
- });
1306
-
1307
- loginTipOverlay.classList.add('show');
1308
- popperInstance.update();
1309
- }
1310
- }
1311
- }
1312
-
1313
- // Handle resize events to switch between banner and popover
1314
- window.addEventListener('resize', function() {
1315
- if (isLoginTipDismissed()) return;
1316
-
1317
- const backdrop = document.querySelector('.login-backdrop');
1318
-
1319
- if (window.innerWidth <= 768) {
1320
- // Switch to mobile banner
1321
- if (loginTipOverlay) {
1322
- loginTipOverlay.classList.remove('show');
1323
- }
1324
- if (loginBanner && backdrop) {
1325
- loginBanner.style.display = 'block';
1326
- backdrop.style.display = 'block';
1327
- }
1328
- } else {
1329
- // Switch to desktop popover
1330
- if (loginBanner && backdrop) {
1331
- loginBanner.style.display = 'none';
1332
- backdrop.style.display = 'none';
1333
- }
1334
- if (loginTipOverlay && loginLink) {
1335
- const popperInstance = Popper.createPopper(loginLink, loginTipOverlay, {
1336
- placement: 'top',
1337
- modifiers: [
1338
- {
1339
- name: 'offset',
1340
- options: {
1341
- offset: [0, 10],
1342
- },
1343
- },
1344
- ],
1345
- });
1346
-
1347
- loginTipOverlay.classList.add('show');
1348
- popperInstance.update();
1349
- }
1350
- }
1351
- });
1352
-
1353
  // Hide the loading overlay when page has loaded
1354
  const loadingOverlay = document.getElementById('loading-overlay');
1355
  loadingOverlay.classList.remove('active');
 
369
  transform: rotate(180deg);
370
  }
371
 
372
+ /* Login link removed */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
373
 
374
  .sidebar-footer {
375
  margin-top: auto;
 
875
  }
876
  }
877
 
878
+ /* Login tip and banner removed */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
879
  </style>
880
  </head>
881
 
 
954
  </div>
955
  </div>
956
  {% else %}
957
+ <!-- Login removed -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
958
  {% endif %}
959
  </div>
960
  </div>
 
983
  <!-- Toast container -->
984
  <div class="toast-container" id="toast-container"></div>
985
 
986
+ <!-- Mobile login banner removed -->
 
 
 
 
 
 
 
 
 
 
 
987
 
988
  {% block extra_scripts %}{% endblock %}
989
  <script src="https://unpkg.com/@popperjs/core@2"></script>
 
1003
  userDropdown.classList.toggle('active');
1004
  }
1005
 
1006
+ // Login tip functions removed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1007
 
1008
  // Loading overlay functionality
1009
  document.addEventListener('DOMContentLoaded', function () {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1010
  // Hide the loading overlay when page has loaded
1011
  const loadingOverlay = document.getElementById('loading-overlay');
1012
  loadingOverlay.classList.remove('active');
templates/leaderboard.html CHANGED
@@ -234,45 +234,7 @@
234
  background-color: var(--primary-color);
235
  }
236
 
237
- .login-prompt {
238
- display: none;
239
- position: fixed;
240
- top: 0;
241
- left: 0;
242
- width: 100%;
243
- height: 100%;
244
- background-color: rgba(0,0,0,0.7);
245
- z-index: 9999;
246
- justify-content: center;
247
- align-items: center;
248
- }
249
-
250
- .login-prompt-content {
251
- background-color: var(--light-gray);
252
- padding: 24px;
253
- border-radius: var(--radius);
254
- box-shadow: var(--shadow);
255
- text-align: center;
256
- max-width: 400px;
257
- position: relative;
258
- }
259
-
260
- .login-prompt-content h3 {
261
- margin-bottom: 16px;
262
- }
263
-
264
- .login-prompt-content p {
265
- margin-bottom: 24px;
266
- }
267
-
268
- .login-prompt-close {
269
- position: absolute;
270
- top: 12px;
271
- right: 12px;
272
- font-size: 20px;
273
- cursor: pointer;
274
- color: #999;
275
- }
276
 
277
  .btn {
278
  display: inline-block;
@@ -695,13 +657,7 @@
695
  background-color: var(--light-gray);
696
  }
697
 
698
- .login-prompt {
699
- text-align: center;
700
- padding: 24px;
701
- background-color: var(--light-gray);
702
- border-radius: var(--radius);
703
- margin-top: 16px;
704
- }
705
 
706
  .no-voters-msg {
707
  text-align: center;
@@ -1375,14 +1331,7 @@
1375
  </div>
1376
  </div>
1377
 
1378
- <div class="login-prompt">
1379
- <div class="login-prompt-content">
1380
- <div class="login-prompt-close">&times;</div>
1381
- <h3>Login Required</h3>
1382
- <p>You need to be logged in to view your personal leaderboard.</p>
1383
- <a href="{{ url_for('auth.login', next=request.path) }}" class="btn">Login with Hugging Face</a>
1384
- </div>
1385
- </div>
1386
 
1387
  <!-- Pass auth status via data attribute -->
1388
  <div id="auth-data" data-is-logged-in="{% if current_user.is_authenticated %}true{% else %}false{% endif %}"></div>
@@ -1465,21 +1414,13 @@
1465
 
1466
  // View toggle functionality
1467
  const viewToggles = document.querySelectorAll('.segmented-control input[type="radio"]');
1468
- const loginPrompt = document.querySelector('.login-prompt');
1469
- const loginPromptClose = document.querySelector('.login-prompt-close');
1470
-
1471
  viewToggles.forEach(toggle => {
1472
  toggle.addEventListener('change', function() {
1473
  const view = this.id.split('-')[1]; // 'public', 'personal', or 'historical'
1474
  const tabId = this.closest('.tab-content').id.split('-')[0]; // 'tts' or 'conversational'
1475
-
1476
- if (view === 'personal' && !isLoggedIn) {
1477
- // Show login prompt
1478
- loginPrompt.style.display = 'flex';
1479
- // Reset the radio button to public
1480
- document.getElementById(`${tabId}-public`).checked = true;
1481
- return;
1482
- }
1483
 
1484
  // Position the slider using our function
1485
  positionSliders();
@@ -1503,14 +1444,7 @@
1503
  */
1504
  });
1505
  });
1506
-
1507
- // Close login prompt
1508
- if (loginPromptClose) {
1509
- loginPromptClose.addEventListener('click', function() {
1510
- loginPrompt.style.display = 'none';
1511
- });
1512
- }
1513
-
1514
  // Historical data functionality - temporarily disabled
1515
  /*
1516
  function setupHistoricalView(modelType) {
 
234
  background-color: var(--primary-color);
235
  }
236
 
237
+ /* Login prompt removed */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
 
239
  .btn {
240
  display: inline-block;
 
657
  background-color: var(--light-gray);
658
  }
659
 
660
+ /* Login prompt CSS removed */
 
 
 
 
 
 
661
 
662
  .no-voters-msg {
663
  text-align: center;
 
1331
  </div>
1332
  </div>
1333
 
1334
+ <!-- Login prompt removed -->
 
 
 
 
 
 
 
1335
 
1336
  <!-- Pass auth status via data attribute -->
1337
  <div id="auth-data" data-is-logged-in="{% if current_user.is_authenticated %}true{% else %}false{% endif %}"></div>
 
1414
 
1415
  // View toggle functionality
1416
  const viewToggles = document.querySelectorAll('.segmented-control input[type="radio"]');
1417
+
 
 
1418
  viewToggles.forEach(toggle => {
1419
  toggle.addEventListener('change', function() {
1420
  const view = this.id.split('-')[1]; // 'public', 'personal', or 'historical'
1421
  const tabId = this.closest('.tab-content').id.split('-')[0]; // 'tts' or 'conversational'
1422
+
1423
+ // Personal view login check removed
 
 
 
 
 
 
1424
 
1425
  // Position the slider using our function
1426
  positionSliders();
 
1444
  */
1445
  });
1446
  });
1447
+
 
 
 
 
 
 
 
1448
  // Historical data functionality - temporarily disabled
1449
  /*
1450
  function setupHistoricalView(modelType) {