-
Notifications
You must be signed in to change notification settings - Fork 5
Moderation Kit #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Moderation Kit #58
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
0767bf9
Add hide topic endpoint
Xialtal f8c2c2c
Add undo option to topic posts delete endpoint
Xialtal b6c3361
Add hide option to topic context menu
Xialtal 2eff094
Add close topic endpoint
Xialtal 71c8778
Add close option to topic context menu
Xialtal 060aaec
Add topic delete endpoint
Xialtal d67d3bc
Add delete option to topic context menu
Xialtal 83b11ab
Add move topic endpoint
Xialtal 595edc3
Add confirmation for topic delete
Xialtal 8f080b3
Fix topic close option in context menu
Xialtal 97fa90d
Extract CheckBoxToggleStyle to SharedUI
Xialtal 6b44b71
Add set topic curator endpoint
Xialtal a0f126c
Improve auth check for post context menu
Xialtal ee9a210
[WIP] Topic & Post tools
Xialtal 0dcf2a2
Improve Post model flag mock
Xialtal b72bec9
Add topic post restore context menu option
Xialtal 0ae07f3
Improve flag in TopicInfo mocks
Xialtal 22e8221
Fix ForumScreen preview
Xialtal c17d6df
Add tools action to topic context menu in ForumFeature
Xialtal 63c2c43
Bump API version
Xialtal 6466cab
Add redAlpha color to SharedUI
Xialtal 0832bd0
Improve ForumFlag model
Xialtal 591c300
Add post status to PostRowView
Xialtal 9d222c1
Add post karma history endpoint
Xialtal 65f26d3
Improve karma value for Post model mock
Xialtal 54e6ade
Fix karma field in Post model
Xialtal 60b6713
Add post karma history
Xialtal b16aeab
Fix user profile not opening from post karma history
Xialtal 9b47bda
Add "last edit hidden" tag support for posts
Xialtal 8f76e12
Add move posts endpoint
Xialtal 977c188
[WIP] ForumMoveFeature
Xialtal 632047f
Add move option to post context menu
Xialtal 12d7d05
Add move option to topic context menu
Xialtal e8657f6
Add user note endpoint
Xialtal fb5fa16
Improve User model mock
Xialtal 66eb1e0
Add note support to FormFeature
Xialtal 8efba5c
Allow avatar upload only for session user
Xialtal ed837e5
Add context menu to user profile
Xialtal 6277e9d
Fix isLastEditHidden check in Post model
Xialtal b3d0731
Use icon if needed for segment picker in ProfileScreen
Xialtal eda43c4
Profile logging section improvements
Xialtal 466ba12
Improve ru localization for ForumFeature
Xialtal e2b9fb6
ForumMoveFeature improvements
Xialtal d07252c
Improve karma field in Post model
Xialtal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,47 @@ | ||
| // | ||
| // ForumModifyType.swift | ||
| // ForPDA | ||
| // | ||
| // Created by Xialtal on 8.04.26. | ||
| // | ||
|
|
||
| import PDAPI | ||
| import Models | ||
|
|
||
| public enum ForumModifyType: Sendable { | ||
| case post(PostModifyAction) | ||
| case topic(TopicModifyAction) | ||
| } | ||
|
|
||
| extension ForumModifyType { | ||
| var transfer: ForumCommand.ModifyType { | ||
| switch self { | ||
| case .post(let action): | ||
| .post(action: action.transfer) | ||
| case .topic(let action): | ||
| .topic(action: action.transfer) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| fileprivate extension PostModifyAction { | ||
| var transfer: ForumCommand.ModifyPostAction { | ||
| switch self { | ||
| case .pin: .pin | ||
| case .hide: .hide | ||
| case .delete: .delete | ||
| case .protect: .protect | ||
| } | ||
| } | ||
| } | ||
|
|
||
| fileprivate extension TopicModifyAction { | ||
| var transfer: ForumCommand.ModifyTopicAction { | ||
| switch self { | ||
| case .pin: .pin | ||
| case .hide: .hide | ||
| case .close: .close | ||
| case .delete: .delete | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.