Use ExpandableText
This commit is contained in:
parent
092084cb56
commit
816cec03c0
@ -17,8 +17,8 @@
|
||||
3D13F9692B389FA300E91913 /* ViewOffsetKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D13F9682B389FA300E91913 /* ViewOffsetKey.swift */; };
|
||||
3D13F96F2B38A32500E91913 /* StickyHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D13F96E2B38A32500E91913 /* StickyHeaderView.swift */; };
|
||||
3D16FC3C2B2CDFB500E6D8B3 /* DashboardLibraryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D16FC3B2B2CDFB500E6D8B3 /* DashboardLibraryView.swift */; };
|
||||
3D21F4292B69A8B0007207D2 /* ExpandableText in Frameworks */ = {isa = PBXBuildFile; productRef = 3D21F4282B69A8B0007207D2 /* ExpandableText */; };
|
||||
3D3816C92B4B5648006414D7 /* ItemGenresView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D3816C82B4B5648006414D7 /* ItemGenresView.swift */; };
|
||||
3D3816CE2B4B78BB006414D7 /* VisibilityTrackingScrollView in Frameworks */ = {isa = PBXBuildFile; productRef = 3D3816CD2B4B78BB006414D7 /* VisibilityTrackingScrollView */; };
|
||||
3D41D1FA2B2CAE0000E58234 /* ItemIconView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D41D1F92B2CAE0000E58234 /* ItemIconView.swift */; };
|
||||
3D4C15722B3CAA670035373E /* DashboardSectionTitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D4C15712B3CAA670035373E /* DashboardSectionTitleView.swift */; };
|
||||
3D58F07E2B4DB19300DB2936 /* TextRatingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D58F07D2B4DB19300DB2936 /* TextRatingView.swift */; };
|
||||
@ -133,8 +133,8 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3D21F4292B69A8B0007207D2 /* ExpandableText in Frameworks */,
|
||||
3D13F95C2B375A9E00E91913 /* NukeUI in Frameworks */,
|
||||
3D3816CE2B4B78BB006414D7 /* VisibilityTrackingScrollView in Frameworks */,
|
||||
3D77093B2B29139700199889 /* PulseUI in Frameworks */,
|
||||
3D7709392B29139700199889 /* Pulse in Frameworks */,
|
||||
3D9064592B27E4C70063DD2A /* JellyfinKit in Frameworks */,
|
||||
@ -359,7 +359,7 @@
|
||||
3D77093A2B29139700199889 /* PulseUI */,
|
||||
3D13F9592B375A9E00E91913 /* Nuke */,
|
||||
3D13F95B2B375A9E00E91913 /* NukeUI */,
|
||||
3D3816CD2B4B78BB006414D7 /* VisibilityTrackingScrollView */,
|
||||
3D21F4282B69A8B0007207D2 /* ExpandableText */,
|
||||
);
|
||||
productName = Jel;
|
||||
productReference = 3D9063C72B279A310063DD2A /* Jel.app */;
|
||||
@ -436,7 +436,7 @@
|
||||
packageReferences = (
|
||||
3D7709372B29139700199889 /* XCRemoteSwiftPackageReference "Pulse" */,
|
||||
3D13F9582B375A9E00E91913 /* XCRemoteSwiftPackageReference "Nuke" */,
|
||||
3D3816CC2B4B78BA006414D7 /* XCRemoteSwiftPackageReference "VisibilityTrackingScrollView" */,
|
||||
3D21F4272B69A8B0007207D2 /* XCRemoteSwiftPackageReference "ExpandableText" */,
|
||||
);
|
||||
productRefGroup = 3D9063C82B279A310063DD2A /* Products */;
|
||||
projectDirPath = "";
|
||||
@ -890,12 +890,12 @@
|
||||
minimumVersion = 12.2.0;
|
||||
};
|
||||
};
|
||||
3D3816CC2B4B78BA006414D7 /* XCRemoteSwiftPackageReference "VisibilityTrackingScrollView" */ = {
|
||||
3D21F4272B69A8B0007207D2 /* XCRemoteSwiftPackageReference "ExpandableText" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/elegantchaos/VisibilityTrackingScrollView";
|
||||
repositoryURL = "https://github.com/n3d1117/ExpandableText?tab=readme-ov-file";
|
||||
requirement = {
|
||||
kind = upToNextMinorVersion;
|
||||
minimumVersion = 1.0.0;
|
||||
branch = main;
|
||||
kind = branch;
|
||||
};
|
||||
};
|
||||
3D7709372B29139700199889 /* XCRemoteSwiftPackageReference "Pulse" */ = {
|
||||
@ -919,10 +919,10 @@
|
||||
package = 3D13F9582B375A9E00E91913 /* XCRemoteSwiftPackageReference "Nuke" */;
|
||||
productName = NukeUI;
|
||||
};
|
||||
3D3816CD2B4B78BB006414D7 /* VisibilityTrackingScrollView */ = {
|
||||
3D21F4282B69A8B0007207D2 /* ExpandableText */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 3D3816CC2B4B78BA006414D7 /* XCRemoteSwiftPackageReference "VisibilityTrackingScrollView" */;
|
||||
productName = VisibilityTrackingScrollView;
|
||||
package = 3D21F4272B69A8B0007207D2 /* XCRemoteSwiftPackageReference "ExpandableText" */;
|
||||
productName = ExpandableText;
|
||||
};
|
||||
3D7709382B29139700199889 /* Pulse */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
|
@ -1,6 +1,15 @@
|
||||
{
|
||||
"object": {
|
||||
"pins": [
|
||||
{
|
||||
"package": "ExpandableText",
|
||||
"repositoryURL": "https://github.com/n3d1117/ExpandableText?tab=readme-ov-file",
|
||||
"state": {
|
||||
"branch": "main",
|
||||
"revision": "2b0dd2f3d2870fe933ffe5c2ee057d2e9fa647e2",
|
||||
"version": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "Get",
|
||||
"repositoryURL": "https://github.com/kean/Get",
|
||||
@ -36,15 +45,6 @@
|
||||
"revision": "4ce950479707ea109f229d7230ec074a133b15d7",
|
||||
"version": "0.2.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "VisibilityTrackingScrollView",
|
||||
"repositoryURL": "https://github.com/elegantchaos/VisibilityTrackingScrollView",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "9a5788298a1e238ed1e1f51b195a1296125a5a8c",
|
||||
"version": "1.0.3"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
import SwiftUI
|
||||
import JellyfinKit
|
||||
import VisibilityTrackingScrollView
|
||||
import ExpandableText
|
||||
|
||||
struct ItemMediaView: View {
|
||||
@EnvironmentObject var jellyfinClient: JellyfinClientController
|
||||
@ -22,9 +22,8 @@ struct ItemMediaView: View {
|
||||
.font(.headline)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
|
||||
ForEach(item.overview?.components(separatedBy: "<br>") ?? [], id: \.self) {overview in
|
||||
Text(overview)
|
||||
}
|
||||
ExpandableText((item.overview ?? "").replacingOccurrences(of: "<br>", with: ""))
|
||||
.lineLimit(8)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
import SwiftUI
|
||||
import JellyfinKit
|
||||
import ExpandableText
|
||||
|
||||
struct ItemPersonViewItemsRow: View {
|
||||
var items: [BaseItemDto]
|
||||
@ -45,7 +46,8 @@ struct ItemPersonView: View {
|
||||
.padding()
|
||||
|
||||
if let overview = item.overview {
|
||||
Text(overview)
|
||||
ExpandableText(overview)
|
||||
.lineLimit(8)
|
||||
.padding([.horizontal, .bottom])
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user