mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
UX: update chat icon to d-chat (#20744)
This commit is contained in:
parent
5d03ddfbc8
commit
147941a5d7
|
@ -98,7 +98,7 @@ acceptance("Sidebar - Plugin API", function (needs) {
|
|||
}
|
||||
|
||||
get prefixValue() {
|
||||
return "hashtag";
|
||||
return "d-chat";
|
||||
}
|
||||
|
||||
get prefixColor() {
|
||||
|
@ -285,7 +285,7 @@ acceptance("Sidebar - Plugin API", function (needs) {
|
|||
);
|
||||
|
||||
assert.strictEqual(
|
||||
links[0].children[0].children[0].classList.contains("d-icon-hashtag"),
|
||||
links[0].children[0].children[0].classList.contains("d-icon-d-chat"),
|
||||
true,
|
||||
"displays prefix icon"
|
||||
);
|
||||
|
|
|
@ -86,7 +86,7 @@ class Wizard
|
|||
step.add_field(
|
||||
id: "chat_enabled",
|
||||
type: "checkbox",
|
||||
icon: "comment",
|
||||
icon: "d-chat",
|
||||
value: SiteSetting.chat_enabled,
|
||||
)
|
||||
end
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
class="chat-channel-title__category-badge"
|
||||
style={{this.channelColorStyle}}
|
||||
>
|
||||
{{d-icon "hashtag"}}
|
||||
{{d-icon "d-chat"}}
|
||||
{{#if this.channel.chatable.read_restricted}}
|
||||
{{d-icon "lock" class="chat-channel-title__restricted-category-icon"}}
|
||||
{{/if}}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
@action={{action "onCancelChatDraft"}}
|
||||
/>
|
||||
<h2 class="chat-draft-header__title">
|
||||
{{d-icon "comment"}}
|
||||
{{d-icon "d-chat"}}
|
||||
{{i18n "chat.draft_channel_screen.header"}}
|
||||
</h2>
|
||||
</header>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
tabindex="0"
|
||||
class={{concat-class "icon btn-flat" (if this.isActive "active")}}
|
||||
>
|
||||
{{d-icon "comment"}}
|
||||
{{d-icon "d-chat"}}
|
||||
|
||||
{{#unless this.currentUserInDnD}}
|
||||
<ChatHeaderIconUnreadIndicator />
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
@class="btn-primary user-card-chat-btn"
|
||||
@action={{action "startChatting"}}
|
||||
@label="chat.title_capitalized"
|
||||
@icon="comment"
|
||||
@icon="d-chat"
|
||||
/>
|
||||
{{/if}}
|
|
@ -1,6 +1,6 @@
|
|||
{{#if (or this.model.can_chat this.currentUser.admin)}}
|
||||
<LinkTo @route="preferences.chat">
|
||||
{{d-icon "comment"}}
|
||||
{{d-icon "d-chat"}}
|
||||
<span>{{i18n "chat.title_capitalized"}}</span>
|
||||
</LinkTo>
|
||||
{{/if}}
|
|
@ -4,10 +4,13 @@ import { bind } from "discourse-common/utils/decorators";
|
|||
import { getOwner } from "discourse-common/lib/get-owner";
|
||||
import { MENTION_KEYWORDS } from "discourse/plugins/chat/discourse/components/chat-message";
|
||||
import { clearChatComposerButtons } from "discourse/plugins/chat/discourse/lib/chat-composer-buttons";
|
||||
import { replaceIcon } from "discourse-common/lib/icon-library";
|
||||
|
||||
let _lastForcedRefreshAt;
|
||||
const MIN_REFRESH_DURATION_MS = 180000; // 3 minutes
|
||||
|
||||
replaceIcon("d-chat", "comment");
|
||||
|
||||
export default {
|
||||
name: "chat-setup",
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ export default {
|
|||
}
|
||||
|
||||
get prefixValue() {
|
||||
return "hashtag";
|
||||
return "d-chat";
|
||||
}
|
||||
|
||||
get prefixColor() {
|
||||
|
|
|
@ -69,7 +69,7 @@ export default {
|
|||
}
|
||||
|
||||
get icon() {
|
||||
return "comment";
|
||||
return "d-chat";
|
||||
}
|
||||
|
||||
get label() {
|
||||
|
@ -112,7 +112,7 @@ export default {
|
|||
}
|
||||
|
||||
get icon() {
|
||||
return "comment";
|
||||
return "d-chat";
|
||||
}
|
||||
|
||||
get count() {
|
||||
|
|
|
@ -33,7 +33,7 @@ const chatNotificationItem = {
|
|||
const title = this.notificationTitle(notificationName, data);
|
||||
const text = this.text(notificationName, data);
|
||||
const html = new RawHtml({ html: `<div>${text}</div>` });
|
||||
const contents = [iconNode("comment"), html];
|
||||
const contents = [iconNode("d-chat"), html];
|
||||
const href = this.url(data);
|
||||
|
||||
return h(
|
||||
|
|
|
@ -179,7 +179,7 @@ html.rtl {
|
|||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.d-icon:not(.d-icon-hashtag) {
|
||||
.d-icon:not(.d-icon-d-chat) {
|
||||
color: var(--primary-high);
|
||||
}
|
||||
.category-hashtag {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<a href="{{url}}">
|
||||
{{#is_category}}
|
||||
<span class="category-chat-badge" style="color: #{{color}}">
|
||||
<svg class="fa d-icon d-icon-hashtag svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use href="#hashtag"></use></svg>
|
||||
<svg class="fa d-icon d-icon-d-chat svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use href="#d-chat"></use></svg>
|
||||
</span>
|
||||
{{/is_category}}
|
||||
<span class="clear-badge">{{{channel_name}}}</span>
|
||||
|
@ -42,7 +42,7 @@
|
|||
<a class="chat-transcript-channel" href="/chat/c/-/{{channel_id}}">
|
||||
{{#is_category}}
|
||||
<span class="category-chat-badge" style="color: #{{color}}">
|
||||
<svg class="fa d-icon d-icon-hashtag svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use href="#hashtag"></use></svg>
|
||||
<svg class="fa d-icon d-icon-d-chat svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use href="#d-chat"></use></svg>
|
||||
</span>
|
||||
{{/is_category}}
|
||||
{{#is_topic}}
|
||||
|
|
|
@ -17,7 +17,6 @@ register_asset "stylesheets/mobile/index.scss", :mobile
|
|||
|
||||
register_svg_icon "comments"
|
||||
register_svg_icon "comment-slash"
|
||||
register_svg_icon "hashtag"
|
||||
register_svg_icon "lock"
|
||||
register_svg_icon "file-audio"
|
||||
register_svg_icon "file-video"
|
||||
|
|
|
@ -178,7 +178,7 @@ describe Chat do
|
|||
<h3 class="chat-onebox-title">
|
||||
<a href="#{chat_url}">
|
||||
<span class="category-chat-badge" style="color: ##{chat_channel.chatable.color}">
|
||||
<svg class="fa d-icon d-icon-hashtag svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use href="#hashtag"></use></svg>
|
||||
<svg class="fa d-icon d-icon-d-chat svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use href="#d-chat"></use></svg>
|
||||
</span>
|
||||
<span class="clear-badge">#{chat_channel.name}</span>
|
||||
</a>
|
||||
|
@ -210,7 +210,7 @@ describe Chat do
|
|||
</div>
|
||||
<a class="chat-transcript-channel" href="/chat/c/-/#{chat_channel.id}">
|
||||
<span class="category-chat-badge" style="color: ##{chat_channel.chatable.color}">
|
||||
<svg class="fa d-icon d-icon-hashtag svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use href="#hashtag"></use></svg>
|
||||
<svg class="fa d-icon d-icon-d-chat svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use href="#d-chat"></use></svg>
|
||||
</span>
|
||||
#{chat_channel.name}
|
||||
</a>
|
||||
|
|
|
@ -30,7 +30,7 @@ RSpec.describe "Sidebar navigation menu", type: :system, js: true do
|
|||
visit("/")
|
||||
|
||||
expect(sidebar_page.channels_section).to have_css(
|
||||
".sidebar-section-link-#{channel_1.slug} .sidebar-section-link-prefix svg.prefix-icon.d-icon-hashtag",
|
||||
".sidebar-section-link-#{channel_1.slug} .sidebar-section-link-prefix svg.prefix-icon.d-icon-d-chat",
|
||||
)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user