mirror of
https://github.com/discourse/discourse.git
synced 2025-06-07 16:46:02 +08:00
DEV: Update final {{raw}}
usages (#32082)
This commit is contained in:
@ -14,6 +14,7 @@ import FlatButton from "discourse/components/flat-button";
|
||||
import LoadMore from "discourse/components/load-more";
|
||||
import BookmarkModal from "discourse/components/modal/bookmark";
|
||||
import PluginOutlet from "discourse/components/plugin-outlet";
|
||||
import ActivityCell from "discourse/components/topic-list/item/activity-cell";
|
||||
import TopicStatus from "discourse/components/topic-status";
|
||||
import avatar from "discourse/helpers/avatar";
|
||||
import categoryLink from "discourse/helpers/category-link";
|
||||
@ -22,7 +23,6 @@ import icon from "discourse/helpers/d-icon";
|
||||
import discourseTags from "discourse/helpers/discourse-tags";
|
||||
import formatDate from "discourse/helpers/format-date";
|
||||
import htmlSafe from "discourse/helpers/html-safe";
|
||||
import raw from "discourse/helpers/raw";
|
||||
import topicLink from "discourse/helpers/topic-link";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { BookmarkFormData } from "discourse/lib/bookmark-form-data";
|
||||
@ -401,12 +401,7 @@ export default class BookmarkList extends Component {
|
||||
<td
|
||||
class="post-metadata topic-list-data updated-at"
|
||||
>{{formatDate bookmark.updated_at format="tiny"}}</td>
|
||||
{{raw
|
||||
"list/activity-column"
|
||||
topic=bookmark
|
||||
class="num post-metadata"
|
||||
tagName="td"
|
||||
}}
|
||||
<ActivityCell class="post-metadata" @topic={{bookmark}} />
|
||||
{{/if}}
|
||||
<td class="topic-list-data">
|
||||
<BookmarkActionsDropdown
|
||||
|
@ -7,7 +7,7 @@ import {
|
||||
import $ from "jquery";
|
||||
import TopicPostBadges from "discourse/components/topic-post-badges";
|
||||
import formatAge from "discourse/helpers/format-age";
|
||||
import raw from "discourse/helpers/raw";
|
||||
import TopicStatus from "./topic-status";
|
||||
|
||||
@classNameBindings(":featured-topic")
|
||||
@attributeBindings("topic.id:data-topic-id")
|
||||
@ -23,7 +23,7 @@ export default class FeaturedTopic extends Component {
|
||||
}
|
||||
|
||||
<template>
|
||||
{{raw "topic-status" topic=this.topic}}
|
||||
<TopicStatus @topic={{this.topic}} @disableActions={{true}} />
|
||||
<a href={{this.topic.lastUnreadUrl}} class="title">{{htmlSafe
|
||||
this.topic.fancyTitle
|
||||
}}</a>
|
||||
|
@ -5,18 +5,19 @@ import {
|
||||
classNameBindings,
|
||||
} from "@ember-decorators/component";
|
||||
import PluginOutlet from "discourse/components/plugin-outlet";
|
||||
import ItemRepliesCell from "discourse/components/topic-list/item/replies-cell";
|
||||
import {
|
||||
navigateToTopic,
|
||||
showEntrance,
|
||||
} from "discourse/components/topic-list-item";
|
||||
import TopicPostBadges from "discourse/components/topic-post-badges";
|
||||
import TopicStatus from "discourse/components/topic-status";
|
||||
import UserAvatarFlair from "discourse/components/user-avatar-flair";
|
||||
import UserLink from "discourse/components/user-link";
|
||||
import avatar from "discourse/helpers/avatar";
|
||||
import categoryLink from "discourse/helpers/category-link";
|
||||
import discourseTags from "discourse/helpers/discourse-tags";
|
||||
import formatDate from "discourse/helpers/format-date";
|
||||
import raw from "discourse/helpers/raw";
|
||||
import topicFeaturedLink from "discourse/helpers/topic-featured-link";
|
||||
import topicLink from "discourse/helpers/topic-link";
|
||||
import discourseComputed from "discourse/lib/decorators";
|
||||
@ -85,7 +86,7 @@ export default class LatestTopicListItem extends Component {
|
||||
</div>
|
||||
<div class="main-link">
|
||||
<div class="top-row">
|
||||
{{raw "topic-status" topic=this.topic}}
|
||||
<TopicStatus @topic={{this.topic}} />
|
||||
{{topicLink this.topic}}
|
||||
{{~#if this.topic.featured_link}}
|
||||
{{topicFeaturedLink this.topic}}
|
||||
@ -114,7 +115,7 @@ export default class LatestTopicListItem extends Component {
|
||||
@connectorTagName="div"
|
||||
@outletArgs={{hash topic=this.topic}}
|
||||
/>
|
||||
{{raw "list/posts-count-column" topic=this.topic tagName="div"}}
|
||||
<ItemRepliesCell @topic={{this.topic}} @tagName="div" />
|
||||
<div class="topic-last-activity">
|
||||
<a
|
||||
href={{this.topic.lastPostUrl}}
|
||||
|
@ -1,9 +1,10 @@
|
||||
import Component from "@ember/component";
|
||||
import { classNameBindings, tagName } from "@ember-decorators/component";
|
||||
import PostCountOrBadges from "discourse/components/topic-list/post-count-or-badges";
|
||||
import { showEntrance } from "discourse/components/topic-list-item";
|
||||
import TopicStatus from "discourse/components/topic-status";
|
||||
import coldAgeClass from "discourse/helpers/cold-age-class";
|
||||
import formatAge from "discourse/helpers/format-age";
|
||||
import raw from "discourse/helpers/raw";
|
||||
import rawDate from "discourse/helpers/raw-date";
|
||||
import topicLink from "discourse/helpers/topic-link";
|
||||
|
||||
@ -15,7 +16,7 @@ export default class MobileCategoryTopic extends Component {
|
||||
<template>
|
||||
<td class="main-link">
|
||||
<div class="topic-inset">
|
||||
{{raw "topic-status" topic=this.topic}}
|
||||
<TopicStatus @topic={{this.topic}} @disableActions={{true}} />
|
||||
{{topicLink this.topic}}
|
||||
{{#if this.topic.unseen}}
|
||||
<span class="badge-notification new-topic"></span>
|
||||
@ -26,10 +27,8 @@ export default class MobileCategoryTopic extends Component {
|
||||
>{{formatAge this.topic.last_posted_at}}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="num posts">{{raw
|
||||
"list/post-count-or-badges"
|
||||
topic=this.topic
|
||||
postBadgesEnabled="true"
|
||||
}}</td>
|
||||
<td class="num posts">
|
||||
<PostCountOrBadges @topic={{this.topic}} @postBadgesEnabled={{true}} />
|
||||
</td>
|
||||
</template>
|
||||
}
|
||||
|
@ -11,13 +11,13 @@ import {
|
||||
} from "@ember-decorators/component";
|
||||
import HighlightSearch from "discourse/components/highlight-search";
|
||||
import PluginOutlet from "discourse/components/plugin-outlet";
|
||||
import TopicStatus from "discourse/components/topic-status";
|
||||
import TrackSelected from "discourse/components/track-selected";
|
||||
import avatar from "discourse/helpers/avatar";
|
||||
import categoryLink from "discourse/helpers/category-link";
|
||||
import icon from "discourse/helpers/d-icon";
|
||||
import discourseTags from "discourse/helpers/discourse-tags";
|
||||
import formatDate from "discourse/helpers/format-date";
|
||||
import raw from "discourse/helpers/raw";
|
||||
import { wantsNewWindow } from "discourse/lib/intercept-click";
|
||||
import { logSearchLinkClick } from "discourse/lib/search";
|
||||
|
||||
@ -75,11 +75,12 @@ export default class SearchResultEntry extends Component {
|
||||
role="heading"
|
||||
aria-level="2"
|
||||
>
|
||||
{{raw
|
||||
"topic-status"
|
||||
topic=this.post.topic
|
||||
showPrivateMessageIcon=true
|
||||
}}
|
||||
<TopicStatus
|
||||
@topic={{this.post.topic}}
|
||||
@disableActions={{true}}
|
||||
@showPrivateMessageIcon={{true}}
|
||||
/>
|
||||
|
||||
<span class="topic-title">
|
||||
{{#if this.post.useTopicTitleHeadline}}
|
||||
{{htmlSafe this.post.topicTitleHeadline}}
|
||||
|
@ -12,6 +12,7 @@ const ActivityCell = <template>
|
||||
"activity num topic-list-data"
|
||||
(coldAgeClass @topic.createdAt startDate=@topic.bumpedAt class="")
|
||||
}}
|
||||
...attributes
|
||||
>
|
||||
<a href={{@topic.lastPostUrl}} class="post-activity">
|
||||
{{~! no whitespace ~}}
|
||||
|
@ -126,7 +126,7 @@ acceptance("Search - Full Page", function (needs) {
|
||||
assert.dom(".fps-topic").exists({ count: 1 }, "has one post");
|
||||
|
||||
assert
|
||||
.dom(".topic-status .personal_message")
|
||||
.dom(".topic-status .d-icon-envelope")
|
||||
.exists({ count: 1 }, "shows the right icon");
|
||||
|
||||
assert
|
||||
|
Reference in New Issue
Block a user