mirror of
https://github.com/neon443/StickerSlack.git
synced 2026-11-30 12:44:51 +00:00
purple accent colour
This commit is contained in:
9 files changed
+87
-15
No files matched your search
@@ -19,7 +19,7 @@ class EmojiHoarder: BaseHoarder {
|
||||
let endpoint: URL = URL(string: "https://cachet.dunkirk.sh/emojis")!
|
||||
|
||||
@Published var emojis: [Emoji] = []
|
||||
@Published var emojiPacks: [EmojiPack] = [.test]
|
||||
@Published var emojiPacks: [EmojiPack] = []
|
||||
|
||||
@Published var trie: Trie = Trie()
|
||||
// @Published var downloadedStickers: Set<String> = []
|
||||
|
||||
@@ -76,10 +76,10 @@ struct EmojiPackDetailView: View {
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding()
|
||||
.background {
|
||||
Color.purple.opacity(0.2)
|
||||
Color.accentColor.opacity(0.2)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 10))
|
||||
.blur(radius: 5)
|
||||
.shadow(color: .purple, radius: 5)
|
||||
.shadow(color: .accentColor, radius: 5)
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
@@ -153,7 +153,7 @@ struct EmojiPackDetailView: View {
|
||||
.navigationTitle(edit ? "Editing" : "Pack Details")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
ToolbarItem() {
|
||||
ToolbarItem(placement: .topBarLeading) {
|
||||
Button(
|
||||
"",
|
||||
systemImage: edit ? "checkmark" : "pencil"
|
||||
@@ -166,7 +166,7 @@ struct EmojiPackDetailView: View {
|
||||
if #available(iOS 19, *) {
|
||||
ToolbarSpacer()
|
||||
}
|
||||
ToolbarItem() {
|
||||
ToolbarItem(placement: .topBarTrailing) {
|
||||
ShareLink(item: pack.shareLink()) {
|
||||
Image(systemName: "square.and.arrow.up")
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ struct EmojiPackImporterView: View {
|
||||
}
|
||||
.modifier(glassButtonIfAv())
|
||||
.padding(.trailing)
|
||||
.tint(.purple)
|
||||
.tint(.accentColor)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,13 @@ struct EmojiPackManager: View {
|
||||
var body: some View {
|
||||
NavigationStack {
|
||||
List {
|
||||
if hoarder.emojiPacks.isEmpty {
|
||||
EmptyCollectionView(
|
||||
title: "No Emoji Packs",
|
||||
details: "Create one using the button in the toolbar.",
|
||||
systemImage: "square.stack.3d.up.slash"
|
||||
)
|
||||
}
|
||||
ForEach($hoarder.emojiPacks) { $pack in
|
||||
NavigationLink {
|
||||
EmojiPackDetailView(hoarder: hoarder, pack: $pack)
|
||||
@@ -28,12 +35,6 @@ struct EmojiPackManager: View {
|
||||
.tint(.red)
|
||||
}
|
||||
}
|
||||
Spacer()
|
||||
NavigationLink {
|
||||
EmojiPackDetailView(hoarder: hoarder, pack: .constant(.test))
|
||||
} label: {
|
||||
Text("test")
|
||||
}
|
||||
}
|
||||
.navigationTitle("Emoji Packs")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// EmptyCollectionView.swift
|
||||
// StickerSlack
|
||||
//
|
||||
// Created by neon443 on 10/04/2026.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct EmptyCollectionView: View {
|
||||
@State var title: String
|
||||
@State var details: String
|
||||
@State var systemImage: String
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
Color.accentColor
|
||||
.opacity(0.4)
|
||||
.padding(.horizontal, -15)
|
||||
.padding(.vertical, -15)
|
||||
.blur(radius: 5)
|
||||
HStack {
|
||||
Image(systemName: systemImage)
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 25)
|
||||
Text(title)
|
||||
.bold()
|
||||
.font(.title3)
|
||||
}
|
||||
}
|
||||
.listRowSeparator(.hidden)
|
||||
HStack {
|
||||
Spacer()
|
||||
Text(details)
|
||||
.multilineTextAlignment(.center)
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
List {
|
||||
EmptyCollectionView(title: "details.title", details: "details.body", systemImage: "gear")
|
||||
}
|
||||
}
|
||||
@@ -24,8 +24,8 @@ struct SettingsView: View {
|
||||
.resizable().scaledToFit()
|
||||
.frame(width: 100, height: 100)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 24))
|
||||
.foregroundStyle(.purple)
|
||||
.shadow(color: isDark ? .black : .purple, radius: 5)
|
||||
.foregroundStyle(Color.accentColor)
|
||||
.shadow(color: isDark ? .black : .accentColor, radius: 5)
|
||||
.padding(.leading, -1)
|
||||
.padding(.trailing, 10)
|
||||
VStack(alignment: .leading) {
|
||||
|
||||
@@ -59,7 +59,7 @@ struct WelcomeView: View {
|
||||
}
|
||||
}
|
||||
.padding(.bottom)
|
||||
.tint(.purple)
|
||||
.tint(.accentColor)
|
||||
.interactiveDismissDisabled()
|
||||
}
|
||||
}
|
||||
|
||||