mirror of
https://github.com/outline/outline.git
synced 2026-06-13 03:14:59 +03:00
fb9f4bb991
* feat: Allow replacing custom emoji image
25 lines
581 B
TypeScript
25 lines
581 B
TypeScript
import { computed } from "mobx";
|
|
import Emoji from "~/models/Emoji";
|
|
import naturalSort from "@shared/utils/naturalSort";
|
|
import type RootStore from "./RootStore";
|
|
import Store, { RPCAction } from "./base/Store";
|
|
|
|
export default class EmojisStore extends Store<Emoji> {
|
|
actions = [
|
|
RPCAction.Info,
|
|
RPCAction.List,
|
|
RPCAction.Create,
|
|
RPCAction.Update,
|
|
RPCAction.Delete,
|
|
];
|
|
|
|
constructor(rootStore: RootStore) {
|
|
super(rootStore, Emoji);
|
|
}
|
|
|
|
@computed
|
|
get orderedData(): Emoji[] {
|
|
return naturalSort(Array.from(this.data.values()), "name");
|
|
}
|
|
}
|