From 664c12d2c39106eea81bab2e014d55af5fbba197 Mon Sep 17 00:00:00 2001 From: Marcin Czachursk Date: Fri, 7 Apr 2023 18:58:15 +0200 Subject: [PATCH] Create share extension compose view --- ClientKit/Package.swift | 5 +- .../AccountData+AccountModel.swift | 0 CoreData/ApplicationSettingsHandler.swift | 30 +++ EnvironmentKit/Package.swift | 5 +- PixelfedKit/Package.swift | 6 +- ServicesKit/Package.swift | 7 +- .../AccentColor.colorset/Contents.json | 0 .../AccentColor1.colorset/Contents.json | 12 +- .../AccentColor10.colorset/Contents.json | 6 +- .../AccentColor2.colorset/Contents.json | 0 .../AccentColor3.colorset/Contents.json | 6 +- .../AccentColor4.colorset/Contents.json | 6 +- .../AccentColor5.colorset/Contents.json | 6 +- .../AccentColor6.colorset/Contents.json | 6 +- .../AccentColor7.colorset/Contents.json | 6 +- .../AccentColor8.colorset/Contents.json | 6 +- .../AccentColor9.colorset/Contents.json | 6 +- .../AccentColors/Contents.json | 0 .../Avatar.imageset/Contents.json | 0 .../Avatar.imageset/avatar.png | Bin .../Avatar.imageset/avatar@2x.png | Bin .../Avatar.imageset/avatar@3x.png | Bin .../Blurhash.imageset/Blurhash.png | Bin .../Blurhash.imageset/Blurhash@2x.png | Bin .../Blurhash.imageset/Blurhash@3x.png | Bin .../Blurhash.imageset/Contents.json | 0 SharedAssets.xcassets/Contents.json | 6 + .../DangerColor.colorset/Contents.json | 38 +++ .../ImagePlaceholder.imageset/Contents.json | 0 .../ImagePlaceholder.png | Bin .../ImagePlaceholder@2x.png | Bin .../ImagePlaceholder@3x.png | Bin .../ImagePlaceholderLight.png | Bin .../ImagePlaceholderLight@2x.png | Bin .../ImagePlaceholderLight@3x.png | Bin .../KeyboardToolbar.colorset}/Contents.json | 12 +- .../LightGrayColor.colorset}/Contents.json | 12 +- .../MainTextColor.colorset/Contents.json | 38 +++ .../SelectedRowColor.colorset/Contents.json | 38 +++ .../Contents.json | 12 +- .../ViewTextColor.colorset/Contents.json | 38 +++ Vernissage.xcodeproj/project.pbxproj | 159 ++++++------- Vernissage/AppRouteur.swift | 1 + .../DangerColor.colorset/Contents.json | 38 --- .../Contents.json | 38 --- .../lightGrayColor.colorset/Contents.json | 38 --- .../mainTextColor.colorset/Contents.json | 38 --- Vernissage/Extensions/View+Keyboard.swift | 1 - Vernissage/Services/RouterPath.swift | 1 + Vernissage/VernissageApp.swift | 31 +-- .../Views/{ComposeView => }/ComposeView.swift | 0 VernissageShareExtension/ComposeView.swift | 225 ++++++------------ .../ShareViewController.swift | 63 +++-- WidgetsKit/Package.swift | 13 +- .../WidgetsKit}/Extensions/String+Date.swift | 4 +- .../WidgetsKit}/Extensions/String+Empty.swift | 2 +- .../Extensions/String+Random.swift | 2 +- .../WidgetsKit}/Extensions/UIFont+Font.swift | 0 .../Extensions/UIImage+Blurhash.swift | 2 +- .../WidgetsKit}/Extensions/UIImage+Jpeg.swift | 6 +- .../WidgetsKit}/Extensions/UIImage+Size.swift | 4 +- .../Extensions/View+Transition.swift | 2 +- .../WidgetsKit}/Models/PhotoAttachment.swift | 8 +- .../WidgetsKit/TextView/TextModel.swift | 7 +- .../ViewModifiers/ClearButton.swift | 0 .../ViewModifiers/FirstAppear.swift | 0 .../ViewModifiers/NavigationMenu.swift | 0 .../WidgetsKit/Views}/ImageUploadView.swift | 6 +- .../WidgetsKit}/Views/PhotoEditorView.swift | 9 +- .../WidgetsKit}/Views/PlaceSelectorView.swift | 9 +- .../{ => Widgets}/ActionButton.swift | 0 .../WidgetsKit/{ => Widgets}/ActionMenu.swift | 0 .../{ => Widgets}/BlurredImage.swift | 2 +- .../{ => Widgets}/BottomRight.swift | 0 .../{ => Widgets}/ContentWarning.swift | 0 .../WidgetsKit/{ => Widgets}/ErrorView.swift | 0 .../{ => Widgets}/FavouriteTouch.swift | 0 .../WidgetsKit/{ => Widgets}/LabelIcon.swift | 0 .../{ => Widgets}/LoadingIndicator.swift | 0 .../{ => Widgets}/MarkdownFormattedText.swift | 0 .../WidgetsKit/{ => Widgets}/NoDataView.swift | 0 .../WidgetsKit/{ => Widgets}/TagWidget.swift | 0 .../{ => Widgets}/TextInputField.swift | 0 .../WidgetsKit/{ => Widgets}/UserAvatar.swift | 0 .../{ => Widgets}/UsernameRow.swift | 0 85 files changed, 493 insertions(+), 523 deletions(-) rename {Vernissage/Extensions => CoreData}/AccountData+AccountModel.swift (100%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/AccentColors/AccentColor.colorset/Contents.json (100%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/AccentColors/AccentColor1.colorset/Contents.json (76%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/AccentColors/AccentColor10.colorset/Contents.json (88%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/AccentColors/AccentColor2.colorset/Contents.json (100%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/AccentColors/AccentColor3.colorset/Contents.json (88%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/AccentColors/AccentColor4.colorset/Contents.json (88%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/AccentColors/AccentColor5.colorset/Contents.json (91%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/AccentColors/AccentColor6.colorset/Contents.json (88%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/AccentColors/AccentColor7.colorset/Contents.json (88%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/AccentColors/AccentColor8.colorset/Contents.json (88%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/AccentColors/AccentColor9.colorset/Contents.json (88%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/AccentColors/Contents.json (100%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/Avatar.imageset/Contents.json (100%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/Avatar.imageset/avatar.png (100%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/Avatar.imageset/avatar@2x.png (100%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/Avatar.imageset/avatar@3x.png (100%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/Blurhash.imageset/Blurhash.png (100%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/Blurhash.imageset/Blurhash@2x.png (100%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/Blurhash.imageset/Blurhash@3x.png (100%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/Blurhash.imageset/Contents.json (100%) create mode 100644 SharedAssets.xcassets/Contents.json create mode 100644 SharedAssets.xcassets/DangerColor.colorset/Contents.json rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/ImagePlaceholder.imageset/Contents.json (100%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/ImagePlaceholder.imageset/ImagePlaceholder.png (100%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/ImagePlaceholder.imageset/ImagePlaceholder@2x.png (100%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/ImagePlaceholder.imageset/ImagePlaceholder@3x.png (100%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/ImagePlaceholder.imageset/ImagePlaceholderLight.png (100%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/ImagePlaceholder.imageset/ImagePlaceholderLight@2x.png (100%) rename {Vernissage/Assets.xcassets => SharedAssets.xcassets}/ImagePlaceholder.imageset/ImagePlaceholderLight@3x.png (100%) rename {Vernissage/Assets.xcassets/SelectedRowColor.colorset => SharedAssets.xcassets/KeyboardToolbar.colorset}/Contents.json (76%) rename {Vernissage/Assets.xcassets/KeyboardToolbar.colorset => SharedAssets.xcassets/LightGrayColor.colorset}/Contents.json (76%) create mode 100644 SharedAssets.xcassets/MainTextColor.colorset/Contents.json create mode 100644 SharedAssets.xcassets/SelectedRowColor.colorset/Contents.json rename {Vernissage/Assets.xcassets/ViewTextColor.colorset => SharedAssets.xcassets/ViewBackgroundColor.colorset}/Contents.json (88%) create mode 100644 SharedAssets.xcassets/ViewTextColor.colorset/Contents.json delete mode 100644 Vernissage/Assets.xcassets/DangerColor.colorset/Contents.json delete mode 100644 Vernissage/Assets.xcassets/ViewBackgroundColor.colorset/Contents.json delete mode 100644 Vernissage/Assets.xcassets/lightGrayColor.colorset/Contents.json delete mode 100644 Vernissage/Assets.xcassets/mainTextColor.colorset/Contents.json rename Vernissage/Views/{ComposeView => }/ComposeView.swift (100%) rename {Vernissage => WidgetsKit/Sources/WidgetsKit}/Extensions/String+Date.swift (98%) rename {Vernissage => WidgetsKit/Sources/WidgetsKit}/Extensions/String+Empty.swift (89%) rename {Vernissage => WidgetsKit/Sources/WidgetsKit}/Extensions/String+Random.swift (93%) rename {Vernissage => WidgetsKit/Sources/WidgetsKit}/Extensions/UIFont+Font.swift (100%) rename {Vernissage => WidgetsKit/Sources/WidgetsKit}/Extensions/UIImage+Jpeg.swift (95%) rename {Vernissage => WidgetsKit/Sources/WidgetsKit}/Extensions/UIImage+Size.swift (96%) rename {Vernissage => WidgetsKit/Sources/WidgetsKit}/Extensions/View+Transition.swift (95%) rename {Vernissage => WidgetsKit/Sources/WidgetsKit}/Models/PhotoAttachment.swift (87%) rename {Vernissage => WidgetsKit/Sources/WidgetsKit}/ViewModifiers/ClearButton.swift (100%) rename {Vernissage => WidgetsKit/Sources/WidgetsKit}/ViewModifiers/FirstAppear.swift (100%) rename {Vernissage => WidgetsKit/Sources/WidgetsKit}/ViewModifiers/NavigationMenu.swift (100%) rename {Vernissage/Views/ComposeView/Subviews => WidgetsKit/Sources/WidgetsKit/Views}/ImageUploadView.swift (95%) rename {Vernissage => WidgetsKit/Sources/WidgetsKit}/Views/PhotoEditorView.swift (95%) rename {Vernissage => WidgetsKit/Sources/WidgetsKit}/Views/PlaceSelectorView.swift (96%) rename WidgetsKit/Sources/WidgetsKit/{ => Widgets}/ActionButton.swift (100%) rename WidgetsKit/Sources/WidgetsKit/{ => Widgets}/ActionMenu.swift (100%) rename WidgetsKit/Sources/WidgetsKit/{ => Widgets}/BlurredImage.swift (99%) rename WidgetsKit/Sources/WidgetsKit/{ => Widgets}/BottomRight.swift (100%) rename WidgetsKit/Sources/WidgetsKit/{ => Widgets}/ContentWarning.swift (100%) rename WidgetsKit/Sources/WidgetsKit/{ => Widgets}/ErrorView.swift (100%) rename WidgetsKit/Sources/WidgetsKit/{ => Widgets}/FavouriteTouch.swift (100%) rename WidgetsKit/Sources/WidgetsKit/{ => Widgets}/LabelIcon.swift (100%) rename WidgetsKit/Sources/WidgetsKit/{ => Widgets}/LoadingIndicator.swift (100%) rename WidgetsKit/Sources/WidgetsKit/{ => Widgets}/MarkdownFormattedText.swift (100%) rename WidgetsKit/Sources/WidgetsKit/{ => Widgets}/NoDataView.swift (100%) rename WidgetsKit/Sources/WidgetsKit/{ => Widgets}/TagWidget.swift (100%) rename WidgetsKit/Sources/WidgetsKit/{ => Widgets}/TextInputField.swift (100%) rename WidgetsKit/Sources/WidgetsKit/{ => Widgets}/UserAvatar.swift (100%) rename WidgetsKit/Sources/WidgetsKit/{ => Widgets}/UsernameRow.swift (100%) diff --git a/ClientKit/Package.swift b/ClientKit/Package.swift index 8661b61..6e7a9d5 100644 --- a/ClientKit/Package.swift +++ b/ClientKit/Package.swift @@ -25,7 +25,10 @@ let package = Package( // Targets can depend on other targets in this package, and on products in packages this package depends on. .target( name: "ClientKit", - dependencies: ["PixelfedKit"]), + dependencies: [ + .product(name: "PixelfedKit", package: "PixelfedKit") + ] + ), .testTarget( name: "ClientKitTests", dependencies: ["ClientKit"]) diff --git a/Vernissage/Extensions/AccountData+AccountModel.swift b/CoreData/AccountData+AccountModel.swift similarity index 100% rename from Vernissage/Extensions/AccountData+AccountModel.swift rename to CoreData/AccountData+AccountModel.swift diff --git a/CoreData/ApplicationSettingsHandler.swift b/CoreData/ApplicationSettingsHandler.swift index b2362d5..8a92576 100644 --- a/CoreData/ApplicationSettingsHandler.swift +++ b/CoreData/ApplicationSettingsHandler.swift @@ -36,6 +36,36 @@ class ApplicationSettingsHandler { } } + func update(applicationState: ApplicationState) { + let defaultSettings = ApplicationSettingsHandler.shared.get() + + if let tintColor = TintColor(rawValue: Int(defaultSettings.tintColor)) { + applicationState.tintColor = tintColor + } + + if let theme = Theme(rawValue: Int(defaultSettings.theme)) { + applicationState.theme = theme + } + + if let avatarShape = AvatarShape(rawValue: Int(defaultSettings.avatarShape)) { + applicationState.avatarShape = avatarShape + } + + applicationState.activeIcon = defaultSettings.activeIcon + applicationState.showSensitive = defaultSettings.showSensitive + applicationState.showPhotoDescription = defaultSettings.showPhotoDescription + + if let menuPosition = MenuPosition(rawValue: Int(defaultSettings.menuPosition)) { + applicationState.menuPosition = menuPosition + } + + applicationState.hapticTabSelectionEnabled = defaultSettings.hapticTabSelectionEnabled + applicationState.hapticRefreshEnabled = defaultSettings.hapticRefreshEnabled + applicationState.hapticButtonPressEnabled = defaultSettings.hapticButtonPressEnabled + applicationState.hapticAnimationEnabled = defaultSettings.hapticAnimationEnabled + applicationState.hapticNotificationEnabled = defaultSettings.hapticNotificationEnabled + } + func set(accountId: String?) { let defaultSettings = self.get() defaultSettings.currentAccount = accountId diff --git a/EnvironmentKit/Package.swift b/EnvironmentKit/Package.swift index 46abb1e..7a7e0cb 100644 --- a/EnvironmentKit/Package.swift +++ b/EnvironmentKit/Package.swift @@ -25,7 +25,10 @@ let package = Package( // Targets can depend on other targets in this package, and on products in packages this package depends on. .target( name: "EnvironmentKit", - dependencies: ["ClientKit"]), + dependencies: [ + .product(name: "ClientKit", package: "ClientKit") + ] + ), .testTarget( name: "EnvironmentKitTests", dependencies: ["EnvironmentKit"]) diff --git a/PixelfedKit/Package.swift b/PixelfedKit/Package.swift index 5631fa6..cc18133 100644 --- a/PixelfedKit/Package.swift +++ b/PixelfedKit/Package.swift @@ -28,7 +28,11 @@ let package = Package( // Targets can depend on other targets in this package, and on products in packages this package depends on. .target( name: "PixelfedKit", - dependencies: ["OAuthSwift", "HTML2Markdown"]), + dependencies: [ + .product(name: "OAuthSwift", package: "OAuthSwift"), + .product(name: "HTML2Markdown", package: "HTML2Markdown") + ] + ), .testTarget( name: "PixelfedKitTests", dependencies: ["PixelfedKit"]) diff --git a/ServicesKit/Package.swift b/ServicesKit/Package.swift index cc03b67..035dd13 100644 --- a/ServicesKit/Package.swift +++ b/ServicesKit/Package.swift @@ -28,7 +28,12 @@ let package = Package( // Targets can depend on other targets in this package, and on products in packages this package depends on. .target( name: "ServicesKit", - dependencies: ["Drops", "Nuke", "PixelfedKit", "EnvironmentKit"]), + dependencies: [ + .product(name: "Drops", package: "Drops"), + .product(name: "Nuke", package: "Nuke"), + .product(name: "NukeUI", package: "Nuke"), + .product(name: "EnvironmentKit", package: "EnvironmentKit") + ]), .testTarget( name: "ServicesKitTests", dependencies: ["ServicesKit"]) diff --git a/Vernissage/Assets.xcassets/AccentColors/AccentColor.colorset/Contents.json b/SharedAssets.xcassets/AccentColors/AccentColor.colorset/Contents.json similarity index 100% rename from Vernissage/Assets.xcassets/AccentColors/AccentColor.colorset/Contents.json rename to SharedAssets.xcassets/AccentColors/AccentColor.colorset/Contents.json diff --git a/Vernissage/Assets.xcassets/AccentColors/AccentColor1.colorset/Contents.json b/SharedAssets.xcassets/AccentColors/AccentColor1.colorset/Contents.json similarity index 76% rename from Vernissage/Assets.xcassets/AccentColors/AccentColor1.colorset/Contents.json rename to SharedAssets.xcassets/AccentColors/AccentColor1.colorset/Contents.json index 1470134..157acc2 100644 --- a/Vernissage/Assets.xcassets/AccentColors/AccentColor1.colorset/Contents.json +++ b/SharedAssets.xcassets/AccentColors/AccentColor1.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "85", - "green" : "123", - "red" : "238" + "blue" : "0.333", + "green" : "0.482", + "red" : "0.933" } }, "idiom" : "universal" @@ -23,9 +23,9 @@ "color-space" : "display-p3", "components" : { "alpha" : "1.000", - "blue" : "101", - "green" : "137", - "red" : "238" + "blue" : "0.396", + "green" : "0.537", + "red" : "0.933" } }, "idiom" : "universal" diff --git a/Vernissage/Assets.xcassets/AccentColors/AccentColor10.colorset/Contents.json b/SharedAssets.xcassets/AccentColors/AccentColor10.colorset/Contents.json similarity index 88% rename from Vernissage/Assets.xcassets/AccentColors/AccentColor10.colorset/Contents.json rename to SharedAssets.xcassets/AccentColors/AccentColor10.colorset/Contents.json index 6a9ad80..6463fe9 100644 --- a/Vernissage/Assets.xcassets/AccentColors/AccentColor10.colorset/Contents.json +++ b/SharedAssets.xcassets/AccentColors/AccentColor10.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "61", - "green" : "78", - "red" : "235" + "blue" : "0.239", + "green" : "0.306", + "red" : "0.922" } }, "idiom" : "universal" diff --git a/Vernissage/Assets.xcassets/AccentColors/AccentColor2.colorset/Contents.json b/SharedAssets.xcassets/AccentColors/AccentColor2.colorset/Contents.json similarity index 100% rename from Vernissage/Assets.xcassets/AccentColors/AccentColor2.colorset/Contents.json rename to SharedAssets.xcassets/AccentColors/AccentColor2.colorset/Contents.json diff --git a/Vernissage/Assets.xcassets/AccentColors/AccentColor3.colorset/Contents.json b/SharedAssets.xcassets/AccentColors/AccentColor3.colorset/Contents.json similarity index 88% rename from Vernissage/Assets.xcassets/AccentColors/AccentColor3.colorset/Contents.json rename to SharedAssets.xcassets/AccentColors/AccentColor3.colorset/Contents.json index eb76f13..b46a501 100644 --- a/Vernissage/Assets.xcassets/AccentColors/AccentColor3.colorset/Contents.json +++ b/SharedAssets.xcassets/AccentColors/AccentColor3.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "207", - "green" : "90", - "red" : "86" + "blue" : "0.812", + "green" : "0.353", + "red" : "0.337" } }, "idiom" : "universal" diff --git a/Vernissage/Assets.xcassets/AccentColors/AccentColor4.colorset/Contents.json b/SharedAssets.xcassets/AccentColors/AccentColor4.colorset/Contents.json similarity index 88% rename from Vernissage/Assets.xcassets/AccentColors/AccentColor4.colorset/Contents.json rename to SharedAssets.xcassets/AccentColors/AccentColor4.colorset/Contents.json index 478170a..7aad98b 100644 --- a/Vernissage/Assets.xcassets/AccentColors/AccentColor4.colorset/Contents.json +++ b/SharedAssets.xcassets/AccentColors/AccentColor4.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "215", - "green" : "90", - "red" : "163" + "blue" : "0.843", + "green" : "0.353", + "red" : "0.639" } }, "idiom" : "universal" diff --git a/Vernissage/Assets.xcassets/AccentColors/AccentColor5.colorset/Contents.json b/SharedAssets.xcassets/AccentColors/AccentColor5.colorset/Contents.json similarity index 91% rename from Vernissage/Assets.xcassets/AccentColors/AccentColor5.colorset/Contents.json rename to SharedAssets.xcassets/AccentColors/AccentColor5.colorset/Contents.json index 2f92c71..954552c 100644 --- a/Vernissage/Assets.xcassets/AccentColors/AccentColor5.colorset/Contents.json +++ b/SharedAssets.xcassets/AccentColors/AccentColor5.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "197", - "green" : "174", - "red" : "88" + "blue" : "0.773", + "green" : "0.682", + "red" : "0.345" } }, "idiom" : "universal" diff --git a/Vernissage/Assets.xcassets/AccentColors/AccentColor6.colorset/Contents.json b/SharedAssets.xcassets/AccentColors/AccentColor6.colorset/Contents.json similarity index 88% rename from Vernissage/Assets.xcassets/AccentColors/AccentColor6.colorset/Contents.json rename to SharedAssets.xcassets/AccentColors/AccentColor6.colorset/Contents.json index 93ea185..2d57900 100644 --- a/Vernissage/Assets.xcassets/AccentColors/AccentColor6.colorset/Contents.json +++ b/SharedAssets.xcassets/AccentColors/AccentColor6.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "102", - "green" : "195", - "red" : "101" + "blue" : "0.400", + "green" : "0.765", + "red" : "0.396" } }, "idiom" : "universal" diff --git a/Vernissage/Assets.xcassets/AccentColors/AccentColor7.colorset/Contents.json b/SharedAssets.xcassets/AccentColors/AccentColor7.colorset/Contents.json similarity index 88% rename from Vernissage/Assets.xcassets/AccentColors/AccentColor7.colorset/Contents.json rename to SharedAssets.xcassets/AccentColors/AccentColor7.colorset/Contents.json index fad688e..a87ca32 100644 --- a/Vernissage/Assets.xcassets/AccentColors/AccentColor7.colorset/Contents.json +++ b/SharedAssets.xcassets/AccentColors/AccentColor7.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "68", - "green" : "204", - "red" : "246" + "blue" : "0.267", + "green" : "0.800", + "red" : "0.965" } }, "idiom" : "universal" diff --git a/Vernissage/Assets.xcassets/AccentColors/AccentColor8.colorset/Contents.json b/SharedAssets.xcassets/AccentColors/AccentColor8.colorset/Contents.json similarity index 88% rename from Vernissage/Assets.xcassets/AccentColors/AccentColor8.colorset/Contents.json rename to SharedAssets.xcassets/AccentColors/AccentColor8.colorset/Contents.json index 5e50bde..072d606 100644 --- a/Vernissage/Assets.xcassets/AccentColors/AccentColor8.colorset/Contents.json +++ b/SharedAssets.xcassets/AccentColors/AccentColor8.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "54", - "green" : "152", - "red" : "241" + "blue" : "0.212", + "green" : "0.596", + "red" : "0.945" } }, "idiom" : "universal" diff --git a/Vernissage/Assets.xcassets/AccentColors/AccentColor9.colorset/Contents.json b/SharedAssets.xcassets/AccentColors/AccentColor9.colorset/Contents.json similarity index 88% rename from Vernissage/Assets.xcassets/AccentColors/AccentColor9.colorset/Contents.json rename to SharedAssets.xcassets/AccentColors/AccentColor9.colorset/Contents.json index d86e8b2..77bc6a5 100644 --- a/Vernissage/Assets.xcassets/AccentColors/AccentColor9.colorset/Contents.json +++ b/SharedAssets.xcassets/AccentColors/AccentColor9.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "90", - "green" : "68", - "red" : "235" + "blue" : "0.353", + "green" : "0.267", + "red" : "0.922" } }, "idiom" : "universal" diff --git a/Vernissage/Assets.xcassets/AccentColors/Contents.json b/SharedAssets.xcassets/AccentColors/Contents.json similarity index 100% rename from Vernissage/Assets.xcassets/AccentColors/Contents.json rename to SharedAssets.xcassets/AccentColors/Contents.json diff --git a/Vernissage/Assets.xcassets/Avatar.imageset/Contents.json b/SharedAssets.xcassets/Avatar.imageset/Contents.json similarity index 100% rename from Vernissage/Assets.xcassets/Avatar.imageset/Contents.json rename to SharedAssets.xcassets/Avatar.imageset/Contents.json diff --git a/Vernissage/Assets.xcassets/Avatar.imageset/avatar.png b/SharedAssets.xcassets/Avatar.imageset/avatar.png similarity index 100% rename from Vernissage/Assets.xcassets/Avatar.imageset/avatar.png rename to SharedAssets.xcassets/Avatar.imageset/avatar.png diff --git a/Vernissage/Assets.xcassets/Avatar.imageset/avatar@2x.png b/SharedAssets.xcassets/Avatar.imageset/avatar@2x.png similarity index 100% rename from Vernissage/Assets.xcassets/Avatar.imageset/avatar@2x.png rename to SharedAssets.xcassets/Avatar.imageset/avatar@2x.png diff --git a/Vernissage/Assets.xcassets/Avatar.imageset/avatar@3x.png b/SharedAssets.xcassets/Avatar.imageset/avatar@3x.png similarity index 100% rename from Vernissage/Assets.xcassets/Avatar.imageset/avatar@3x.png rename to SharedAssets.xcassets/Avatar.imageset/avatar@3x.png diff --git a/Vernissage/Assets.xcassets/Blurhash.imageset/Blurhash.png b/SharedAssets.xcassets/Blurhash.imageset/Blurhash.png similarity index 100% rename from Vernissage/Assets.xcassets/Blurhash.imageset/Blurhash.png rename to SharedAssets.xcassets/Blurhash.imageset/Blurhash.png diff --git a/Vernissage/Assets.xcassets/Blurhash.imageset/Blurhash@2x.png b/SharedAssets.xcassets/Blurhash.imageset/Blurhash@2x.png similarity index 100% rename from Vernissage/Assets.xcassets/Blurhash.imageset/Blurhash@2x.png rename to SharedAssets.xcassets/Blurhash.imageset/Blurhash@2x.png diff --git a/Vernissage/Assets.xcassets/Blurhash.imageset/Blurhash@3x.png b/SharedAssets.xcassets/Blurhash.imageset/Blurhash@3x.png similarity index 100% rename from Vernissage/Assets.xcassets/Blurhash.imageset/Blurhash@3x.png rename to SharedAssets.xcassets/Blurhash.imageset/Blurhash@3x.png diff --git a/Vernissage/Assets.xcassets/Blurhash.imageset/Contents.json b/SharedAssets.xcassets/Blurhash.imageset/Contents.json similarity index 100% rename from Vernissage/Assets.xcassets/Blurhash.imageset/Contents.json rename to SharedAssets.xcassets/Blurhash.imageset/Contents.json diff --git a/SharedAssets.xcassets/Contents.json b/SharedAssets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/SharedAssets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SharedAssets.xcassets/DangerColor.colorset/Contents.json b/SharedAssets.xcassets/DangerColor.colorset/Contents.json new file mode 100644 index 0000000..11a9ac4 --- /dev/null +++ b/SharedAssets.xcassets/DangerColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0.267", + "green" : "0.341", + "red" : "1.000" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.267", + "green" : "0.341", + "red" : "1.000" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Vernissage/Assets.xcassets/ImagePlaceholder.imageset/Contents.json b/SharedAssets.xcassets/ImagePlaceholder.imageset/Contents.json similarity index 100% rename from Vernissage/Assets.xcassets/ImagePlaceholder.imageset/Contents.json rename to SharedAssets.xcassets/ImagePlaceholder.imageset/Contents.json diff --git a/Vernissage/Assets.xcassets/ImagePlaceholder.imageset/ImagePlaceholder.png b/SharedAssets.xcassets/ImagePlaceholder.imageset/ImagePlaceholder.png similarity index 100% rename from Vernissage/Assets.xcassets/ImagePlaceholder.imageset/ImagePlaceholder.png rename to SharedAssets.xcassets/ImagePlaceholder.imageset/ImagePlaceholder.png diff --git a/Vernissage/Assets.xcassets/ImagePlaceholder.imageset/ImagePlaceholder@2x.png b/SharedAssets.xcassets/ImagePlaceholder.imageset/ImagePlaceholder@2x.png similarity index 100% rename from Vernissage/Assets.xcassets/ImagePlaceholder.imageset/ImagePlaceholder@2x.png rename to SharedAssets.xcassets/ImagePlaceholder.imageset/ImagePlaceholder@2x.png diff --git a/Vernissage/Assets.xcassets/ImagePlaceholder.imageset/ImagePlaceholder@3x.png b/SharedAssets.xcassets/ImagePlaceholder.imageset/ImagePlaceholder@3x.png similarity index 100% rename from Vernissage/Assets.xcassets/ImagePlaceholder.imageset/ImagePlaceholder@3x.png rename to SharedAssets.xcassets/ImagePlaceholder.imageset/ImagePlaceholder@3x.png diff --git a/Vernissage/Assets.xcassets/ImagePlaceholder.imageset/ImagePlaceholderLight.png b/SharedAssets.xcassets/ImagePlaceholder.imageset/ImagePlaceholderLight.png similarity index 100% rename from Vernissage/Assets.xcassets/ImagePlaceholder.imageset/ImagePlaceholderLight.png rename to SharedAssets.xcassets/ImagePlaceholder.imageset/ImagePlaceholderLight.png diff --git a/Vernissage/Assets.xcassets/ImagePlaceholder.imageset/ImagePlaceholderLight@2x.png b/SharedAssets.xcassets/ImagePlaceholder.imageset/ImagePlaceholderLight@2x.png similarity index 100% rename from Vernissage/Assets.xcassets/ImagePlaceholder.imageset/ImagePlaceholderLight@2x.png rename to SharedAssets.xcassets/ImagePlaceholder.imageset/ImagePlaceholderLight@2x.png diff --git a/Vernissage/Assets.xcassets/ImagePlaceholder.imageset/ImagePlaceholderLight@3x.png b/SharedAssets.xcassets/ImagePlaceholder.imageset/ImagePlaceholderLight@3x.png similarity index 100% rename from Vernissage/Assets.xcassets/ImagePlaceholder.imageset/ImagePlaceholderLight@3x.png rename to SharedAssets.xcassets/ImagePlaceholder.imageset/ImagePlaceholderLight@3x.png diff --git a/Vernissage/Assets.xcassets/SelectedRowColor.colorset/Contents.json b/SharedAssets.xcassets/KeyboardToolbar.colorset/Contents.json similarity index 76% rename from Vernissage/Assets.xcassets/SelectedRowColor.colorset/Contents.json rename to SharedAssets.xcassets/KeyboardToolbar.colorset/Contents.json index 86c24e0..207b76d 100644 --- a/Vernissage/Assets.xcassets/SelectedRowColor.colorset/Contents.json +++ b/SharedAssets.xcassets/KeyboardToolbar.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "248", - "green" : "248", - "red" : "248" + "blue" : "0.969", + "green" : "0.969", + "red" : "0.969" } }, "idiom" : "universal" @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "25", - "green" : "25", - "red" : "25" + "blue" : "0.165", + "green" : "0.157", + "red" : "0.157" } }, "idiom" : "universal" diff --git a/Vernissage/Assets.xcassets/KeyboardToolbar.colorset/Contents.json b/SharedAssets.xcassets/LightGrayColor.colorset/Contents.json similarity index 76% rename from Vernissage/Assets.xcassets/KeyboardToolbar.colorset/Contents.json rename to SharedAssets.xcassets/LightGrayColor.colorset/Contents.json index 026cda1..ccb2fbc 100644 --- a/Vernissage/Assets.xcassets/KeyboardToolbar.colorset/Contents.json +++ b/SharedAssets.xcassets/LightGrayColor.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "247", - "green" : "247", - "red" : "247" + "blue" : "0.627", + "green" : "0.627", + "red" : "0.627" } }, "idiom" : "universal" @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "42", - "green" : "40", - "red" : "40" + "blue" : "0.627", + "green" : "0.627", + "red" : "0.627" } }, "idiom" : "universal" diff --git a/SharedAssets.xcassets/MainTextColor.colorset/Contents.json b/SharedAssets.xcassets/MainTextColor.colorset/Contents.json new file mode 100644 index 0000000..364fa31 --- /dev/null +++ b/SharedAssets.xcassets/MainTextColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.039", + "green" : "0.039", + "red" : "0.039" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.961", + "green" : "0.961", + "red" : "0.961" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SharedAssets.xcassets/SelectedRowColor.colorset/Contents.json b/SharedAssets.xcassets/SelectedRowColor.colorset/Contents.json new file mode 100644 index 0000000..4aacf9a --- /dev/null +++ b/SharedAssets.xcassets/SelectedRowColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.973", + "green" : "0.973", + "red" : "0.973" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.098", + "green" : "0.098", + "red" : "0.098" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Vernissage/Assets.xcassets/ViewTextColor.colorset/Contents.json b/SharedAssets.xcassets/ViewBackgroundColor.colorset/Contents.json similarity index 88% rename from Vernissage/Assets.xcassets/ViewTextColor.colorset/Contents.json rename to SharedAssets.xcassets/ViewBackgroundColor.colorset/Contents.json index 13f4d66..c82979e 100644 --- a/Vernissage/Assets.xcassets/ViewTextColor.colorset/Contents.json +++ b/SharedAssets.xcassets/ViewBackgroundColor.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "247", - "green" : "247", - "red" : "247" + "blue" : "0.157", + "green" : "0.157", + "red" : "0.157" } }, "idiom" : "universal" @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.157", - "green" : "0.157", - "red" : "0.157" + "blue" : "0.969", + "green" : "0.969", + "red" : "0.969" } }, "idiom" : "universal" diff --git a/SharedAssets.xcassets/ViewTextColor.colorset/Contents.json b/SharedAssets.xcassets/ViewTextColor.colorset/Contents.json new file mode 100644 index 0000000..13e7c90 --- /dev/null +++ b/SharedAssets.xcassets/ViewTextColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.969", + "green" : "0.969", + "red" : "0.969" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.157", + "green" : "0.157", + "red" : "0.157" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Vernissage.xcodeproj/project.pbxproj b/Vernissage.xcodeproj/project.pbxproj index 7dfbeaf..6f19557 100644 --- a/Vernissage.xcodeproj/project.pbxproj +++ b/Vernissage.xcodeproj/project.pbxproj @@ -36,7 +36,6 @@ F85D497F296416C800751DF7 /* CommentsSectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F85D497E296416C800751DF7 /* CommentsSectionView.swift */; }; F85D498329642FAC00751DF7 /* AttachmentData+Comperable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F85D498229642FAC00751DF7 /* AttachmentData+Comperable.swift */; }; F85D49852964301800751DF7 /* StatusData+Attachments.swift in Sources */ = {isa = PBXBuildFile; fileRef = F85D49842964301800751DF7 /* StatusData+Attachments.swift */; }; - F85D49872964334100751DF7 /* String+Date.swift in Sources */ = {isa = PBXBuildFile; fileRef = F85D49862964334100751DF7 /* String+Date.swift */; }; F85D4DFE29B78C8400345267 /* HashtagModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F85D4DFD29B78C8400345267 /* HashtagModel.swift */; }; F85DBF8F296732E20069BF89 /* AccountsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F85DBF8E296732E20069BF89 /* AccountsView.swift */; }; F86167C6297FE6CC004D1F67 /* AvatarShapesSectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F86167C5297FE6CC004D1F67 /* AvatarShapesSectionView.swift */; }; @@ -90,7 +89,6 @@ F87AEB922986C44E00434FB6 /* AuthorizationSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = F87AEB912986C44E00434FB6 /* AuthorizationSession.swift */; }; F87AEB972986D16D00434FB6 /* AuthorisationError.swift in Sources */ = {isa = PBXBuildFile; fileRef = F87AEB962986D16D00434FB6 /* AuthorisationError.swift */; }; F883402029B62AE900C3E096 /* SearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F883401F29B62AE900C3E096 /* SearchView.swift */; }; - F8864CEF29ACE90B0020C534 /* UIFont+Font.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8864CEE29ACE90B0020C534 /* UIFont+Font.swift */; }; F8864CF129ACFFB80020C534 /* View+Keyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8864CF029ACFFB80020C534 /* View+Keyboard.swift */; }; F88AB05329B3613900345EDE /* PhotoUrl.swift in Sources */ = {isa = PBXBuildFile; fileRef = F88AB05229B3613900345EDE /* PhotoUrl.swift */; }; F88AB05529B3626300345EDE /* ImageGrid.swift in Sources */ = {isa = PBXBuildFile; fileRef = F88AB05429B3626300345EDE /* ImageGrid.swift */; }; @@ -110,6 +108,28 @@ F88BC52D29E04BB600CE6141 /* EnvironmentKit in Frameworks */ = {isa = PBXBuildFile; productRef = F88BC52C29E04BB600CE6141 /* EnvironmentKit */; }; F88BC52F29E04C5F00CE6141 /* EnvironmentKit in Frameworks */ = {isa = PBXBuildFile; productRef = F88BC52E29E04C5F00CE6141 /* EnvironmentKit */; }; F88BC53029E0672000CE6141 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = F835082629BEF9C400DE3247 /* Localizable.strings */; }; + F88BC53229E0677000CE6141 /* EnvironmentKit in Frameworks */ = {isa = PBXBuildFile; productRef = F88BC53129E0677000CE6141 /* EnvironmentKit */; }; + F88BC53B29E06A5100CE6141 /* ImageContextMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = F88BC53A29E06A5100CE6141 /* ImageContextMenu.swift */; }; + F88BC53D29E06EAD00CE6141 /* ServicesKit in Frameworks */ = {isa = PBXBuildFile; productRef = F88BC53C29E06EAD00CE6141 /* ServicesKit */; }; + F88BC53F29E06EB100CE6141 /* WidgetsKit in Frameworks */ = {isa = PBXBuildFile; productRef = F88BC53E29E06EB100CE6141 /* WidgetsKit */; }; + F88BC54129E072A600CE6141 /* CoreDataError.swift in Sources */ = {isa = PBXBuildFile; fileRef = F864F7A429BBA01D00B13921 /* CoreDataError.swift */; }; + F88BC54229E072A900CE6141 /* AttachmentDataHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = F80048092961EA1900E6868A /* AttachmentDataHandler.swift */; }; + F88BC54329E072AC00CE6141 /* StatusDataHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = F80048072961E6DE00E6868A /* StatusDataHandler.swift */; }; + F88BC54429E072AF00CE6141 /* ApplicationSettingsHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = F866F6A429604194002E8F88 /* ApplicationSettingsHandler.swift */; }; + F88BC54529E072B200CE6141 /* AccountDataHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = F866F6A229604161002E8F88 /* AccountDataHandler.swift */; }; + F88BC54629E072B500CE6141 /* CoreDataHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = F88C2474295C37BB0006098B /* CoreDataHandler.swift */; }; + F88BC54729E072B800CE6141 /* AccountData+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = F88FAD29295F43B8009B20C9 /* AccountData+CoreDataProperties.swift */; }; + F88BC54829E072BC00CE6141 /* AccountData+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = F88FAD28295F43B8009B20C9 /* AccountData+CoreDataClass.swift */; }; + F88BC54929E072C000CE6141 /* ApplicationSettings+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = F866F69F296040A8002E8F88 /* ApplicationSettings+CoreDataProperties.swift */; }; + F88BC54A29E072C400CE6141 /* ApplicationSettings+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = F866F69E296040A8002E8F88 /* ApplicationSettings+CoreDataClass.swift */; }; + F88BC54B29E072CA00CE6141 /* StatusData+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = F80048022961850500E6868A /* StatusData+CoreDataProperties.swift */; }; + F88BC54C29E072CD00CE6141 /* StatusData+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = F80048012961850500E6868A /* StatusData+CoreDataClass.swift */; }; + F88BC54D29E072D600CE6141 /* AttachmentData+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = F80048002961850500E6868A /* AttachmentData+CoreDataProperties.swift */; }; + F88BC54E29E072D900CE6141 /* AttachmentData+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = F80047FF2961850500E6868A /* AttachmentData+CoreDataClass.swift */; }; + F88BC54F29E073BC00CE6141 /* AccountData+AccountModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F88BC51C29E0377B00CE6141 /* AccountData+AccountModel.swift */; }; + F88BC55029E074EB00CE6141 /* Vernissage.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = F88C2476295C37BB0006098B /* Vernissage.xcdatamodeld */; }; + F88BC55229E0798900CE6141 /* SharedAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F88BC55129E0798900CE6141 /* SharedAssets.xcassets */; }; + F88BC55429E0798900CE6141 /* SharedAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F88BC55129E0798900CE6141 /* SharedAssets.xcassets */; }; F88C246C295C37B80006098B /* VernissageApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = F88C246B295C37B80006098B /* VernissageApp.swift */; }; F88C246E295C37B80006098B /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F88C246D295C37B80006098B /* MainView.swift */; }; F88C2470295C37BB0006098B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F88C246F295C37BB0006098B /* Assets.xcassets */; }; @@ -126,17 +146,13 @@ F88FAD27295F400E009B20C9 /* NotificationsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F88FAD26295F400E009B20C9 /* NotificationsView.swift */; }; F88FAD2A295F43B8009B20C9 /* AccountData+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = F88FAD28295F43B8009B20C9 /* AccountData+CoreDataClass.swift */; }; F88FAD2B295F43B8009B20C9 /* AccountData+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = F88FAD29295F43B8009B20C9 /* AccountData+CoreDataProperties.swift */; }; - F8911A1729DE914D00770F44 /* NavigationMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8911A1629DE914D00770F44 /* NavigationMenu.swift */; }; F891E7CE29C35BF50022C449 /* ImageRowItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = F891E7CD29C35BF50022C449 /* ImageRowItem.swift */; }; F891E7D029C368750022C449 /* ImageRowItemAsync.swift in Sources */ = {isa = PBXBuildFile; fileRef = F891E7CF29C368750022C449 /* ImageRowItemAsync.swift */; }; F897978F29684BCB00B22335 /* LoadingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F897978E29684BCB00B22335 /* LoadingView.swift */; }; - F898DE702972868A004B4A6A /* String+Empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = F898DE6F2972868A004B4A6A /* String+Empty.swift */; }; - F8996DEB2971D29D0043EEC6 /* View+Transition.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8996DEA2971D29D0043EEC6 /* View+Transition.swift */; }; F89992C9296D6DC7005994BF /* CommentBodyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F89992C8296D6DC7005994BF /* CommentBodyView.swift */; }; F89A46DC296EAACE0062125F /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F89A46DB296EAACE0062125F /* SettingsView.swift */; }; F89A46DE296EABA20062125F /* StatusPlaceholderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F89A46DD296EABA20062125F /* StatusPlaceholderView.swift */; }; F89AC00529A1F9B500F4159F /* AppMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = F89AC00429A1F9B500F4159F /* AppMetadata.swift */; }; - F89AC00729A208CC00F4159F /* PlaceSelectorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F89AC00629A208CC00F4159F /* PlaceSelectorView.swift */; }; F89B5CC029D019B600549F2F /* HTMLString in Frameworks */ = {isa = PBXBuildFile; productRef = F89B5CBF29D019B600549F2F /* HTMLString */; }; F89B5CC229D01BF700549F2F /* InstanceView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F89B5CC129D01BF700549F2F /* InstanceView.swift */; }; F89CEB802984198600A1376F /* AttachmentData+HighestImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = F89CEB7F2984198600A1376F /* AttachmentData+HighestImage.swift */; }; @@ -146,7 +162,6 @@ F89D6C4A297196FF001DA3D4 /* ImageViewer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F89D6C49297196FF001DA3D4 /* ImageViewer.swift */; }; F89F57B029D1C11200001EE3 /* RelationshipModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F89F57AF29D1C11200001EE3 /* RelationshipModel.swift */; }; F8A93D7E2965FD89001D8331 /* UserProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8A93D7D2965FD89001D8331 /* UserProfileView.swift */; }; - F8AD061329A565620042F111 /* String+Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8AD061229A565620042F111 /* String+Random.swift */; }; F8AFF7C129B259150087D083 /* HashtagsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8AFF7C029B259150087D083 /* HashtagsView.swift */; }; F8AFF7C429B25EF40087D083 /* ImagesGrid.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8AFF7C329B25EF40087D083 /* ImagesGrid.swift */; }; F8B05ACB29B489B100857221 /* HapticsSectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8B05ACA29B489B100857221 /* HapticsSectionView.swift */; }; @@ -154,26 +169,18 @@ F8B0885E29942E31002AB40A /* ThirdPartyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8B0885D29942E31002AB40A /* ThirdPartyView.swift */; }; F8B0886029943498002AB40A /* OtherSectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8B0885F29943498002AB40A /* OtherSectionView.swift */; }; F8B08862299435C9002AB40A /* SupportView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8B08861299435C9002AB40A /* SupportView.swift */; }; - F8C5E56229892CC300ADF6A7 /* FirstAppear.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C5E56129892CC300ADF6A7 /* FirstAppear.swift */; }; - F8CAE63E29B8902D001E0372 /* ClearButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8CAE63D29B8902D001E0372 /* ClearButton.swift */; }; F8CAE64029B8E6E1001E0372 /* UIApplication+Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8CAE63F29B8E6E1001E0372 /* UIApplication+Window.swift */; }; - F8CEEDF829ABADDD00DBED66 /* UIImage+Size.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8CEEDF729ABADDD00DBED66 /* UIImage+Size.swift */; }; F8CEEDFA29ABAFD200DBED66 /* ImageFileTranseferable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8CEEDF929ABAFD200DBED66 /* ImageFileTranseferable.swift */; }; F8D5444329D4066C002225D6 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8D5444229D4066C002225D6 /* AppDelegate.swift */; }; F8DF38E429DD68820047F1AA /* ViewOffsetKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8DF38E329DD68820047F1AA /* ViewOffsetKey.swift */; }; F8DF38E629DDB98A0047F1AA /* SocialsSectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8DF38E529DDB98A0047F1AA /* SocialsSectionView.swift */; }; F8E6D03329CDD52500416CCA /* EditProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8E6D03229CDD52500416CCA /* EditProfileView.swift */; }; - F8E6D03529CE161B00416CCA /* UIImage+Jpeg.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8E6D03429CE161B00416CCA /* UIImage+Jpeg.swift */; }; - F8E9391F29C0BCFA002BB3B8 /* ImageContextMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8E9391E29C0BCFA002BB3B8 /* ImageContextMenu.swift */; }; F8E9392129C0DA7E002BB3B8 /* LazyImageState+ImageResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8E9392029C0DA7E002BB3B8 /* LazyImageState+ImageResponse.swift */; }; F8F6E44229BC58F20004795E /* Vernissage.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = F88C2476295C37BB0006098B /* Vernissage.xcdatamodeld */; }; F8F6E44C29BCC1F70004795E /* SmallWidgetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8F6E44629BCC0DC0004795E /* SmallWidgetView.swift */; }; F8F6E44D29BCC1F90004795E /* MediumWidgetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8F6E44829BCC0F00004795E /* MediumWidgetView.swift */; }; F8F6E44E29BCC1FB0004795E /* LargeWidgetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8F6E44A29BCC0FF0004795E /* LargeWidgetView.swift */; }; F8F6E45129BCE9190004795E /* UIImage+Resize.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8F6E45029BCE9190004795E /* UIImage+Resize.swift */; }; - F8FA9919299FA35A007AB130 /* PhotoAttachment.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FA9918299FA35A007AB130 /* PhotoAttachment.swift */; }; - F8FA991C299FA8C2007AB130 /* ImageUploadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FA991B299FA8C2007AB130 /* ImageUploadView.swift */; }; - F8FA991E299FAB92007AB130 /* PhotoEditorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FA991D299FAB92007AB130 /* PhotoEditorView.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -236,7 +243,6 @@ F85D497E296416C800751DF7 /* CommentsSectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommentsSectionView.swift; sourceTree = ""; }; F85D498229642FAC00751DF7 /* AttachmentData+Comperable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AttachmentData+Comperable.swift"; sourceTree = ""; }; F85D49842964301800751DF7 /* StatusData+Attachments.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "StatusData+Attachments.swift"; sourceTree = ""; }; - F85D49862964334100751DF7 /* String+Date.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Date.swift"; sourceTree = ""; }; F85D4DFD29B78C8400345267 /* HashtagModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HashtagModel.swift; sourceTree = ""; }; F85DBF8E296732E20069BF89 /* AccountsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountsView.swift; sourceTree = ""; }; F86167C5297FE6CC004D1F67 /* AvatarShapesSectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AvatarShapesSectionView.swift; sourceTree = ""; }; @@ -277,7 +283,6 @@ F87AEB912986C44E00434FB6 /* AuthorizationSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthorizationSession.swift; sourceTree = ""; }; F87AEB962986D16D00434FB6 /* AuthorisationError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthorisationError.swift; sourceTree = ""; }; F883401F29B62AE900C3E096 /* SearchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchView.swift; sourceTree = ""; }; - F8864CEE29ACE90B0020C534 /* UIFont+Font.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIFont+Font.swift"; sourceTree = ""; }; F8864CF029ACFFB80020C534 /* View+Keyboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "View+Keyboard.swift"; sourceTree = ""; }; F88AB05229B3613900345EDE /* PhotoUrl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotoUrl.swift; sourceTree = ""; }; F88AB05429B3626300345EDE /* ImageGrid.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageGrid.swift; sourceTree = ""; }; @@ -295,6 +300,8 @@ F88BC52529E0421F00CE6141 /* ServicesKit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = ServicesKit; sourceTree = ""; }; F88BC52829E0467400CE6141 /* WidgetsKit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = WidgetsKit; sourceTree = ""; }; F88BC52B29E04AC200CE6141 /* EnvironmentKit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = EnvironmentKit; sourceTree = ""; }; + F88BC53A29E06A5100CE6141 /* ImageContextMenu.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageContextMenu.swift; sourceTree = ""; }; + F88BC55129E0798900CE6141 /* SharedAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = SharedAssets.xcassets; sourceTree = ""; }; F88C2468295C37B80006098B /* Vernissage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Vernissage.app; sourceTree = BUILT_PRODUCTS_DIR; }; F88C246B295C37B80006098B /* VernissageApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VernissageApp.swift; sourceTree = ""; }; F88C246D295C37B80006098B /* MainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainView.swift; sourceTree = ""; }; @@ -311,18 +318,14 @@ F88FAD26295F400E009B20C9 /* NotificationsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationsView.swift; sourceTree = ""; }; F88FAD28295F43B8009B20C9 /* AccountData+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AccountData+CoreDataClass.swift"; sourceTree = ""; }; F88FAD29295F43B8009B20C9 /* AccountData+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AccountData+CoreDataProperties.swift"; sourceTree = ""; }; - F8911A1629DE914D00770F44 /* NavigationMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationMenu.swift; sourceTree = ""; }; F8911A1829DE9E5500770F44 /* Vernissage-007.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Vernissage-007.xcdatamodel"; sourceTree = ""; }; F891E7CD29C35BF50022C449 /* ImageRowItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageRowItem.swift; sourceTree = ""; }; F891E7CF29C368750022C449 /* ImageRowItemAsync.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageRowItemAsync.swift; sourceTree = ""; }; F897978E29684BCB00B22335 /* LoadingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingView.swift; sourceTree = ""; }; - F898DE6F2972868A004B4A6A /* String+Empty.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Empty.swift"; sourceTree = ""; }; - F8996DEA2971D29D0043EEC6 /* View+Transition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "View+Transition.swift"; sourceTree = ""; }; F89992C8296D6DC7005994BF /* CommentBodyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommentBodyView.swift; sourceTree = ""; }; F89A46DB296EAACE0062125F /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = ""; }; F89A46DD296EABA20062125F /* StatusPlaceholderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusPlaceholderView.swift; sourceTree = ""; }; F89AC00429A1F9B500F4159F /* AppMetadata.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppMetadata.swift; sourceTree = ""; }; - F89AC00629A208CC00F4159F /* PlaceSelectorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaceSelectorView.swift; sourceTree = ""; }; F89B5CC129D01BF700549F2F /* InstanceView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstanceView.swift; sourceTree = ""; }; F89CEB7F2984198600A1376F /* AttachmentData+HighestImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AttachmentData+HighestImage.swift"; sourceTree = ""; }; F89D6C4129717FDC001DA3D4 /* AccountsSectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountsSectionView.swift; sourceTree = ""; }; @@ -332,7 +335,6 @@ F89F0605299139F6003DC875 /* Vernissage-002.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Vernissage-002.xcdatamodel"; sourceTree = ""; }; F89F57AF29D1C11200001EE3 /* RelationshipModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RelationshipModel.swift; sourceTree = ""; }; F8A93D7D2965FD89001D8331 /* UserProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserProfileView.swift; sourceTree = ""; }; - F8AD061229A565620042F111 /* String+Random.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Random.swift"; sourceTree = ""; }; F8AFF7C029B259150087D083 /* HashtagsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HashtagsView.swift; sourceTree = ""; }; F8AFF7C329B25EF40087D083 /* ImagesGrid.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImagesGrid.swift; sourceTree = ""; }; F8B05AC929B488C600857221 /* Vernissage-003.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Vernissage-003.xcdatamodel"; sourceTree = ""; }; @@ -344,20 +346,15 @@ F8B08861299435C9002AB40A /* SupportView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SupportView.swift; sourceTree = ""; }; F8B3699A29D86EB600BE3808 /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .swiftlint.yml; sourceTree = ""; }; F8B3699B29D86EBD00BE3808 /* .gitignore */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitignore; sourceTree = ""; }; - F8C5E56129892CC300ADF6A7 /* FirstAppear.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstAppear.swift; sourceTree = ""; }; F8C937A929882CA90004D782 /* Vernissage-001.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Vernissage-001.xcdatamodel"; sourceTree = ""; }; - F8CAE63D29B8902D001E0372 /* ClearButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClearButton.swift; sourceTree = ""; }; F8CAE63F29B8E6E1001E0372 /* UIApplication+Window.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIApplication+Window.swift"; sourceTree = ""; }; F8CAE64129B8F1AF001E0372 /* Vernissage-005.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Vernissage-005.xcdatamodel"; sourceTree = ""; }; - F8CEEDF729ABADDD00DBED66 /* UIImage+Size.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImage+Size.swift"; sourceTree = ""; }; F8CEEDF929ABAFD200DBED66 /* ImageFileTranseferable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageFileTranseferable.swift; sourceTree = ""; }; F8D5444229D4066C002225D6 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; F8DF38E329DD68820047F1AA /* ViewOffsetKey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewOffsetKey.swift; sourceTree = ""; }; F8DF38E529DDB98A0047F1AA /* SocialsSectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SocialsSectionView.swift; sourceTree = ""; }; F8DF38E729DDC3D20047F1AA /* eu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = eu; path = eu.lproj/Localizable.strings; sourceTree = ""; }; F8E6D03229CDD52500416CCA /* EditProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditProfileView.swift; sourceTree = ""; }; - F8E6D03429CE161B00416CCA /* UIImage+Jpeg.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImage+Jpeg.swift"; sourceTree = ""; }; - F8E9391E29C0BCFA002BB3B8 /* ImageContextMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageContextMenu.swift; sourceTree = ""; }; F8E9392029C0DA7E002BB3B8 /* LazyImageState+ImageResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LazyImageState+ImageResponse.swift"; sourceTree = ""; }; F8EF371429C624DA00669F45 /* Vernissage-006.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Vernissage-006.xcdatamodel"; sourceTree = ""; }; F8F6E44329BC5CAA0004795E /* VernissageWidgetExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = VernissageWidgetExtension.entitlements; sourceTree = ""; }; @@ -366,9 +363,6 @@ F8F6E44829BCC0F00004795E /* MediumWidgetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediumWidgetView.swift; sourceTree = ""; }; F8F6E44A29BCC0FF0004795E /* LargeWidgetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LargeWidgetView.swift; sourceTree = ""; }; F8F6E45029BCE9190004795E /* UIImage+Resize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImage+Resize.swift"; sourceTree = ""; }; - F8FA9918299FA35A007AB130 /* PhotoAttachment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotoAttachment.swift; sourceTree = ""; }; - F8FA991B299FA8C2007AB130 /* ImageUploadView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageUploadView.swift; sourceTree = ""; }; - F8FA991D299FAB92007AB130 /* PhotoEditorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotoEditorView.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -388,7 +382,10 @@ buildActionMask = 2147483647; files = ( F88BC51F29E03ED300CE6141 /* ClientKit in Frameworks */, + F88BC53F29E06EB100CE6141 /* WidgetsKit in Frameworks */, + F88BC53229E0677000CE6141 /* EnvironmentKit in Frameworks */, F88BC51129E02F5300CE6141 /* PixelfedKit in Frameworks */, + F88BC53D29E06EAD00CE6141 /* ServicesKit in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -458,8 +455,8 @@ F808641229756583009F035C /* NotificationsView */, F8121CA6298A86B300B466C7 /* SignInView */, F89D6C4829718868001DA3D4 /* StatusView */, - F8FA991A299FA8A5007AB130 /* ComposeView */, F88C246D295C37B80006098B /* MainView.swift */, + F88ABD9329687CA4004EF61E /* ComposeView.swift */, F88FAD20295F3944009B20C9 /* HomeFeedView.swift */, F88AB05729B36B8200345EDE /* AccountsPhotoView.swift */, F88E4D47297E90CD0057491A /* TrendStatusesView.swift */, @@ -470,8 +467,6 @@ F85DBF8E296732E20069BF89 /* AccountsView.swift */, F897978E29684BCB00B22335 /* LoadingView.swift */, F8B0885D29942E31002AB40A /* ThirdPartyView.swift */, - F8FA991D299FAB92007AB130 /* PhotoEditorView.swift */, - F89AC00629A208CC00F4159F /* PlaceSelectorView.swift */, F8E6D03229CDD52500416CCA /* EditProfileView.swift */, F89B5CC129D01BF700549F2F /* InstanceView.swift */, F805DCF029DBEF83006A1FD9 /* ReportView.swift */, @@ -482,18 +477,10 @@ F8341F94295C63FE009C8EE6 /* Extensions */ = { isa = PBXGroup; children = ( - F85D49862964334100751DF7 /* String+Date.swift */, - F898DE6F2972868A004B4A6A /* String+Empty.swift */, - F8AD061229A565620042F111 /* String+Random.swift */, - F8CEEDF729ABADDD00DBED66 /* UIImage+Size.swift */, - F8E6D03429CE161B00416CCA /* UIImage+Jpeg.swift */, - F8996DEA2971D29D0043EEC6 /* View+Transition.swift */, - F8864CEE29ACE90B0020C534 /* UIFont+Font.swift */, F8864CF029ACFFB80020C534 /* View+Keyboard.swift */, F8CAE63F29B8E6E1001E0372 /* UIApplication+Window.swift */, F873F14B29BDB67300DE72D1 /* UIImage+Rounded.swift */, F8E9392029C0DA7E002BB3B8 /* LazyImageState+ImageResponse.swift */, - F88BC51C29E0377B00CE6141 /* AccountData+AccountModel.swift */, ); path = Extensions; sourceTree = ""; @@ -503,7 +490,6 @@ children = ( F866F6AD29606367002E8F88 /* ApplicationViewMode.swift */, F8764186298ABB520057D362 /* ViewState.swift */, - F8FA9918299FA35A007AB130 /* PhotoAttachment.swift */, F89AC00429A1F9B500F4159F /* AppMetadata.swift */, F8CEEDF929ABAFD200DBED66 /* ImageFileTranseferable.swift */, F88AB05229B3613900345EDE /* PhotoUrl.swift */, @@ -531,6 +517,7 @@ F866F69F296040A8002E8F88 /* ApplicationSettings+CoreDataProperties.swift */, F88FAD28295F43B8009B20C9 /* AccountData+CoreDataClass.swift */, F88FAD29295F43B8009B20C9 /* AccountData+CoreDataProperties.swift */, + F88BC51C29E0377B00CE6141 /* AccountData+AccountModel.swift */, F88C2474295C37BB0006098B /* CoreDataHandler.swift */, F866F6A229604161002E8F88 /* AccountDataHandler.swift */, F866F6A429604194002E8F88 /* ApplicationSettingsHandler.swift */, @@ -644,14 +631,6 @@ path = Subviews; sourceTree = ""; }; - F878842029A494E3003CFAD2 /* Subviews */ = { - isa = PBXGroup; - children = ( - F8FA991B299FA8C2007AB130 /* ImageUploadView.swift */, - ); - path = Subviews; - sourceTree = ""; - }; F88BC50329E02F3900CE6141 /* VernissageShareExtension */ = { isa = PBXGroup; children = ( @@ -664,9 +643,18 @@ path = VernissageShareExtension; sourceTree = ""; }; + F88BC53729E068D200CE6141 /* ViewModifiers */ = { + isa = PBXGroup; + children = ( + F88BC53A29E06A5100CE6141 /* ImageContextMenu.swift */, + ); + path = ViewModifiers; + sourceTree = ""; + }; F88C245F295C37B80006098B = { isa = PBXGroup; children = ( + F88BC55129E0798900CE6141 /* SharedAssets.xcassets */, F88BC52B29E04AC200CE6141 /* EnvironmentKit */, F88BC52829E0467400CE6141 /* WidgetsKit */, F88BC52529E0421F00CE6141 /* ServicesKit */, @@ -702,11 +690,11 @@ children = ( F8F6E44429BC5CC50004795E /* Vernissage.entitlements */, F866F6A829604FFF002E8F88 /* Info.plist */, + F88BC53729E068D200CE6141 /* ViewModifiers */, F802884D297AEEAA000BDD51 /* Errors */, F86B721F296C498B00EE59EC /* Styles */, F8210DE82966E4D8001D9973 /* Modifiers */, F88FAD30295F5010009B20C9 /* Services */, - F8C5E56029892C8A00ADF6A7 /* ViewModifiers */, F83901A2295D863B00456AE2 /* Widgets */, F8341F95295C640C009C8EE6 /* Models */, F8B9B354298D4B88009CC69C /* EnvironmentObjects */, @@ -789,17 +777,6 @@ path = EnvironmentObjects; sourceTree = ""; }; - F8C5E56029892C8A00ADF6A7 /* ViewModifiers */ = { - isa = PBXGroup; - children = ( - F8C5E56129892CC300ADF6A7 /* FirstAppear.swift */, - F8CAE63D29B8902D001E0372 /* ClearButton.swift */, - F8E9391E29C0BCFA002BB3B8 /* ImageContextMenu.swift */, - F8911A1629DE914D00770F44 /* NavigationMenu.swift */, - ); - path = ViewModifiers; - sourceTree = ""; - }; F8CB3DF029D80B1E00CDAE5A /* Resources */ = { isa = PBXGroup; children = ( @@ -825,15 +802,6 @@ path = Extensions; sourceTree = ""; }; - F8FA991A299FA8A5007AB130 /* ComposeView */ = { - isa = PBXGroup; - children = ( - F878842029A494E3003CFAD2 /* Subviews */, - F88ABD9329687CA4004EF61E /* ComposeView.swift */, - ); - path = ComposeView; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -874,6 +842,9 @@ packageProductDependencies = ( F88BC51029E02F5300CE6141 /* PixelfedKit */, F88BC51E29E03ED300CE6141 /* ClientKit */, + F88BC53129E0677000CE6141 /* EnvironmentKit */, + F88BC53C29E06EAD00CE6141 /* ServicesKit */, + F88BC53E29E06EB100CE6141 /* WidgetsKit */, ); productName = VernissageShareExtension; productReference = F88BC50229E02F3900CE6141 /* VernissageShareExtension.appex */; @@ -975,6 +946,7 @@ buildActionMask = 2147483647; files = ( F88BC53029E0672000CE6141 /* Localizable.strings in Resources */, + F88BC55429E0798900CE6141 /* SharedAssets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -982,6 +954,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + F88BC55229E0798900CE6141 /* SharedAssets.xcassets in Resources */, F88C2473295C37BB0006098B /* Preview Assets.xcassets in Resources */, F835082329BEF9C400DE3247 /* Localizable.strings in Resources */, F88C2470295C37BB0006098B /* Assets.xcassets in Resources */, @@ -1049,10 +1022,26 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + F88BC54529E072B200CE6141 /* AccountDataHandler.swift in Sources */, + F88BC54729E072B800CE6141 /* AccountData+CoreDataProperties.swift in Sources */, + F88BC54D29E072D600CE6141 /* AttachmentData+CoreDataProperties.swift in Sources */, + F88BC54F29E073BC00CE6141 /* AccountData+AccountModel.swift in Sources */, + F88BC54629E072B500CE6141 /* CoreDataHandler.swift in Sources */, F88BC50529E02F3900CE6141 /* ShareViewController.swift in Sources */, F88BC52229E03F6D00CE6141 /* View+Keyboard.swift in Sources */, + F88BC54129E072A600CE6141 /* CoreDataError.swift in Sources */, + F88BC54229E072A900CE6141 /* AttachmentDataHandler.swift in Sources */, + F88BC54429E072AF00CE6141 /* ApplicationSettingsHandler.swift in Sources */, F88BC51629E0307F00CE6141 /* NotificationsName.swift in Sources */, + F88BC54829E072BC00CE6141 /* AccountData+CoreDataClass.swift in Sources */, F88BC51329E02FD800CE6141 /* ComposeView.swift in Sources */, + F88BC54E29E072D900CE6141 /* AttachmentData+CoreDataClass.swift in Sources */, + F88BC54C29E072CD00CE6141 /* StatusData+CoreDataClass.swift in Sources */, + F88BC54B29E072CA00CE6141 /* StatusData+CoreDataProperties.swift in Sources */, + F88BC54A29E072C400CE6141 /* ApplicationSettings+CoreDataClass.swift in Sources */, + F88BC54929E072C000CE6141 /* ApplicationSettings+CoreDataProperties.swift in Sources */, + F88BC55029E074EB00CE6141 /* Vernissage.xcdatamodeld in Sources */, + F88BC54329E072AC00CE6141 /* StatusDataHandler.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1071,22 +1060,18 @@ F8210DEA2966E4F9001D9973 /* AnimatePlaceholderModifier.swift in Sources */, F8B08862299435C9002AB40A /* SupportView.swift in Sources */, F8CAE64029B8E6E1001E0372 /* UIApplication+Window.swift in Sources */, - F8CAE63E29B8902D001E0372 /* ClearButton.swift in Sources */, F8B05ACB29B489B100857221 /* HapticsSectionView.swift in Sources */, F88FAD2B295F43B8009B20C9 /* AccountData+CoreDataProperties.swift in Sources */, F85D4975296407F100751DF7 /* HomeTimelineService.swift in Sources */, F80048062961850500E6868A /* StatusData+CoreDataProperties.swift in Sources */, F8864CF129ACFFB80020C534 /* View+Keyboard.swift in Sources */, F88FAD21295F3944009B20C9 /* HomeFeedView.swift in Sources */, - F8FA991E299FAB92007AB130 /* PhotoEditorView.swift in Sources */, - F8911A1729DE914D00770F44 /* NavigationMenu.swift in Sources */, F88C2475295C37BB0006098B /* CoreDataHandler.swift in Sources */, F87AEB972986D16D00434FB6 /* AuthorisationError.swift in Sources */, F8742FC429990AFB00E9642B /* ClientError.swift in Sources */, F883402029B62AE900C3E096 /* SearchView.swift in Sources */, F88FAD2A295F43B8009B20C9 /* AccountData+CoreDataClass.swift in Sources */, F85DBF8F296732E20069BF89 /* AccountsView.swift in Sources */, - F85D49872964334100751DF7 /* String+Date.swift in Sources */, F805DCF129DBEF83006A1FD9 /* ReportView.swift in Sources */, F8B0886029943498002AB40A /* OtherSectionView.swift in Sources */, F808641429756666009F035C /* NotificationRowView.swift in Sources */, @@ -1097,7 +1082,6 @@ F8B05ACE29B48E2F00857221 /* MediaSettingsView.swift in Sources */, F89D6C4429718092001DA3D4 /* AccentsSectionView.swift in Sources */, F88E4D42297E69FD0057491A /* StatusesView.swift in Sources */, - F8E9391F29C0BCFA002BB3B8 /* ImageContextMenu.swift in Sources */, F878842229A4A4E3003CFAD2 /* AppMetadataService.swift in Sources */, F85D497929640B9D00751DF7 /* ImagesCarousel.swift in Sources */, F89AC00529A1F9B500F4159F /* AppMetadata.swift in Sources */, @@ -1106,8 +1090,6 @@ F86B7221296C49A300EE59EC /* EmptyButtonStyle.swift in Sources */, F80048042961850500E6868A /* AttachmentData+CoreDataProperties.swift in Sources */, F88E4D4A297EA0490057491A /* RouterPath.swift in Sources */, - F8FA991C299FA8C2007AB130 /* ImageUploadView.swift in Sources */, - F8CEEDF829ABADDD00DBED66 /* UIImage+Size.swift in Sources */, F88E4D48297E90CD0057491A /* TrendStatusesView.swift in Sources */, F800480A2961EA1900E6868A /* AttachmentDataHandler.swift in Sources */, F80048032961850500E6868A /* AttachmentData+CoreDataClass.swift in Sources */, @@ -1115,17 +1097,13 @@ F89D6C4A297196FF001DA3D4 /* ImageViewer.swift in Sources */, F8A93D7E2965FD89001D8331 /* UserProfileView.swift in Sources */, F88C246E295C37B80006098B /* MainView.swift in Sources */, - F89AC00729A208CC00F4159F /* PlaceSelectorView.swift in Sources */, F8AFF7C429B25EF40087D083 /* ImagesGrid.swift in Sources */, - F8FA9919299FA35A007AB130 /* PhotoAttachment.swift in Sources */, F88C2478295C37BB0006098B /* Vernissage.xcdatamodeld in Sources */, - F8AD061329A565620042F111 /* String+Random.swift in Sources */, F8AFF7C129B259150087D083 /* HashtagsView.swift in Sources */, F8DF38E429DD68820047F1AA /* ViewOffsetKey.swift in Sources */, F89A46DE296EABA20062125F /* StatusPlaceholderView.swift in Sources */, F88C2482295C3A4F0006098B /* StatusView.swift in Sources */, F866F6A329604161002E8F88 /* AccountDataHandler.swift in Sources */, - F8996DEB2971D29D0043EEC6 /* View+Transition.swift in Sources */, F8E9392129C0DA7E002BB3B8 /* LazyImageState+ImageResponse.swift in Sources */, F89D6C4629718193001DA3D4 /* GeneralSectionView.swift in Sources */, F85D497F296416C800751DF7 /* CommentsSectionView.swift in Sources */, @@ -1144,7 +1122,6 @@ F88C246C295C37B80006098B /* VernissageApp.swift in Sources */, F8121CA8298A86D600B466C7 /* InstanceRowView.swift in Sources */, F873F14C29BDB67300DE72D1 /* UIImage+Rounded.swift in Sources */, - F8864CEF29ACE90B0020C534 /* UIFont+Font.swift in Sources */, F8CEEDFA29ABAFD200DBED66 /* ImageFileTranseferable.swift in Sources */, F8D5444329D4066C002225D6 /* AppDelegate.swift in Sources */, F802884F297AEED5000BDD51 /* DatabaseError.swift in Sources */, @@ -1162,16 +1139,14 @@ F89992C9296D6DC7005994BF /* CommentBodyView.swift in Sources */, F866F6A1296040A8002E8F88 /* ApplicationSettings+CoreDataProperties.swift in Sources */, F86A4303299A9AF500DF7645 /* TipsStore.swift in Sources */, - F8C5E56229892CC300ADF6A7 /* FirstAppear.swift in Sources */, F8DF38E629DDB98A0047F1AA /* SocialsSectionView.swift in Sources */, + F88BC53B29E06A5100CE6141 /* ImageContextMenu.swift in Sources */, F864F7A529BBA01D00B13921 /* CoreDataError.swift in Sources */, F83CBEFB298298A1002972C8 /* ImageCarouselPicture.swift in Sources */, F89A46DC296EAACE0062125F /* SettingsView.swift in Sources */, F866F6AE29606367002E8F88 /* ApplicationViewMode.swift in Sources */, F85D4DFE29B78C8400345267 /* HashtagModel.swift in Sources */, F866F6AA29605AFA002E8F88 /* SceneDelegate.swift in Sources */, - F8E6D03529CE161B00416CCA /* UIImage+Jpeg.swift in Sources */, - F898DE702972868A004B4A6A /* String+Empty.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1632,6 +1607,18 @@ isa = XCSwiftPackageProductDependency; productName = EnvironmentKit; }; + F88BC53129E0677000CE6141 /* EnvironmentKit */ = { + isa = XCSwiftPackageProductDependency; + productName = EnvironmentKit; + }; + F88BC53C29E06EAD00CE6141 /* ServicesKit */ = { + isa = XCSwiftPackageProductDependency; + productName = ServicesKit; + }; + F88BC53E29E06EB100CE6141 /* WidgetsKit */ = { + isa = XCSwiftPackageProductDependency; + productName = WidgetsKit; + }; F88E4D4C297EA4290057491A /* EmojiText */ = { isa = XCSwiftPackageProductDependency; package = F88E4D4B297EA4290057491A /* XCRemoteSwiftPackageReference "EmojiText" */; diff --git a/Vernissage/AppRouteur.swift b/Vernissage/AppRouteur.swift index 4b94a65..5af7764 100644 --- a/Vernissage/AppRouteur.swift +++ b/Vernissage/AppRouteur.swift @@ -6,6 +6,7 @@ import Foundation import SwiftUI +import WidgetsKit extension View { diff --git a/Vernissage/Assets.xcassets/DangerColor.colorset/Contents.json b/Vernissage/Assets.xcassets/DangerColor.colorset/Contents.json deleted file mode 100644 index db2b413..0000000 --- a/Vernissage/Assets.xcassets/DangerColor.colorset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "display-p3", - "components" : { - "alpha" : "1.000", - "blue" : "68", - "green" : "87", - "red" : "255" - } - }, - "idiom" : "universal" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "68", - "green" : "87", - "red" : "255" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Vernissage/Assets.xcassets/ViewBackgroundColor.colorset/Contents.json b/Vernissage/Assets.xcassets/ViewBackgroundColor.colorset/Contents.json deleted file mode 100644 index b2a4183..0000000 --- a/Vernissage/Assets.xcassets/ViewBackgroundColor.colorset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "40", - "green" : "40", - "red" : "40" - } - }, - "idiom" : "universal" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "247", - "green" : "247", - "red" : "247" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Vernissage/Assets.xcassets/lightGrayColor.colorset/Contents.json b/Vernissage/Assets.xcassets/lightGrayColor.colorset/Contents.json deleted file mode 100644 index f07e8ce..0000000 --- a/Vernissage/Assets.xcassets/lightGrayColor.colorset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "160", - "green" : "160", - "red" : "160" - } - }, - "idiom" : "universal" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "160", - "green" : "160", - "red" : "160" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Vernissage/Assets.xcassets/mainTextColor.colorset/Contents.json b/Vernissage/Assets.xcassets/mainTextColor.colorset/Contents.json deleted file mode 100644 index 7445000..0000000 --- a/Vernissage/Assets.xcassets/mainTextColor.colorset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "10", - "green" : "10", - "red" : "10" - } - }, - "idiom" : "universal" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "245", - "green" : "245", - "red" : "245" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Vernissage/Extensions/View+Keyboard.swift b/Vernissage/Extensions/View+Keyboard.swift index 9ee374d..31ebae8 100644 --- a/Vernissage/Extensions/View+Keyboard.swift +++ b/Vernissage/Extensions/View+Keyboard.swift @@ -7,7 +7,6 @@ import SwiftUI import Combine -// TODO: Move to shared views. extension View { var keyboardPublisher: AnyPublisher { Publishers diff --git a/Vernissage/Services/RouterPath.swift b/Vernissage/Services/RouterPath.swift index abde7de..728bd56 100644 --- a/Vernissage/Services/RouterPath.swift +++ b/Vernissage/Services/RouterPath.swift @@ -8,6 +8,7 @@ import SwiftUI import Foundation import PixelfedKit import ClientKit +import WidgetsKit enum RouteurDestinations: Hashable { case tag(hashTag: String) diff --git a/Vernissage/VernissageApp.swift b/Vernissage/VernissageApp.swift index 62f5bc4..b99a0ed 100644 --- a/Vernissage/VernissageApp.swift +++ b/Vernissage/VernissageApp.swift @@ -151,35 +151,10 @@ struct VernissageApp: App { } private func loadUserPreferences() { - let defaultSettings = ApplicationSettingsHandler.shared.get() + ApplicationSettingsHandler.shared.update(applicationState: self.applicationState) - if let tintColor = TintColor(rawValue: Int(defaultSettings.tintColor)) { - self.applicationState.tintColor = tintColor - self.tintColor = tintColor.color() - } - - if let theme = Theme(rawValue: Int(defaultSettings.theme)) { - self.applicationState.theme = theme - self.theme = theme.colorScheme() - } - - if let avatarShape = AvatarShape(rawValue: Int(defaultSettings.avatarShape)) { - self.applicationState.avatarShape = avatarShape - } - - self.applicationState.activeIcon = defaultSettings.activeIcon - self.applicationState.showSensitive = defaultSettings.showSensitive - self.applicationState.showPhotoDescription = defaultSettings.showPhotoDescription - - if let menuPosition = MenuPosition(rawValue: Int(defaultSettings.menuPosition)) { - self.applicationState.menuPosition = menuPosition - } - - self.applicationState.hapticTabSelectionEnabled = defaultSettings.hapticTabSelectionEnabled - self.applicationState.hapticRefreshEnabled = defaultSettings.hapticRefreshEnabled - self.applicationState.hapticButtonPressEnabled = defaultSettings.hapticButtonPressEnabled - self.applicationState.hapticAnimationEnabled = defaultSettings.hapticAnimationEnabled - self.applicationState.hapticNotificationEnabled = defaultSettings.hapticNotificationEnabled + self.tintColor = self.applicationState.tintColor.color() + self.theme = self.applicationState.theme.colorScheme() } private func setImagePipelines() { diff --git a/Vernissage/Views/ComposeView/ComposeView.swift b/Vernissage/Views/ComposeView.swift similarity index 100% rename from Vernissage/Views/ComposeView/ComposeView.swift rename to Vernissage/Views/ComposeView.swift diff --git a/VernissageShareExtension/ComposeView.swift b/VernissageShareExtension/ComposeView.swift index ca3109c..f78293f 100644 --- a/VernissageShareExtension/ComposeView.swift +++ b/VernissageShareExtension/ComposeView.swift @@ -9,65 +9,12 @@ import SwiftUI import PhotosUI import PixelfedKit import ClientKit - -// TODO: Move colors extenstions to shared. +import EnvironmentKit +import WidgetsKit +import ServicesKit struct ComposeView: View { - var body: some View { - VStack { - Text("Hello!") - Button("Close") { - NotificationCenter.default.post(name: NotificationsName.shareSheetClose, object: nil) - } - .buttonStyle(.borderedProminent) - } - } -} - -public class PhotoAttachment: ObservableObject, Identifiable, Equatable, Hashable { - public let id: String - public let photosPickerItem: PhotosPickerItem - - @Published public var photoData: Data? - @Published public var uploadedAttachment: UploadedAttachment? - @Published public var error: Error? - - init(photosPickerItem: PhotosPickerItem) { - self.id = UUID().uuidString - self.photosPickerItem = photosPickerItem - } - - public static func == (lhs: PhotoAttachment, rhs: PhotoAttachment) -> Bool { - lhs.id == rhs.id - } - - public func hash(into hasher: inout Hasher) { - return hasher.combine(self.id) - } -} - -extension [PhotoAttachment] { - public func hasUploadedPhotos() -> Bool { - return self.contains { photoAttachment in - photoAttachment.uploadedAttachment != nil - } - } - - public func getUploadedPhotoIds() -> [String] { - var ids: [String] = [] - - for item in self { - if let uploadedAttachment = item.uploadedAttachment { - ids.append(uploadedAttachment.id) - } - } - - return ids - } -} - -/* -struct ComposeView: View { + @EnvironmentObject var applicationState: ApplicationState @EnvironmentObject var client: Client @StateObject private var textModel: TextModel @@ -114,83 +61,79 @@ struct ComposeView: View { } } + private let attachments: [NSItemProvider] private let keyboardFontImageSize = 20.0 private let keyboardFontTextSize = 16.0 private let autocompleteFontTextSize = 12.0 - public init() { + public init(attachments: [NSItemProvider]) { + self.attachments = attachments _textModel = StateObject(wrappedValue: .init()) } var body: some View { - NavigationStack { - NavigationView { - ZStack(alignment: .bottom) { - self.composeBody() + NavigationView { + ZStack(alignment: .bottom) { + self.composeBody() - if self.isKeyboardPresented { - VStack(alignment: .leading, spacing: 0) { - self.autocompleteToolbar() - self.keyboardToolbar() - } - .transition(.opacity) + if self.isKeyboardPresented { + VStack(alignment: .leading, spacing: 0) { + self.autocompleteToolbar() + self.keyboardToolbar() } + .transition(.opacity) } - .frame(alignment: .topLeading) - .toolbar { - ToolbarItem(placement: .primaryAction) { - Button { - Task { - await self.publishStatus() - } - } label: { - Text("compose.title.publish", comment: "Publish") - } - .disabled(self.publishDisabled) - .buttonStyle(.borderedProminent) - } - - ToolbarItem(placement: .cancellationAction) { - Button(NSLocalizedString("compose.title.cancel", comment: "Cancel"), role: .cancel) { - NotificationCenter.default.post(name: NotificationsName.shareSheetClose, object: nil) - } - } - } - .onAppear { - self.textModel.client = self.client - } - .onChange(of: self.textModel.text) { _ in - self.refreshScreenState() - } - .onChange(of: self.selectedItems) { _ in - Task { - await self.loadPhotos() - } - } - .sheet(item: $showSheet, content: { sheetType in - switch sheetType { - case .photoDetails(let photoAttachment): - // TODO: Move to common views? - // PhotoEditorView(photoAttachment: photoAttachment) - EmptyView() - case .placeSelector: - // TODO: Move to common views? - // PlaceSelectorView(place: $place) - EmptyView() - } - }) - .onReceive(keyboardPublisher) { value in - withAnimation { - self.isKeyboardPresented = value - } - } - .photosPicker(isPresented: $photosPickerVisible, - selection: $selectedItems, - maxSelectionCount: 4, - matching: .images) - .navigationTitle("compose.navigationBar.title") - .navigationBarTitleDisplayMode(.inline) } + .frame(alignment: .topLeading) + .toolbar { + ToolbarItem(placement: .primaryAction) { + Button { + Task { + await self.publishStatus() + } + } label: { + Text("compose.title.publish", comment: "Publish") + } + .disabled(self.publishDisabled) + .buttonStyle(.borderedProminent) + } + + ToolbarItem(placement: .cancellationAction) { + Button(NSLocalizedString("compose.title.cancel", comment: "Cancel"), role: .cancel) { + NotificationCenter.default.post(name: NotificationsName.shareSheetClose, object: nil) + } + } + } + .onAppear { + self.textModel.client = self.client + } + .onChange(of: self.textModel.text) { _ in + self.refreshScreenState() + } + .onChange(of: self.selectedItems) { _ in + Task { + await self.loadPhotos() + } + } + .sheet(item: $showSheet, content: { sheetType in + switch sheetType { + case .photoDetails(let photoAttachment): + PhotoEditorView(photoAttachment: photoAttachment) + case .placeSelector: + PlaceSelectorView(place: $place) + } + }) + .onReceive(keyboardPublisher) { value in + withAnimation { + self.isKeyboardPresented = value + } + } + .photosPicker(isPresented: $photosPickerVisible, + selection: $selectedItems, + maxSelectionCount: 4, + matching: .images) + .navigationTitle("compose.navigationBar.title") + .navigationBarTitleDisplayMode(.inline) } .interactiveDismissDisabled(self.interactiveDismissDisabled) } @@ -217,9 +160,6 @@ struct ComposeView: View { // Grid with images. self.imagesGridView() - // Status when we are adding new comment. - self.statusModelView() - Spacer() } } @@ -255,32 +195,6 @@ struct ComposeView: View { .padding(8) } - @ViewBuilder - private func statusModelView() -> some View { - if let status = self.statusViewModel { - HStack(alignment: .top) { - UserAvatar(accountAvatar: status.account.avatar, size: .comment) - - VStack(alignment: .leading, spacing: 0) { - HStack(alignment: .top) { - Text(statusViewModel?.account.displayNameWithoutEmojis ?? "") - .foregroundColor(.mainTextColor) - .font(.footnote) - .fontWeight(.bold) - - Spacer() - } - - MarkdownFormattedText(status.content.asMarkdown) - .font(.subheadline) - .environment(\.openURL, OpenURLAction { _ in .handled }) - } - } - .padding(8) - .background(Color.selectedRowColor) - } - } - @ViewBuilder private func statusTextView() -> some View { TextView($textModel.text, getTextView: { textView in @@ -509,7 +423,7 @@ struct ComposeView: View { } private func placeholder() -> LocalizedStringKey { - self.statusViewModel == nil ? "compose.title.attachPhotoFull" : "compose.title.attachPhotoMini" + "compose.title.attachPhotoFull" } private func isPublishButtonDisabled() -> Bool { @@ -524,7 +438,7 @@ struct ComposeView: View { } // When status is not a comment, then photo is required. - if self.statusViewModel == nil && self.photosAttachment.hasUploadedPhotos() == false { + if self.photosAttachment.hasUploadedPhotos() == false { return true } @@ -637,7 +551,7 @@ struct ComposeView: View { let commentModel = CommentModel(status: statusModel, showDivider: false) self.applicationState.newComment = commentModel - dismiss() + NotificationCenter.default.post(name: NotificationsName.shareSheetClose, object: nil) } } catch { ErrorService.shared.handle(error, message: "compose.error.postingStatusFailed", showToastr: true) @@ -645,7 +559,7 @@ struct ComposeView: View { } private func createStatus() -> Pixelfed.Statuses.Components { - return Pixelfed.Statuses.Components(inReplyToId: self.statusViewModel?.id, + return Pixelfed.Statuses.Components(inReplyToId: nil, text: self.textModel.text.string, spoilerText: self.isSensitive ? self.spoilerText : String.empty(), mediaIds: self.photosAttachment.getUploadedPhotoIds(), @@ -655,4 +569,3 @@ struct ComposeView: View { commentsDisabled: self.commentsDisabled) } } -*/ diff --git a/VernissageShareExtension/ShareViewController.swift b/VernissageShareExtension/ShareViewController.swift index 780f1b0..2e8d03f 100644 --- a/VernissageShareExtension/ShareViewController.swift +++ b/VernissageShareExtension/ShareViewController.swift @@ -7,30 +7,59 @@ import SwiftUI import UIKit import Social +import ClientKit +import EnvironmentKit class ShareViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - if let item = extensionContext?.inputItems.first as? NSExtensionItem { - let view = ComposeView() - - let childView = UIHostingController(rootView: view) - addChild(childView) - - childView.view.frame = self.view.bounds - self.view.addSubview(childView.view) - childView.didMove(toParent: self) - childView.view.translatesAutoresizingMaskIntoConstraints = false - - NSLayoutConstraint.activate([ - childView.view.topAnchor.constraint(equalTo: self.view.topAnchor), - childView.view.bottomAnchor.constraint(equalTo: self.view.bottomAnchor), - childView.view.leadingAnchor.constraint(equalTo: self.view.leadingAnchor), - childView.view.trailingAnchor.constraint(equalTo: self.view.trailingAnchor) - ]) + guard let item = extensionContext?.inputItems.first as? NSExtensionItem else { + return } + guard let attachments = item.attachments else { + return + } + + // Create shared objects. + let applicationState = ApplicationState.shared + let client = Client.shared + + // Get curret signed in user. + guard let currentAccount = AccountDataHandler.shared.getCurrentAccountData() else { + return + } + + // Create Pixelfed client. + let accountModel = currentAccount.toAccountModel() + client.setAccount(account: accountModel) + + // Update application settings from database. + ApplicationSettingsHandler.shared.update(applicationState: applicationState) + + // Create view. + let view = ComposeView(attachments: attachments) + .environmentObject(applicationState) + .environmentObject(client) + .tint(applicationState.tintColor.color()) + + // Add view to current UIViewController. + let childView = UIHostingController(rootView: view) + addChild(childView) + + childView.view.frame = self.view.bounds + self.view.addSubview(childView.view) + childView.didMove(toParent: self) + childView.view.translatesAutoresizingMaskIntoConstraints = false + + NSLayoutConstraint.activate([ + childView.view.topAnchor.constraint(equalTo: self.view.topAnchor), + childView.view.bottomAnchor.constraint(equalTo: self.view.bottomAnchor), + childView.view.leadingAnchor.constraint(equalTo: self.view.leadingAnchor), + childView.view.trailingAnchor.constraint(equalTo: self.view.trailingAnchor) + ]) + NotificationCenter.default.addObserver(forName: NotificationsName.shareSheetClose, object: nil, queue: nil) { _ in self.close() } diff --git a/WidgetsKit/Package.swift b/WidgetsKit/Package.swift index 81a1425..aafdffd 100644 --- a/WidgetsKit/Package.swift +++ b/WidgetsKit/Package.swift @@ -20,6 +20,7 @@ let package = Package( // Dependencies declare other packages that this package depends on. .package(url: "https://github.com/exyte/ActivityIndicatorView.git", .upToNextMajor(from: "1.0.0")), .package(url: "https://github.com/divadretlaw/EmojiText", .upToNextMajor(from: "2.6.0")), + .package(url: "https://github.com/kean/Nuke", .upToNextMajor(from: "12.0.0")), .package(name: "PixelfedKit", path: "../PixelfedKit"), .package(name: "ClientKit", path: "../ClientKit"), .package(name: "ServicesKit", path: "../ServicesKit"), @@ -30,7 +31,17 @@ let package = Package( // Targets can depend on other targets in this package, and on products in packages this package depends on. .target( name: "WidgetsKit", - dependencies: ["ActivityIndicatorView", "EmojiText", "PixelfedKit", "ClientKit", "ServicesKit", "EnvironmentKit"]), + dependencies: [ + .product(name: "ActivityIndicatorView", package: "ActivityIndicatorView"), + .product(name: "Nuke", package: "Nuke"), + .product(name: "NukeUI", package: "Nuke"), + .product(name: "EmojiText", package: "EmojiText"), + .product(name: "PixelfedKit", package: "PixelfedKit"), + .product(name: "ClientKit", package: "ClientKit"), + .product(name: "ServicesKit", package: "ServicesKit"), + .product(name: "EnvironmentKit", package: "EnvironmentKit") + ] + ), .testTarget( name: "WidgetsKitTests", dependencies: ["WidgetsKit"]) diff --git a/Vernissage/Extensions/String+Date.swift b/WidgetsKit/Sources/WidgetsKit/Extensions/String+Date.swift similarity index 98% rename from Vernissage/Extensions/String+Date.swift rename to WidgetsKit/Sources/WidgetsKit/Extensions/String+Date.swift index 8e52729..af1eba9 100644 --- a/Vernissage/Extensions/String+Date.swift +++ b/WidgetsKit/Sources/WidgetsKit/Extensions/String+Date.swift @@ -6,8 +6,8 @@ import Foundation -extension String { - public enum DateFormatType { +public extension String { + enum DateFormatType { /// The ISO8601 formatted year "yyyy" i.e. 1997 case isoYear diff --git a/Vernissage/Extensions/String+Empty.swift b/WidgetsKit/Sources/WidgetsKit/Extensions/String+Empty.swift similarity index 89% rename from Vernissage/Extensions/String+Empty.swift rename to WidgetsKit/Sources/WidgetsKit/Extensions/String+Empty.swift index dcfca2f..9783dcb 100644 --- a/Vernissage/Extensions/String+Empty.swift +++ b/WidgetsKit/Sources/WidgetsKit/Extensions/String+Empty.swift @@ -6,7 +6,7 @@ import Foundation -extension String { +public extension String { static func empty() -> String { return "" } diff --git a/Vernissage/Extensions/String+Random.swift b/WidgetsKit/Sources/WidgetsKit/Extensions/String+Random.swift similarity index 93% rename from Vernissage/Extensions/String+Random.swift rename to WidgetsKit/Sources/WidgetsKit/Extensions/String+Random.swift index f6494c7..7eb6b29 100644 --- a/Vernissage/Extensions/String+Random.swift +++ b/WidgetsKit/Sources/WidgetsKit/Extensions/String+Random.swift @@ -6,7 +6,7 @@ import Foundation -extension String { +public extension String { static func randomString(length: Int) -> String { let letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" return String((0..= 6 else { return nil } let sizeFlag = String(blurHash[0]).decode83() diff --git a/Vernissage/Extensions/UIImage+Jpeg.swift b/WidgetsKit/Sources/WidgetsKit/Extensions/UIImage+Jpeg.swift similarity index 95% rename from Vernissage/Extensions/UIImage+Jpeg.swift rename to WidgetsKit/Sources/WidgetsKit/Extensions/UIImage+Jpeg.swift index a78ffb8..ef07a1f 100644 --- a/Vernissage/Extensions/UIImage+Jpeg.swift +++ b/WidgetsKit/Sources/WidgetsKit/Extensions/UIImage+Jpeg.swift @@ -6,8 +6,8 @@ import SwiftUI -extension UIImage { - public func getJpegData() -> Data? { +public extension UIImage { + func getJpegData() -> Data? { #if targetEnvironment(simulator) // For testing purposes. let converted = self.convertToExtendedSRGBJpeg() @@ -31,7 +31,7 @@ extension UIImage { } } - public func convertToExtendedSRGBJpeg() -> Data? { + func convertToExtendedSRGBJpeg() -> Data? { guard let sourceImage = CIImage(image: self, options: [.applyOrientationProperty: true]) else { return self.jpegData(compressionQuality: 0.9) } diff --git a/Vernissage/Extensions/UIImage+Size.swift b/WidgetsKit/Sources/WidgetsKit/Extensions/UIImage+Size.swift similarity index 96% rename from Vernissage/Extensions/UIImage+Size.swift rename to WidgetsKit/Sources/WidgetsKit/Extensions/UIImage+Size.swift index 26c6dd5..71c1d13 100644 --- a/Vernissage/Extensions/UIImage+Size.swift +++ b/WidgetsKit/Sources/WidgetsKit/Extensions/UIImage+Size.swift @@ -6,7 +6,7 @@ import UIKit -extension UIImage.Orientation { +public extension UIImage.Orientation { var exifOrientation: Int32 { switch self { case .up: return 1 @@ -22,7 +22,7 @@ extension UIImage.Orientation { } } -extension UIImage { +public extension UIImage { func resized(to targetSize: CGSize) -> UIImage { guard let sourceImage = CIImage(image: self, options: [.applyOrientationProperty: true]) else { return self diff --git a/Vernissage/Extensions/View+Transition.swift b/WidgetsKit/Sources/WidgetsKit/Extensions/View+Transition.swift similarity index 95% rename from Vernissage/Extensions/View+Transition.swift rename to WidgetsKit/Sources/WidgetsKit/Extensions/View+Transition.swift index aaf73ae..6b3fe57 100644 --- a/Vernissage/Extensions/View+Transition.swift +++ b/WidgetsKit/Sources/WidgetsKit/Extensions/View+Transition.swift @@ -6,7 +6,7 @@ import SwiftUI -extension View { +public extension View { func withoutAnimation(action: @escaping () -> Void) { var transaction = Transaction() transaction.disablesAnimations = true diff --git a/Vernissage/Models/PhotoAttachment.swift b/WidgetsKit/Sources/WidgetsKit/Models/PhotoAttachment.swift similarity index 87% rename from Vernissage/Models/PhotoAttachment.swift rename to WidgetsKit/Sources/WidgetsKit/Models/PhotoAttachment.swift index 380a23d..2eae4e4 100644 --- a/Vernissage/Models/PhotoAttachment.swift +++ b/WidgetsKit/Sources/WidgetsKit/Models/PhotoAttachment.swift @@ -17,7 +17,7 @@ public class PhotoAttachment: ObservableObject, Identifiable, Equatable, Hashabl @Published public var uploadedAttachment: UploadedAttachment? @Published public var error: Error? - init(photosPickerItem: PhotosPickerItem) { + public init(photosPickerItem: PhotosPickerItem) { self.id = UUID().uuidString self.photosPickerItem = photosPickerItem } @@ -31,14 +31,14 @@ public class PhotoAttachment: ObservableObject, Identifiable, Equatable, Hashabl } } -extension [PhotoAttachment] { - public func hasUploadedPhotos() -> Bool { +public extension [PhotoAttachment] { + func hasUploadedPhotos() -> Bool { return self.contains { photoAttachment in photoAttachment.uploadedAttachment != nil } } - public func getUploadedPhotoIds() -> [String] { + func getUploadedPhotoIds() -> [String] { var ids: [String] = [] for item in self { diff --git a/WidgetsKit/Sources/WidgetsKit/TextView/TextModel.swift b/WidgetsKit/Sources/WidgetsKit/TextView/TextModel.swift index c1e470e..b69c9de 100644 --- a/WidgetsKit/Sources/WidgetsKit/TextView/TextModel.swift +++ b/WidgetsKit/Sources/WidgetsKit/TextView/TextModel.swift @@ -7,6 +7,7 @@ import Foundation import SwiftUI import PixelfedKit +import ServicesKit import ClientKit import EnvironmentKit @@ -130,8 +131,7 @@ public class TextModel: NSObject, ObservableObject { } } } catch { - // TODO: Prepare something for common error. - // ErrorService.shared.handle(error, message: "Error during composing attribute string.") + ErrorService.shared.handle(error, message: "Error during composing attribute string.") } } @@ -158,8 +158,7 @@ public class TextModel: NSObject, ObservableObject { break } } catch { - // TODO: Prepare something for common error. - // ErrorService.shared.handle(error, message: "Error during downloading autocomplete.") + ErrorService.shared.handle(error, message: "Error during downloading autocomplete.") } } } diff --git a/Vernissage/ViewModifiers/ClearButton.swift b/WidgetsKit/Sources/WidgetsKit/ViewModifiers/ClearButton.swift similarity index 100% rename from Vernissage/ViewModifiers/ClearButton.swift rename to WidgetsKit/Sources/WidgetsKit/ViewModifiers/ClearButton.swift diff --git a/Vernissage/ViewModifiers/FirstAppear.swift b/WidgetsKit/Sources/WidgetsKit/ViewModifiers/FirstAppear.swift similarity index 100% rename from Vernissage/ViewModifiers/FirstAppear.swift rename to WidgetsKit/Sources/WidgetsKit/ViewModifiers/FirstAppear.swift diff --git a/Vernissage/ViewModifiers/NavigationMenu.swift b/WidgetsKit/Sources/WidgetsKit/ViewModifiers/NavigationMenu.swift similarity index 100% rename from Vernissage/ViewModifiers/NavigationMenu.swift rename to WidgetsKit/Sources/WidgetsKit/ViewModifiers/NavigationMenu.swift diff --git a/Vernissage/Views/ComposeView/Subviews/ImageUploadView.swift b/WidgetsKit/Sources/WidgetsKit/Views/ImageUploadView.swift similarity index 95% rename from Vernissage/Views/ComposeView/Subviews/ImageUploadView.swift rename to WidgetsKit/Sources/WidgetsKit/Views/ImageUploadView.swift index 4819499..f45a53f 100644 --- a/Vernissage/Views/ComposeView/Subviews/ImageUploadView.swift +++ b/WidgetsKit/Sources/WidgetsKit/Views/ImageUploadView.swift @@ -6,10 +6,8 @@ import SwiftUI import ServicesKit -import WidgetsKit -struct ImageUploadView: View { - @EnvironmentObject public var routerPath: RouterPath +public struct ImageUploadView: View { @ObservedObject public var photoAttachment: PhotoAttachment private let delete: () -> Void @@ -23,7 +21,7 @@ struct ImageUploadView: View { self.upload = upload } - var body: some View { + public var body: some View { if photoAttachment.error != nil { Menu { Button { diff --git a/Vernissage/Views/PhotoEditorView.swift b/WidgetsKit/Sources/WidgetsKit/Views/PhotoEditorView.swift similarity index 95% rename from Vernissage/Views/PhotoEditorView.swift rename to WidgetsKit/Sources/WidgetsKit/Views/PhotoEditorView.swift index bead0ad..3220629 100644 --- a/Vernissage/Views/PhotoEditorView.swift +++ b/WidgetsKit/Sources/WidgetsKit/Views/PhotoEditorView.swift @@ -7,16 +7,19 @@ import SwiftUI import ClientKit import ServicesKit -import WidgetsKit -struct PhotoEditorView: View { +public struct PhotoEditorView: View { @EnvironmentObject var client: Client @Environment(\.dismiss) private var dismiss @State private var description: String = String.empty() @ObservedObject public var photoAttachment: PhotoAttachment - var body: some View { + public init(photoAttachment: PhotoAttachment) { + self.photoAttachment = photoAttachment + } + + public var body: some View { NavigationView { VStack(alignment: .leading) { if let data = photoAttachment.photoData, let uiImage = UIImage(data: data) { diff --git a/Vernissage/Views/PlaceSelectorView.swift b/WidgetsKit/Sources/WidgetsKit/Views/PlaceSelectorView.swift similarity index 96% rename from Vernissage/Views/PlaceSelectorView.swift rename to WidgetsKit/Sources/WidgetsKit/Views/PlaceSelectorView.swift index 44428b8..bdb3f4c 100644 --- a/Vernissage/Views/PlaceSelectorView.swift +++ b/WidgetsKit/Sources/WidgetsKit/Views/PlaceSelectorView.swift @@ -9,9 +9,8 @@ import PixelfedKit import ClientKit import ServicesKit import EnvironmentKit -import WidgetsKit -struct PlaceSelectorView: View { +public struct PlaceSelectorView: View { @EnvironmentObject var applicationState: ApplicationState @EnvironmentObject var client: Client @Environment(\.dismiss) private var dismiss @@ -28,7 +27,11 @@ struct PlaceSelectorView: View { case search } - var body: some View { + public init(place: Binding) { + self._place = place + } + + public var body: some View { NavigationView { VStack(alignment: .leading) { List { diff --git a/WidgetsKit/Sources/WidgetsKit/ActionButton.swift b/WidgetsKit/Sources/WidgetsKit/Widgets/ActionButton.swift similarity index 100% rename from WidgetsKit/Sources/WidgetsKit/ActionButton.swift rename to WidgetsKit/Sources/WidgetsKit/Widgets/ActionButton.swift diff --git a/WidgetsKit/Sources/WidgetsKit/ActionMenu.swift b/WidgetsKit/Sources/WidgetsKit/Widgets/ActionMenu.swift similarity index 100% rename from WidgetsKit/Sources/WidgetsKit/ActionMenu.swift rename to WidgetsKit/Sources/WidgetsKit/Widgets/ActionMenu.swift diff --git a/WidgetsKit/Sources/WidgetsKit/BlurredImage.swift b/WidgetsKit/Sources/WidgetsKit/Widgets/BlurredImage.swift similarity index 99% rename from WidgetsKit/Sources/WidgetsKit/BlurredImage.swift rename to WidgetsKit/Sources/WidgetsKit/Widgets/BlurredImage.swift index 8798671..dbdad8c 100644 --- a/WidgetsKit/Sources/WidgetsKit/BlurredImage.swift +++ b/WidgetsKit/Sources/WidgetsKit/Widgets/BlurredImage.swift @@ -14,7 +14,7 @@ public struct BlurredImage: View { public init(blurhash: String? = nil) { self.blurhash = blurhash } - + public var body: some View { if let blurhash, let uiImage = UIImage(blurHash: blurhash, size: CGSize(width: 32, height: 32)) { Image(uiImage: uiImage) diff --git a/WidgetsKit/Sources/WidgetsKit/BottomRight.swift b/WidgetsKit/Sources/WidgetsKit/Widgets/BottomRight.swift similarity index 100% rename from WidgetsKit/Sources/WidgetsKit/BottomRight.swift rename to WidgetsKit/Sources/WidgetsKit/Widgets/BottomRight.swift diff --git a/WidgetsKit/Sources/WidgetsKit/ContentWarning.swift b/WidgetsKit/Sources/WidgetsKit/Widgets/ContentWarning.swift similarity index 100% rename from WidgetsKit/Sources/WidgetsKit/ContentWarning.swift rename to WidgetsKit/Sources/WidgetsKit/Widgets/ContentWarning.swift diff --git a/WidgetsKit/Sources/WidgetsKit/ErrorView.swift b/WidgetsKit/Sources/WidgetsKit/Widgets/ErrorView.swift similarity index 100% rename from WidgetsKit/Sources/WidgetsKit/ErrorView.swift rename to WidgetsKit/Sources/WidgetsKit/Widgets/ErrorView.swift diff --git a/WidgetsKit/Sources/WidgetsKit/FavouriteTouch.swift b/WidgetsKit/Sources/WidgetsKit/Widgets/FavouriteTouch.swift similarity index 100% rename from WidgetsKit/Sources/WidgetsKit/FavouriteTouch.swift rename to WidgetsKit/Sources/WidgetsKit/Widgets/FavouriteTouch.swift diff --git a/WidgetsKit/Sources/WidgetsKit/LabelIcon.swift b/WidgetsKit/Sources/WidgetsKit/Widgets/LabelIcon.swift similarity index 100% rename from WidgetsKit/Sources/WidgetsKit/LabelIcon.swift rename to WidgetsKit/Sources/WidgetsKit/Widgets/LabelIcon.swift diff --git a/WidgetsKit/Sources/WidgetsKit/LoadingIndicator.swift b/WidgetsKit/Sources/WidgetsKit/Widgets/LoadingIndicator.swift similarity index 100% rename from WidgetsKit/Sources/WidgetsKit/LoadingIndicator.swift rename to WidgetsKit/Sources/WidgetsKit/Widgets/LoadingIndicator.swift diff --git a/WidgetsKit/Sources/WidgetsKit/MarkdownFormattedText.swift b/WidgetsKit/Sources/WidgetsKit/Widgets/MarkdownFormattedText.swift similarity index 100% rename from WidgetsKit/Sources/WidgetsKit/MarkdownFormattedText.swift rename to WidgetsKit/Sources/WidgetsKit/Widgets/MarkdownFormattedText.swift diff --git a/WidgetsKit/Sources/WidgetsKit/NoDataView.swift b/WidgetsKit/Sources/WidgetsKit/Widgets/NoDataView.swift similarity index 100% rename from WidgetsKit/Sources/WidgetsKit/NoDataView.swift rename to WidgetsKit/Sources/WidgetsKit/Widgets/NoDataView.swift diff --git a/WidgetsKit/Sources/WidgetsKit/TagWidget.swift b/WidgetsKit/Sources/WidgetsKit/Widgets/TagWidget.swift similarity index 100% rename from WidgetsKit/Sources/WidgetsKit/TagWidget.swift rename to WidgetsKit/Sources/WidgetsKit/Widgets/TagWidget.swift diff --git a/WidgetsKit/Sources/WidgetsKit/TextInputField.swift b/WidgetsKit/Sources/WidgetsKit/Widgets/TextInputField.swift similarity index 100% rename from WidgetsKit/Sources/WidgetsKit/TextInputField.swift rename to WidgetsKit/Sources/WidgetsKit/Widgets/TextInputField.swift diff --git a/WidgetsKit/Sources/WidgetsKit/UserAvatar.swift b/WidgetsKit/Sources/WidgetsKit/Widgets/UserAvatar.swift similarity index 100% rename from WidgetsKit/Sources/WidgetsKit/UserAvatar.swift rename to WidgetsKit/Sources/WidgetsKit/Widgets/UserAvatar.swift diff --git a/WidgetsKit/Sources/WidgetsKit/UsernameRow.swift b/WidgetsKit/Sources/WidgetsKit/Widgets/UsernameRow.swift similarity index 100% rename from WidgetsKit/Sources/WidgetsKit/UsernameRow.swift rename to WidgetsKit/Sources/WidgetsKit/Widgets/UsernameRow.swift