aboutsummaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2025-04-24 09:11:54 +0800
committerGitHub <noreply@github.com>2025-04-24 09:11:54 +0800
commite625250ffc48d5f5e899d27f11aadce04ce6cb6f (patch)
tree01cde4b0f9fb3c823c6a772fc250315a2852fd20 /web_src
parent58d2a87c6c4431873340cb7c00fa43670d4418aa (diff)
downloadgitea-e625250ffc48d5f5e899d27f11aadce04ce6cb6f.tar.gz
gitea-e625250ffc48d5f5e899d27f11aadce04ce6cb6f.zip
Fix various trivial frontend problems (#34263)
1. Fix #20606 2. Fix #34246 3. Fix missing spaces, fix misspells, no visual change. 4. Fix missing "not-mobile", fix #34265 --------- Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'web_src')
-rw-r--r--web_src/css/base.css5
-rw-r--r--web_src/js/features/repo-issue-list.ts2
-rw-r--r--web_src/js/features/tribute.ts2
3 files changed, 6 insertions, 3 deletions
diff --git a/web_src/css/base.css b/web_src/css/base.css
index e2daeb341a..204b6a1560 100644
--- a/web_src/css/base.css
+++ b/web_src/css/base.css
@@ -2,7 +2,10 @@
/* fonts */
--fonts-proportional: -apple-system, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial;
--fonts-monospace: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace, var(--fonts-emoji);
- --fonts-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla";
+ /* GitHub explicitly sets font names like: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla";
+ Actually "Twemoji Mozilla" emoji font is widely used by browsers like Firefox, Pale Moon, and it is more likely up-to-dated than the system emoji font.
+ So not setting emoji font seems to be the best choice, here we just use a non-existing dummy font name and let browsers choose. */
+ --fonts-emoji: -emoji-fallback;
/* font weights - use between 400 and 600 for general purposes. Avoid 700 as it is perceived too bold */
--font-weight-light: 300;
--font-weight-normal: 400;
diff --git a/web_src/js/features/repo-issue-list.ts b/web_src/js/features/repo-issue-list.ts
index 01d4bb6f78..8cd4483357 100644
--- a/web_src/js/features/repo-issue-list.ts
+++ b/web_src/js/features/repo-issue-list.ts
@@ -138,7 +138,7 @@ function initDropdownUserRemoteSearch(el: Element) {
// the content is provided by backend IssuePosters handler
processedResults.length = 0;
for (const item of resp.results) {
- let html = `<img class="ui avatar tw-align-middle" src="${htmlEscape(item.avatar_link)}" aria-hidden="true" alt="" width="20" height="20"><span class="gt-ellipsis">${htmlEscape(item.username)}</span>`;
+ let html = `<img class="ui avatar tw-align-middle" src="${htmlEscape(item.avatar_link)}" aria-hidden="true" alt width="20" height="20"><span class="gt-ellipsis">${htmlEscape(item.username)}</span>`;
if (item.full_name) html += `<span class="search-fullname tw-ml-2">${htmlEscape(item.full_name)}</span>`;
if (selectedUsername.toLowerCase() === item.username.toLowerCase()) selectedUsername = item.username;
processedResults.push({value: item.username, name: html});
diff --git a/web_src/js/features/tribute.ts b/web_src/js/features/tribute.ts
index de1c3e97cd..cf98377ae7 100644
--- a/web_src/js/features/tribute.ts
+++ b/web_src/js/features/tribute.ts
@@ -34,7 +34,7 @@ export async function attachTribute(element: HTMLElement) {
menuItemTemplate: (item: TributeItem) => {
return `
<div class="tribute-item">
- <img src="${htmlEscape(item.original.avatar)}" width="21" height="21"/>
+ <img alt src="${htmlEscape(item.original.avatar)}" width="21" height="21"/>
<span class="name">${htmlEscape(item.original.name)}</span>
${item.original.fullname && item.original.fullname !== '' ? `<span class="fullname">${htmlEscape(item.original.fullname)}</span>` : ''}
</div>