diff --git a/Modules/MicX/Mic/src/Mic.K.swift b/Modules/MicX/Mic/src/Mic.K.swift new file mode 100644 index 0000000..f37112f --- /dev/null +++ b/Modules/MicX/Mic/src/Mic.K.swift @@ -0,0 +1,5 @@ +public extension Mic { + enum K { + public static let isActive = "Mic.isActive" + } +} diff --git a/Modules/MicX/Mic/src/Mic.swift b/Modules/MicX/Mic/src/Mic.swift new file mode 100644 index 0000000..c3467a3 --- /dev/null +++ b/Modules/MicX/Mic/src/Mic.swift @@ -0,0 +1 @@ +public enum Mic { } diff --git a/Modules/MicX/MicItem/src/MicItem.V.swift b/Modules/MicX/MicItem/src/MicItem.V.swift new file mode 100644 index 0000000..7406eea --- /dev/null +++ b/Modules/MicX/MicItem/src/MicItem.V.swift @@ -0,0 +1,27 @@ +import BusX +import SwiftUI + +extension MicItem { + public struct V: View { + @StateObject var isActive = BusUI.Value(Mic.K.isActive, false) + + public init() { + DispatchQueue.main.asyncAfter(deadline: .now() + 2) { + Bus.send(Mic.K.isActive, true) + } + DispatchQueue.main.asyncAfter(deadline: .now() + 5) { + Bus.send(Mic.K.isActive, false) + } + } + + public var body: some View { + Text("Mic activity") + .padding(8) + .border( + isActive.v ? Color.black : Color.gray, + width: isActive.v ? 3 : 1 + ) + .animation(.easeInOut(duration: 0.3)) + } + } +} diff --git a/Modules/MicX/MicItem/src/MicItem.swift b/Modules/MicX/MicItem/src/MicItem.swift new file mode 100644 index 0000000..c7740eb --- /dev/null +++ b/Modules/MicX/MicItem/src/MicItem.swift @@ -0,0 +1 @@ +public enum MicItem { } diff --git a/Modules/MicX/MicX.podspec b/Modules/MicX/MicX.podspec new file mode 100644 index 0000000..9eb99ce --- /dev/null +++ b/Modules/MicX/MicX.podspec @@ -0,0 +1,17 @@ +Pod::Spec.new do |s| + +s.name = 'MicX' +s.version = '2024.01.15' +s.license = 'IVCS' +s.summary = 'Отображение звуковой активности участника' +s.homepage = 'IVCS' +s.author = 'IVCS' +s.source = { :git => 'https://fake.com/FAKE.git', :tag => s.version } +s.source_files = '**/**/*.{swift,yml}' +s.swift_version = '5.2' +s.ios.deployment_target = '14.0' +s.dependency 'AELog' +s.dependency 'BusX' +s.dependency 'MPAKX' + +end diff --git a/app/Podfile b/app/Podfile index 07c0d57..633d025 100644 --- a/app/Podfile +++ b/app/Podfile @@ -6,6 +6,7 @@ pod 'AELog' pod 'BusX', :path => '../Modules/BusX' pod 'MeetupIdX', :path => '../Modules/MeetupIdX' +pod 'MicX', :path => '../Modules/MicX' pod 'MPAKX', :path => '../Modules/MPAKX' target 'pesochnicza' do diff --git a/app/Podfile.lock b/app/Podfile.lock index 73b5162..8c7b6d2 100644 --- a/app/Podfile.lock +++ b/app/Podfile.lock @@ -5,12 +5,17 @@ PODS: - AELog - BusX - MPAKX + - MicX (2024.01.15): + - AELog + - BusX + - MPAKX - MPAKX (2023.12.15) DEPENDENCIES: - AELog - BusX (from `../Modules/BusX`) - MeetupIdX (from `../Modules/MeetupIdX`) + - MicX (from `../Modules/MicX`) - MPAKX (from `../Modules/MPAKX`) SPEC REPOS: @@ -22,6 +27,8 @@ EXTERNAL SOURCES: :path: "../Modules/BusX" MeetupIdX: :path: "../Modules/MeetupIdX" + MicX: + :path: "../Modules/MicX" MPAKX: :path: "../Modules/MPAKX" @@ -29,8 +36,9 @@ SPEC CHECKSUMS: AELog: f732b70f7a9d1b4c6a3676304192b3908f362133 BusX: 1db5cf8652f7b206af468cc115cab3326efd1ced MeetupIdX: 2fa9fb27717aa8878ff495c1abe960c96e524308 + MicX: 6ffa81f29a477a66cde277e3ade3de8ce2d47b91 MPAKX: dc592434f55edf34709f6e4f37c9ec90dcd95185 -PODFILE CHECKSUM: ff31073a9b868750f1cfabf6c1c740dbf32d4cb1 +PODFILE CHECKSUM: 392946a4062b4b9d773ce17e4479d0040d242551 COCOAPODS: 1.13.0 diff --git a/src/App.swift b/src/App.swift index ddf2865..aabc679 100644 --- a/src/App.swift +++ b/src/App.swift @@ -1,4 +1,5 @@ import MeetupIdX +import MicX import SwiftUI import UIKit @@ -6,7 +7,7 @@ struct Content: View { var body: some View { MeetupId.V() Divider() - MeetupId.V() + MicItem.V() } }