From 74a56df5bd3fcb371fbb7b02c8f88394ff2e428e Mon Sep 17 00:00:00 2001 From: Alexander Romanov Date: Wed, 15 Mar 2023 10:52:22 +0300 Subject: [PATCH 1/2] Update Kits --- Package.swift | 9 ++++ .../AttachmentScreen/AttachmentView.swift | 2 +- .../CreateEventScreen/CreateEventView.swift | 2 +- .../CreateEventViewModel.swift | 2 +- .../CreateEventViewSheet.swift | 2 +- .../SaveForView/SaveForView.swift | 2 +- .../Pickers/AlertPicker.swift | 2 +- .../Pickers/CalendarPicker.swift | 2 +- .../Pickers/RepeatPicker.swift | 2 +- .../AttendeesList/AttendeesView.swift | 2 +- .../ContactsLists/ContactsListsView.swift | 2 +- .../ContactsPicker/EmailPickerView.swift | 2 +- .../OversizeKit/LauncherKit/Launcher.swift | 2 +- .../Apperance/AppearanceSettingView.swift | 2 +- .../Security/PINCode/SetPINCodeView.swift | 2 +- .../SettingsKit/Views/SettingsView.swift | 2 +- .../StoreScreen/StoreInstuctinsView.swift | 2 +- .../StoreScreen/StoreSpecialOfferView.swift | 2 +- .../StoreKit/StoreScreen/StoreView.swift | 2 +- .../StoreKit/Views/PrmiumBannerRow.swift | 2 +- .../StoreKit/Views/StoreProductView.swift | 2 +- .../OversizeNoticeKit/NoticeListView.swift | 2 +- .../OnboardingView.swift | 2 +- .../OversizePhotoKit/PhotosGalleryView.swift | 46 +++++++++++++++++++ 24 files changed, 77 insertions(+), 22 deletions(-) create mode 100644 Sources/OversizePhotoKit/PhotosGalleryView.swift diff --git a/Package.swift b/Package.swift index 68096b9..72d36a1 100644 --- a/Package.swift +++ b/Package.swift @@ -38,6 +38,7 @@ let package = Package( .library(name: "OversizeContactsKit", targets: ["OversizeContactsKit"]), .library(name: "OversizeLocationKit", targets: ["OversizeLocationKit"]), .library(name: "OversizeNotificationKit", targets: ["OversizeNotificationKit"]), + .library(name: "OversizePhotoKit", targets: ["OversizePhotoKit"]), ], dependencies: productionDependencies, targets: [ @@ -114,6 +115,14 @@ let package = Package( .product(name: "OversizeServices", package: "OversizeServices"), ] ), + .target( + name: "OversizePhotoKit", + dependencies: [ + "OversizeKit", + .product(name: "OversizeUI", package: "OversizeUI"), + .product(name: "OversizePhotoComponents", package: "OversizeComponents"), + ] + ), .testTarget( name: "OversizeKitTests", dependencies: ["OversizeKit"] diff --git a/Sources/OversizeCalendarKit/CreateEventScreen/AttachmentScreen/AttachmentView.swift b/Sources/OversizeCalendarKit/CreateEventScreen/AttachmentScreen/AttachmentView.swift index 7322dc2..78a3809 100644 --- a/Sources/OversizeCalendarKit/CreateEventScreen/AttachmentScreen/AttachmentView.swift +++ b/Sources/OversizeCalendarKit/CreateEventScreen/AttachmentScreen/AttachmentView.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // AttachmentView.swift // diff --git a/Sources/OversizeCalendarKit/CreateEventScreen/CreateEventView.swift b/Sources/OversizeCalendarKit/CreateEventScreen/CreateEventView.swift index 9f89795..14583d9 100644 --- a/Sources/OversizeCalendarKit/CreateEventScreen/CreateEventView.swift +++ b/Sources/OversizeCalendarKit/CreateEventScreen/CreateEventView.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // CreateEventView.swift // diff --git a/Sources/OversizeCalendarKit/CreateEventScreen/CreateEventViewModel.swift b/Sources/OversizeCalendarKit/CreateEventScreen/CreateEventViewModel.swift index ed2e315..5947764 100644 --- a/Sources/OversizeCalendarKit/CreateEventScreen/CreateEventViewModel.swift +++ b/Sources/OversizeCalendarKit/CreateEventScreen/CreateEventViewModel.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // CreateEventViewModel.swift // diff --git a/Sources/OversizeCalendarKit/CreateEventScreen/CreateEventViewSheet.swift b/Sources/OversizeCalendarKit/CreateEventScreen/CreateEventViewSheet.swift index 1d207c5..5a9513f 100644 --- a/Sources/OversizeCalendarKit/CreateEventScreen/CreateEventViewSheet.swift +++ b/Sources/OversizeCalendarKit/CreateEventScreen/CreateEventViewSheet.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // CreateEventViewSheet.swift // diff --git a/Sources/OversizeCalendarKit/CreateEventScreen/SaveForView/SaveForView.swift b/Sources/OversizeCalendarKit/CreateEventScreen/SaveForView/SaveForView.swift index 5fa43ce..7f673fe 100644 --- a/Sources/OversizeCalendarKit/CreateEventScreen/SaveForView/SaveForView.swift +++ b/Sources/OversizeCalendarKit/CreateEventScreen/SaveForView/SaveForView.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // SaveForView.swift // diff --git a/Sources/OversizeCalendarKit/Pickers/AlertPicker.swift b/Sources/OversizeCalendarKit/Pickers/AlertPicker.swift index e6a45e8..bdd4492 100644 --- a/Sources/OversizeCalendarKit/Pickers/AlertPicker.swift +++ b/Sources/OversizeCalendarKit/Pickers/AlertPicker.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // AlertPicker.swift // diff --git a/Sources/OversizeCalendarKit/Pickers/CalendarPicker.swift b/Sources/OversizeCalendarKit/Pickers/CalendarPicker.swift index 8f1391f..f09adae 100644 --- a/Sources/OversizeCalendarKit/Pickers/CalendarPicker.swift +++ b/Sources/OversizeCalendarKit/Pickers/CalendarPicker.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // CalendarPicker.swift // diff --git a/Sources/OversizeCalendarKit/Pickers/RepeatPicker.swift b/Sources/OversizeCalendarKit/Pickers/RepeatPicker.swift index 138b3a2..5ebdaa5 100644 --- a/Sources/OversizeCalendarKit/Pickers/RepeatPicker.swift +++ b/Sources/OversizeCalendarKit/Pickers/RepeatPicker.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // RepeatPicker.swift // diff --git a/Sources/OversizeContactsKit/AttendeesList/AttendeesView.swift b/Sources/OversizeContactsKit/AttendeesList/AttendeesView.swift index 09bd487..1a4f07c 100644 --- a/Sources/OversizeContactsKit/AttendeesList/AttendeesView.swift +++ b/Sources/OversizeContactsKit/AttendeesList/AttendeesView.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // AttendeesView.swift // diff --git a/Sources/OversizeContactsKit/ContactsLists/ContactsListsView.swift b/Sources/OversizeContactsKit/ContactsLists/ContactsListsView.swift index a8de0aa..fc81abe 100644 --- a/Sources/OversizeContactsKit/ContactsLists/ContactsListsView.swift +++ b/Sources/OversizeContactsKit/ContactsLists/ContactsListsView.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // ContactsListsView.swift // diff --git a/Sources/OversizeContactsKit/ContactsPicker/EmailPickerView.swift b/Sources/OversizeContactsKit/ContactsPicker/EmailPickerView.swift index d064c49..e78c6b1 100644 --- a/Sources/OversizeContactsKit/ContactsPicker/EmailPickerView.swift +++ b/Sources/OversizeContactsKit/ContactsPicker/EmailPickerView.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // EmailPickerView.swift // diff --git a/Sources/OversizeKit/LauncherKit/Launcher.swift b/Sources/OversizeKit/LauncherKit/Launcher.swift index d353b09..ab3de09 100644 --- a/Sources/OversizeKit/LauncherKit/Launcher.swift +++ b/Sources/OversizeKit/LauncherKit/Launcher.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // Launcher.swift // diff --git a/Sources/OversizeKit/SettingsKit/Views/Apperance/AppearanceSettingView.swift b/Sources/OversizeKit/SettingsKit/Views/Apperance/AppearanceSettingView.swift index dc3d2a6..b5f1608 100644 --- a/Sources/OversizeKit/SettingsKit/Views/Apperance/AppearanceSettingView.swift +++ b/Sources/OversizeKit/SettingsKit/Views/Apperance/AppearanceSettingView.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // AppearanceSettingView.swift // diff --git a/Sources/OversizeKit/SettingsKit/Views/Security/PINCode/SetPINCodeView.swift b/Sources/OversizeKit/SettingsKit/Views/Security/PINCode/SetPINCodeView.swift index 32aadb2..a1b894b 100644 --- a/Sources/OversizeKit/SettingsKit/Views/Security/PINCode/SetPINCodeView.swift +++ b/Sources/OversizeKit/SettingsKit/Views/Security/PINCode/SetPINCodeView.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // SetPINCodeView.swift // diff --git a/Sources/OversizeKit/SettingsKit/Views/SettingsView.swift b/Sources/OversizeKit/SettingsKit/Views/SettingsView.swift index 998d6d0..700a660 100644 --- a/Sources/OversizeKit/SettingsKit/Views/SettingsView.swift +++ b/Sources/OversizeKit/SettingsKit/Views/SettingsView.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // SettingsView.swift // diff --git a/Sources/OversizeKit/StoreKit/StoreScreen/StoreInstuctinsView.swift b/Sources/OversizeKit/StoreKit/StoreScreen/StoreInstuctinsView.swift index 2f3097e..1b95429 100644 --- a/Sources/OversizeKit/StoreKit/StoreScreen/StoreInstuctinsView.swift +++ b/Sources/OversizeKit/StoreKit/StoreScreen/StoreInstuctinsView.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // StoreInstuctinsView.swift // diff --git a/Sources/OversizeKit/StoreKit/StoreScreen/StoreSpecialOfferView.swift b/Sources/OversizeKit/StoreKit/StoreScreen/StoreSpecialOfferView.swift index 7c94152..b2ccee1 100644 --- a/Sources/OversizeKit/StoreKit/StoreScreen/StoreSpecialOfferView.swift +++ b/Sources/OversizeKit/StoreKit/StoreScreen/StoreSpecialOfferView.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // StoreSpecialOfferView.swift // diff --git a/Sources/OversizeKit/StoreKit/StoreScreen/StoreView.swift b/Sources/OversizeKit/StoreKit/StoreScreen/StoreView.swift index 3145428..aa2055b 100644 --- a/Sources/OversizeKit/StoreKit/StoreScreen/StoreView.swift +++ b/Sources/OversizeKit/StoreKit/StoreScreen/StoreView.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // StoreView.swift // diff --git a/Sources/OversizeKit/StoreKit/Views/PrmiumBannerRow.swift b/Sources/OversizeKit/StoreKit/Views/PrmiumBannerRow.swift index 102a0e1..b6e99ea 100644 --- a/Sources/OversizeKit/StoreKit/Views/PrmiumBannerRow.swift +++ b/Sources/OversizeKit/StoreKit/Views/PrmiumBannerRow.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // PrmiumBannerRow.swift // diff --git a/Sources/OversizeKit/StoreKit/Views/StoreProductView.swift b/Sources/OversizeKit/StoreKit/Views/StoreProductView.swift index 21b6ef0..fac9083 100644 --- a/Sources/OversizeKit/StoreKit/Views/StoreProductView.swift +++ b/Sources/OversizeKit/StoreKit/Views/StoreProductView.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // StoreProductView.swift // diff --git a/Sources/OversizeNoticeKit/NoticeListView.swift b/Sources/OversizeNoticeKit/NoticeListView.swift index c4f8137..4eec60b 100644 --- a/Sources/OversizeNoticeKit/NoticeListView.swift +++ b/Sources/OversizeNoticeKit/NoticeListView.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // NoticeListView.swift // diff --git a/Sources/OversizeOnboardingKit/OnboardingView.swift b/Sources/OversizeOnboardingKit/OnboardingView.swift index c43814f..081ee47 100644 --- a/Sources/OversizeOnboardingKit/OnboardingView.swift +++ b/Sources/OversizeOnboardingKit/OnboardingView.swift @@ -1,5 +1,5 @@ // -// Copyright © 2022 Alexander Romanov +// Copyright © 2023 Alexander Romanov // OnboardingView.swift // diff --git a/Sources/OversizePhotoKit/PhotosGalleryView.swift b/Sources/OversizePhotoKit/PhotosGalleryView.swift new file mode 100644 index 0000000..a00ebc6 --- /dev/null +++ b/Sources/OversizePhotoKit/PhotosGalleryView.swift @@ -0,0 +1,46 @@ +// +// Copyright © 2023 Alexander Romanov +// PhotosGalleryView.swift +// + +import OversizePhotoComponents +import OversizeUI +import SwiftUI + +public struct PhotosGalleryView: View { + private let title: String + private let images: [Image] + @State private var isShowPhoto: Bool = false + @State private var selection: Int = 0 + + public init(title: String = "Photos", images: [Image]) { + self.title = title + self.images = images + } + + public var body: some View { + PageView(title) { + if images.isEmpty { + Text("Not photos") + .title3() + .onSurfaceHighEmphasisForegroundColor() + } else { + ImageGridView(images, columnCount: .constant(3)) { image in + let index = images.firstIndex(of: image) + selection = index ?? 0 + isShowPhoto = true + } longPressAction: { _ in } + } + } + .leadingBar { + BarButton(.back) + } + .photoOverlay(isPresent: $isShowPhoto, selection: $selection, photos: images) + } +} + + struct PhotosGalleryView_Previews: PreviewProvider { + static var previews: some View { + PhotosGalleryView(images: []) + } + } From c80234279551d4891ccc788fb2525962e85d8021 Mon Sep 17 00:00:00 2001 From: Alexander Romanov Date: Wed, 15 Mar 2023 10:53:38 +0300 Subject: [PATCH 2/2] Update CI --- .github/workflows/bump.yml | 20 ++++++++++++++++++++ .github/workflows/release.yml | 16 ++++++++++++++++ .github/workflows/tag-and-relise.yml | 15 --------------- 3 files changed, 36 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/bump.yml create mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/tag-and-relise.yml diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml new file mode 100644 index 0000000..fb1699e --- /dev/null +++ b/.github/workflows/bump.yml @@ -0,0 +1,20 @@ +name: Bump version +on: + push: + branches: + - main +jobs: + + tag: + name: Create tag + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: '0' + + - name: Bump version and push tag + uses: anothrNick/github-tag-action@1.61.0 + env: + GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }} + WITH_V: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0242e2a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,16 @@ +name: Release + +on: + push: + tags: + - "*.*.*" + +jobs: + build: + name: Create release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Release + uses: softprops/action-gh-release@v1 diff --git a/.github/workflows/tag-and-relise.yml b/.github/workflows/tag-and-relise.yml deleted file mode 100644 index 9bc1776..0000000 --- a/.github/workflows/tag-and-relise.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Bump version -on: - push: - branches: - - master -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: Bump version and push tag - uses: anothrNick/github-tag-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - REPO_OWNER: anothrNick