mirror of
https://ghfast.top/https://github.com/discourse/discourse-topic-voting.git
synced 2026-07-17 11:37:03 +08:00
This aims to be a 1:1 port of functionality and HTML structure. In future, this plugin may benefit from a refactor to use float-kit. Also unskips the system spec and makes improvements to prevent flakiness.
23 lines
746 B
Text
23 lines
746 B
Text
import Component from "@ember/component";
|
|
import { classNames, tagName } from "@ember-decorators/component";
|
|
import routeAction from "discourse/helpers/route-action";
|
|
import VoteBox from "../../components/vote-box";
|
|
|
|
@tagName("div")
|
|
@classNames("topic-above-post-stream-outlet", "topic-title-voting")
|
|
export default class TopicTitleVoting extends Component {
|
|
<template>
|
|
{{#if this.model.can_vote}}
|
|
{{#if this.model.postStream.loaded}}
|
|
{{#if this.model.postStream.firstPostPresent}}
|
|
<div class="voting title-voting">
|
|
<VoteBox
|
|
@topic={{this.model}}
|
|
@showLogin={{routeAction "showLogin"}}
|
|
/>
|
|
</div>
|
|
{{/if}}
|
|
{{/if}}
|
|
{{/if}}
|
|
</template>
|
|
}
|