commit e587f4700a491aff805dd5d35e9ebf5630d80f4b
parent 58a13fe5be925e7d92526bc68683f0ded58c4126
Author: authorisation <64337177+authorisation@users.noreply.github.com>
Date:   Sat,  2 Sep 2023 19:53:37 +0200

chore: fine tuning to style

* reduced notices
* rewrote some strings

Diffstat:
Mapp/src/main/kotlin/me/rhunk/snapenhance/ui/manager/sections/features/FeaturesSection.kt | 10++++++++--
Mcore/src/main/assets/lang/en_US.json | 17++++++++---------
Mcore/src/main/kotlin/me/rhunk/snapenhance/core/config/ConfigObjects.kt | 6++----
Mcore/src/main/kotlin/me/rhunk/snapenhance/core/config/impl/Camera.kt | 4++--
Mcore/src/main/kotlin/me/rhunk/snapenhance/core/config/impl/DownloaderConfig.kt | 2+-
Mcore/src/main/kotlin/me/rhunk/snapenhance/core/config/impl/Experimental.kt | 4++--
Mcore/src/main/kotlin/me/rhunk/snapenhance/core/config/impl/Global.kt | 6+++---
Mcore/src/main/kotlin/me/rhunk/snapenhance/core/config/impl/MessagingTweaks.kt | 2+-
Mcore/src/main/kotlin/me/rhunk/snapenhance/core/config/impl/UserInterfaceTweaks.kt | 2+-
9 files changed, 28 insertions(+), 25 deletions(-)

diff --git a/app/src/main/kotlin/me/rhunk/snapenhance/ui/manager/sections/features/FeaturesSection.kt b/app/src/main/kotlin/me/rhunk/snapenhance/ui/manager/sections/features/FeaturesSection.kt @@ -76,6 +76,7 @@ import kotlinx.coroutines.launch import me.rhunk.snapenhance.core.config.ConfigContainer import me.rhunk.snapenhance.core.config.ConfigFlag import me.rhunk.snapenhance.core.config.DataProcessors +import me.rhunk.snapenhance.core.config.FeatureNotice import me.rhunk.snapenhance.core.config.PropertyKey import me.rhunk.snapenhance.core.config.PropertyPair import me.rhunk.snapenhance.core.config.PropertyValue @@ -301,6 +302,12 @@ class FeaturesSection : Section() { @Composable private fun PropertyCard(property: PropertyPair<*>) { var clickCallback by remember { mutableStateOf<ClickCallback?>(null) } + val noticeColorMap = mapOf( + FeatureNotice.UNSTABLE.key to Color(0xFFFFFB87), + FeatureNotice.BAN_RISK.key to Color(0xFFFF8585), + FeatureNotice.INTERNAL_BEHAVIOR.key to Color(0xFFFFFB87) + ) + Card( modifier = Modifier .fillMaxWidth() @@ -356,13 +363,12 @@ class FeaturesSection : Section() { }.forEach { Text( text = context.translation["features.notices.${it.key}"], - color = Color.Yellow, + color = noticeColorMap[it.key] ?: Color(0xFFFFFB87), fontSize = 12.sp, lineHeight = 15.sp ) } } - Row( modifier = Modifier .align(Alignment.CenterVertically) diff --git a/core/src/main/assets/lang/en_US.json b/core/src/main/assets/lang/en_US.json @@ -77,15 +77,14 @@ "features": { "notices": { - "unstable": "This feature is unstable and may cause issues", - "may_ban": "This feature may cause bans", - "may_break_internal_behavior": "This may break Snapchat internal behavior", - "may_cause_crashes": "This may cause instability" + "unstable": "\u26A0 Unstable", + "ban_risk": "\u26A0 This feature may cause bans", + "internal_behavior": "\u26A0 This may break Snapchat internal behavior" }, "properties": { "downloader": { "name": "Downloader", - "description": "Download Snaps and Stories", + "description": "Download Snapchat Media", "properties": { "save_folder": { "name": "Save Folder", @@ -193,7 +192,7 @@ }, "2d_bitmoji_selfie": { "name": "2D Bitmoji Selfie", - "description": "Brings back the 2D selfie from older Snapchat versions\nYou need to clean the Snapchat cache from debug for this to take effect" + "description": "Brings back the 2D Bitmoji selfies from older Snapchat versions\nYou may need to clean the Snapchat cache for this to take effect" }, "disable_spotlight": { "name": "Disable Spotlight", @@ -277,7 +276,7 @@ }, "global": { "name": "Global", - "description": "Tweak Snapchat Globally", + "description": "Tweak Global Snapchat Settings", "properties": { "snapchat_plus": { "name": "Snapchat Plus", @@ -315,7 +314,7 @@ }, "rules": { "name": "Rules", - "description": "Manage Automatic Features\nThe social tab lets you assign a rule to an object" + "description": "Manage Automatic Features for individual people" }, "camera": { "name": "Camera", @@ -349,7 +348,7 @@ }, "streaks_reminder": { "name": "Streaks Reminder", - "description": "Reminds you to keep your streaks", + "description": "Periodically notifies you about your Streaks", "properties": { "interval": { "name": "Interval", diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/config/ConfigObjects.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/config/ConfigObjects.kt @@ -3,7 +3,6 @@ package me.rhunk.snapenhance.core.config import me.rhunk.snapenhance.core.bridge.wrapper.LocaleWrapper import kotlin.reflect.KProperty - data class PropertyPair<T>( val key: PropertyKey<T>, val value: PropertyValue<*> @@ -16,9 +15,8 @@ enum class FeatureNotice( val key: String ) { UNSTABLE(0b0001, "unstable"), - MAY_BAN(0b0010, "may_ban"), - MAY_BREAK_INTERNAL_BEHAVIOR(0b0100, "may_break_internal_behavior"), - MAY_CAUSE_CRASHES(0b1000, "may_cause_crashes"); + BAN_RISK(0b0010, "ban_risk"), + INTERNAL_BEHAVIOR(0b0100, "internal_behavior") } enum class ConfigFlag( diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/config/impl/Camera.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/config/impl/Camera.kt @@ -7,13 +7,13 @@ import me.rhunk.snapenhance.features.impl.tweaks.CameraTweaks class Camera : ConfigContainer() { val disable = boolean("disable_camera") - val immersiveCameraPreview = boolean("immersive_camera_preview") { addNotices(FeatureNotice.MAY_CAUSE_CRASHES) } + val immersiveCameraPreview = boolean("immersive_camera_preview") { addNotices(FeatureNotice.UNSTABLE) } val overridePreviewResolution = unique("override_preview_resolution", *CameraTweaks.resolutions.toTypedArray()) { addFlags(ConfigFlag.NO_TRANSLATE) } val overridePictureResolution = unique("override_picture_resolution", *CameraTweaks.resolutions.toTypedArray()) { addFlags(ConfigFlag.NO_TRANSLATE) } val customFrameRate = unique("custom_frame_rate", "5", "10", "20", "25", "30", "48", "60", "90", "120" - ) { addNotices(FeatureNotice.MAY_BREAK_INTERNAL_BEHAVIOR); addFlags(ConfigFlag.NO_TRANSLATE) } + ) { addNotices(FeatureNotice.UNSTABLE); addFlags(ConfigFlag.NO_TRANSLATE) } val forceCameraSourceEncoding = boolean("force_camera_source_encoding") } diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/config/impl/DownloaderConfig.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/config/impl/DownloaderConfig.kt @@ -34,7 +34,7 @@ class DownloaderConfig : ConfigContainer() { "append_date_time", ).apply { set(mutableListOf("append_hash", "append_date_time", "append_type", "append_username")) } val allowDuplicate = boolean("allow_duplicate") - val mergeOverlays = boolean("merge_overlays") { addNotices(FeatureNotice.MAY_CAUSE_CRASHES) } + val mergeOverlays = boolean("merge_overlays") { addNotices(FeatureNotice.UNSTABLE) } val forceImageFormat = unique("force_image_format", "jpg", "png", "webp") { addFlags(ConfigFlag.NO_TRANSLATE) } diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/config/impl/Experimental.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/config/impl/Experimental.kt @@ -10,7 +10,7 @@ class Experimental : ConfigContainer() { val appLockOnResume = boolean("app_lock_on_resume") val infiniteStoryBoost = boolean("infinite_story_boost") val meoPasscodeBypass = boolean("meo_passcode_bypass") - val unlimitedMultiSnap = boolean("unlimited_multi_snap") { addNotices(FeatureNotice.MAY_BAN)} + val unlimitedMultiSnap = boolean("unlimited_multi_snap") { addNotices(FeatureNotice.BAN_RISK)} val noFriendScoreDelay = boolean("no_friend_score_delay") val addFriendSourceSpoof = unique("add_friend_source_spoof", "added_by_username", @@ -18,5 +18,5 @@ class Experimental : ConfigContainer() { "added_by_group_chat", "added_by_qr_code", "added_by_community", - ) { addNotices(FeatureNotice.MAY_BAN) } + ) { addNotices(FeatureNotice.BAN_RISK) } } \ No newline at end of file diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/config/impl/Global.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/config/impl/Global.kt @@ -4,11 +4,11 @@ import me.rhunk.snapenhance.core.config.ConfigContainer import me.rhunk.snapenhance.core.config.FeatureNotice class Global : ConfigContainer() { - val snapchatPlus = boolean("snapchat_plus") { addNotices(FeatureNotice.MAY_BAN) } + val snapchatPlus = boolean("snapchat_plus") { addNotices(FeatureNotice.BAN_RISK) } val disableMetrics = boolean("disable_metrics") val blockAds = boolean("block_ads") - val disableVideoLengthRestrictions = boolean("disable_video_length_restrictions") { addNotices(FeatureNotice.MAY_BAN) } + val disableVideoLengthRestrictions = boolean("disable_video_length_restrictions") { addNotices(FeatureNotice.BAN_RISK) } val disableGooglePlayDialogs = boolean("disable_google_play_dialogs") val forceMediaSourceQuality = boolean("force_media_source_quality") - val disableSnapSplitting = boolean("disable_snap_splitting") { addNotices(FeatureNotice.MAY_BREAK_INTERNAL_BEHAVIOR) } + val disableSnapSplitting = boolean("disable_snap_splitting") { addNotices(FeatureNotice.INTERNAL_BEHAVIOR) } } \ No newline at end of file diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/config/impl/MessagingTweaks.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/config/impl/MessagingTweaks.kt @@ -24,7 +24,7 @@ class MessagingTweaks : ConfigContainer() { val notificationBlacklist = multiple("notification_blacklist", *NotificationType.getIncomingValues().map { it.key }.toTypedArray()) { customOptionTranslationPath = "features.options.notifications" } - val messageLogger = boolean("message_logger") { addNotices(FeatureNotice.MAY_CAUSE_CRASHES) } + val messageLogger = boolean("message_logger") { addNotices(FeatureNotice.UNSTABLE) } val galleryMediaSendOverride = boolean("gallery_media_send_override") val messagePreviewLength = integer("message_preview_length", defaultValue = 20) } \ No newline at end of file diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/config/impl/UserInterfaceTweaks.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/config/impl/UserInterfaceTweaks.kt @@ -33,6 +33,6 @@ class UserInterfaceTweaks : ConfigContainer() { "ngs_community_icon_container", "ngs_spotlight_icon_container", "ngs_search_icon_container" - ) { addNotices(FeatureNotice.MAY_BREAK_INTERNAL_BEHAVIOR) } + ) { addNotices(FeatureNotice.INTERNAL_BEHAVIOR) } val storyViewerOverride = unique("story_viewer_override", "DISCOVER_PLAYBACK_SEEKBAR", "VERTICAL_STORY_VIEWER") { addNotices(FeatureNotice.UNSTABLE) } }