Skip to content

Commit

Permalink
Modlog (#1557)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjmarf authored Dec 30, 2024
1 parent 54806de commit 64aa346
Show file tree
Hide file tree
Showing 22 changed files with 864 additions and 60 deletions.
30 changes: 29 additions & 1 deletion Mlem.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
033F844D2D18D90900D87A9E /* MessageBubbleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 033F844C2D18D90900D87A9E /* MessageBubbleView.swift */; };
033F844F2D196AC700D87A9E /* OptimalHeightLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 033F844E2D196AC700D87A9E /* OptimalHeightLayout.swift */; };
033F84512D196AFD00D87A9E /* MessageFeedView+Logic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 033F84502D196AFD00D87A9E /* MessageFeedView+Logic.swift */; };
033F84662D1C780900D87A9E /* ModlogButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 033F84652D1C780900D87A9E /* ModlogButtonView.swift */; };
033F84732D1C784600D87A9E /* ModlogEntryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 033F84702D1C784600D87A9E /* ModlogEntryView.swift */; };
033F84742D1C784600D87A9E /* ModlogView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 033F84712D1C784600D87A9E /* ModlogView.swift */; };
033F84782D1D68D200D87A9E /* ModlogEntryType+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 033F84772D1D68D200D87A9E /* ModlogEntryType+Extensions.swift */; };
033F84AD2C298466002E3EDF /* SectionIndexTitles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 033F84AC2C298466002E3EDF /* SectionIndexTitles.swift */; };
033F84B12C29907F002E3EDF /* FeedbackType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 033F84B02C29907F002E3EDF /* FeedbackType.swift */; };
033F84BB2C2ACB96002E3EDF /* CommentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 033F84BA2C2ACB96002E3EDF /* CommentView.swift */; };
Expand All @@ -95,6 +99,7 @@
034B94852C09348400039AF4 /* MarkdownImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 034B94842C09348400039AF4 /* MarkdownImageView.swift */; };
034B94892C09360A00039AF4 /* Int+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 034B94882C09360A00039AF4 /* Int+Extensions.swift */; };
034B948E2C0937BA00039AF4 /* FancyScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 034B948D2C0937BA00039AF4 /* FancyScrollView.swift */; };
034CC0302D22C5BE00C557D3 /* WarningOverlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 034CC02F2D22C5BE00C557D3 /* WarningOverlayView.swift */; };
03500C242BF55D0E00CAA076 /* Toast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03500C232BF55D0E00CAA076 /* Toast.swift */; };
03500C272BF69D1D00CAA076 /* ToastModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03500C262BF69D1D00CAA076 /* ToastModel.swift */; };
03500C2B2BF7F1B100CAA076 /* ToastOverlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03500C2A2BF7F1B100CAA076 /* ToastOverlayView.swift */; };
Expand Down Expand Up @@ -516,6 +521,10 @@
033F844C2D18D90900D87A9E /* MessageBubbleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageBubbleView.swift; sourceTree = "<group>"; };
033F844E2D196AC700D87A9E /* OptimalHeightLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OptimalHeightLayout.swift; sourceTree = "<group>"; };
033F84502D196AFD00D87A9E /* MessageFeedView+Logic.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MessageFeedView+Logic.swift"; sourceTree = "<group>"; };
033F84652D1C780900D87A9E /* ModlogButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModlogButtonView.swift; sourceTree = "<group>"; };
033F84702D1C784600D87A9E /* ModlogEntryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModlogEntryView.swift; sourceTree = "<group>"; };
033F84712D1C784600D87A9E /* ModlogView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModlogView.swift; sourceTree = "<group>"; };
033F84772D1D68D200D87A9E /* ModlogEntryType+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ModlogEntryType+Extensions.swift"; sourceTree = "<group>"; };
033F84AC2C298466002E3EDF /* SectionIndexTitles.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SectionIndexTitles.swift; sourceTree = "<group>"; };
033F84B02C29907F002E3EDF /* FeedbackType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedbackType.swift; sourceTree = "<group>"; };
033F84BA2C2ACB96002E3EDF /* CommentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommentView.swift; sourceTree = "<group>"; };
Expand All @@ -541,6 +550,7 @@
034B94842C09348400039AF4 /* MarkdownImageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarkdownImageView.swift; sourceTree = "<group>"; };
034B94882C09360A00039AF4 /* Int+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Int+Extensions.swift"; sourceTree = "<group>"; };
034B948D2C0937BA00039AF4 /* FancyScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FancyScrollView.swift; sourceTree = "<group>"; };
034CC02F2D22C5BE00C557D3 /* WarningOverlayView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WarningOverlayView.swift; sourceTree = "<group>"; };
03500C212BF5594100CAA076 /* ToastType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToastType.swift; sourceTree = "<group>"; };
03500C232BF55D0E00CAA076 /* Toast.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Toast.swift; sourceTree = "<group>"; };
03500C262BF69D1D00CAA076 /* ToastModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToastModel.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1022,6 +1032,15 @@
path = MessageFeedView;
sourceTree = "<group>";
};
033F84722D1C784600D87A9E /* Modlog */ = {
isa = PBXGroup;
children = (
033F84702D1C784600D87A9E /* ModlogEntryView.swift */,
033F84712D1C784600D87A9E /* ModlogView.swift */,
);
path = Modlog;
sourceTree = "<group>";
};
033F84C62C2B192F002E3EDF /* MlemStats */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1185,6 +1204,7 @@
CDD99C3B2C73F3FF0010367F /* DeleteAccountView.swift */,
03B25B3A2CC44FFF00EB6DF5 /* UploadConfirmationView.swift */,
03E46AD12D130681002589DB /* VotesListView.swift */,
033F84722D1C784600D87A9E /* Modlog */,
033F844B2D18D8F400D87A9E /* MessageFeedView */,
);
name = Pages;
Expand Down Expand Up @@ -1599,6 +1619,7 @@
038028FE2CB72AC90091A8A2 /* ReasonShortcutView.swift */,
03B62B762CE295530077E9C8 /* RulesListView.swift */,
03B62B782CE2A2C00077E9C8 /* RulesPickerView.swift */,
033F84652D1C780900D87A9E /* ModlogButtonView.swift */,
035BE0852BDD8D9100F77D73 /* Navigation */,
0382A7EE2C09F0F800C79DDA /* Pages */,
CD7DB9702C49C17200DCC542 /* PersonContentGridView.swift */,
Expand All @@ -1612,6 +1633,7 @@
03500C252BF694A800CAA076 /* Toast */,
CD0E07002C12707700445849 /* ToolbarEllipsisMenu.swift */,
CDD99C3D2C73F4380010367F /* WarningView.swift */,
034CC02F2D22C5BE00C557D3 /* WarningOverlayView.swift */,
CD13CC582C583C7A001AF428 /* WebsitePreviewView.swift */,
CD13CC5A2C588B34001AF428 /* WebView.swift */,
03AF91DE2C1B243D00E56644 /* ZoomableContainer.swift */,
Expand Down Expand Up @@ -1851,6 +1873,7 @@
0320B6532C8B65EB00D38548 /* Captcha+Extensions.swift */,
030050D42D10AE30002B1E99 /* Report+Extensions.swift */,
03E46AD32D130728002589DB /* ScoringOperation+Extensions.swift */,
033F84772D1D68D200D87A9E /* ModlogEntryType+Extensions.swift */,
);
path = "Content Models";
sourceTree = "<group>";
Expand Down Expand Up @@ -2243,6 +2266,7 @@
031E2D5B2BEFC9460003BC45 /* ThemeSettingsView.swift in Sources */,
CDE4AC3F2CA2083200981010 /* VideoView.swift in Sources */,
03D3A1F12BB9D48E009DE55E /* BasicAction.swift in Sources */,
033F84662D1C780900D87A9E /* ModlogButtonView.swift in Sources */,
03D2A6392C00FAE000ED4FF2 /* UserAccount.swift in Sources */,
CDB738292CB8A6A5005B11BB /* View+PaletteBorder.swift in Sources */,
03C93CF02BEFFB1A00327BFE /* LoginCredentialsView.swift in Sources */,
Expand Down Expand Up @@ -2277,6 +2301,7 @@
CDB41E8E2C84CFA200BD2DE9 /* FixedImageView.swift in Sources */,
033F84C12C2AD072002E3EDF /* CommentWrapper.swift in Sources */,
034B94832C09340A00039AF4 /* MarkdownConfiguration+Extensions.swift in Sources */,
034CC0302D22C5BE00C557D3 /* WarningOverlayView.swift in Sources */,
034690932D0F4D720073E664 /* RemovableProviding+Extensions.swift in Sources */,
039F58952C7B618F00C61658 /* InboxSettingsView.swift in Sources */,
CD4D58CF2B86DDEC00B82964 /* AccountSortMode.swift in Sources */,
Expand Down Expand Up @@ -2326,6 +2351,8 @@
CD1446272A5B36DA00610EF1 /* EULA.swift in Sources */,
CD79281F2C73B52A00FA712D /* EndOfFeedView.swift in Sources */,
CDE1F19C2C63E2EB008AF042 /* SettingPropertyWrapper.swift in Sources */,
033F84732D1C784600D87A9E /* ModlogEntryView.swift in Sources */,
033F84742D1C784600D87A9E /* ModlogView.swift in Sources */,
038096612C10AAD8003ED1D8 /* TransitionView.swift in Sources */,
0382A7F42C0A76A900C79DDA /* Date+Extensions.swift in Sources */,
CD9D243D2CC1DF59006E5F3F /* AccountType.swift in Sources */,
Expand Down Expand Up @@ -2415,6 +2442,7 @@
031E2D5D2BEFCC630003BC45 /* SettingsView.swift in Sources */,
CDCA44B42C176A4700C092B3 /* Array+Extensions.swift in Sources */,
03CCDAA42BF2852E00C0C851 /* LoginTotpView.swift in Sources */,
033F84782D1D68D200D87A9E /* ModlogEntryType+Extensions.swift in Sources */,
CD4ED8472BF110FA00EFA0A2 /* TabReselectTracker.swift in Sources */,
CD8457142D07576A00CEA2B8 /* AVPlayer+Extensions.swift in Sources */,
033FCAEE2C57DD14007B7CD1 /* CaptchaDifficulty+Extensions.swift in Sources */,
Expand Down Expand Up @@ -3035,7 +3063,7 @@
repositoryURL = "https://github.com/mlemgroup/MlemMiddleware";
requirement = {
kind = upToNextMinorVersion;
minimumVersion = 0.58.0;
minimumVersion = 0.59.0;
};
};
CD64A9182CA37D63007CA7E6 /* XCRemoteSwiftPackageReference "Gifu" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/mlemgroup/MlemMiddleware",
"state" : {
"revision" : "aaa2f9673ac8a3c4db23c666c168ce7e1c13f2ed",
"version" : "0.58.0"
"revision" : "3a1c52cc11fa4c2af9f923c58352b94e25d99111",
"version" : "0.59.0"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Mlem/App/Configuration/Colors/StandardPalette.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extension ColorPalette {
inbox: .purple,
accent: .blue,
neutralAccent: .gray,
colorfulAccents: [.orange, .pink, .blue, .green, .purple, .indigo, .mint, .teal],
colorfulAccents: [.orange, .pink, .blue, .green, .purple, .indigo, .mint, .teal, .yellow],
commentIndentColors: [.red, .orange, .yellow, .green, .blue, .purple]
)
}
6 changes: 5 additions & 1 deletion Mlem/App/Configuration/Icons.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ enum Icons {
// moderation
static let moderation: String = "shield"
static let moderationFill: String = "shield.fill"
static let demoteModerator: String = "shield.slash"
static let moderationReport: String = "flag"
static let modlog: String = "book.pages"
static let transferCommunity: String = "arrow.right"

// inbox
static let mention: String = "quote.bubble"
Expand All @@ -59,11 +62,12 @@ enum Icons {
static let titleOnlyPost: String = "character.bubble"
static let pin: String = "pin"
static let pinFill: String = "pin.fill"
static let unpin: String = "pin.slash"
static let websiteIcon: String = "globe"
static let read: String = "book"
static let lock: String = "lock"
static let lockFill: String = "lock.fill"
static let unlock: String = "lock.slash"
static let unlock: String = "lock.open"
static let remove: String = "xmark.bin"
static let removeFill: String = "xmark.bin.fill"
static let restore: String = "arrow.up.bin"
Expand Down
4 changes: 3 additions & 1 deletion Mlem/App/Configuration/User Settings/CodableSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import UIKit
/// Mirror of Settings but without any AppStorage complexity and fully optionalized.
struct CodableSettings: Codable {
// MARK: Settings saved in AppStorage

var a11y_readPostIndicator: ReadPostIndicator
var a11y_readOutlineThickness: Int
var a11y_websiteThumbnailIcon: Bool
Expand Down Expand Up @@ -88,6 +89,7 @@ struct CodableSettings: Codable {
var filters_keywordFilterEnabled: Bool

// MARK: Settings saved in files

var filteredKeywords: Set<String>

// swiftlint:disable line_length function_body_length
Expand Down Expand Up @@ -231,8 +233,8 @@ struct CodableSettings: Codable {
self.post_webPreview_showIcon = true
self.profile_showBanner = true
self.safety_blurNsfw = settings.blurNsfw
self.safety_enableModlogWarning = true
self.safety_enableNsfwCommunityWarning = settings.showNsfwCommunityWarning
self.safety_enableModlogWarning = settings.showModlogWarning
self.tab_gestures_enableLongPress = true
self.tab_gestures_enableSwipeUp = true
self.tab_profile_labelType = "nickname"
Expand Down
2 changes: 2 additions & 0 deletions Mlem/App/Configuration/User Settings/Settings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class Settings: ObservableObject {

@AppStorage("safety.blurNsfw") var blurNsfw: NsfwBlurBehavior = .always
@AppStorage("safety.showNsfwCommunityWarning") var showNsfwCommunityWarning: Bool = true
@AppStorage("safety.showModlogWarning") var showModlogWarning: Bool = true

@AppStorage("privacy.autoBypassImageProxy") var autoBypassImageProxy: Bool = false

Expand Down Expand Up @@ -139,6 +140,7 @@ class Settings: ObservableObject {
developerMode = settings.dev_developerMode
blurNsfw = settings.safety_blurNsfw
showNsfwCommunityWarning = settings.safety_enableNsfwCommunityWarning
showModlogWarning = settings.safety_enableModlogWarning
confirmImageUploads = settings.behavior_confirmImageUploads
openLinksInBrowser = settings.links_openInBrowser
openLinksInReaderMode = settings.links_readerMode
Expand Down
Loading

0 comments on commit 64aa346

Please sign in to comment.