Change design of lists in web UI (#32881)
This commit is contained in:
parent
7385016837
commit
62603508c7
39 changed files with 1395 additions and 1350 deletions
18
app/javascript/mastodon/models/list.ts
Normal file
18
app/javascript/mastodon/models/list.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
import type { RecordOf } from 'immutable';
|
||||
import { Record } from 'immutable';
|
||||
|
||||
import type { ApiListJSON } from 'mastodon/api_types/lists';
|
||||
|
||||
type ListShape = Required<ApiListJSON>; // no changes from server shape
|
||||
export type List = RecordOf<ListShape>;
|
||||
|
||||
const ListFactory = Record<ListShape>({
|
||||
id: '',
|
||||
title: '',
|
||||
exclusive: false,
|
||||
replies_policy: 'list',
|
||||
});
|
||||
|
||||
export function createList(attributes: Partial<ListShape>) {
|
||||
return ListFactory(attributes);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue