Add files via upload

This commit is contained in:
JSTAR 2025-04-18 22:19:06 +05:00 committed by GitHub
parent ac0a56c08e
commit 9d9305b69a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 27 deletions

View File

@ -267,16 +267,6 @@
<div class="setting-description">This name will be used in your greeting message</div> <div class="setting-description">This name will be used in your greeting message</div>
<input type="text" id="settings-name" placeholder="Enter your name"> <input type="text" id="settings-name" placeholder="Enter your name">
</div> </div>
<div class="setting-item horizontal">
<div>
<div class="setting-label">Anonymous Mode</div>
<div class="setting-description">Hide your real name and use a randomly generated one</div>
</div>
<label class="toggle">
<input type="checkbox" id="toggle-anonymous">
<span class="toggle-slider"></span>
</label>
</div>
</div> </div>
<div class="settings-card"> <div class="settings-card">
@ -631,7 +621,7 @@
<div class="setting-description">Hide your real name and use a randomly generated one</div> <div class="setting-description">Hide your real name and use a randomly generated one</div>
</div> </div>
<label class="toggle"> <label class="toggle">
<input type="checkbox" id="toggle-anonymous-privacy"> <input type="checkbox" id="toggle-anonymous">
<span class="toggle-slider"></span> <span class="toggle-slider"></span>
</label> </label>
</div> </div>

View File

@ -1,5 +1,5 @@
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
const MAX_IMAGE_SIZE_MB = 1.5; const MAX_IMAGE_SIZE_MB = 5;
const MAX_USER_BACKGROUNDS = 10; const MAX_USER_BACKGROUNDS = 10;
const backgroundUpload = document.getElementById('background-upload'); const backgroundUpload = document.getElementById('background-upload');

View File

@ -765,11 +765,9 @@ const settings = {
}); });
if (data.settings.passwordProtectionEnabled) { if (data.settings.passwordProtectionEnabled) {
setTimeout(() => { if (typeof shortcuts.createShortcutProtectionManager === 'function') {
if (typeof shortcuts.createShortcutProtectionManager === 'function') { shortcuts.createShortcutProtectionManager();
shortcuts.createShortcutProtectionManager(); }
}
}, 100);
} }
Storage.set('shortcuts', data.shortcuts); Storage.set('shortcuts', data.shortcuts);

View File

@ -414,6 +414,12 @@ const shortcuts = {
if (passwordSettings) { if (passwordSettings) {
if (isEnabled) { if (isEnabled) {
passwordSettings.classList.remove('hidden'); passwordSettings.classList.remove('hidden');
const masterPasswordInput = document.getElementById('master-password');
if (masterPasswordInput) {
setTimeout(() => {
masterPasswordInput.focus();
}, 10);
}
} else { } else {
passwordSettings.classList.add('hidden'); passwordSettings.classList.add('hidden');
} }
@ -432,10 +438,7 @@ const shortcuts = {
} }
} else { } else {
notifications.show('Password protection enabled!', 'success'); notifications.show('Password protection enabled!', 'success');
shortcuts.createShortcutProtectionManager();
setTimeout(() => {
shortcuts.createShortcutProtectionManager();
}, 10);
} }
} else { } else {
const currentShortcuts = Storage.get('shortcuts') || []; const currentShortcuts = Storage.get('shortcuts') || [];
@ -476,13 +479,9 @@ const shortcuts = {
} }
shortcuts.updateAddShortcutModal(); shortcuts.updateAddShortcutModal();
setTimeout(() => { shortcuts.createShortcutProtectionManager();
shortcuts.createShortcutProtectionManager();
}, 10);
} else { } else {
setTimeout(() => { shortcuts.createShortcutProtectionManager();
shortcuts.createShortcutProtectionManager();
}, 10);
} }
} else { } else {
notifications.show('Please enter a valid password!', 'error'); notifications.show('Please enter a valid password!', 'error');