Add dynamic favicon and mask icon

This commit is contained in:
ernstmul committed 2025-05-16 16:59:38 +02:00
1 parent 96a5360720
commit 1ae6a5ea82
4 files changed
+23 -3

No files matched your search

+1 -2
View File
@@ -5,8 +5,7 @@
<meta
name="description"
content="Appwrite is an open-source platform for building applications at any scale, using your preferred programming languages and tools." />
<link rel="icon" type="image/svg+xml" href="/console/logos/appwrite-icon.svg" />
<link rel="mask-icon" type="image/png" href="/console/logos/appwrite-icon.png" />
<link rel="stylesheet" href="/console/css/loading.css" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
+19 -1
View File
@@ -1,7 +1,7 @@
import * as Sentry from '@sentry/sveltekit';
import { AppwriteException } from '@appwrite.io/console';
import type { HandleClientError } from '@sveltejs/kit';
import { isCloud, isProd } from '$lib/system';
import { isCloud, isProd, isStudio } from '$lib/system';
Sentry.init({
enabled: isCloud && isProd,
@@ -11,6 +11,24 @@ Sentry.init({
replaysOnErrorSampleRate: 0
});
function setFavicon() {
const favicon = isStudio ? 'imagine-icon.svg' : 'appwrite-icon.svg';
const maskIcon = isStudio ? 'imagine-icon.png' : 'appwrite-icon.png';
const link = document.createElement('link');
link.rel = 'icon';
link.href = '/console/logos/' + favicon;
link.type = 'image/svg+xml';
document.head.appendChild(link);
const maskLink = document.createElement('link');
maskLink.rel = 'mask-icon';
link.href = '/console/logos/' + maskIcon;
link.type = 'image/png';
document.head.appendChild(maskLink);
}
setFavicon();
export const handleError: HandleClientError = Sentry.handleErrorWithSentry(
async ({ error, message, status }) => {
console.error(error);
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

+3
View File
@@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.3916 26.4365C14.8232 26.4368 15.1729 26.7871 15.1729 27.2188C15.1726 27.6502 14.823 27.9998 14.3916 28C13.96 28 13.6096 27.6503 13.6094 27.2188C13.6094 26.787 13.9598 26.4365 14.3916 26.4365ZM17.5947 26.4365C18.0263 26.4368 18.376 26.7871 18.376 27.2188C18.3758 27.6502 18.0261 27.9998 17.5947 28C17.1631 28 16.8127 27.6503 16.8125 27.2188C16.8125 26.787 17.163 26.4365 17.5947 26.4365ZM11.1826 26.6611C11.4902 26.6613 11.7393 26.9111 11.7393 27.2188C11.739 27.5262 11.4901 27.7752 11.1826 27.7754C10.875 27.7754 10.6252 27.5263 10.625 27.2188C10.625 26.911 10.8749 26.6611 11.1826 26.6611ZM20.7998 26.6611C21.1074 26.6613 21.3564 26.9111 21.3564 27.2188C21.3562 27.5262 21.1073 27.7752 20.7998 27.7754C20.4922 27.7754 20.2424 27.5263 20.2422 27.2188C20.2422 26.911 20.492 26.6611 20.7998 26.6611ZM7.97168 27.0117C8.08561 27.0117 8.17864 27.1039 8.17871 27.2178C8.17871 27.3318 8.08566 27.4238 7.97168 27.4238C7.85785 27.4237 7.76562 27.3316 7.76562 27.2178C7.7657 27.104 7.8579 27.0119 7.97168 27.0117ZM24.0107 27.0117C24.1247 27.0117 24.2177 27.1039 24.2178 27.2178C24.2178 27.3318 24.1247 27.4238 24.0107 27.4238C23.8969 27.4237 23.8047 27.3316 23.8047 27.2178C23.8048 27.104 23.897 27.0119 24.0107 27.0117ZM16.3291 9.93457C17.277 9.01356 18.8942 9.38782 19.2773 10.6621L19.585 10.1445C21.1971 8.48805 23.504 10.8613 21.8018 12.4258L21.3184 12.7031C21.9961 12.8868 22.5171 13.5264 22.5498 14.2266L22.6543 13.8936C23.1823 12.5044 25.2055 12.7214 25.4287 14.1494C25.6957 15.8549 23.3078 16.4996 22.6631 14.9062L22.5498 14.5508C22.5212 15.1514 22.1134 15.7644 21.5449 15.9766L21.999 16.2832C22.3057 16.5831 22.5387 16.998 22.5498 17.4336L22.6631 17.0781C23.1471 15.8331 24.9593 15.8705 25.3691 17.125C25.9461 18.8922 23.4009 19.8344 22.6729 18.1367L22.5498 17.7578C22.5155 18.48 22.0054 19.0409 21.3506 19.2969C22.2936 19.6545 22.6954 20.7903 22.1543 21.6553C21.4503 22.7807 19.7521 22.5822 19.293 21.3545C19.037 22.0089 18.4767 22.5192 17.7549 22.5537L18.0869 22.6572C19.4765 23.185 19.2592 25.2094 17.8311 25.4326C16.1261 25.699 15.4813 23.3118 17.0742 22.667L17.4307 22.5537C16.83 22.5252 16.2171 22.1174 16.0049 21.5488L15.6973 22.0029C15.3973 22.3096 14.9825 22.5427 14.5469 22.5537L14.8799 22.6572C16.524 23.2819 15.8368 25.7347 14.1182 25.4277C12.7066 25.1754 12.5169 23.1788 13.8906 22.6572L14.2227 22.5537C13.5227 22.5209 12.8839 21.9998 12.7002 21.3223L12.3926 21.8408C10.4385 23.7267 8.19972 20.3978 10.6592 19.2969C9.13286 18.7923 8.97386 16.6926 10.4326 15.9922C8.98356 15.3095 9.12451 13.1706 10.6592 12.7031L10.3115 12.5166C8.27721 10.9524 10.9443 8.27893 12.5137 10.3154L12.7002 10.6621C13.1537 9.13686 15.3256 8.97951 15.9727 10.4355L16.3291 9.93457ZM20.8115 22.7617C21.5014 22.7617 22.0614 23.3209 22.0615 24.0107C22.0615 24.7007 21.5015 25.2598 20.8115 25.2598C20.1217 25.2596 19.5625 24.7006 19.5625 24.0107C19.5626 23.321 20.1217 22.7619 20.8115 22.7617ZM11.1816 22.7666C11.8687 22.7666 12.4257 23.3237 12.4258 24.0107C12.4258 24.6978 11.8687 25.2549 11.1816 25.2549C10.4945 25.2549 9.9375 24.6978 9.9375 24.0107C9.93757 23.3237 10.4946 22.7666 11.1816 22.7666ZM24.0068 23.2383C24.4336 23.2383 24.7793 23.584 24.7793 24.0107C24.7793 24.4375 24.4336 24.7832 24.0068 24.7832C23.5802 24.7831 23.2344 24.4374 23.2344 24.0107C23.2344 23.5841 23.5802 23.2384 24.0068 23.2383ZM7.97754 23.2451C8.40048 23.2453 8.74307 23.5878 8.74316 24.0107C8.74316 24.4338 8.40053 24.7771 7.97754 24.7773C7.55437 24.7773 7.21094 24.4339 7.21094 24.0107C7.21103 23.5876 7.55442 23.2451 7.97754 23.2451ZM4.76855 23.8047C4.88253 23.8047 4.97559 23.8968 4.97559 24.0107C4.97553 24.1247 4.8825 24.2168 4.76855 24.2168C4.65476 24.2166 4.56256 24.1246 4.5625 24.0107C4.5625 23.8969 4.65472 23.8049 4.76855 23.8047ZM27.2217 23.8047C27.3357 23.8047 27.4287 23.8968 27.4287 24.0107C27.4287 24.1247 27.3356 24.2168 27.2217 24.2168C27.1079 24.2166 27.0157 24.1246 27.0156 24.0107C27.0156 23.8969 27.1078 23.8049 27.2217 23.8047ZM24.0068 19.5537C24.6968 19.5537 25.2568 20.1138 25.2568 20.8037C25.2566 21.4935 24.6967 22.0527 24.0068 22.0527C23.3171 22.0526 22.758 21.4934 22.7578 20.8037C22.7578 20.1138 23.317 19.5538 24.0068 19.5537ZM7.9707 19.5674C8.6535 19.5674 9.20703 20.1209 9.20703 20.8037C9.20693 21.4864 8.65343 22.04 7.9707 22.04C7.28797 22.04 6.73448 21.4864 6.73438 20.8037C6.73438 20.1209 7.2879 19.5674 7.9707 19.5674ZM27.2217 20.2461C27.5293 20.2463 27.7783 20.4961 27.7783 20.8037C27.7782 21.1112 27.5292 21.3602 27.2217 21.3604C26.914 21.3604 26.6642 21.1113 26.6641 20.8037C26.6641 20.496 26.9139 20.2461 27.2217 20.2461ZM4.76074 20.2617C5.06009 20.2617 5.30273 20.5044 5.30273 20.8037C5.30265 21.103 5.06004 21.3457 4.76074 21.3457C4.46146 21.3457 4.21883 21.103 4.21875 20.8037C4.21875 20.5044 4.46141 20.2617 4.76074 20.2617ZM16 12.625C14.1361 12.625 12.6251 14.1361 12.625 16C12.625 17.864 14.136 19.375 16 19.375C17.864 19.375 19.375 17.864 19.375 16C19.3749 14.1361 17.8639 12.625 16 12.625ZM7.97168 16.1631C8.76288 16.1631 9.40424 16.8045 9.4043 17.5957C9.4043 18.3869 8Line truncated
</svg>

After

Width:  |  Height:  |  Size: 9.7 KiB