NCAssistantEmptyView.swift 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // EmptyTasksView.swift
  3. // Nextcloud
  4. //
  5. // Created by Milen on 16.04.24.
  6. // Copyright © 2024 Marino Faggiana. All rights reserved.
  7. //
  8. import SwiftUI
  9. struct NCAssistantEmptyView: View {
  10. let titleKey, subtitleKey: String
  11. var body: some View {
  12. VStack {
  13. Image(systemName: "sparkles")
  14. .renderingMode(.template)
  15. .resizable()
  16. .aspectRatio(contentMode: .fit)
  17. .foregroundStyle(Color(NCBrandColor.shared.brandElement))
  18. .font(Font.system(.body).weight(.light))
  19. .frame(height: 100)
  20. Text(NSLocalizedString(titleKey, comment: ""))
  21. .font(.system(size: 22, weight: .bold))
  22. .padding(.bottom, 5)
  23. Text(NSLocalizedString(subtitleKey, comment: ""))
  24. .font(.system(size: 14))
  25. .foregroundStyle(.secondary)
  26. }
  27. }
  28. }
  29. #Preview {
  30. NCAssistantEmptyView(titleKey: "_no_tasks_", subtitleKey: "_create_task_subtitle_")
  31. }