mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
This commit introduces <NotificationsTracking /> which is a wrapper component around <DMenu /> which replaces the select-kit component <TopicNotificationsButton />. Each tracking case has its dedicated component: - topic -> `<TopicNotificationsTracking />` - group -> `<GroupNotificationsTracking />` - tag -> `<TagNotificationsTracking />` - category -> `<CategoryNotificationsTracking />` - chat thread -> `<ThreadNotificationsTracking />`
25 lines
776 B
Plaintext
25 lines
776 B
Plaintext
import Component from "@glimmer/component";
|
|
import NotificationsTracking from "discourse/components/notifications-tracking";
|
|
import { topicLevels } from "discourse/lib/notification-levels";
|
|
import { i18n } from "discourse-i18n";
|
|
|
|
export default class TopicNotificationsTracking extends Component {
|
|
get suffix() {
|
|
return this.args.topic?.archetype === "private_message" ? "_pm" : "";
|
|
}
|
|
|
|
<template>
|
|
<NotificationsTracking
|
|
@onChange={{@onChange}}
|
|
@levelId={{@levelId}}
|
|
@showCaret={{@showCaret}}
|
|
@showFullTitle={{@showFullTitle}}
|
|
@prefix="topic.notifications"
|
|
@title={{i18n "topic.notifications.title"}}
|
|
class="topic-notifications-tracking"
|
|
@levels={{topicLevels}}
|
|
@suffix={{this.suffix}}
|
|
/>
|
|
</template>
|
|
}
|