ui improvements idk

This commit is contained in:
neon443 committed 2026-04-09 00:47:05 +01:00
1 parent 7d7308b274
commit 8f3c22cc43
4 files changed
+57 -17

No files matched your search

+29 -1
View File
@@ -134,7 +134,35 @@ extension EmojiPack {
"loll", "loll",
"bleh", "bleh",
"uhh", "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"
] ]
) )
} }
+9 -5
View File
@@ -33,7 +33,9 @@ struct ContentView: View {
} }
Tab(role: .search) { Tab(role: .search) {
SearchView(hoarder: emojiHoarder) NavigationStack {
SearchView(hoarder: emojiHoarder)
}
} }
} }
} else { } else {
@@ -54,10 +56,12 @@ struct ContentView: View {
.tabItem { .tabItem {
Label("Setings", systemImage: "gear") Label("Setings", systemImage: "gear")
} }
SearchView(hoarder: emojiHoarder) NavigationStack {
.tabItem { SearchView(hoarder: emojiHoarder)
Label("Search", systemImage: "magnifyingglass") }
} .tabItem {
Label("Search", systemImage: "magnifyingglass")
}
} }
} }
} }
@@ -14,6 +14,7 @@ struct EmojiPackDetailView: View {
@State var editName: Bool = false @State var editName: Bool = false
@State var editDescription: Bool = false @State var editDescription: Bool = false
@State var showAdder: Bool = false @State var showAdder: Bool = false
@State var searchTerm: String = ""
var minColWidth: CGFloat { 75 } var minColWidth: CGFloat { 75 }
var spacing: CGFloat { 10 } var spacing: CGFloat { 10 }
@@ -29,7 +30,7 @@ struct EmojiPackDetailView: View {
var body: some View { var body: some View {
NavigationStack { NavigationStack {
GeometryReader { geo in GeometryReader { geo in
VStack { ScrollView {
Button() { Button() {
editName.toggle() editName.toggle()
} label: { } label: {
@@ -125,26 +126,33 @@ struct EmojiPackDetailView: View {
} }
} }
.sheet(isPresented: $showAdder) { .sheet(isPresented: $showAdder) {
SearchView(hoarder: hoarder, fromPackEditor: true) { selection in NavigationStack {
print(selection) SearchView(hoarder: hoarder, fromPackEditor: true) { selection in
withAnimation { print(selection)
guard let id = UUID(uuidString: selection.id) else { withAnimation {
fatalError("bruh what happened to ur uuid") 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) .animation(.spring, value: pack.items)
.padding(.vertical) .padding()
Text("\(pack.items.count) Emoji\(pack.items.count.plural)") Text("\(pack.items.count) Emoji\(pack.items.count.plural)")
.bold() .bold()
.multilineTextAlignment(.center) .multilineTextAlignment(.center)
} }
.padding()
.navigationTitle(edit ? "Editing" : "Pack Details") .navigationTitle(edit ? "Editing" : "Pack Details")
.navigationBarTitleDisplayMode(.inline) .navigationBarTitleDisplayMode(.inline)
.toolbar { .toolbar {
@@ -177,7 +185,7 @@ struct EmojiPackDetailView: View {
@available(iOS 17, *) @available(iOS 17, *)
#Preview { #Preview {
@Previewable @State var pack: EmojiPack = .new() @Previewable @State var pack: EmojiPack = .test
EmojiPackDetailView( EmojiPackDetailView(
hoarder: EmojiHoarder(localOnly: true, skipIndex: false), hoarder: EmojiHoarder(localOnly: true, skipIndex: false),
pack: $pack pack: $pack
+1 -1
View File
@@ -32,7 +32,7 @@ struct SearchView: View {
@Environment(\.dismiss) var dismiss @Environment(\.dismiss) var dismiss
var body: some View { var body: some View {
NavigationStack { VStack {
if fromPackEditor { if fromPackEditor {
GeometryReader { geo in GeometryReader { geo in
let columns: Int = max(1, Int((geo.size.width - 2*spacing) / (minColWidth + spacing))) let columns: Int = max(1, Int((geo.size.width - 2*spacing) / (minColWidth + spacing)))
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.