2021-01-05 20:54:51 -08:00
|
|
|
//
|
2021-08-28 07:32:31 +02:00
|
|
|
// PasswordTableViewCell.swift
|
|
|
|
|
// pass
|
2021-01-05 20:54:51 -08:00
|
|
|
//
|
|
|
|
|
// Created by Sun, Mingshen on 12/31/20.
|
|
|
|
|
// Copyright © 2020 Bob Sun. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
import passKit
|
|
|
|
|
|
|
|
|
|
class PasswordTableViewCell: UITableViewCell {
|
|
|
|
|
func configure(with entry: PasswordTableEntry) {
|
|
|
|
|
textLabel?.font = UIFont.preferredFont(forTextStyle: .body)
|
2025-01-25 15:40:12 -08:00
|
|
|
textLabel?.text = entry.passwordEntity.isSynced ? entry.title : "↻ \(entry.title)"
|
2021-01-05 20:54:51 -08:00
|
|
|
textLabel?.adjustsFontForContentSizeCategory = true
|
|
|
|
|
|
|
|
|
|
accessoryType = .none
|
2021-01-15 22:43:03 -08:00
|
|
|
detailTextLabel?.textColor = UIColor.lightGray
|
2021-01-05 20:54:51 -08:00
|
|
|
detailTextLabel?.font = UIFont.preferredFont(forTextStyle: .footnote)
|
|
|
|
|
detailTextLabel?.adjustsFontForContentSizeCategory = true
|
|
|
|
|
detailTextLabel?.text = entry.categoryText
|
|
|
|
|
|
|
|
|
|
if entry.isDir {
|
|
|
|
|
accessoryType = .disclosureIndicator
|
|
|
|
|
textLabel?.font = UIFont.systemFont(ofSize: UIFont.preferredFont(forTextStyle: .body).pointSize, weight: .medium)
|
|
|
|
|
detailTextLabel?.font = UIFont.preferredFont(forTextStyle: .body)
|
2025-01-25 15:40:12 -08:00
|
|
|
detailTextLabel?.text = "\(entry.passwordEntity.children.count)"
|
2021-01-05 20:54:51 -08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|