ios.rs 793 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright 2019-2023 Tauri Programme within The Commons Conservancy
  2. // SPDX-License-Identifier: Apache-2.0
  3. // SPDX-License-Identifier: MIT
  4. use super::{SectionItem, Status};
  5. use colored::Colorize;
  6. pub fn items() -> Vec<SectionItem> {
  7. vec![SectionItem::new(
  8. || {
  9. let teams = cargo_mobile2::apple::teams::find_development_teams().unwrap_or_default();
  10. Some((
  11. if teams.is_empty() {
  12. "Developer Teams: None".red().to_string()
  13. } else {
  14. format!(
  15. "Developer Teams: {}",
  16. teams
  17. .iter()
  18. .map(|t| format!("{} (ID: {})", t.name, t.id))
  19. .collect::<Vec<String>>()
  20. .join(", ")
  21. )
  22. },
  23. Status::Neutral,
  24. ))
  25. },
  26. || None,
  27. false,
  28. )]
  29. }