mirror of
https://github.com/Dvorinka/PPve.git
synced 2026-06-04 20:42:59 +00:00
f
This commit is contained in:
+2
-11
@@ -2297,7 +2297,7 @@ function setupFileInput() {
|
|||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
// Initialize file input for custom icon upload
|
// Initialize file input for custom icon upload
|
||||||
setupFileInput();
|
// setupFileInput(); // Removed custom icon upload functionality
|
||||||
|
|
||||||
// Add click handler for custom icon button
|
// Add click handler for custom icon button
|
||||||
const customIconBtn = document.getElementById('customIconBtn');
|
const customIconBtn = document.getElementById('customIconBtn');
|
||||||
@@ -2532,29 +2532,20 @@ function renderIcons(searchTerm) {
|
|||||||
function selectIcon(iconClass) {
|
function selectIcon(iconClass) {
|
||||||
const iconPickerModal = document.getElementById('iconPickerModal');
|
const iconPickerModal = document.getElementById('iconPickerModal');
|
||||||
const selectedIcon = document.getElementById('selectedIcon');
|
const selectedIcon = document.getElementById('selectedIcon');
|
||||||
const customIconPreview = document.getElementById('customIconPreview');
|
|
||||||
const iconPreview = document.getElementById('iconPreview');
|
const iconPreview = document.getElementById('iconPreview');
|
||||||
const appIcon = document.getElementById('appIcon');
|
const appIcon = document.getElementById('appIcon');
|
||||||
const iconClassInput = document.getElementById('appIconClass');
|
const iconClassInput = document.getElementById('appIconClass');
|
||||||
|
|
||||||
// Show the selected icon and hide custom icon preview
|
// Show the selected icon
|
||||||
if (selectedIcon) {
|
if (selectedIcon) {
|
||||||
selectedIcon.className = `fas ${iconClass} text-2xl text-gray-400`;
|
selectedIcon.className = `fas ${iconClass} text-2xl text-gray-400`;
|
||||||
selectedIcon.classList.remove('hidden');
|
selectedIcon.classList.remove('hidden');
|
||||||
}
|
}
|
||||||
if (customIconPreview) {
|
|
||||||
customIconPreview.src = '';
|
|
||||||
customIconPreview.classList.add('hidden');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the app icon value to the selected icon class
|
// Set the app icon value to the selected icon class
|
||||||
if (appIcon) appIcon.value = iconClass;
|
if (appIcon) appIcon.value = iconClass;
|
||||||
if (iconClassInput) iconClassInput.value = iconClass;
|
if (iconClassInput) iconClassInput.value = iconClass;
|
||||||
|
|
||||||
// Reset file input
|
|
||||||
const customIconInput = document.getElementById('customIconInput');
|
|
||||||
if (customIconInput) customIconInput.value = '';
|
|
||||||
|
|
||||||
// Update preview with random color
|
// Update preview with random color
|
||||||
const colors = ['blue', 'green', 'red', 'yellow', 'indigo', 'purple', 'pink', 'gray'];
|
const colors = ['blue', 'green', 'red', 'yellow', 'indigo', 'purple', 'pink', 'gray'];
|
||||||
const randomColor = colors[Math.floor(Math.random() * colors.length)];
|
const randomColor = colors[Math.floor(Math.random() * colors.length)];
|
||||||
|
|||||||
Reference in New Issue
Block a user