This repository was archived by the owner on Jul 22, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +71
-0
lines changed
topic-list-heading-bottom
stylesheets/modules/summarization/common Expand file tree Collapse file tree 5 files changed +71
-0
lines changed Original file line number Diff line number Diff line change 1+ import Component from " @glimmer/component" ;
2+ import { service } from " @ember/service" ;
3+ import icon from " discourse-common/helpers/d-icon" ;
4+ import i18n from " discourse-common/helpers/i18n" ;
5+
6+ export default class AiGistDisclosure extends Component {
7+ @service router;
8+
9+ get shouldShow () {
10+ return this .router .currentRoute .attributes .list ? .topics ? .some (
11+ (topic ) => topic .ai_topic_gist
12+ );
13+ }
14+
15+ <template >
16+ {{#if this . shouldShow }}
17+ <span class =" ai-topic-gist__disclosure" >
18+ {{icon " discourse-sparkles" }}
19+ {{i18n " discourse_ai.summarization.disclosure" }}
20+ </span >
21+ {{/if }}
22+ </template >
23+ }
Original file line number Diff line number Diff line change 1+ import Component from " @glimmer/component" ;
2+ import AiGistDisclosure from " ../../components/ai-gist-disclosure" ;
3+
4+ export default class AiTopicGistDisclosure extends Component {
5+ static shouldRender (outletArgs , helper ) {
6+ const isMobileView = helper .site .mobileView ;
7+ return isMobileView;
8+ }
9+
10+ <template >
11+ <AiGistDisclosure />
12+ </template >
13+ }
Original file line number Diff line number Diff line change 1+ import Component from " @glimmer/component" ;
2+ import AiGistDisclosure from " ../../components/ai-gist-disclosure" ;
3+
4+ export default class AiTopicGist extends Component {
5+ static shouldRender (outletArgs ) {
6+ return (
7+ // "default" can be removed after the glimmer topic list is rolled out
8+ (outletArgs? .name === " default" || outletArgs? .name === " topic.title" ) &&
9+ ! outletArgs .bulkSelectEnabled
10+ );
11+ }
12+
13+ <template >
14+ <AiGistDisclosure />
15+ </template >
16+ }
Original file line number Diff line number Diff line change 235235 color : var (--primary-medium );
236236 }
237237 }
238+
239+ & __disclosure {
240+ font-size : var (--font-down-1 );
241+ color : var (--primary-600 );
242+ .desktop-view & {
243+ margin-left : 0.5em ;
244+ }
245+ .mobile-view & {
246+ display : block ;
247+ margin-top : -0.5em ;
248+ margin-bottom : 0.5em ;
249+ }
250+ .d-icon {
251+ font-size : var (--font-down-1 );
252+ position : relative ;
253+ top : -0.05em ; // improve vertical alignment
254+ }
255+ }
238256}
Original file line number Diff line number Diff line change 464464 topic :
465465 title : " Topic summary"
466466 close : " Close summary panel"
467+ disclosure : " Summaries generated by AI"
467468 review :
468469 types :
469470 reviewable_ai_post :
You can’t perform that action at this time.
0 commit comments