Merge remote-tracking branch 'parent/main' into upstream-20241126
This commit is contained in:
commit
8a075ba4c6
303 changed files with 7495 additions and 4498 deletions
15
app/javascript/mastodon/selectors/antennas.ts
Normal file
15
app/javascript/mastodon/selectors/antennas.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import type { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
import type { Antenna } from 'mastodon/models/antenna';
|
||||
import type { RootState } from 'mastodon/store';
|
||||
|
||||
export const getOrderedAntennas = createSelector(
|
||||
[(state: RootState) => state.antennas],
|
||||
(antennas: ImmutableMap<string, Antenna | null>) =>
|
||||
antennas
|
||||
.toList()
|
||||
.filter((item: Antenna | null) => !!item)
|
||||
.sort((a: Antenna, b: Antenna) => a.title.localeCompare(b.title))
|
||||
.toArray(),
|
||||
);
|
17
app/javascript/mastodon/selectors/bookmark_categories.ts
Normal file
17
app/javascript/mastodon/selectors/bookmark_categories.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import type { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
import type { BookmarkCategory } from 'mastodon/models/bookmark_category';
|
||||
import type { RootState } from 'mastodon/store';
|
||||
|
||||
export const getOrderedBookmarkCategories = createSelector(
|
||||
[(state: RootState) => state.bookmark_categories],
|
||||
(bookmark_categories: ImmutableMap<string, BookmarkCategory | null>) =>
|
||||
bookmark_categories
|
||||
.toList()
|
||||
.filter((item: BookmarkCategory | null) => !!item)
|
||||
.sort((a: BookmarkCategory, b: BookmarkCategory) =>
|
||||
a.title.localeCompare(b.title),
|
||||
)
|
||||
.toArray(),
|
||||
);
|
15
app/javascript/mastodon/selectors/circles.ts
Normal file
15
app/javascript/mastodon/selectors/circles.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import type { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
import type { Circle } from 'mastodon/models/circle';
|
||||
import type { RootState } from 'mastodon/store';
|
||||
|
||||
export const getOrderedCircles = createSelector(
|
||||
[(state: RootState) => state.circles],
|
||||
(circles: ImmutableMap<string, Circle | null>) =>
|
||||
circles
|
||||
.toList()
|
||||
.filter((item: Circle | null) => !!item)
|
||||
.sort((a: Circle, b: Circle) => a.title.localeCompare(b.title))
|
||||
.toArray(),
|
||||
);
|
15
app/javascript/mastodon/selectors/lists.ts
Normal file
15
app/javascript/mastodon/selectors/lists.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import type { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
import type { List } from 'mastodon/models/list';
|
||||
import type { RootState } from 'mastodon/store';
|
||||
|
||||
export const getOrderedLists = createSelector(
|
||||
[(state: RootState) => state.lists],
|
||||
(lists: ImmutableMap<string, List | null>) =>
|
||||
lists
|
||||
.toList()
|
||||
.filter((item: List | null) => !!item)
|
||||
.sort((a: List, b: List) => a.title.localeCompare(b.title))
|
||||
.toArray(),
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue