* fix: Logic error in toast fix: Remove useless component * fix: Logout not clearing all stores * Add icons to notification settings * Add eslint rule to enforce spaced comment * Add eslint rule for arrow-body-style * Add eslint rule to enforce self-closing components * Add menu to api key settings Fix: Deleting webhook subscription does not remove from UI Split webhook subscriptions into active and inactive Styling updates
30 lines
696 B
TypeScript
30 lines
696 B
TypeScript
import { computed } from "mobx";
|
|
import WebhookSubscription from "~/models/WebhookSubscription";
|
|
import BaseStore, { RPCAction } from "./BaseStore";
|
|
import RootStore from "./RootStore";
|
|
|
|
export default class WebhookSubscriptionsStore extends BaseStore<
|
|
WebhookSubscription
|
|
> {
|
|
actions = [
|
|
RPCAction.List,
|
|
RPCAction.Create,
|
|
RPCAction.Delete,
|
|
RPCAction.Update,
|
|
];
|
|
|
|
constructor(rootStore: RootStore) {
|
|
super(rootStore, WebhookSubscription);
|
|
}
|
|
|
|
@computed
|
|
get enabled() {
|
|
return this.orderedData.filter((subscription) => subscription.enabled);
|
|
}
|
|
|
|
@computed
|
|
get disabled() {
|
|
return this.orderedData.filter((subscription) => !subscription.enabled);
|
|
}
|
|
}
|