mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-24 21:51:41 +08:00
Bumps the lint group with 4 updates in the / directory: [@discourse/lint-configs](https://github.com/discourse/lint-configs), [ember-template-lint](https://github.com/ember-template-lint/ember-template-lint), [eslint](https://github.com/eslint/eslint) and [stylelint](https://github.com/stylelint/stylelint). Updates `@discourse/lint-configs` from 2.22.0 to 2.28.0 - [Commits](https://github.com/discourse/lint-configs/commits) Updates `ember-template-lint` from 7.7.0 to 7.9.1 - [Release notes](https://github.com/ember-template-lint/ember-template-lint/releases) - [Changelog](https://github.com/ember-template-lint/ember-template-lint/blob/master/CHANGELOG.md) - [Commits](https://github.com/ember-template-lint/ember-template-lint/commits) Updates `eslint` from 9.27.0 to 9.32.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v9.27.0...v9.32.0) Updates `stylelint` from 16.19.1 to 16.22.0 - [Release notes](https://github.com/stylelint/stylelint/releases) - [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint/stylelint/compare/16.19.1...16.22.0) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Discourse CI <ci@ci.invalid> Co-authored-by: Jarek Radosz <jarek@cvx.dev>
108 lines
3.8 KiB
Text
Vendored
108 lines
3.8 KiB
Text
Vendored
import { fn, hash } from "@ember/helper";
|
|
import { LinkTo } from "@ember/routing";
|
|
import { htmlSafe } from "@ember/template";
|
|
import RouteTemplate from "ember-route-template";
|
|
import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner";
|
|
import HighlightSearch from "discourse/components/highlight-search";
|
|
import TopicStatus from "discourse/components/topic-status";
|
|
import ageWithTooltip from "discourse/helpers/age-with-tooltip";
|
|
import avatar from "discourse/helpers/avatar";
|
|
import categoryLink from "discourse/helpers/category-link";
|
|
import discourseTag from "discourse/helpers/discourse-tag";
|
|
import { i18n } from "discourse-i18n";
|
|
import Chart from "admin/components/chart";
|
|
import ComboBox from "select-kit/components/combo-box";
|
|
import PeriodChooser from "select-kit/components/period-chooser";
|
|
|
|
export default RouteTemplate(
|
|
<template>
|
|
<div class="admin-title">
|
|
<PeriodChooser
|
|
@period={{@controller.period}}
|
|
@onChange={{fn (mut @controller.period)}}
|
|
/>
|
|
<ComboBox
|
|
@content={{@controller.searchTypeOptions}}
|
|
@value={{@controller.searchType}}
|
|
@onChange={{fn (mut @controller.searchType)}}
|
|
class="search-logs-filter"
|
|
/>
|
|
</div>
|
|
|
|
<h2>
|
|
<LinkTo
|
|
@route="full-page-search"
|
|
@query={{hash q=@controller.term}}
|
|
>{{@controller.term}}</LinkTo>
|
|
</h2>
|
|
|
|
<ConditionalLoadingSpinner @condition={{@controller.refreshing}}>
|
|
<Chart @chartConfig={{@controller.chartConfig}} />
|
|
|
|
<br /><br />
|
|
<h2> {{i18n "admin.logs.search_logs.header_search_results"}} </h2>
|
|
<br />
|
|
|
|
<div class="header-search-results">
|
|
{{#each @controller.model.search_result.posts as |result|}}
|
|
<div class="fps-result">
|
|
<div class="author">
|
|
<a href={{result.userPath}} data-user-card={{result.username}}>
|
|
{{avatar result imageSize="large"}}
|
|
</a>
|
|
</div>
|
|
|
|
<div class="fps-topic">
|
|
<div class="topic">
|
|
<a href={{result.url}} class="search-link">
|
|
<TopicStatus
|
|
@topic={{result.topic}}
|
|
@disableActions={{true}}
|
|
/>
|
|
<span class="topic-title">
|
|
{{#if result.useTopicTitleHeadline}}
|
|
{{htmlSafe result.topicTitleHeadline}}
|
|
{{else}}
|
|
<HighlightSearch @highlight={{@controller.q}}>
|
|
{{htmlSafe result.topic.fancyTitle}}
|
|
</HighlightSearch>
|
|
{{/if}}
|
|
</span>
|
|
</a>
|
|
|
|
<div class="search-category">
|
|
{{#if result.topic.category.parentCategory}}
|
|
{{categoryLink result.topic.category.parentCategory}}
|
|
{{/if}}
|
|
{{categoryLink result.topic.category hideParent=true}}
|
|
{{#each result.topic.tags as |tag|}}
|
|
{{discourseTag tag}}
|
|
{{/each}}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="blurb container">
|
|
<span class="date">
|
|
{{ageWithTooltip result.created_at}}
|
|
{{#if result.blurb}}
|
|
-
|
|
{{/if}}
|
|
</span>
|
|
|
|
{{#if result.blurb}}
|
|
{{#if @controller.siteSettings.use_pg_headlines_for_excerpt}}
|
|
{{htmlSafe result.blurb}}
|
|
{{else}}
|
|
<HighlightSearch @highlight={{@controller.highlightQuery}}>
|
|
{{htmlSafe result.blurb}}
|
|
</HighlightSearch>
|
|
{{/if}}
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{/each}}
|
|
</div>
|
|
</ConditionalLoadingSpinner>
|
|
</template>
|
|
);
|