Skip to content

Commit

Permalink
UI: Change favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
previnder committed Feb 13, 2025
1 parent ac1e5bd commit 2970f1a
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion core/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ func (nv *NotificationView) setIcon(objects ...any) {
}

// No image was found, so use the default one.
nv.Icons = append(nv.Icons, "/favicon.png")
nv.Icons = append(nv.Icons, "/favicon.png?v=2")
}

// Notification is a user's notification.
Expand Down
6 changes: 3 additions & 3 deletions ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@
}
})();
</script>
<link rel="shortcut icon" href="/favicon.png" />
<link rel="mask-icon" href="/favicon.png" color="#6b02f2" />
<link rel="apple-touch-icon" href="/logo-manifest-512.png" />
<link rel="shortcut icon" href="/favicon.png?v=2" />
<link rel="mask-icon" href="/favicon.png?v=2" color="#6b02f2" />
<link rel="apple-touch-icon" href="/logo-manifest-512.png?v=2" />
</head>
<body>
<noscript>Please enable javascript to continue.</noscript>
Expand Down
Binary file added ui/public/favicon-gray.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ui/public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ui/public/logo-manifest-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions ui/public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"id": "discuit_pwa_v1",
"icons": [
{
"src": "/logo-manifest-512.png",
"src": "/logo-manifest-512.png?v=2",
"type": "image/png",
"sizes": "512x512"
},
{
"src": "/logo-manifest-512.png",
"src": "/logo-manifest-512.png?v=2",
"type": "image/png",
"sizes": "512x512",
"purpose": "maskable"
Expand Down
Binary file removed ui/src/assets/imgs/community-banner-2.jpg
Binary file not shown.
Binary file removed ui/src/assets/imgs/community-banner.jpg
Binary file not shown.
4 changes: 2 additions & 2 deletions ui/src/components/CommunityProPic.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import PropTypes from 'prop-types';
import favicon from '../../public/favicon.png';
import { selectImageCopyURL } from '../helper';
import { useImageLoaded } from '../hooks';

const CommunityProPic = ({ className, name, proPic, size = 'small', ...rest }) => {
let src = favicon;
const defaultFavicon = '/favicon-gray.png';
let src = defaultFavicon;
let averageColor = '#3d3d3d';
if (proPic) {
averageColor = proPic.averageColor;
Expand Down
6 changes: 2 additions & 4 deletions ui/src/pages/Community/Banner.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import PropTypes from 'prop-types';
import React from 'react';
import BannerImg from '../../assets/imgs/community-banner-2.jpg';
import Image from '../../components/Image';
import { selectImageCopyURL } from '../../helper';

const Banner = ({ community, ...rest }) => {
let src = BannerImg;
let src = '';
if (community.bannerImage) {
src = selectImageCopyURL('small', community.bannerImage);
}
Expand All @@ -14,7 +12,7 @@ const Banner = ({ community, ...rest }) => {
<Image
src={src}
alt={`${community.name}'s banner`}
backgroundColor={community.bannerImage ? community.bannerImage.averageColor : '#fff'}
backgroundColor={community.bannerImage ? community.bannerImage.averageColor : '#eee'}
{...rest}
isFullSize
/>
Expand Down

0 comments on commit 2970f1a

Please sign in to comment.