-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
186 additions
and
39 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
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,49 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>StringsTable</key> | ||
<string>Root</string> | ||
<key>PreferenceSpecifiers</key> | ||
<array> | ||
<dict> | ||
<key>Type</key> | ||
<string>PSGroupSpecifier</string> | ||
<key>Title</key> | ||
<string>Performance</string> | ||
<key>FooterText</key> | ||
<string>Restart “Reveil” to make things happen.</string> | ||
</dict> | ||
<dict> | ||
<key>Type</key> | ||
<string>PSToggleSwitchSpecifier</string> | ||
<key>Title</key> | ||
<string>Animated Text</string> | ||
<key>Key</key> | ||
<string>AnimatedText</string> | ||
<key>DefaultValue</key> | ||
<true/> | ||
</dict> | ||
<dict> | ||
<key>Type</key> | ||
<string>PSToggleSwitchSpecifier</string> | ||
<key>Title</key> | ||
<string>Animated Background</string> | ||
<key>Key</key> | ||
<string>AnimatedBackground</string> | ||
<key>DefaultValue</key> | ||
<true/> | ||
</dict> | ||
<dict> | ||
<key>Type</key> | ||
<string>PSToggleSwitchSpecifier</string> | ||
<key>Title</key> | ||
<string>Limit Frame Rate to 30</string> | ||
<key>Key</key> | ||
<string>LowFrameRate</string> | ||
<key>DefaultValue</key> | ||
<false/> | ||
</dict> | ||
</array> | ||
</dict> | ||
</plist> |
Binary file not shown.
Binary file not shown.
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,3 +1,10 @@ | ||
// | ||
// AppCodableStorage.swift | ||
// Reveil | ||
// | ||
// Created by Lessica on 2023/10/14. | ||
// | ||
|
||
import SwiftUI | ||
|
||
@MainActor | ||
|
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
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,36 @@ | ||
// | ||
// StandardUserDefaults.swift | ||
// Reveil | ||
// | ||
// Created by Lessica on 2024/1/1. | ||
// | ||
|
||
import Foundation | ||
|
||
private let gDefaultsKeyAnimatedText = "AnimatedText" | ||
private let gDefaultsKeyAnimatedBackground = "AnimatedBackground" | ||
private let gDefaultsKeyLowFrameRate = "LowFrameRate" | ||
|
||
class StandardUserDefaults { | ||
static let shared = StandardUserDefaults() | ||
|
||
private init() { | ||
UserDefaults.standard.register(defaults: [ | ||
gDefaultsKeyAnimatedText: true, | ||
gDefaultsKeyAnimatedBackground: true, | ||
gDefaultsKeyLowFrameRate: false, | ||
]) | ||
} | ||
|
||
lazy var isAnimatedTextEnabled: Bool = { | ||
UserDefaults.standard.bool(forKey: gDefaultsKeyAnimatedText) | ||
}() | ||
|
||
lazy var isAnimatedBackgroundEnabled: Bool = { | ||
UserDefaults.standard.bool(forKey: gDefaultsKeyAnimatedBackground) | ||
}() | ||
|
||
lazy var isLowFrameRateEnabled: Bool = { | ||
UserDefaults.standard.bool(forKey: gDefaultsKeyLowFrameRate) | ||
}() | ||
} |
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
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