mirror of
https://github.com/Dvorinka/PPve.git
synced 2026-06-04 04:22:58 +00:00
fe
This commit is contained in:
@@ -1976,10 +1976,10 @@ async function saveApp(event) {
|
||||
const name = document.getElementById('appName')?.value.trim() || '';
|
||||
const url = document.getElementById('appLink')?.value.trim() || '';
|
||||
const description = document.getElementById('appDescription')?.value.trim() || '';
|
||||
const icon = document.getElementById('appIcon')?.value || 'fa-globe';
|
||||
const iconClass = form.iconClass || 'fa-globe'; // Use stored icon class
|
||||
const color = document.getElementById('appColor')?.value || '#4a6cf7';
|
||||
|
||||
console.log('Saving app with data:', { name, url, description, icon, color });
|
||||
console.log('Saving app with data:', { name, url, description, iconClass, color });
|
||||
|
||||
if (!name) {
|
||||
showNotification('Název aplikace je povinný', 'error');
|
||||
@@ -1995,7 +1995,7 @@ async function saveApp(event) {
|
||||
formData.append('name', name);
|
||||
formData.append('url', url);
|
||||
formData.append('description', description);
|
||||
formData.append('icon', icon);
|
||||
formData.append('iconClass', iconClass); // Use iconClass instead of icon
|
||||
formData.append('color', color);
|
||||
|
||||
try {
|
||||
@@ -2517,6 +2517,12 @@ function selectIcon(iconClass) {
|
||||
if (selectedOption) {
|
||||
selectedOption.classList.add('active');
|
||||
}
|
||||
|
||||
// Store the icon class in the form data
|
||||
const form = document.getElementById('appForm');
|
||||
if (form) {
|
||||
form.iconClass = iconClass;
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize icon picker when the page loads
|
||||
|
||||
Reference in New Issue
Block a user