-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: 82Flex <[email protected]>
- Loading branch information
Showing
21 changed files
with
203 additions
and
90 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,19 @@ | ||
// | ||
// View+ForegroundStyle.swift | ||
// Reveil | ||
// | ||
// Created by Lessica on 2024/1/8. | ||
// | ||
|
||
import SwiftUI | ||
|
||
extension View { | ||
@ViewBuilder | ||
func foregroundStyle(accent: Bool) -> some View { | ||
if #available(iOS 15.0, *), accent { | ||
self.foregroundStyle(.accent) | ||
} else { | ||
self | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
Reveil/Extensions/Backports/View+ListSectionSeparator.swift
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,37 @@ | ||
// | ||
// View+ListSectionSeparator.swift | ||
// Reveil | ||
// | ||
// Created by Lessica on 2024/1/8. | ||
// | ||
|
||
import SwiftUI | ||
|
||
extension View { | ||
@ViewBuilder | ||
func listSectionSeparator(hidden: Bool = true) -> some View { | ||
if #available(iOS 15.0, *) { | ||
self.listSectionSeparator(hidden ? .hidden : .visible, edges: .all) | ||
} else { | ||
self | ||
} | ||
} | ||
|
||
@ViewBuilder | ||
func listSectionSeparator(topHidden: Bool = true) -> some View { | ||
if #available(iOS 15.0, *) { | ||
self.listSectionSeparator(topHidden ? .hidden : .visible, edges: .top) | ||
} else { | ||
self | ||
} | ||
} | ||
|
||
@ViewBuilder | ||
func listSectionSeparator(bottomHidden: Bool = true) -> some View { | ||
if #available(iOS 15.0, *) { | ||
self.listSectionSeparator(bottomHidden ? .hidden : .visible, edges: .bottom) | ||
} else { | ||
self | ||
} | ||
} | ||
} |
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,19 @@ | ||
// | ||
// View+Material.swift | ||
// Reveil | ||
// | ||
// Created by Lessica on 2024/1/8. | ||
// | ||
|
||
import SwiftUI | ||
|
||
extension View { | ||
@ViewBuilder | ||
func background(thinMaterial: Bool) -> some View { | ||
if #available(iOS 15.0, *), thinMaterial { | ||
self.background(.thinMaterial) | ||
} else { | ||
self | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.
f63d91a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
omg