SidebarIconKind.swift 974 B

123456789101112131415161718192021222324252627282930313233
  1. import SwiftUI
  2. enum SidebarIconKind: Hashable {
  3. case postGenerator
  4. case titleOptimizer
  5. case commentWriter
  6. case history
  7. case settings
  8. var systemImage: String {
  9. switch self {
  10. case .postGenerator: "square.and.pencil"
  11. case .titleOptimizer: "textformat.size"
  12. case .commentWriter: "bubble.left.and.bubble.right.fill"
  13. case .history: "clock.arrow.circlepath"
  14. case .settings: "gearshape.fill"
  15. }
  16. }
  17. var gradient: [Color] {
  18. switch self {
  19. case .postGenerator: [Color(hex: 0xC4B5FD), Color(hex: 0x7C3AED)]
  20. case .titleOptimizer: [Color(hex: 0x93C5FD), Color(hex: 0x2563EB)]
  21. case .commentWriter: [Color(hex: 0x86EFAC), Color(hex: 0x16A34A)]
  22. case .history: [Color(hex: 0xFCD34D), Color(hex: 0xD97706)]
  23. case .settings: [Color(hex: 0x9CA3AF), Color(hex: 0x4B5563)]
  24. }
  25. }
  26. var glowColor: Color {
  27. gradient.last ?? gradient[0]
  28. }
  29. }