mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 00:32:52 +08:00
FIX: Broken topic-timeline summarize topic button (#20661)
# Context During the octane upgrade of the Topic Timeline the `summarize-topic` button was neglected, leaving it in a broken state. # Fix Update the button to replicate the original functionality <img width="351" alt="Screenshot 2023-03-13 at 12 41 25 PM" src="https://user-images.githubusercontent.com/50783505/224785657-fc8124fe-f1d9-4cc8-917b-9cd859517da3.png"> _updated timeline with summarize button_
This commit is contained in:
@ -15,6 +15,7 @@
|
|||||||
@mobileView={{@mobileView}}
|
@mobileView={{@mobileView}}
|
||||||
@toggleMultiSelect={{@toggleMultiSelect}}
|
@toggleMultiSelect={{@toggleMultiSelect}}
|
||||||
@showTopicSlowModeUpdate={{@showTopicSlowModeUpdate}}
|
@showTopicSlowModeUpdate={{@showTopicSlowModeUpdate}}
|
||||||
|
@showSummary={{@showSummary}}
|
||||||
@deleteTopic={{@deleteTopic}}
|
@deleteTopic={{@deleteTopic}}
|
||||||
@recoverTopic={{@recoverTopic}}
|
@recoverTopic={{@recoverTopic}}
|
||||||
@toggleClosed={{@toggleClosed}}
|
@toggleClosed={{@toggleClosed}}
|
||||||
|
@ -24,15 +24,6 @@ export default class TopicTimeline extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get displaySummary() {
|
|
||||||
return (
|
|
||||||
this.siteSettings.summary_timeline_button &&
|
|
||||||
!this.args.fullScreen &&
|
|
||||||
this.args.model.has_summary &&
|
|
||||||
!this.args.model.postStream.summary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
get createdAt() {
|
get createdAt() {
|
||||||
return new Date(this.args.model.created_at);
|
return new Date(this.args.model.created_at);
|
||||||
}
|
}
|
||||||
|
@ -121,12 +121,12 @@
|
|||||||
{{#if this.displaySummary}}
|
{{#if this.displaySummary}}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="show-summary btn-small"
|
class="show-summary btn btn-small"
|
||||||
label={{i18n "summary.short_label"}}
|
|
||||||
title={{i18n "summary.short_title"}}
|
title={{i18n "summary.short_title"}}
|
||||||
{{on "click" @showSummary}}
|
{{on "click" @showSummary}}
|
||||||
>
|
>
|
||||||
{{d-icon "layer-group"}}
|
{{d-icon "layer-group"}}
|
||||||
|
{{i18n "summary.short_label"}}
|
||||||
</button>
|
</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -77,6 +77,15 @@ export default class TopicTimelineScrollArea extends Component {
|
|||||||
this.dockCheck();
|
this.dockCheck();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get displaySummary() {
|
||||||
|
return (
|
||||||
|
this.siteSettings.summary_timeline_button &&
|
||||||
|
!this.args.fullScreen &&
|
||||||
|
this.args.model.has_summary &&
|
||||||
|
!this.args.model.postStream.summary
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
get displayTimeLineScrollArea() {
|
get displayTimeLineScrollArea() {
|
||||||
if (this.args.mobileView) {
|
if (this.args.mobileView) {
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user