4sp-dv-latest 1.0.2 → 1.0.3

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.
@@ -6,7 +6,7 @@
6
6
  <title>4SP - VERSION 5 CLIENT</title>
7
7
  <link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/npm/4sp-dv@latest/images/logo.png">
8
8
 
9
- <base href="https://cdn.jsdelivr.net/npm/4sp-dv@1.0.18/logged-in/">
9
+ <base href="https://cdn.jsdelivr.net/npm/4sp-dv@1.0.19/logged-in/">
10
10
  <script src="https://cdn.tailwindcss.com"></script>
11
11
  <link href="https://fonts.googleapis.com/css2?family=Geist:wght@100..900&display=swap" rel="stylesheet">
12
12
 
@@ -1828,7 +1828,7 @@
1828
1828
  const displayUsername = document.getElementById('display-username');
1829
1829
  const displayEmail = document.getElementById('display-email');
1830
1830
 
1831
- const BASE_URL = 'https://cdn.jsdelivr.net/npm/4sp-dv@1.0.18/logged-in/';
1831
+ const BASE_URL = 'https://cdn.jsdelivr.net/npm/4sp-dv@1.0.19/logged-in/';
1832
1832
  const STORAGE_KEY = 'local_access_code';
1833
1833
  const USER_DATA_KEY = 'local_user_data';
1834
1834
  const LAST_PAGE_KEY = 'local_last_page';
@@ -1850,7 +1850,7 @@
1850
1850
  let currentUser = null;
1851
1851
  let userDataUnsubscribe = null;
1852
1852
 
1853
- // --- ADMIN KEYBINDS LOGIC (Integrated) ---
1853
+ // --- ADMIN KEYBINDS LOGIC (Updated to Match admin_keybinds.js exactly) ---
1854
1854
  function initAdminKeybinds(db, auth, user) {
1855
1855
  console.log("[Admin Keybinds] Initializing for", user.uid);
1856
1856
  let explicitEnabled = true;
@@ -1865,7 +1865,7 @@
1865
1865
  const toast = document.createElement("div");
1866
1866
  toast.id = "admin-keybind-toast";
1867
1867
 
1868
- // Styles
1868
+ // Styles matching admin_keybinds.js exactly
1869
1869
  Object.assign(toast.style, {
1870
1870
  position: "fixed",
1871
1871
  bottom: "24px",
@@ -1873,12 +1873,12 @@
1873
1873
  display: "flex",
1874
1874
  alignItems: "center",
1875
1875
  gap: "12px",
1876
- backgroundColor: "rgba(13, 13, 13, 0.95)",
1876
+ backgroundColor: "rgba(13, 13, 13, 0.95)", // Dark glass effect
1877
1877
  backdropFilter: "blur(5px)",
1878
- color: "#c0c0c0",
1878
+ color: "#c0c0c0", // Light gray text
1879
1879
  padding: "14px 20px",
1880
1880
  borderRadius: "12px",
1881
- border: "1px solid #333",
1881
+ border: "1px solid #333", // Dark border
1882
1882
  fontFamily: "'Geist', 'Roboto', sans-serif",
1883
1883
  fontSize: "14px",
1884
1884
  fontWeight: "500",
@@ -1924,8 +1924,10 @@
1924
1924
  const data = docSnap.data();
1925
1925
  if (data.explicitEnabled !== undefined) {
1926
1926
  explicitEnabled = data.explicitEnabled;
1927
+ console.log(`[Admin Keybinds] Explicit Enabled: ${explicitEnabled}`);
1927
1928
  }
1928
1929
  } else {
1930
+ console.log("[Admin Keybinds] Config doc missing. Defaulting to TRUE.");
1929
1931
  explicitEnabled = true;
1930
1932
  }
1931
1933
  }, (error) => console.error("Config Listen Error:", error));
@@ -1936,11 +1938,14 @@
1936
1938
 
1937
1939
  // Key Listener
1938
1940
  document.addEventListener('keydown', async (e) => {
1939
- if (e.ctrlKey && e.altKey && (e.key.toLowerCase() === 'e' || e.code === 'KeyE')) {
1941
+ // CHANGED: Trigger is Ctrl + Shift + E as requested
1942
+ if (e.ctrlKey && e.shiftKey && (e.key.toLowerCase() === 'e' || e.code === 'KeyE')) {
1940
1943
  e.preventDefault();
1941
- console.log("[Admin Keybinds] Ctrl+Alt+E detected.");
1944
+ console.log("[Admin Keybinds] Ctrl+Shift+E detected.");
1942
1945
 
1943
1946
  if (explicitEnabled) {
1947
+ // Logic for disabling (Immediate)
1948
+ console.log("[Admin Keybinds] Disabling explicit sounds...");
1944
1949
  try {
1945
1950
  await setDoc(doc(db, 'config', 'soundboard'), { explicitEnabled: false }, { merge: true });
1946
1951
  showAdminToast("Explicit Sounds: DISABLED", "red");
@@ -1950,8 +1955,10 @@
1950
1955
  showAdminToast("Error: Check Console", "red");
1951
1956
  }
1952
1957
  } else {
1958
+ // Logic for enabling (Double Press Safety)
1953
1959
  const now = Date.now();
1954
1960
  if (now - lastEnablePressTime < 1500) {
1961
+ console.log("[Admin Keybinds] Enabling explicit sounds...");
1955
1962
  try {
1956
1963
  await setDoc(doc(db, 'config', 'soundboard'), { explicitEnabled: true }, { merge: true });
1957
1964
  showAdminToast("Explicit Sounds: ENABLED", "green");
@@ -1961,7 +1968,8 @@
1961
1968
  showAdminToast("Error: Check Console", "red");
1962
1969
  }
1963
1970
  } else {
1964
- showAdminToast("Press Ctrl+Alt+E again to ENABLE", "blue");
1971
+ console.log("[Admin Keybinds] Waiting for confirm...");
1972
+ showAdminToast("Press Ctrl+Shift+E again to ENABLE", "blue");
1965
1973
  lastEnablePressTime = now;
1966
1974
  }
1967
1975
  }
@@ -3262,4 +3270,4 @@
3262
3270
 
3263
3271
  </script>
3264
3272
  </body>
3265
- </html>
3273
+ </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "4sp-dv-latest",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "The latest HTML file of the 4SP Version 5 Client.",
5
5
  "license": "ISC",
6
6
  "author": "",