Mute conversations
This commit is contained in:
parent
de7a69dee9
commit
84e52c948b
12 changed files with 185 additions and 3 deletions
29
ts/util/getMuteOptions.ts
Normal file
29
ts/util/getMuteOptions.ts
Normal file
|
@ -0,0 +1,29 @@
|
|||
import moment from 'moment';
|
||||
import { LocalizerType } from '../types/Util';
|
||||
|
||||
type MuteOption = {
|
||||
name: string;
|
||||
disabled?: boolean;
|
||||
value: number;
|
||||
};
|
||||
|
||||
export function getMuteOptions(i18n: LocalizerType): Array<MuteOption> {
|
||||
return [
|
||||
{
|
||||
name: i18n('muteHour'),
|
||||
value: moment.duration(1, 'hour').as('milliseconds'),
|
||||
},
|
||||
{
|
||||
name: i18n('muteDay'),
|
||||
value: moment.duration(1, 'day').as('milliseconds'),
|
||||
},
|
||||
{
|
||||
name: i18n('muteWeek'),
|
||||
value: moment.duration(1, 'week').as('milliseconds'),
|
||||
},
|
||||
{
|
||||
name: i18n('muteYear'),
|
||||
value: moment.duration(1, 'year').as('milliseconds'),
|
||||
},
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue