-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge dev into master - MUIC-376, 408, 377, 269, 298 fix, README and …
…documentation (#102)
- Loading branch information
1 parent
48b75b4
commit 13730b1
Showing
86 changed files
with
1,785 additions
and
457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
GliaWidgets/Component/AttachmentList/AttachmentSourceListStyle.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import UIKit | ||
|
||
/// Style of the list that contains the chat attachment sources. Appears in the media upload menu popover in the message input area in chat. | ||
public class AttachmentSourceListStyle { | ||
/// Possible attachment sources to show, for example: camera, photo gallery or local file system. | ||
public var items: [AttachmentSourceItemStyle] | ||
|
||
/// Color of a separator line between different attachment source items. | ||
public var separatorColor: UIColor | ||
|
||
/// Background color of the view. | ||
public var backgroundColor: UIColor | ||
|
||
/// | ||
/// - Parameters: | ||
/// - items: Possible attachment sources to show, for example: camera, photo gallery or local file system. | ||
/// - separatorColor: Color of a separator line between different attachment source items. | ||
/// - backgroundColor: Background color of the view. | ||
/// | ||
public init( | ||
items: [AttachmentSourceItemStyle], | ||
separatorColor: UIColor, | ||
backgroundColor: UIColor | ||
) { | ||
self.items = items | ||
self.separatorColor = separatorColor | ||
self.backgroundColor = backgroundColor | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
GliaWidgets/Component/AttachmentList/Item/AttachmentSourceItemStyle.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import UIKit | ||
|
||
/// Style of an attachment source list item. | ||
public class AttachmentSourceItemStyle { | ||
/// Kind of an item shown in the attachment source list view (e.g. Photo Library, Take Photo or Browse). | ||
public var kind: AtttachmentSourceItemKind | ||
|
||
/// Title of the attachment source list item (e.g. "Take Photo"). | ||
public var title: String | ||
|
||
/// Font of the title. Default is `bodyText`, i.e. Roboto Regular 16. | ||
public var titleFont: UIFont | ||
|
||
/// Color of the title. | ||
public var titleColor: UIColor | ||
|
||
/// Icon of the item. Default is one of three icons (Take Photo, Photo Library or Browse) corresponding to the kind of attachment. | ||
public var icon: UIImage? | ||
|
||
/// Color of the icon. | ||
public var iconColor: UIColor? | ||
|
||
/// | ||
/// - Parameters: | ||
/// - kind: Kind of an item shown in the attachment source list view (e.g. Photo Library, Take Photo or Browse). | ||
/// - title: Title of the attachment source list item (e.g. "Take Photo"). | ||
/// - titleFont: Font of the title. Default is `bodyText`, i.e. Roboto Regular 16. | ||
/// - titleColor: Color of the title. | ||
/// - icon: Icon of the item. Default is one of three icons (Take Photo, Photo Library or Browse) corresponding to the kind of attachment. | ||
/// - iconColor: Color of the icon. | ||
/// | ||
public init( | ||
kind: AtttachmentSourceItemKind, | ||
title: String, | ||
titleFont: UIFont, | ||
titleColor: UIColor, | ||
icon: UIImage?, | ||
iconColor: UIColor? | ||
) { | ||
self.kind = kind | ||
self.title = title | ||
self.titleFont = titleFont | ||
self.titleColor = titleColor | ||
self.icon = icon | ||
self.iconColor = iconColor | ||
} | ||
} |
8 changes: 4 additions & 4 deletions
8
...omponent/ItemList/Item/ListItemView.swift → ...tList/Item/AttachmentSourceItemView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
GliaWidgets/Component/AttachmentList/Item/AtttachmentSourceItemKind.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/// Kind of an item shown in the list view. Used in chat's attachment popover menu. | ||
public enum AtttachmentSourceItemKind { | ||
/// Photo Library item. | ||
case photoLibrary | ||
|
||
/// Take Photo item. | ||
case takePhoto | ||
|
||
/// Browse item. | ||
case browse | ||
} |
Oops, something went wrong.