NCAssistantEmptyView.swift 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. @EnvironmentObject var model: NCAssistantTask
  11. let titleKey, subtitleKey: String
  12. var body: some View {
  13. VStack {
  14. Image(systemName: "sparkles")
  15. .renderingMode(.template)
  16. .resizable()
  17. .aspectRatio(contentMode: .fit)
  18. .foregroundStyle(Color(NCBrandColor.shared.getElement(account: model.controller?.account)))
  19. .font(Font.system(.body).weight(.light))
  20. .frame(height: 100)
  21. Text(NSLocalizedString(titleKey, comment: ""))
  22. .font(.system(size: 22, weight: .bold))
  23. .padding(.bottom, 5)
  24. Text(NSLocalizedString(subtitleKey, comment: ""))
  25. .font(.system(size: 14))
  26. .foregroundStyle(.secondary)
  27. }
  28. }
  29. }
  30. #Preview {
  31. NCAssistantEmptyView(titleKey: "_no_tasks_", subtitleKey: "_create_task_subtitle_")
  32. }