Skip to content

Commit 414d21d

Browse files
authored
Add Halo logo for Halo App user agent display (#193)
<img width="418" height="105" alt="image" src="https://github.com/user-attachments/assets/b903286f-9029-4cbd-9254-6a62988d14e4" /> /kind feature ```release-note 支持显示来自 Halo App 的 UA 显示。 ```
1 parent 8470c5f commit 414d21d

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ build {
5555
}
5656

5757
halo {
58-
version = "2.21.6"
58+
version = "2.21.7"
5959
debug = true
6060
}
487 Bytes
Loading

packages/comment-widget/src/commenter-ua-bar.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { css, html, LitElement } from 'lit';
22
import { property, state } from 'lit/decorators.js';
33
import { when } from 'lit/directives/when.js';
44
import type { UAParser } from 'ua-parser-js';
5+
import haloLogo from './assets/halo.png';
56
import baseStyles from './styles/base';
67

78
const OS_ICON_MAP = {
@@ -72,8 +73,11 @@ export class CommenterUABar extends LitElement {
7273
const browser = this.parser.getBrowser();
7374

7475
if (!os.name && !browser.name) {
76+
const isHaloApp = this.ua.startsWith('Halo App/');
77+
7578
return html`
7679
<div class="inline-flex items-center gap-1 bg-muted-3 rounded-base px-1.5 py-1">
80+
${when(isHaloApp, () => html`<img src=${haloLogo} class="size-3 rounded-sm" />`)}
7781
<span class="text-xs text-text-3">${this.ua}</span>
7882
</div>
7983
`;

0 commit comments

Comments
 (0)