mirror of
https://github.com/neon443/StickerSlack.git
synced 2026-11-30 12:44:51 +00:00
jfal;sd
This commit is contained in:
3 files changed
+19
-62
No files matched your search
@@ -24,12 +24,14 @@ struct EmptyCollectionView: View {
|
|||||||
.bold()
|
.bold()
|
||||||
.font(.title3)
|
.font(.title3)
|
||||||
}
|
}
|
||||||
HStack {
|
if !details.isEmpty {
|
||||||
Spacer()
|
HStack {
|
||||||
Text(details)
|
Spacer()
|
||||||
.multilineTextAlignment(.center)
|
Text(details)
|
||||||
.foregroundStyle(.gray)
|
.multilineTextAlignment(.center)
|
||||||
Spacer()
|
.foregroundStyle(.gray)
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.listRowSeparator(.hidden)
|
.listRowSeparator(.hidden)
|
||||||
|
|||||||
@@ -58,14 +58,12 @@ struct SearchView: View {
|
|||||||
var body: some View {
|
var body: some View {
|
||||||
VStack {
|
VStack {
|
||||||
if searchTerm.isEmpty {
|
if searchTerm.isEmpty {
|
||||||
EmptyCollectionView(title: "Search", details: "", systemImage: "magnifyingglass")
|
EmptyCollectionView(title: "Start a Search", details: "", systemImage: "magnifyingglass")
|
||||||
.frame(maxHeight: 100)
|
.frame(maxHeight: 100)
|
||||||
.padding()
|
|
||||||
Spacer()
|
Spacer()
|
||||||
} else if searchResult.isEmpty {
|
} else if searchResult.isEmpty {
|
||||||
EmptyCollectionView(title: "No Results", details: "Try a new search", systemImage: "exclamationmark.magnifyingglass")
|
EmptyCollectionView(title: "No Results", details: "Try a new search", systemImage: "exclamationmark.magnifyingglass")
|
||||||
.frame(maxHeight: 100)
|
.frame(maxHeight: 100)
|
||||||
.padding()
|
|
||||||
Spacer()
|
Spacer()
|
||||||
} else if fromPackEditor {
|
} else if fromPackEditor {
|
||||||
EmojiCollectionViewRepresentable(
|
EmojiCollectionViewRepresentable(
|
||||||
@@ -78,45 +76,6 @@ struct SearchView: View {
|
|||||||
} else {
|
} else {
|
||||||
EmojiTableViewRepresentable(hoarder: hoarder, items: searchResult)
|
EmojiTableViewRepresentable(hoarder: hoarder, items: searchResult)
|
||||||
}
|
}
|
||||||
|
|
||||||
if fromPackEditor {
|
|
||||||
if searchResult.isEmpty {
|
|
||||||
EmptyCollectionView(title: "No Results", details: "Try a new search", systemImage: "exclamationmark.magnifyingglass")
|
|
||||||
.frame(maxHeight: 100)
|
|
||||||
.padding()
|
|
||||||
Spacer()
|
|
||||||
} else {
|
|
||||||
EmojiCollectionViewRepresentable(
|
|
||||||
hoarder: hoarder,
|
|
||||||
items: searchResult,
|
|
||||||
width: 75,
|
|
||||||
style: .plainWithLabel,
|
|
||||||
onTapCallback: { callback($0)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
switch stickerType {
|
|
||||||
case .slackEmoji:
|
|
||||||
Text("\(searchResult.count)")
|
|
||||||
if searchResult.isEmpty {
|
|
||||||
EmptyCollectionView(title: "No Results", details: "Try a new search", systemImage: "exclamationmark.magnifyingglass")
|
|
||||||
.frame(maxHeight: 100)
|
|
||||||
.padding()
|
|
||||||
Spacer()
|
|
||||||
} else {
|
|
||||||
EmojiTableViewRepresentable(hoarder: hoarder, items: searchResult)
|
|
||||||
}
|
|
||||||
case .giphyGifs:
|
|
||||||
Text("uhh")
|
|
||||||
}
|
|
||||||
Picker("", selection: $stickerType) {
|
|
||||||
ForEach(StickerType.allCases) { type in
|
|
||||||
Text(type.description).tag(type)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.pickerStyle(.segmented)
|
|
||||||
.padding(.horizontal)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.searchable(text: $searchTerm)
|
.searchable(text: $searchTerm)
|
||||||
.onChange(of: searchTerm) { new in
|
.onChange(of: searchTerm) { new in
|
||||||
|
|||||||
@@ -13,17 +13,17 @@ final class TabbedContentView: UITabBarController {
|
|||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
|
||||||
self.edgesForExtendedLayout = .bottom
|
// self.edgesForExtendedLayout = .bottom
|
||||||
self.extendedLayoutIncludesOpaqueBars = false
|
// self.extendedLayoutIncludesOpaqueBars = false
|
||||||
|
|
||||||
if #available(iOS 26, *) {
|
// if #available(iOS 26, *) {
|
||||||
let appearance = UITabBarAppearance()
|
// let appearance = UITabBarAppearance()
|
||||||
appearance.configureWithDefaultBackground()
|
// appearance.configureWithDefaultBackground()
|
||||||
tabBar.standardAppearance = appearance
|
// tabBar.standardAppearance = appearance
|
||||||
tabBar.scrollEdgeAppearance = appearance
|
// tabBar.scrollEdgeAppearance = appearance
|
||||||
} else {
|
// } else {
|
||||||
self.tabBarController?.tabBar.isTranslucent = false
|
// self.tabBarController?.tabBar.isTranslucent = false
|
||||||
}
|
// }
|
||||||
setupTabs()
|
setupTabs()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,10 +51,6 @@ final class TabbedContentView: UITabBarController {
|
|||||||
downloadedView.navigationItem.title = "Downloaded"
|
downloadedView.navigationItem.title = "Downloaded"
|
||||||
downloaded.tabBarItem = UITabBarItem(title: "Downloaded", image: UIImage(systemName: "arrow.down.circle.fill"), tag: 2)
|
downloaded.tabBarItem = UITabBarItem(title: "Downloaded", image: UIImage(systemName: "arrow.down.circle.fill"), tag: 2)
|
||||||
|
|
||||||
// let downloadedView = DownloadedView(emojiHoarder: emojiHoarder, gifHoarder: gifHoarder)
|
|
||||||
// let downloaded = UIHostingController(rootView: downloadedView)
|
|
||||||
// downloaded.tabBarItem = UITabBarItem(title: "Downloaded", image: UIImage(systemName: "arrow.down.circle.fill"), tag: 2)
|
|
||||||
|
|
||||||
let settingsView = SettingsView(hoarder: emojiHoarder)
|
let settingsView = SettingsView(hoarder: emojiHoarder)
|
||||||
let settings = UIHostingController(rootView: settingsView)
|
let settings = UIHostingController(rootView: settingsView)
|
||||||
settings.tabBarItem = UITabBarItem(title: "Settings", image: UIImage(systemName: "gear"), tag: 3)
|
settings.tabBarItem = UITabBarItem(title: "Settings", image: UIImage(systemName: "gear"), tag: 3)
|
||||||
|
|||||||