Refactor how to use new Jitsi icon

Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>
This commit is contained in:
Gregoire Parant 2022-02-23 00:27:07 +01:00
parent 437f35817a
commit 07d399403b
2 changed files with 8 additions and 1 deletions

View File

@ -9,6 +9,8 @@
import { iframeStates } from "../../WebRtc/CoWebsiteManager"; import { iframeStates } from "../../WebRtc/CoWebsiteManager";
import { coWebsiteManager } from "../../WebRtc/CoWebsiteManager"; import { coWebsiteManager } from "../../WebRtc/CoWebsiteManager";
import uploadFile from "../images/jitsi.png";
export let index: number; export let index: number;
export let coWebsite: CoWebsite; export let coWebsite: CoWebsite;
export let vertical: boolean; export let vertical: boolean;
@ -21,7 +23,7 @@
onMount(() => { onMount(() => {
icon.src = isJitsi icon.src = isJitsi
? "/resources/logos/jitsi.png" ? uploadFile
: `${ICON_URL}/icon?url=${coWebsite.getUrl().hostname}&size=64..96..256&fallback_icon_color=14304c`; : `${ICON_URL}/icon?url=${coWebsite.getUrl().hostname}&size=64..96..256&fallback_icon_color=14304c`;
icon.alt = coWebsite.getUrl().hostname; icon.alt = coWebsite.getUrl().hostname;
icon.onload = () => { icon.onload = () => {
@ -350,9 +352,14 @@
color: white; color: white;
padding: 4px; padding: 4px;
border-radius: 4px; border-radius: 4px;
p { p {
margin-bottom: 0; margin-bottom: 0;
} }
&.hide {
display: none;
}
} }
} }
</style> </style>

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB