mirror of
https://github.com/Dvorinka/PPve.git
synced 2026-06-05 04:52: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 name = document.getElementById('appName')?.value.trim() || '';
|
||||||
const url = document.getElementById('appLink')?.value.trim() || '';
|
const url = document.getElementById('appLink')?.value.trim() || '';
|
||||||
const description = document.getElementById('appDescription')?.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';
|
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) {
|
if (!name) {
|
||||||
showNotification('Název aplikace je povinný', 'error');
|
showNotification('Název aplikace je povinný', 'error');
|
||||||
@@ -1995,7 +1995,7 @@ async function saveApp(event) {
|
|||||||
formData.append('name', name);
|
formData.append('name', name);
|
||||||
formData.append('url', url);
|
formData.append('url', url);
|
||||||
formData.append('description', description);
|
formData.append('description', description);
|
||||||
formData.append('icon', icon);
|
formData.append('iconClass', iconClass); // Use iconClass instead of icon
|
||||||
formData.append('color', color);
|
formData.append('color', color);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -2517,6 +2517,12 @@ function selectIcon(iconClass) {
|
|||||||
if (selectedOption) {
|
if (selectedOption) {
|
||||||
selectedOption.classList.add('active');
|
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
|
// Initialize icon picker when the page loads
|
||||||
|
|||||||
Reference in New Issue
Block a user