mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-08 17:44:16 +00:00
Co-authored-by: SleeplessOne1917 <insomnia_void@protonmail.com>
This commit is contained in:
parent
5ec9baa5a5
commit
37c72d599e
|
@ -9,7 +9,7 @@ import {
|
||||||
PostAggregates,
|
PostAggregates,
|
||||||
} from "lemmy-js-client";
|
} from "lemmy-js-client";
|
||||||
import { VoteContentType, VoteType } from "../../interfaces";
|
import { VoteContentType, VoteType } from "../../interfaces";
|
||||||
import { I18NextService } from "../../services";
|
import { I18NextService, UserService } from "../../services";
|
||||||
import { Icon, Spinner } from "../common/icon";
|
import { Icon, Spinner } from "../common/icon";
|
||||||
|
|
||||||
interface VoteButtonsProps {
|
interface VoteButtonsProps {
|
||||||
|
@ -113,6 +113,7 @@ export class VoteButtonsCompact extends Component<
|
||||||
this.props.my_vote === 1 ? "text-info" : "text-muted"
|
this.props.my_vote === 1 ? "text-info" : "text-muted"
|
||||||
}`}
|
}`}
|
||||||
data-tippy-content={tippy(this.props.counts)}
|
data-tippy-content={tippy(this.props.counts)}
|
||||||
|
disabled={!UserService.Instance.myUserInfo}
|
||||||
onClick={linkEvent(this, handleUpvote)}
|
onClick={linkEvent(this, handleUpvote)}
|
||||||
aria-label={I18NextService.i18n.t("upvote")}
|
aria-label={I18NextService.i18n.t("upvote")}
|
||||||
aria-pressed={this.props.my_vote === 1}
|
aria-pressed={this.props.my_vote === 1}
|
||||||
|
@ -136,6 +137,7 @@ export class VoteButtonsCompact extends Component<
|
||||||
className={`ms-2 btn btn-sm btn-link btn-animate btn py-0 px-1 ${
|
className={`ms-2 btn btn-sm btn-link btn-animate btn py-0 px-1 ${
|
||||||
this.props.my_vote === -1 ? "text-danger" : "text-muted"
|
this.props.my_vote === -1 ? "text-danger" : "text-muted"
|
||||||
}`}
|
}`}
|
||||||
|
disabled={!UserService.Instance.myUserInfo}
|
||||||
onClick={linkEvent(this, handleDownvote)}
|
onClick={linkEvent(this, handleDownvote)}
|
||||||
data-tippy-content={tippy(this.props.counts)}
|
data-tippy-content={tippy(this.props.counts)}
|
||||||
aria-label={I18NextService.i18n.t("downvote")}
|
aria-label={I18NextService.i18n.t("downvote")}
|
||||||
|
@ -191,6 +193,7 @@ export class VoteButtons extends Component<VoteButtonsProps, VoteButtonsState> {
|
||||||
className={`btn-animate btn btn-link p-0 ${
|
className={`btn-animate btn btn-link p-0 ${
|
||||||
this.props.my_vote === 1 ? "text-info" : "text-muted"
|
this.props.my_vote === 1 ? "text-info" : "text-muted"
|
||||||
}`}
|
}`}
|
||||||
|
disabled={!UserService.Instance.myUserInfo}
|
||||||
onClick={linkEvent(this, handleUpvote)}
|
onClick={linkEvent(this, handleUpvote)}
|
||||||
data-tippy-content={I18NextService.i18n.t("upvote")}
|
data-tippy-content={I18NextService.i18n.t("upvote")}
|
||||||
aria-label={I18NextService.i18n.t("upvote")}
|
aria-label={I18NextService.i18n.t("upvote")}
|
||||||
|
@ -218,6 +221,7 @@ export class VoteButtons extends Component<VoteButtonsProps, VoteButtonsState> {
|
||||||
className={`btn-animate btn btn-link p-0 ${
|
className={`btn-animate btn btn-link p-0 ${
|
||||||
this.props.my_vote === -1 ? "text-danger" : "text-muted"
|
this.props.my_vote === -1 ? "text-danger" : "text-muted"
|
||||||
}`}
|
}`}
|
||||||
|
disabled={!UserService.Instance.myUserInfo}
|
||||||
onClick={linkEvent(this, handleDownvote)}
|
onClick={linkEvent(this, handleDownvote)}
|
||||||
data-tippy-content={I18NextService.i18n.t("downvote")}
|
data-tippy-content={I18NextService.i18n.t("downvote")}
|
||||||
aria-label={I18NextService.i18n.t("downvote")}
|
aria-label={I18NextService.i18n.t("downvote")}
|
||||||
|
|
Loading…
Reference in a new issue