mirror of
https://github.com/neon443/StickerSlack.git
synced 2026-11-30 12:44:51 +00:00
ui improvements idk
This commit is contained in:
4 files changed
+58
-18
No files matched your search
@@ -134,7 +134,35 @@ extension EmojiPack {
|
||||
"loll",
|
||||
"bleh",
|
||||
"uhh",
|
||||
"communist"
|
||||
"communist",
|
||||
"ufahh",
|
||||
"uhafh",
|
||||
"uhgfh",
|
||||
"uoohh",
|
||||
"ujyhgghh",
|
||||
"uhfgh",
|
||||
"ujg3thh",
|
||||
"uyhh",
|
||||
"ughhhh",
|
||||
"uvhh",
|
||||
"ujrg3tjthhg",
|
||||
"ujherh",
|
||||
"uxhggrh",
|
||||
"ushgrq3geallh",
|
||||
"u hrgqh",
|
||||
"ujjjjjyhgh",
|
||||
"uherhh",
|
||||
"uhhesh",
|
||||
"hhreruhgh",
|
||||
"u hffh",
|
||||
"uh h",
|
||||
"uaugerhh",
|
||||
"u4h3h",
|
||||
"u4hh",
|
||||
"ueyhh ",
|
||||
"u erthh",
|
||||
"uhujh",
|
||||
"ujkkkkhh"
|
||||
]
|
||||
)
|
||||
}
|
||||
|
||||
@@ -33,7 +33,9 @@ struct ContentView: View {
|
||||
}
|
||||
|
||||
Tab(role: .search) {
|
||||
SearchView(hoarder: emojiHoarder)
|
||||
NavigationStack {
|
||||
SearchView(hoarder: emojiHoarder)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -54,10 +56,12 @@ struct ContentView: View {
|
||||
.tabItem {
|
||||
Label("Setings", systemImage: "gear")
|
||||
}
|
||||
SearchView(hoarder: emojiHoarder)
|
||||
.tabItem {
|
||||
Label("Search", systemImage: "magnifyingglass")
|
||||
}
|
||||
NavigationStack {
|
||||
SearchView(hoarder: emojiHoarder)
|
||||
}
|
||||
.tabItem {
|
||||
Label("Search", systemImage: "magnifyingglass")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,7 +70,7 @@ struct ContentView: View {
|
||||
} content: {
|
||||
WelcomeView()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ struct EmojiPackDetailView: View {
|
||||
@State var editName: Bool = false
|
||||
@State var editDescription: Bool = false
|
||||
@State var showAdder: Bool = false
|
||||
@State var searchTerm: String = ""
|
||||
|
||||
var minColWidth: CGFloat { 75 }
|
||||
var spacing: CGFloat { 10 }
|
||||
@@ -29,7 +30,7 @@ struct EmojiPackDetailView: View {
|
||||
var body: some View {
|
||||
NavigationStack {
|
||||
GeometryReader { geo in
|
||||
VStack {
|
||||
ScrollView {
|
||||
Button() {
|
||||
editName.toggle()
|
||||
} label: {
|
||||
@@ -125,26 +126,33 @@ struct EmojiPackDetailView: View {
|
||||
}
|
||||
}
|
||||
.sheet(isPresented: $showAdder) {
|
||||
SearchView(hoarder: hoarder, fromPackEditor: true) { selection in
|
||||
print(selection)
|
||||
withAnimation {
|
||||
guard let id = UUID(uuidString: selection.id) else {
|
||||
fatalError("bruh what happened to ur uuid")
|
||||
NavigationStack {
|
||||
SearchView(hoarder: hoarder, fromPackEditor: true) { selection in
|
||||
print(selection)
|
||||
withAnimation {
|
||||
pack.items.append(selection.name)
|
||||
}
|
||||
}
|
||||
.navigationTitle("Search Emojis")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.presentationDragIndicator(.visible)
|
||||
.presentationDetents([.large, .medium])
|
||||
.toolbar {
|
||||
Button("", systemImage: "xmark") {
|
||||
showAdder.toggle()
|
||||
}
|
||||
pack.items.append(selection.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.animation(.spring, value: pack.items)
|
||||
.padding(.vertical)
|
||||
.padding()
|
||||
|
||||
Text("\(pack.items.count) Emoji\(pack.items.count.plural)")
|
||||
.bold()
|
||||
.multilineTextAlignment(.center)
|
||||
}
|
||||
.padding()
|
||||
.navigationTitle(edit ? "Editing" : "Pack Details")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
@@ -177,7 +185,7 @@ struct EmojiPackDetailView: View {
|
||||
|
||||
@available(iOS 17, *)
|
||||
#Preview {
|
||||
@Previewable @State var pack: EmojiPack = .new()
|
||||
@Previewable @State var pack: EmojiPack = .test
|
||||
EmojiPackDetailView(
|
||||
hoarder: EmojiHoarder(localOnly: true, skipIndex: false),
|
||||
pack: $pack
|
||||
|
||||
@@ -32,7 +32,7 @@ struct SearchView: View {
|
||||
@Environment(\.dismiss) var dismiss
|
||||
|
||||
var body: some View {
|
||||
NavigationStack {
|
||||
VStack {
|
||||
if fromPackEditor {
|
||||
GeometryReader { geo in
|
||||
let columns: Int = max(1, Int((geo.size.width - 2*spacing) / (minColWidth + spacing)))
|
||||
|
||||