-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
Add video chat instances icons #3702
base: main
Are you sure you want to change the base?
Conversation
I think it makes not much sense to do it on every build because those won't change very often. you can also save the icons of the default instances as icons to a subfolder of images/ Then the format of the video chat provider objects could be: interface VideoChatInstance {
// id for distinguishing between the instances
id: string,
// the url of the video chat provider that is given to core
url: string,
// path of the icon, either relative url for default providers or base64 for custom providers that user added that were saved in a core ui config
icon: string,
}
const VIDEO_CHAT_INSTANCES: Record<string, VideoChatInstance > = {
'systemli': { id: 'systemli', url: 'https://meet.systemli.org/$ROOM', icon: "../images/videochat_providers/systemli.ico" },
'autistici': { id: 'autistici', url: 'https://vc.autistici.org/$ROOM', icon: "../images/videochat_providers/autistici" },
} and maybe also a display name property that we wanna show to the user |
@Simon-Laux @adzialocha I need to investigate why the initial render takes so much time but hints are welcome. |
needs to be rebased |
let data = {} | ||
for (const [id, props] of Object.entries(VIDEO_CHAT_INSTANCES)) { | ||
for (const i = 1; i <= 3; i++) { // max 3 retries | ||
const response = await fetch(props.url.replace('$ROOM', '/images/favicon.ico')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might work, but parsing url and just taking hostname + /favicon.ico
might be better. but ok for now as long as the default instances are jitsi
but do not write code to parse urls yourself, just use https://nodejs.org/docs/latest-v18.x/api/url.html
might make sense to show the icons pixelated, as blurry does not look good. (css
|
margin: '4px', | ||
borderRadius: iconRound ? '4px' : undefined, | ||
backgroundColor: iconWithBackground | ||
? 'var(--textPrimary)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be hardcoded to white, most icons are deigned for light mode, this would ensure that the icon works also in darkmode
But I'm not sure it's wise to prioritise this right now as there is still quite some stuff left todo to make it really useful, also I think the code structure can be much simplified. |
This PR is ready for review and just adds the icons to make it look prettier a bit. The option to add feature to let users add their own instances will be added through another PR. |
I think I did a wrong rebase :D |
26adf8f
to
763428b
Compare
763428b
to
cba7f87
Compare
This PR aims to do just these two:
src