chore: fix building the app (#13606)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - New Features - Built-in Then-style DSL for fluent configuration. - Centralized theming via a new resources library exposing standardized colors and icons for SwiftUI and UIKit. - Refactor - Migrated color and icon accessors to the new resources provider. - Removed redundant imports and streamlined UI configuration. - Dependencies - Updated MarkdownView to 3.4.2. - Removed the Then third-party dependency; updated package sources; added resources package and assets. - Documentation - Added iOS Swift code style and architecture guidelines. - Chores - Updated Xcode project format and repository ignore rules. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
83 files changed
+484
-78
No files matched your search
+2
-2
@@ -8,8 +8,8 @@
|
||||
import ApolloAPI
|
||||
|
||||
public enum SchemaConfiguration: ApolloAPI.SchemaConfiguration {
|
||||
public static func cacheKeyInfo(for _: ApolloAPI.Object, object _: ApolloAPI.ObjectData) -> CacheKeyInfo? {
|
||||
public static func cacheKeyInfo(for type: ApolloAPI.Object, object: ApolloAPI.ObjectData) -> CacheKeyInfo? {
|
||||
// Implement this function to configure cache key resolution for your schema types.
|
||||
nil
|
||||
return nil
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
.DS_Store
|
||||
/.build
|
||||
/Packages
|
||||
xcuserdata/
|
||||
DerivedData/
|
||||
.swiftpm/configuration/registries.json
|
||||
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
|
||||
.netrc
|
||||
@@ -0,0 +1,23 @@
|
||||
// swift-tools-version: 5.9
|
||||
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "AffineResources",
|
||||
products: [
|
||||
.library(
|
||||
name: "AffineResources",
|
||||
targets: ["AffineResources"]
|
||||
),
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "AffineResources",
|
||||
resources: [
|
||||
.process("Resources/Icons.xcassets"),
|
||||
.process("Resources/Colors.xcassets"),
|
||||
]
|
||||
),
|
||||
]
|
||||
)
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
// The Swift Programming Language
|
||||
// https://docs.swift.org/swift-book
|
||||
|
||||
import SwiftUI
|
||||
import UIKit
|
||||
|
||||
public enum AffineColors: String, CaseIterable {
|
||||
case buttonPrimary = "affine.button.primary"
|
||||
case iconActivated = "affine.icon.activated"
|
||||
case iconPrimary = "affine.icon.primary"
|
||||
case layerBackgroundPrimary = "affine.layer.background.primary"
|
||||
case layerBackgroundSecondary = "affine.layer.background.secondary"
|
||||
case layerBorder = "affine.layer.border"
|
||||
case layerPureWhite = "affine.layer.pureWhite"
|
||||
case textEmphasis = "affine.text.emphasis"
|
||||
case textLink = "affine.text.link"
|
||||
case textListDotAndNumber = "affine.text.listDotAndNumber"
|
||||
case textPlaceholder = "affine.text.placeholder"
|
||||
case textPrimary = "affine.text.primary"
|
||||
case textPureWhite = "affine.text.pureWhite"
|
||||
case textSecondary = "affine.text.secondary"
|
||||
case textTertiary = "affine.text.tertiary"
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
public var color: Color {
|
||||
Color(rawValue, bundle: .module)
|
||||
}
|
||||
|
||||
public var uiColor: UIColor {
|
||||
UIColor(named: rawValue, in: .module, compatibleWith: nil) ?? .clear
|
||||
}
|
||||
}
|
||||
|
||||
public enum AffineIcons: String, CaseIterable {
|
||||
case arrowDown = "ArrowDown"
|
||||
case arrowUpBig = "ArrowUpBig"
|
||||
case box = "Box"
|
||||
case broom = "Broom"
|
||||
case bubble = "Bubble"
|
||||
case calendar = "Calendar"
|
||||
case camera = "Camera"
|
||||
case checkCircle = "CheckCircle"
|
||||
case close = "Close"
|
||||
case image = "Image"
|
||||
case more = "More"
|
||||
case page = "Page"
|
||||
case plus = "Plus"
|
||||
case settings = "Settings"
|
||||
case think = "Think"
|
||||
case tools = "Tools"
|
||||
case upload = "Upload"
|
||||
case web = "Web"
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
public var image: Image {
|
||||
Image(rawValue, bundle: .module)
|
||||
}
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
public var uiImage: UIImage {
|
||||
UIImage(named: rawValue, in: .module, with: .none) ?? UIImage()
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -14,28 +14,29 @@ let package = Package(
|
||||
],
|
||||
dependencies: [
|
||||
.package(path: "../AffineGraphQL"),
|
||||
.package(path: "../AffineResources"),
|
||||
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.22.0"),
|
||||
.package(url: "https://github.com/apple/swift-collections", from: "1.2.0"),
|
||||
.package(url: "https://github.com/devxoul/Then", from: "3.0.0"),
|
||||
.package(url: "https://github.com/apple/swift-collections.git", from: "1.2.0"),
|
||||
.package(url: "https://github.com/SnapKit/SnapKit.git", from: "5.7.1"),
|
||||
.package(url: "https://github.com/SwifterSwift/SwifterSwift.git", from: "6.0.0"),
|
||||
.package(url: "https://github.com/Recouse/EventSource", from: "0.1.4"),
|
||||
.package(url: "https://github.com/Lakr233/ListViewKit", from: "1.1.6"),
|
||||
.package(url: "https://github.com/Lakr233/MarkdownView", from: "3.4.1"),
|
||||
.package(url: "https://github.com/Recouse/EventSource.git", from: "0.1.4"),
|
||||
.package(url: "https://github.com/Lakr233/ListViewKit.git", from: "1.1.6"),
|
||||
.package(url: "https://github.com/Lakr233/MarkdownView.git", from: "3.4.2"),
|
||||
],
|
||||
targets: [
|
||||
.target(name: "Intelligents", dependencies: [
|
||||
"AffineGraphQL",
|
||||
"AffineResources",
|
||||
"SnapKit",
|
||||
"Then",
|
||||
"SwifterSwift",
|
||||
.product(name: "Apollo", package: "apollo-ios"),
|
||||
.product(name: "OrderedCollections", package: "swift-collections"),
|
||||
|
||||
"ListViewKit",
|
||||
"MarkdownView",
|
||||
"EventSource",
|
||||
], resources: [
|
||||
.process("Resources/main.metal"),
|
||||
.process("Resources/Media.xcassets"),
|
||||
.process("Interface/View/InputBox/InputBox.xcassets"),
|
||||
.process("Interface/Controller/AttachmentManagementController/AttachmentIcon.xcassets"),
|
||||
]),
|
||||
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
import AffineResources
|
||||
import SwiftUI
|
||||
|
||||
extension Color {
|
||||
/// Primary icon color
|
||||
static var affineIconPrimary: Color {
|
||||
AffineColors.iconPrimary.color
|
||||
}
|
||||
|
||||
/// Primary background layer color
|
||||
static var affineLayerBackgroundPrimary: Color {
|
||||
AffineColors.layerBackgroundPrimary.color
|
||||
}
|
||||
|
||||
/// Secondary background layer color
|
||||
static var affineLayerBackgroundSecondary: Color {
|
||||
AffineColors.layerBackgroundSecondary.color
|
||||
}
|
||||
|
||||
/// Border layer color
|
||||
static var affineLayerBorder: Color {
|
||||
AffineColors.layerBorder.color
|
||||
}
|
||||
|
||||
/// Pure white layer color
|
||||
static var affineLayerPureWhite: Color {
|
||||
AffineColors.layerPureWhite.color
|
||||
}
|
||||
|
||||
/// Primary button color
|
||||
static var affineButtonPrimary: Color {
|
||||
AffineColors.buttonPrimary.color
|
||||
}
|
||||
|
||||
/// Activated icon color
|
||||
static var affineIconActivated: Color {
|
||||
AffineColors.iconActivated.color
|
||||
}
|
||||
|
||||
/// Text emphasis color
|
||||
static var affineTextEmphasis: Color {
|
||||
AffineColors.textEmphasis.color
|
||||
}
|
||||
|
||||
/// Text link color
|
||||
static var affineTextLink: Color {
|
||||
AffineColors.textLink.color
|
||||
}
|
||||
|
||||
/// List dot and number color
|
||||
static var affineTextListDotAndNumber: Color {
|
||||
AffineColors.textListDotAndNumber.color
|
||||
}
|
||||
|
||||
/// Placeholder text color
|
||||
static var affineTextPlaceholder: Color {
|
||||
AffineColors.textPlaceholder.color
|
||||
}
|
||||
|
||||
/// Primary text color
|
||||
static var affineTextPrimary: Color {
|
||||
AffineColors.textPrimary.color
|
||||
}
|
||||
|
||||
/// Pure white text color
|
||||
static var affineTextPureWhite: Color {
|
||||
AffineColors.textPureWhite.color
|
||||
}
|
||||
|
||||
/// Secondary text color
|
||||
static var affineTextSecondary: Color {
|
||||
AffineColors.textSecondary.color
|
||||
}
|
||||
|
||||
/// Tertiary text color
|
||||
static var affineTextTertiary: Color {
|
||||
AffineColors.textTertiary.color
|
||||
}
|
||||
}
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
import AffineResources
|
||||
import SwiftUI
|
||||
|
||||
extension Image {
|
||||
/// Check circle icon
|
||||
static var affineCheckCircle: Image {
|
||||
AffineIcons.checkCircle.image
|
||||
}
|
||||
|
||||
/// More options icon
|
||||
static var affineMore: Image {
|
||||
AffineIcons.more.image
|
||||
}
|
||||
|
||||
/// Arrow down icon
|
||||
static var affineArrowDown: Image {
|
||||
AffineIcons.arrowDown.image
|
||||
}
|
||||
|
||||
/// Tools icon
|
||||
static var affineTools: Image {
|
||||
AffineIcons.tools.image
|
||||
}
|
||||
|
||||
/// Box icon
|
||||
static var affineBox: Image {
|
||||
AffineIcons.box.image
|
||||
}
|
||||
|
||||
/// Think icon
|
||||
static var affineThink: Image {
|
||||
AffineIcons.think.image
|
||||
}
|
||||
|
||||
/// Web icon
|
||||
static var affineWeb: Image {
|
||||
AffineIcons.web.image
|
||||
}
|
||||
|
||||
/// Calendar icon
|
||||
static var affineCalendar: Image {
|
||||
AffineIcons.calendar.image
|
||||
}
|
||||
|
||||
/// Camera icon
|
||||
static var affineCamera: Image {
|
||||
AffineIcons.camera.image
|
||||
}
|
||||
|
||||
/// Close icon
|
||||
static var affineClose: Image {
|
||||
AffineIcons.close.image
|
||||
}
|
||||
|
||||
/// Big arrow up icon
|
||||
static var affineArrowUpBig: Image {
|
||||
AffineIcons.arrowUpBig.image
|
||||
}
|
||||
|
||||
/// Broom icon
|
||||
static var affineBroom: Image {
|
||||
AffineIcons.broom.image
|
||||
}
|
||||
|
||||
/// Bubble icon
|
||||
static var affineBubble: Image {
|
||||
AffineIcons.bubble.image
|
||||
}
|
||||
|
||||
/// Image icon
|
||||
static var affineImage: Image {
|
||||
AffineIcons.image.image
|
||||
}
|
||||
|
||||
/// Page icon
|
||||
static var affinePage: Image {
|
||||
AffineIcons.page.image
|
||||
}
|
||||
|
||||
/// Plus icon
|
||||
static var affinePlus: Image {
|
||||
AffineIcons.plus.image
|
||||
}
|
||||
|
||||
/// Settings icon
|
||||
static var affineSettings: Image {
|
||||
AffineIcons.settings.image
|
||||
}
|
||||
|
||||
/// Upload icon
|
||||
static var affineUpload: Image {
|
||||
AffineIcons.upload.image
|
||||
}
|
||||
}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
// Copyright (c) 2015 Suyeol Jeon (xoul.kr)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
// this package uses swift version 5.0 which is currently broken
|
||||
|
||||
import Foundation
|
||||
#if !os(Linux)
|
||||
import CoreGraphics
|
||||
#endif
|
||||
#if os(iOS) || os(tvOS)
|
||||
import UIKit.UIGeometry
|
||||
#endif
|
||||
|
||||
public protocol Then {}
|
||||
|
||||
extension Then where Self: Any {
|
||||
|
||||
/// Makes it available to set properties with closures just after initializing and copying the value types.
|
||||
///
|
||||
/// let frame = CGRect().with {
|
||||
/// $0.origin.x = 10
|
||||
/// $0.size.width = 100
|
||||
/// }
|
||||
@inlinable
|
||||
public func with(_ block: (inout Self) throws -> Void) rethrows -> Self {
|
||||
var copy = self
|
||||
try block(©)
|
||||
return copy
|
||||
}
|
||||
|
||||
/// Makes it available to execute something with closures.
|
||||
///
|
||||
/// UserDefaults.standard.do {
|
||||
/// $0.set("devxoul", forKey: "username")
|
||||
/// $0.set("devxoul@gmail.com", forKey: "email")
|
||||
/// $0.synchronize()
|
||||
/// }
|
||||
@inlinable
|
||||
public func `do`(_ block: (Self) throws -> Void) rethrows {
|
||||
try block(self)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension Then where Self: AnyObject {
|
||||
|
||||
/// Makes it available to set properties with closures just after initializing.
|
||||
///
|
||||
/// let label = UILabel().then {
|
||||
/// $0.textAlignment = .center
|
||||
/// $0.textColor = UIColor.black
|
||||
/// $0.text = "Hello, World!"
|
||||
/// }
|
||||
@inlinable
|
||||
public func then(_ block: (Self) throws -> Void) rethrows -> Self {
|
||||
try block(self)
|
||||
return self
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension NSObject: Then {}
|
||||
|
||||
#if !os(Linux)
|
||||
extension CGPoint: Then {}
|
||||
extension CGRect: Then {}
|
||||
extension CGSize: Then {}
|
||||
extension CGVector: Then {}
|
||||
#endif
|
||||
|
||||
extension Array: Then {}
|
||||
extension Dictionary: Then {}
|
||||
extension Set: Then {}
|
||||
extension JSONDecoder: Then {}
|
||||
extension JSONEncoder: Then {}
|
||||
|
||||
#if os(iOS) || os(tvOS)
|
||||
extension UIEdgeInsets: Then {}
|
||||
extension UIOffset: Then {}
|
||||
extension UIRectEdge: Then {}
|
||||
#endif
|
||||
+16
-15
@@ -1,78 +1,79 @@
|
||||
import AffineResources
|
||||
import UIKit
|
||||
|
||||
extension UIColor {
|
||||
/// Primary icon color
|
||||
static var affineIconPrimary: UIColor {
|
||||
UIColor(named: "affine.icon.primary", in: .module, compatibleWith: nil) ?? .black
|
||||
AffineColors.iconPrimary.uiColor
|
||||
}
|
||||
|
||||
/// Primary background layer color
|
||||
static var affineLayerBackgroundPrimary: UIColor {
|
||||
UIColor(named: "affine.layer.background.primary", in: .module, compatibleWith: nil) ?? .white
|
||||
AffineColors.layerBackgroundPrimary.uiColor
|
||||
}
|
||||
|
||||
/// Secondary background layer color
|
||||
static var affineLayerBackgroundSecondary: UIColor {
|
||||
UIColor(named: "affine.layer.background.secondary", in: .module, compatibleWith: nil) ?? .systemGray6
|
||||
AffineColors.layerBackgroundSecondary.uiColor
|
||||
}
|
||||
|
||||
/// Border layer color
|
||||
static var affineLayerBorder: UIColor {
|
||||
UIColor(named: "affine.layer.border", in: .module, compatibleWith: nil) ?? .gray
|
||||
AffineColors.layerBorder.uiColor
|
||||
}
|
||||
|
||||
/// Pure white layer color
|
||||
static var affineLayerPureWhite: UIColor {
|
||||
UIColor(named: "affine.layer.pureWhite", in: .module, compatibleWith: nil) ?? .white
|
||||
AffineColors.layerPureWhite.uiColor
|
||||
}
|
||||
|
||||
/// Primary button color
|
||||
static var affineButtonPrimary: UIColor {
|
||||
UIColor(named: "affine.button.primary", in: .module, compatibleWith: nil) ?? .blue
|
||||
AffineColors.buttonPrimary.uiColor
|
||||
}
|
||||
|
||||
/// Activated icon color
|
||||
static var affineIconActivated: UIColor {
|
||||
UIColor(named: "affine.icon.activated", in: .module, compatibleWith: nil) ?? .blue
|
||||
AffineColors.iconActivated.uiColor
|
||||
}
|
||||
|
||||
/// Text emphasis color
|
||||
static var affineTextEmphasis: UIColor {
|
||||
UIColor(named: "affine.text.emphasis", in: .module, compatibleWith: nil) ?? .blue
|
||||
AffineColors.textEmphasis.uiColor
|
||||
}
|
||||
|
||||
/// Text link color
|
||||
static var affineTextLink: UIColor {
|
||||
UIColor(named: "affine.text.link", in: .module, compatibleWith: nil) ?? .blue
|
||||
AffineColors.textLink.uiColor
|
||||
}
|
||||
|
||||
/// List dot and number color
|
||||
static var affineTextListDotAndNumber: UIColor {
|
||||
UIColor(named: "affine.text.listDotAndNumber", in: .module, compatibleWith: nil) ?? .blue
|
||||
AffineColors.textListDotAndNumber.uiColor
|
||||
}
|
||||
|
||||
/// Placeholder text color
|
||||
static var affineTextPlaceholder: UIColor {
|
||||
UIColor(named: "affine.text.placeholder", in: .module, compatibleWith: nil) ?? .gray
|
||||
AffineColors.textPlaceholder.uiColor
|
||||
}
|
||||
|
||||
/// Primary text color
|
||||
static var affineTextPrimary: UIColor {
|
||||
UIColor(named: "affine.text.primary", in: .module, compatibleWith: nil) ?? .black
|
||||
AffineColors.textPrimary.uiColor
|
||||
}
|
||||
|
||||
/// Pure white text color
|
||||
static var affineTextPureWhite: UIColor {
|
||||
UIColor(named: "affine.text.pureWhite", in: .module, compatibleWith: nil) ?? .white
|
||||
AffineColors.textPureWhite.uiColor
|
||||
}
|
||||
|
||||
/// Secondary text color
|
||||
static var affineTextSecondary: UIColor {
|
||||
UIColor(named: "affine.text.secondary", in: .module, compatibleWith: nil) ?? .gray
|
||||
AffineColors.textSecondary.uiColor
|
||||
}
|
||||
|
||||
/// Tertiary text color
|
||||
static var affineTextTertiary: UIColor {
|
||||
UIColor(named: "affine.text.tertiary", in: .module, compatibleWith: nil) ?? .gray
|
||||
AffineColors.textTertiary.uiColor
|
||||
}
|
||||
}
|
||||
+19
-18
@@ -1,93 +1,94 @@
|
||||
import AffineResources
|
||||
import UIKit
|
||||
|
||||
extension UIImage {
|
||||
/// Check circle icon
|
||||
static var affineCheckCircle: UIImage {
|
||||
UIImage(named: "CheckCircle", in: .module, compatibleWith: nil) ?? UIImage()
|
||||
AffineIcons.checkCircle.uiImage
|
||||
}
|
||||
|
||||
/// More options icon
|
||||
static var affineMore: UIImage {
|
||||
UIImage(named: "More", in: .module, compatibleWith: nil) ?? UIImage()
|
||||
AffineIcons.more.uiImage
|
||||
}
|
||||
|
||||
/// Arrow down icon
|
||||
static var affineArrowDown: UIImage {
|
||||
UIImage(named: "ArrowDown", in: .module, compatibleWith: nil) ?? UIImage()
|
||||
AffineIcons.arrowDown.uiImage
|
||||
}
|
||||
|
||||
/// Tools icon
|
||||
static var affineTools: UIImage {
|
||||
UIImage(named: "Tools", in: .module, compatibleWith: nil) ?? UIImage()
|
||||
AffineIcons.tools.uiImage
|
||||
}
|
||||
|
||||
/// Box icon
|
||||
static var affineBox: UIImage {
|
||||
UIImage(named: "Box", in: .module, compatibleWith: nil) ?? UIImage()
|
||||
AffineIcons.box.uiImage
|
||||
}
|
||||
|
||||
/// Think icon
|
||||
static var affineThink: UIImage {
|
||||
UIImage(named: "Think", in: .module, compatibleWith: nil) ?? UIImage()
|
||||
AffineIcons.think.uiImage
|
||||
}
|
||||
|
||||
/// Web icon
|
||||
static var affineWeb: UIImage {
|
||||
UIImage(named: "Web", in: .module, compatibleWith: nil) ?? UIImage()
|
||||
AffineIcons.web.uiImage
|
||||
}
|
||||
|
||||
/// Calendar icon
|
||||
static var affineCalendar: UIImage {
|
||||
UIImage(named: "Calendar", in: .module, compatibleWith: nil) ?? UIImage()
|
||||
AffineIcons.calendar.uiImage
|
||||
}
|
||||
|
||||
/// Camera icon
|
||||
static var affineCamera: UIImage {
|
||||
UIImage(named: "Camera", in: .module, compatibleWith: nil) ?? UIImage()
|
||||
AffineIcons.camera.uiImage
|
||||
}
|
||||
|
||||
/// Close icon
|
||||
static var affineClose: UIImage {
|
||||
UIImage(named: "Close", in: .module, compatibleWith: nil) ?? UIImage()
|
||||
AffineIcons.close.uiImage
|
||||
}
|
||||
|
||||
/// Big arrow up icon
|
||||
static var affineArrowUpBig: UIImage {
|
||||
UIImage(named: "ArrowUpBig", in: .module, compatibleWith: nil) ?? UIImage()
|
||||
AffineIcons.arrowUpBig.uiImage
|
||||
}
|
||||
|
||||
/// Broom icon
|
||||
static var affineBroom: UIImage {
|
||||
UIImage(named: "Broom", in: .module, compatibleWith: nil) ?? UIImage()
|
||||
AffineIcons.broom.uiImage
|
||||
}
|
||||
|
||||
/// Bubble icon
|
||||
static var affineBubble: UIImage {
|
||||
UIImage(named: "Bubble", in: .module, compatibleWith: nil) ?? UIImage()
|
||||
AffineIcons.bubble.uiImage
|
||||
}
|
||||
|
||||
/// Image icon
|
||||
static var affineImage: UIImage {
|
||||
UIImage(named: "Image", in: .module, compatibleWith: nil) ?? UIImage()
|
||||
AffineIcons.image.uiImage
|
||||
}
|
||||
|
||||
/// Page icon
|
||||
static var affinePage: UIImage {
|
||||
UIImage(named: "Page", in: .module, compatibleWith: nil) ?? UIImage()
|
||||
AffineIcons.page.uiImage
|
||||
}
|
||||
|
||||
/// Plus icon
|
||||
static var affinePlus: UIImage {
|
||||
UIImage(named: "Plus", in: .module, compatibleWith: nil) ?? UIImage()
|
||||
AffineIcons.plus.uiImage
|
||||
}
|
||||
|
||||
/// Settings icon
|
||||
static var affineSettings: UIImage {
|
||||
UIImage(named: "Settings", in: .module, compatibleWith: nil) ?? UIImage()
|
||||
AffineIcons.settings.uiImage
|
||||
}
|
||||
|
||||
/// Upload icon
|
||||
static var affineUpload: UIImage {
|
||||
UIImage(named: "Upload", in: .module, compatibleWith: nil) ?? UIImage()
|
||||
AffineIcons.upload.uiImage
|
||||
}
|
||||
}
|
||||
-1
@@ -6,7 +6,6 @@
|
||||
//
|
||||
|
||||
import SnapKit
|
||||
import Then
|
||||
import UIKit
|
||||
|
||||
class AttachmentManagementController: UINavigationController {
|
||||
|
||||
-1
@@ -1,6 +1,5 @@
|
||||
import Combine
|
||||
import SnapKit
|
||||
import Then
|
||||
import UIKit
|
||||
|
||||
class MainViewController: UIViewController {
|
||||
|
||||
-1
@@ -8,7 +8,6 @@
|
||||
import Litext
|
||||
import MarkdownView
|
||||
import SnapKit
|
||||
import Then
|
||||
import UIKit
|
||||
|
||||
private let markdownViewForSizeCalculation: MarkdownTextView = .init()
|
||||
|
||||
-1
@@ -9,7 +9,6 @@ import ListViewKit
|
||||
import Litext
|
||||
import MarkdownView
|
||||
import SnapKit
|
||||
import Then
|
||||
import UIKit
|
||||
|
||||
class ChatBaseCell: ListRowView {
|
||||
|
||||
-1
@@ -7,7 +7,6 @@
|
||||
|
||||
import Litext
|
||||
import SnapKit
|
||||
import Then
|
||||
import UIKit
|
||||
|
||||
class ErrorCell: ChatBaseCell {
|
||||
|
||||
-1
@@ -7,7 +7,6 @@
|
||||
|
||||
import Litext
|
||||
import SnapKit
|
||||
import Then
|
||||
import UIKit
|
||||
|
||||
class LoadingCell: ChatBaseCell {
|
||||
|
||||
-1
@@ -7,7 +7,6 @@
|
||||
|
||||
import Litext
|
||||
import SnapKit
|
||||
import Then
|
||||
import UIKit
|
||||
|
||||
private let labelForSizeCalculation = LTXLabel()
|
||||
|
||||
-1
@@ -7,7 +7,6 @@
|
||||
|
||||
import Litext
|
||||
import SnapKit
|
||||
import Then
|
||||
import UIKit
|
||||
|
||||
private let labelForSizeCalculation = LTXLabel()
|
||||
|
||||
-1
@@ -7,7 +7,6 @@
|
||||
|
||||
import AffineGraphQL
|
||||
import SnapKit
|
||||
import Then
|
||||
import UIKit
|
||||
|
||||
class DocumentPickerView: UIView {
|
||||
|
||||
-1
@@ -6,7 +6,6 @@
|
||||
//
|
||||
|
||||
import SnapKit
|
||||
import Then
|
||||
import UIKit
|
||||
|
||||
class DocumentTableViewCell: UITableViewCell {
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
import SnapKit
|
||||
import Then
|
||||
import UIKit
|
||||
|
||||
final class FileAttachmentHeaderView: UIView {
|
||||
|
||||
-1
@@ -6,7 +6,6 @@
|
||||
//
|
||||
|
||||
import SnapKit
|
||||
import Then
|
||||
import UIKit
|
||||
|
||||
class ImageAttachmentBar: UICollectionView {
|
||||
|
||||
-1
@@ -1,6 +1,5 @@
|
||||
import Combine
|
||||
import SnapKit
|
||||
import Then
|
||||
import UIKit
|
||||
|
||||
class InputBox: UIView {
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
import SnapKit
|
||||
import Then
|
||||
import UIKit
|
||||
|
||||
private let unselectedColor: UIColor = .affineIconPrimary
|
||||
|
||||
-1
@@ -7,7 +7,6 @@
|
||||
|
||||
import SnapKit
|
||||
import SwifterSwift
|
||||
import Then
|
||||
import UIKit
|
||||
|
||||
// floating button to open intelligent panel
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
import SnapKit
|
||||
import Then
|
||||
import UIKit
|
||||
|
||||
class MainHeaderView: UIView {
|
||||
|
||||
Reference in new issue
Block a user