Add cookie notice with settings, jfif preview support, and share page title from link name

This commit is contained in:
dev
2026-09-12 10:05:02 +03:00
parent 192de5e690
commit fd753c1318
11 changed files with 80 additions and 36 deletions
+2 -2
View File
@@ -872,7 +872,7 @@ app.get('/api/settings', requireAdmin, async (_, res) => {
app.get('/api/public-settings', apiLimiter, async (_, res) => {
const out = await cacheWrap('public-settings', PUBLIC_TTL_MS, async () => {
const keys = ['footer_left', 'footer_right', 'share_show_student_message', 'share_show_entry_date', 'share_show_student_names', 'share_show_group_photos'];
const keys = ['footer_left', 'footer_right', 'share_show_student_message', 'share_show_entry_date', 'share_show_student_names', 'share_show_group_photos', 'cookie_notice_text'];
const result = {};
for (const k of keys) result[k] = await getSetting(k, '');
return result;
@@ -2308,7 +2308,7 @@ app.post('/api/entries/:id/files', requireAuth, (req, res, next) => {
});
function isImageName(name) {
return /\.(jpe?g|png|gif|webp|bmp|avif|ico)$/i.test(name || '');
return /\.(jpe?g|jfif|png|gif|webp|bmp|avif|ico)$/i.test(name || '');
}
app.get('/api/files', requireAuth, async (req, res) => {