mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Cosmetic on conference list display
This commit is contained in:
parent
df53cc73e9
commit
79a2235368
8 changed files with 32 additions and 23 deletions
|
|
@ -57,10 +57,8 @@ class ScheduledConferenceData {
|
|||
rawDate = Date(timeIntervalSince1970:TimeInterval(conferenceInfo.dateTime))
|
||||
|
||||
let durationFormatter = DateComponentsFormatter()
|
||||
durationFormatter.unitsStyle = .positional
|
||||
durationFormatter.allowedUnits = [.minute, .second ]
|
||||
durationFormatter.zeroFormattingBehavior = [ .pad ]
|
||||
duration.value = conferenceInfo.duration > 0 ? durationFormatter.string(from: TimeInterval(conferenceInfo.duration)) : nil
|
||||
durationFormatter.unitsStyle = .abbreviated
|
||||
duration.value = conferenceInfo.duration > 0 ? durationFormatter.string(from: TimeInterval(conferenceInfo.duration*60)) : nil
|
||||
|
||||
organizer.value = conferenceInfo.organizer?.addressBookEnhancedDisplayName()
|
||||
|
||||
|
|
|
|||
|
|
@ -32,15 +32,15 @@ class ScheduledConferencesCell: UITableViewCell {
|
|||
let clockIcon = UIImageView(image: UIImage(named: "conference_schedule_time_default"))
|
||||
let timeDuration = StyledLabel(VoipTheme.conference_invite_desc_font)
|
||||
let organiser = StyledLabel(VoipTheme.conference_invite_desc_font)
|
||||
let subject = StyledLabel(VoipTheme.conference_invite_subject_font)
|
||||
let subject = StyledLabel(VoipTheme.conference_list_subject_font)
|
||||
let cancelledLabel = StyledLabel(VoipTheme.conference_cancelled_title_font)
|
||||
let participantsIcon = UIImageView(image: UIImage(named: "conference_schedule_participants_default"))
|
||||
let participants = StyledLabel(VoipTheme.conference_invite_desc_font)
|
||||
let infoConf = UIButton()
|
||||
|
||||
let descriptionTitle = StyledLabel(VoipTheme.conference_invite_desc_font, VoipTexts.conference_description_title)
|
||||
let descriptionValue = StyledLabel(VoipTheme.conference_invite_desc_font)
|
||||
let urlTitle = StyledLabel(VoipTheme.conference_invite_desc_font, VoipTexts.conference_schedule_address_title)
|
||||
let descriptionTitle = StyledLabel(VoipTheme.conference_list_address_desc_font, VoipTexts.conference_description_title)
|
||||
let descriptionValue = StyledLabel(VoipTheme.conference_list_address_desc_font)
|
||||
let urlTitle = StyledLabel(VoipTheme.conference_list_address_desc_font, VoipTexts.conference_schedule_address_title)
|
||||
let urlValue = StyledLabel(VoipTheme.conference_scheduling_font)
|
||||
let copyLink = CallControlButton(width:button_size,height:button_size,buttonTheme: VoipTheme.scheduled_conference_action("voip_copy"))
|
||||
let joinConf = FormButton(title:VoipTexts.conference_invite_join.uppercased(), backgroundStateColors: VoipTheme.button_green_background)
|
||||
|
|
@ -55,7 +55,7 @@ class ScheduledConferencesCell: UITableViewCell {
|
|||
var conferenceData: ScheduledConferenceData? = nil {
|
||||
didSet {
|
||||
if let data = conferenceData {
|
||||
timeDuration.text = "\(data.time.value)"+(data.duration.value != nil ? " ( \(data.duration.value) )" : "")
|
||||
timeDuration.text = "\(data.time.value)"+(data.duration.value != nil ? " (\(data.duration.value))" : "")
|
||||
organiser.text = VoipTexts.conference_schedule_organizer+data.organizer.value!
|
||||
subject.text = data.subject.value!
|
||||
cancelledLabel.text = data.isConferenceCancelled.value == true ? ( data.canEdit.value == true ? VoipTexts.conference_scheduled_cancelled_by_me: VoipTexts.conference_scheduled_cancelled_by_organizer) : nil
|
||||
|
|
@ -84,8 +84,8 @@ class ScheduledConferencesCell: UITableViewCell {
|
|||
} else {
|
||||
self.editConf.isHidden = true
|
||||
}
|
||||
self.participants.removeConstraints().alignUnder(view: self.subject,withMargin: 15).toRightOf(self.participantsIcon,withLeftMargin:10).toRightOf(self.participantsIcon,withLeftMargin:10).toLeftOf(self.infoConf,withRightMargin: 15).done()
|
||||
self.joinEditDelete.removeConstraints().alignUnder(view: self.expandedRows,withMargin: 15).alignParentRight(withMargin: 10).done()
|
||||
self.participants.removeConstraints().alignUnder(view: self.subject,withMargin: 10).toRightOf(self.participantsIcon,withLeftMargin:10).toRightOf(self.participantsIcon,withLeftMargin:10).toLeftOf(self.infoConf,withRightMargin: 15).done()
|
||||
self.joinEditDelete.removeConstraints().alignUnder(view: self.expandedRows,withMargin: 10).alignParentRight(withMargin: 10).done()
|
||||
if (expanded == true) {
|
||||
self.joinEditDelete.alignParentBottom(withMargin: 10).done()
|
||||
} else {
|
||||
|
|
@ -109,25 +109,25 @@ class ScheduledConferencesCell: UITableViewCell {
|
|||
myContentView.matchParentDimmensions(insetedBy: UIEdgeInsets(top: 5,left: 0,bottom: 5,right: 0)).done()
|
||||
|
||||
myContentView.addSubview(clockIcon)
|
||||
clockIcon.alignParentTop(withMargin: 15).square(15).alignParentLeft(withMargin: 10).done()
|
||||
clockIcon.alignParentTop(withMargin: 10).square(20).alignParentLeft(withMargin: 10).done()
|
||||
|
||||
myContentView.addSubview(timeDuration)
|
||||
timeDuration.alignParentTop(withMargin: 15).toRightOf(clockIcon,withLeftMargin:10).alignHorizontalCenterWith(clockIcon).done()
|
||||
timeDuration.alignParentTop(withMargin: 10).toRightOf(clockIcon,withLeftMargin:10).alignHorizontalCenterWith(clockIcon).done()
|
||||
|
||||
myContentView.addSubview(organiser)
|
||||
organiser.alignParentTop(withMargin: 15).toRightOf(timeDuration, withLeftMargin:10).alignParentRight(withMargin:10).alignHorizontalCenterWith(clockIcon).done()
|
||||
organiser.alignParentTop(withMargin: 10).toRightOf(timeDuration, withLeftMargin:10).alignParentRight(withMargin:10).alignHorizontalCenterWith(clockIcon).done()
|
||||
|
||||
|
||||
let subjectCancel = UIStackView()
|
||||
subjectCancel.axis = .vertical
|
||||
myContentView.addSubview(subjectCancel)
|
||||
subjectCancel.alignUnder(view: timeDuration,withMargin: 15).alignParentLeft(withMargin: 10).done()
|
||||
subjectCancel.alignUnder(view: timeDuration,withMargin: 10).matchParentSideBorders(insetedByDx: 10.0).done()
|
||||
|
||||
subjectCancel.addArrangedSubview(cancelledLabel)
|
||||
subjectCancel.addArrangedSubview(subject)
|
||||
|
||||
myContentView.addSubview(participantsIcon)
|
||||
participantsIcon.alignUnder(view: subject,withMargin: 15).square(15).alignParentLeft(withMargin: 10).done()
|
||||
participantsIcon.alignUnder(view: subject,withMargin: 5).square(25).alignParentLeft(withMargin: 10).done()
|
||||
|
||||
//infoConf.onClick {
|
||||
contentView.onClick {
|
||||
|
|
@ -136,12 +136,12 @@ class ScheduledConferencesCell: UITableViewCell {
|
|||
}
|
||||
myContentView.addSubview(infoConf)
|
||||
infoConf.imageView?.contentMode = .scaleAspectFit
|
||||
infoConf.alignUnder(view: subject,withMargin: 15).square(30).alignParentRight(withMargin: 10).alignHorizontalCenterWith(participantsIcon).done()
|
||||
infoConf.alignUnder(view: subject,withMargin: 5).square(25).alignParentRight(withMargin: 10).done()
|
||||
infoConf.applyTintedIcons(tintedIcons: VoipTheme.conference_info_button)
|
||||
|
||||
|
||||
myContentView.addSubview(participants)
|
||||
participants.alignUnder(view: subject,withMargin: 15).toRightOf(participantsIcon,withLeftMargin:10).toRightOf(participantsIcon,withLeftMargin:10).toLeftOf(infoConf,withRightMargin: 15).done()
|
||||
participants.alignUnder(view: subject,withMargin: 10).toRightOf(participantsIcon,withLeftMargin:10).toRightOf(participantsIcon,withLeftMargin:10).toLeftOf(infoConf,withRightMargin: 15).done()
|
||||
|
||||
expandedRows.axis = .vertical
|
||||
expandedRows.spacing = 10
|
||||
|
|
@ -170,7 +170,7 @@ class ScheduledConferencesCell: UITableViewCell {
|
|||
joinEditDelete.distribution = .equalSpacing
|
||||
|
||||
myContentView.addSubview(joinEditDelete)
|
||||
joinEditDelete.alignUnder(view: expandedRows,withMargin: 15).alignParentRight(withMargin: 10).done()
|
||||
joinEditDelete.alignUnder(view: expandedRows,withMargin: 10).alignParentRight(withMargin: 10).done()
|
||||
|
||||
|
||||
joinEditDelete.addArrangedSubview(joinConf)
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import linphonesw
|
|||
let noConference = StyledLabel(VoipTheme.empty_list_font,VoipTexts.conference_no_schedule)
|
||||
let filters = UIStackView()
|
||||
let selectAllButton = CallControlButton(buttonTheme:VoipTheme.nav_button("deselect_all"))
|
||||
let separator = UIView()
|
||||
|
||||
static let compositeDescription = UICompositeViewDescription(ScheduledConferencesView.self, statusBar: StatusBarView.self, tabBar: nil, sideMenu: SideMenuView.self, fullscreen: false, isLeftFragment: false,fragmentWith: nil)
|
||||
static func compositeViewDescription() -> UICompositeViewDescription! { return compositeDescription }
|
||||
|
|
@ -52,6 +53,7 @@ import linphonesw
|
|||
},
|
||||
nextActionEnableCondition: MutableLiveData(),
|
||||
title:VoipTexts.conference_scheduled)
|
||||
super.titleLabel.applyStyle(VoipTheme.navigation_header_font)
|
||||
|
||||
// Select all
|
||||
selectAllButton.setImage(UIImage(named: "deselect_all"), for: .selected)
|
||||
|
|
@ -86,7 +88,10 @@ import linphonesw
|
|||
filters.spacing = 10
|
||||
filters.alignParentLeft(withMargin: 10).alignUnder(view: super.topBar,withMargin: self.form_margin).done()
|
||||
|
||||
|
||||
self.view.addSubview(separator)
|
||||
separator.backgroundColor = VoipTheme.voip_light_gray
|
||||
separator.matchParentSideBorders().height(1).alignUnder(view: filters,withMargin: self.form_margin).done()
|
||||
|
||||
// Conference list
|
||||
|
||||
self.view.addSubview(conferenceListView)
|
||||
|
|
@ -151,7 +156,7 @@ import linphonesw
|
|||
super.viewWillAppear(animated)
|
||||
self.conferenceListView.reloadData()
|
||||
self.conferenceListView.removeConstraints().done()
|
||||
self.conferenceListView.matchParentSideBorders(insetedByDx: 10).alignUnder(view: filters,withMargin: self.form_margin).alignParentBottom().done()
|
||||
self.conferenceListView.matchParentSideBorders(insetedByDx: 10).alignUnder(view: separator).alignParentBottom().done()
|
||||
noConference.isHidden = !ScheduledConferencesViewModel.shared.daySplitted.isEmpty
|
||||
super.nextButton.isEnabled = Core.get().defaultAccount != nil
|
||||
ScheduledConferencesViewModel.shared.editionEnabled.value = false
|
||||
|
|
|
|||
|
|
@ -57,7 +57,10 @@ class TimestampUtils {
|
|||
let dateFormatter = DateFormatter()
|
||||
dateFormatter.dateStyle = .long
|
||||
dateFormatter.timeStyle = .none
|
||||
return dateFormatter.string(from: date)
|
||||
let dayFormatter = DateFormatter()
|
||||
dayFormatter.dateFormat = "EEEE"
|
||||
let day = dayFormatter.string(from: date)
|
||||
return day.prefix(1).uppercased() + day.dropFirst()+" "+dateFormatter.string(from: date)
|
||||
}
|
||||
|
||||
static func timeToString(date:Date) -> String {
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ import UIKit
|
|||
@objc static let chat_room_group_info_admin = NSLocalizedString("Admin",comment:"")
|
||||
@objc static let conference_creation_failed = NSLocalizedString("Failed to create meeting",comment:"")
|
||||
@objc static let conference_default_title = NSLocalizedString("Remote group call",comment:"")
|
||||
@objc static let conference_description_title = NSLocalizedString("Description:",comment:"")
|
||||
@objc static let conference_description_title = NSLocalizedString("Description",comment:"")
|
||||
@objc static let conference_display_mode_active_speaker = NSLocalizedString("Active speaker mode",comment:"")
|
||||
@objc static let conference_display_mode_audio_only = NSLocalizedString("Audio only mode",comment:"")
|
||||
@objc static let conference_display_mode_mosaic = NSLocalizedString("Mosaic mode",comment:"")
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ import UIKit
|
|||
static let call_stats_font = TextStyle(fgColor: LightDarkColor(.white,.white), bgColor: LightDarkColor(.clear,.clear), allCaps: false, align: .center, font: fontName+"-Regular", size: 12.0)
|
||||
static let call_stats_font_title = TextStyle(fgColor: LightDarkColor(.white,.white), bgColor: LightDarkColor(.clear,.clear), allCaps: false, align: .center, font: fontName+"-Regular", size: 18.0)
|
||||
static let calls_list_header_font = TextStyle(fgColor: voipTextColor, bgColor: LightDarkColor(.clear,.clear), allCaps: false, align: .center, font: fontName+"-Regular", size: 20.0)
|
||||
static let navigation_header_font = TextStyle(fgColor: LightDarkColor(primary_color,primary_color), bgColor: LightDarkColor(.clear,.clear), allCaps: true, align: .center, font: fontName+"-Bold", size: 27.0)
|
||||
|
||||
static let call_list_active_name_font = TextStyle(fgColor: LightDarkColor(.white,.white), bgColor: LightDarkColor(.clear,.clear), allCaps: false, align: .center, font: fontName+"-Regular", size: 18.0)
|
||||
static let call_list_active_sip_uri_font = TextStyle(fgColor: LightDarkColor(.white,.white), bgColor: LightDarkColor(.clear,.clear), allCaps: false, align: .center, font: fontName+"-Regular", size: 12.0)
|
||||
|
|
@ -138,6 +139,8 @@ import UIKit
|
|||
|
||||
static let empty_list_font = TextStyle(fgColor: primaryTextColor, bgColor: LightDarkColor(.clear,.clear), allCaps: false, align: .center, font: fontName+"-Regular", size: 18.0)
|
||||
static let conf_list_filter_button_font = TextStyle(fgColor: LightDarkColor(.black,.black), bgColor: LightDarkColor(.clear,.clear), allCaps: false, align: .center, font: fontName+"-Regular", size: 14.0)
|
||||
static let conference_list_subject_font = TextStyle(fgColor: LightDarkColor(voip_dark_gray,voip_dark_gray), bgColor: LightDarkColor(.clear,.clear), allCaps: false, align: .left, font: fontName+"-Bold", size: 18.0)
|
||||
static let conference_list_address_desc_font = TextStyle(fgColor: LightDarkColor(voip_dark_gray,voip_dark_gray), bgColor: LightDarkColor(.clear,.clear), allCaps: false, align: .left, font: fontName+"-Regular", size: 18.0)
|
||||
|
||||
|
||||
// Buttons Background (State colors)
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Loading…
Add table
Reference in a new issue