- Notifications
You must be signed in to change notification settings - Fork928
fix: display workspace avatars correctly when URLs fail to load#14814
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
59214b1
ab432e3
597348b
a4096d5
7067ece
50cfa3f
4cc2b56
6b5e508
5672d92
5b9a6b3
392e896
dee7611
720ca76
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -14,3 +14,18 @@ export const getLogoURL = (): string => { | ||
?.getAttribute("content"); | ||
return c && !c.startsWith("{{ .") ? c : ""; | ||
}; | ||
/** | ||
* Exposes an easy way to determine if a given URL is for an emoji hosted on | ||
* the Coder deployment. | ||
* | ||
* Helps when you need to style emojis differently (i.e., not adding rounding to | ||
* the container so that the emoji doesn't get cut off). | ||
*/ | ||
export function isEmojiUrl(url: string | undefined): boolean { | ||
if (!url) { | ||
return false; | ||
} | ||
return url.startsWith("/emojis/"); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. hmm. I'm skeptic about adding special handling like this, but I get the motivation. |
Uh oh!
There was an error while loading.Please reload this page.