Compare commits
No commits in common. "main" and "v1.1" have entirely different histories.
@ -203,8 +203,8 @@
|
|||||||
<td class="editable" data-field="iso">{{ photo.iso }}</td>
|
<td class="editable" data-field="iso">{{ photo.iso }}</td>
|
||||||
<td>{{ photo.width }}x{{ photo.height }}</td>
|
<td>{{ photo.width }}x{{ photo.height }}</td>
|
||||||
<td>
|
<td>
|
||||||
<button class="save-btn">Save</button>
|
<button id="save-btn">Save</button>
|
||||||
<button class="delete-btn">Delete</button>
|
<button class="delete-btn" id="delete-btn">Delete</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -244,7 +244,7 @@
|
|||||||
<label for="about.profile_image">Profile Image:</label>
|
<label for="about.profile_image">Profile Image:</label>
|
||||||
<div style="display: flex; align-items: center; gap: 1rem;">
|
<div style="display: flex; align-items: center; gap: 1rem;">
|
||||||
<img id="profile-preview" src="/static/profile.jpeg" alt="Profile" style="width: 100px; height: 100px; object-fit: cover; border-radius: 50%;">
|
<img id="profile-preview" src="/static/profile.jpeg" alt="Profile" style="width: 100px; height: 100px; object-fit: cover; border-radius: 50%;">
|
||||||
<input type="file" class="profile-image-upload" accept="image/jpeg,image/png" style="flex: 1;">
|
<input type="file" id="profile_image_upload" accept="image/jpeg,image/png" style="flex: 1;">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -314,7 +314,6 @@
|
|||||||
alert('An error occurred while saving changes.');
|
alert('An error occurred while saving changes.');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function deletePhoto(event) {
|
function deletePhoto(event) {
|
||||||
if (confirm('Are you sure you want to delete this photo?')) {
|
if (confirm('Are you sure you want to delete this photo?')) {
|
||||||
const button = event.target;
|
const button = event.target;
|
||||||
@ -340,16 +339,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
document.querySelectorAll('.delete-btn').forEach(button => {
|
document.getElementById('delete-btn').addEventListener('click', (event) => deletePhoto(event));
|
||||||
button.addEventListener('click', (event) => deletePhoto(event));
|
document.getElementById('save-btn').addEventListener('click', (event) => saveChanges(event));
|
||||||
});
|
|
||||||
|
|
||||||
document.querySelectorAll('.save-btn').forEach(button => {
|
document.getElementById('profile_image_upload').addEventListener('change', async (e) => {
|
||||||
button.addEventListener('click', (event) => saveChanges(event));
|
|
||||||
});
|
|
||||||
|
|
||||||
document.querySelectorAll('.profile-image-upload').forEach(input => {
|
|
||||||
input.addEventListener('change', async (e) => {
|
|
||||||
const file = e.target.files[0];
|
const file = e.target.files[0];
|
||||||
if (!file) return;
|
if (!file) return;
|
||||||
|
|
||||||
@ -372,7 +365,6 @@
|
|||||||
alert('Error uploading profile image: ' + error);
|
alert('Error uploading profile image: ' + error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
document.getElementById('configForm').addEventListener('submit', async (e) => {
|
document.getElementById('configForm').addEventListener('submit', async (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
Loading…
Reference in New Issue
Block a user