forked from mastodon/mastodon
-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'parent/main' into upstream-20241209
- Loading branch information
Showing
28 changed files
with
571 additions
and
324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
22.11 | ||
22.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { apiGetTag, apiFollowTag, apiUnfollowTag } from 'mastodon/api/tags'; | ||
import { createDataLoadingThunk } from 'mastodon/store/typed_functions'; | ||
|
||
export const fetchHashtag = createDataLoadingThunk( | ||
'tags/fetch', | ||
({ tagId }: { tagId: string }) => apiGetTag(tagId), | ||
); | ||
|
||
export const followHashtag = createDataLoadingThunk( | ||
'tags/follow', | ||
({ tagId }: { tagId: string }) => apiFollowTag(tagId), | ||
); | ||
|
||
export const unfollowHashtag = createDataLoadingThunk( | ||
'tags/unfollow', | ||
({ tagId }: { tagId: string }) => apiUnfollowTag(tagId), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { apiRequestPost, apiRequestGet } from 'mastodon/api'; | ||
import type { ApiHashtagJSON } from 'mastodon/api_types/tags'; | ||
|
||
export const apiGetTag = (tagId: string) => | ||
apiRequestGet<ApiHashtagJSON>(`v1/tags/${tagId}`); | ||
|
||
export const apiFollowTag = (tagId: string) => | ||
apiRequestPost<ApiHashtagJSON>(`v1/tags/${tagId}/follow`); | ||
|
||
export const apiUnfollowTag = (tagId: string) => | ||
apiRequestPost<ApiHashtagJSON>(`v1/tags/${tagId}/unfollow`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
interface ApiHistoryJSON { | ||
day: string; | ||
accounts: string; | ||
uses: string; | ||
} | ||
|
||
export interface ApiHashtagJSON { | ||
id: string; | ||
name: string; | ||
url: string; | ||
history: [ApiHistoryJSON, ...ApiHistoryJSON[]]; | ||
following?: boolean; | ||
} |
94 changes: 0 additions & 94 deletions
94
app/javascript/mastodon/features/hashtag_timeline/components/hashtag_header.jsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.