Include weather icon control refinements in v2.17.5
This commit is contained in:
1 parent
ab4a40ccd8
commit
48e8f3eb4b
3 files changed
+12
-2
No files matched your search
@@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file.
|
||||
- Added query-aligned database indexes for playlist loading, template and slide lookups, session cleanup, background task claiming, and data-source list ordering.
|
||||
- Audit log filtering, sorting, and pagination run in SQL; CSV exports still include all matching events.
|
||||
- Table header Create buttons use the same right inset as pagination controls.
|
||||
- Weather icon Edit buttons use the standard primary colour, and edit dialogs place Save before Cancel.
|
||||
|
||||
## 2.17.4 - 2026-10-23
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
{{#if (anyPermission ../currentUser 'weather-icons.update' 'weather-icons.delete')}}
|
||||
<td data-label="Actions" class="text-nowrap">
|
||||
{{#if (hasPermission ../currentUser 'weather-icons.update')}}
|
||||
<button type="button" class="btn btn-secondary btn-sm" data-bs-toggle="modal" data-bs-target="#edit-set-{{id}}">Edit</button>
|
||||
<button type="button" class="btn btn-primary btn-sm" data-bs-toggle="modal" data-bs-target="#edit-set-{{id}}">Edit</button>
|
||||
<form method="post" action="/settings/weather-icons/{{id}}/toggle" class="d-inline ms-1">
|
||||
<input type="hidden" name="enabled" value="{{#if enabled}}0{{else}}1{{/if}}">
|
||||
<button type="submit" class="btn btn-secondary btn-sm">{{#if enabled}}Disable{{else}}Enable{{/if}}</button>
|
||||
@@ -169,8 +169,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-secondary" type="button" data-bs-dismiss="modal">Cancel</button>
|
||||
<button class="btn btn-primary" type="submit">Save</button>
|
||||
<button class="btn btn-secondary" type="button" data-bs-dismiss="modal">Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div></div>
|
||||
|
||||
@@ -76,6 +76,15 @@ test('weather icons map exact WMO codes and fall back for missing or unsafe imag
|
||||
assert.match(weatherIcons.renderImage(sets[0].icons.clear, 48, 24), /object-fit:contain/);
|
||||
});
|
||||
|
||||
test('weather icon edit controls use the standard colour and save before cancel', function () {
|
||||
const html = require('../src/web/view').renderView('settings/weather-icons/list', {
|
||||
sets: [{ id: 'example', name: 'Example', enabled: true, conditions: [] }],
|
||||
currentUser: { permissionKeys: ['weather-icons.read', 'weather-icons.update'] }
|
||||
});
|
||||
assert.match(html, /class="btn btn-primary btn-sm" data-bs-toggle="modal" data-bs-target="#edit-set-example">Edit<\/button>/);
|
||||
assert.match(html, /<div class="modal-footer">\s*<button class="btn btn-primary" type="submit">Save<\/button>\s*<button class="btn btn-secondary" type="button" data-bs-dismiss="modal">Cancel<\/button>/);
|
||||
});
|
||||
|
||||
test('weather management template renders Assets and permission gated uploads', function () {
|
||||
const html = require('../src/web/view').renderView('settings/weather-icons/list', {
|
||||
title: 'Weather icons', active: 'weather-icons', assetsMenuOpen: true, conditions: library.CONDITIONS,
|
||||
|
||||
Reference in new issue
Block a user