Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added templates/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion templates/stackyard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<Category>Tools:Utilities</Category>
<WebUI>http://[IP]:[PORT:80]</WebUI>
<TemplateURL>https://raw.githubusercontent.com/SandObserver/Stackyard/main/templates/stackyard.xml</TemplateURL>
<Icon>https://raw.githubusercontent.com/SandObserver/Stackyard/main/templates/icon.svg</Icon>
<Icon>https://raw.githubusercontent.com/SandObserver/Stackyard/main/templates/icon.png</Icon>
<Screenshot>https://raw.githubusercontent.com/SandObserver/Stackyard/main/docs/screenshot.png</Screenshot>
<Screenshot>https://raw.githubusercontent.com/SandObserver/Stackyard/main/docs/screenshot-general.png</Screenshot>
<Screenshot>https://raw.githubusercontent.com/SandObserver/Stackyard/main/docs/screenshot-appearance.png</Screenshot>
Expand Down
14 changes: 13 additions & 1 deletion test/repo/ca-template.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ test('config and icon storage are both mapped, or an update wipes them', () => {

test('every referenced asset exists in the repo', () => {
const assets = {
[tag(template, 'Icon')]: 'templates/icon.svg',
[tag(template, 'Icon')]: 'templates/icon.png',
[tag(template, 'Screenshot')]: 'docs/screenshot.png',
};
for (const [url, file] of Object.entries(assets)) {
Expand All @@ -66,6 +66,18 @@ test('every referenced asset exists in the repo', () => {
}
});

/* Unraid saves the template icon as <Name>-icon.png whatever its format. An SVG
saved under that name draws blank on the Docker tab and the Dashboard. */
test('the template icon is a PNG and matches the 512 px favicon', () => {
const icon = fs.readFileSync(path.join(ROOT, 'templates', 'icon.png'));
const signature = Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);
assert.deepEqual(icon.subarray(0, 8), signature, 'templates/icon.png is not a PNG');
assert.ok(
icon.equals(fs.readFileSync(path.join(ROOT, 'ui', 'icons', 'favicon-512.png'))),
'templates/icon.png differs from ui/icons/favicon-512.png',
);
});

test('the legacy light and dark icons ship alongside the tile icon', () => {
for (const f of ['templates/icon.svg', 'templates/icon-light.svg', 'templates/icon-dark.svg']) {
assert.ok(fs.existsSync(path.join(ROOT, f)), `${f} is missing`);
Expand Down
Loading