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>
<input type="text" id="settings-name" placeholder="Enter your name">
</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 class="settings-card">
@ -631,7 +621,7 @@
<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-privacy">
<input type="checkbox" id="toggle-anonymous">
<span class="toggle-slider"></span>
</label>
</div>

View File

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

View File

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

View File

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