Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server: fix blurry PWA icon #465

Merged
merged 1 commit into from
Oct 13, 2024
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
1 change: 1 addition & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ app.use(cookieParser());
app.use(express.static(path.join(scriptDir, 'public/root')));
app.use(`/manifest.webmanifest`, express.static(path.join(scriptDir, 'public/manifest.webmanifest')));
app.use(`/robots.txt`, express.static(path.join(scriptDir, 'public/robots.txt')));
app.use(`/icon.png`, express.static(path.join(scriptDir, 'public/icon.png')));
Copy link

@rpg2014 rpg2014 Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should probably use the png that already exists in the images folder instead of replicating the image in the public folder. https://github.com/TriliumNext/Notes/blob/develop/images/app-icons/png/512x512.png

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find. I did a quick find and didn't see it, so I generated my own. But this is so much better.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, this file is only on the develop branch and not the last release or master branch.

app.use(sessionParser);
app.use(favicon(`${scriptDir}/../images/app-icons/icon.ico`));

Expand Down
Binary file added src/public/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/public/manifest.webmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"start_url": "/",
"icons": [
{
"src": "favicon.ico",
"sizes": "180x180 512x512",
"type": "image/x-icon"
"src": "icon.png",
"sizes": "512x512",
"type": "image/png"
}
]
}