diff --git a/Mail/Components/AttachmentView.swift b/Mail/Components/AttachmentView.swift new file mode 100644 index 000000000..88bfde8a9 --- /dev/null +++ b/Mail/Components/AttachmentView.swift @@ -0,0 +1,71 @@ +/* + Infomaniak Mail - iOS App + Copyright (C) 2022 Infomaniak Network SA + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ + +import MailCore +import MailResources +import SwiftUI + +struct AttachmentView: View { + let attachment: Attachment + let subtitle: String + @ViewBuilder let accessory: () -> Content? + + init(attachment: Attachment, subtitle: String, accessory: @escaping () -> Content? = { EmptyView() }) { + self.attachment = attachment + self.subtitle = subtitle + self.accessory = accessory + } + + var body: some View { + VStack(spacing: 0) { + HStack { + attachment.icon.swiftUIImage + .resizable() + .frame(width: 24, height: 24) + + HStack(spacing: 8) { + VStack(alignment: .leading, spacing: 0) { + Text(attachment.name) + .textStyle(.bodySmall) + .lineLimit(1) + .truncationMode(.middle) + + Text(subtitle) + .textStyle(.labelSecondary) + } + + accessory() + } + } + .padding(.horizontal, 8) + .padding(.vertical, 4) + } + .background( + RoundedRectangle(cornerRadius: 6) + .stroke(MailResourcesAsset.elementsColor.swiftUIColor, lineWidth: 1) + ) + .cornerRadius(6) + .frame(maxWidth: 200) + } +} + +struct AttachmentView_Previews: PreviewProvider { + static var previews: some View { + AttachmentView(attachment: PreviewHelper.sampleAttachment, subtitle: "24ko") + } +} diff --git a/Mail/Views/New Message/Attachments/AttachmentUploadCell.swift b/Mail/Views/New Message/Attachments/AttachmentUploadCell.swift index c4e378cff..8efcf8ec1 100644 --- a/Mail/Views/New Message/Attachments/AttachmentUploadCell.swift +++ b/Mail/Views/New Message/Attachments/AttachmentUploadCell.swift @@ -21,60 +21,39 @@ import MailResources import SwiftUI struct AttachmentUploadCell: View { - let attachment: Attachment @ObservedObject var uploadTask: AttachmentUploadTask + + let attachment: Attachment let attachmentRemoved: ((Attachment) -> Void)? var body: some View { - VStack(spacing: 0) { - HStack { - attachment.icon.swiftUIImage - - VStack(alignment: .leading, spacing: 0) { - Text(attachment.name) - .textStyle(.bodySmall) - .lineLimit(1) - .truncationMode(.middle) - if let error = uploadTask.error { - Text(error.localizedDescription) - .textStyle(.labelSecondary) - } else { - Text(attachment.size, format: .defaultByteCount) - .textStyle(.labelSecondary) - .opacity(attachment.size == 0 ? 0 : 1) - } + AttachmentView( + attachment: attachment, + subtitle: uploadTask.error != nil ? uploadTask.error!.localizedDescription : attachment.size + .formatted(.defaultByteCount) + ) { + Button { + if let attachmentRemoved { + attachmentRemoved(attachment) } - - Button { - if let attachmentRemoved { - attachmentRemoved(attachment) - } - } label: { - MailResourcesAsset.closeSmall.swiftUIImage - .resizable() - .foregroundColor(MailResourcesAsset.textSecondaryColor) - .frame(width: 16, height: 16) - } - .buttonStyle(.borderless) - .padding(.leading, 8) + } label: { + MailResourcesAsset.closeSmall.swiftUIImage + .resizable() + .foregroundColor(MailResourcesAsset.textSecondaryColor) + .frame(width: 12, height: 12) } - .padding(6) + .buttonStyle(.borderless) + } + .overlay(alignment: .bottom) { IndeterminateProgressView(indeterminate: uploadTask.progress == 0, progress: uploadTask.progress) .opacity(uploadTask.progress == 1 ? 0 : 1) } - .background( - RoundedRectangle(cornerRadius: 6) - .stroke(MailResourcesAsset.elementsColor.swiftUIColor, lineWidth: 1) - ) - .cornerRadius(6) - .frame(maxWidth: 200) - .padding(.top, 16) } } struct AttachmentUploadCell_Previews: PreviewProvider { static var previews: some View { - AttachmentUploadCell(attachment: PreviewHelper.sampleAttachment, uploadTask: AttachmentUploadTask()) { _ in + AttachmentUploadCell(uploadTask: AttachmentUploadTask(), attachment: PreviewHelper.sampleAttachment) { _ in /* Preview */ } } diff --git a/Mail/Views/New Message/Attachments/AttachmentsHeaderView.swift b/Mail/Views/New Message/Attachments/AttachmentsHeaderView.swift index f0e99cecc..a06299715 100644 --- a/Mail/Views/New Message/Attachments/AttachmentsHeaderView.swift +++ b/Mail/Views/New Message/Attachments/AttachmentsHeaderView.swift @@ -30,10 +30,10 @@ struct AttachmentsHeaderView: View { ScrollView(.horizontal, showsIndicators: false) { HStack(spacing: 8) { ForEach(attachmentsManager.attachments) { attachment in - AttachmentUploadCell(attachment: attachment, - uploadTask: attachmentsManager - .attachmentUploadTaskOrFinishedTask(for: attachment - .uuid)) { attachmentRemoved in + AttachmentUploadCell( + uploadTask: attachmentsManager.attachmentUploadTaskOrFinishedTask(for: attachment.uuid), + attachment: attachment + ) { attachmentRemoved in attachmentsManager.removeAttachment(attachmentRemoved) } } @@ -41,6 +41,7 @@ struct AttachmentsHeaderView: View { .padding(.vertical, 1) .padding(.horizontal, 16) } + .padding(.top, 16) } } .customAlert(item: $attachmentsManager.globalError) { error in diff --git a/Mail/Views/Thread/AttachmentCell.swift b/Mail/Views/Thread/AttachmentCell.swift index d707030fe..cdd83703e 100644 --- a/Mail/Views/Thread/AttachmentCell.swift +++ b/Mail/Views/Thread/AttachmentCell.swift @@ -24,28 +24,7 @@ struct AttachmentCell: View { let attachment: Attachment var body: some View { - VStack(spacing: 0) { - HStack { - attachment.icon.swiftUIImage - - VStack(alignment: .leading, spacing: 0) { - Text(attachment.name) - .textStyle(.bodySmall) - .lineLimit(1) - .truncationMode(.middle) - Text(attachment.size, format: .defaultByteCount) - .textStyle(.labelSecondary) - .opacity(attachment.size == 0 ? 0 : 1) - } - } - .padding(4) - } - .background( - RoundedRectangle(cornerRadius: 6) - .stroke(MailResourcesAsset.elementsColor.swiftUIColor, lineWidth: 1) - ) - .cornerRadius(6) - .frame(maxWidth: 200) + AttachmentView(attachment: attachment, subtitle: attachment.size.formatted(.defaultByteCount)) } } diff --git a/MailCore/Models/Attachment.swift b/MailCore/Models/Attachment.swift index 8197fc2a4..7b36cfc0e 100644 --- a/MailCore/Models/Attachment.swift +++ b/MailCore/Models/Attachment.swift @@ -53,24 +53,35 @@ public class Attachment: /* Hashable, */ EmbeddedObject, Codable, Identifiable { public var icon: MailResourcesImages { guard let uti else { return MailResourcesAsset.unknownFile } - if uti.conforms(to: .audio) { - return MailResourcesAsset.audioFile - } else if uti.conforms(to: .archive) { - return MailResourcesAsset.zipFile + + if uti.conforms(to: .pdf) { + return MailResourcesAsset.pdfFile + } else if uti.conforms(to: .calendarEvent) || uti.conforms(to: .ics) { + return MailResourcesAsset.icsFile + } else if uti.conforms(to: .vCard) { + return MailResourcesAsset.vcardFile } else if uti.conforms(to: .image) { - return MailResourcesAsset.imageFileLandscape - } else if uti.conforms(to: .pdf) { - return MailResourcesAsset.officeFileAdobe - } else if uti.conforms(to: .plainText) { - return MailResourcesAsset.commonFileText - } else if uti.conforms(to: .presentation) { - return MailResourcesAsset.officeFileGraph - } else if uti.conforms(to: .spreadsheet) { - return MailResourcesAsset.officeFileSheet + return MailResourcesAsset.imageFile + } else if uti.conforms(to: .audio) { + return MailResourcesAsset.audioFile } else if uti.conforms(to: .movie) { - return MailResourcesAsset.videoFilePlay + return MailResourcesAsset.videoFile + } else if uti.conforms(to: .spreadsheet) { + return MailResourcesAsset.gridFile + } else if uti.conforms(to: .presentation) { + return MailResourcesAsset.pointFile + } else if uti.conforms(to: .sourceCode) || uti.conforms(to: .html) || uti.conforms(to: .json) || uti.conforms(to: .xml) { + return MailResourcesAsset.codeFile + } else if uti.conforms(to: .text) || uti.conforms(to: .pages) || uti.conforms(to: .onlyOffice) + || uti.conforms(to: .wordDoc) || uti.conforms(to: .wordDocm) || uti.conforms(to: .wordDocx) { + return MailResourcesAsset.docFile + } else if uti.conforms(to: .archive) { + return MailResourcesAsset.archiveFile + } else if uti.conforms(to: .font) { + return MailResourcesAsset.fontFile + } else { + return MailResourcesAsset.unknownFile } - return MailResourcesAsset.unknownFile } private enum CodingKeys: String, CodingKey { diff --git a/MailCore/Utils/UTType+Extension.swift b/MailCore/Utils/UTType+Extension.swift new file mode 100644 index 000000000..053cf956e --- /dev/null +++ b/MailCore/Utils/UTType+Extension.swift @@ -0,0 +1,30 @@ +/* + Infomaniak Mail - iOS App + Copyright (C) 2022 Infomaniak Network SA + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ + +import Foundation +import UniformTypeIdentifiers + +public extension UTType { + static let pages = UTType("com.apple.iwork.pages.sffpages")! + static let wordDoc = UTType("com.microsoft.word.doc")! + static let wordDocm = UTType(mimeType: "application/vnd.ms-word")! + static let wordDocx = UTType("org.openxmlformats.wordprocessingml.document")! + static let onlyOffice = UTType("org.oasis-open.opendocument.text")! + + static let ics = UTType(mimeType: "application/ics")! +} diff --git a/MailResources/Assets.xcassets/Files/archive-file.imageset/Contents.json b/MailResources/Assets.xcassets/Files/archive-file.imageset/Contents.json new file mode 100644 index 000000000..3d7c3f707 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/archive-file.imageset/Contents.json @@ -0,0 +1,25 @@ +{ + "images" : [ + { + "filename" : "archive-file-light.svg", + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "archive-file-dark.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/MailResources/Assets.xcassets/Files/archive-file.imageset/archive-file-dark.svg b/MailResources/Assets.xcassets/Files/archive-file.imageset/archive-file-dark.svg new file mode 100644 index 000000000..7edcf817f --- /dev/null +++ b/MailResources/Assets.xcassets/Files/archive-file.imageset/archive-file-dark.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/MailResources/Assets.xcassets/Files/archive-file.imageset/archive-file-light.svg b/MailResources/Assets.xcassets/Files/archive-file.imageset/archive-file-light.svg new file mode 100644 index 000000000..ed05e3487 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/archive-file.imageset/archive-file-light.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/MailResources/Assets.xcassets/Files/audio-file.imageset/Contents.json b/MailResources/Assets.xcassets/Files/audio-file.imageset/Contents.json index 670fc420b..bba53518d 100644 --- a/MailResources/Assets.xcassets/Files/audio-file.imageset/Contents.json +++ b/MailResources/Assets.xcassets/Files/audio-file.imageset/Contents.json @@ -1,7 +1,17 @@ { "images" : [ { - "filename" : "audio-file.svg", + "filename" : "audio-file-light.svg", + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "audio-file-dark.svg", "idiom" : "universal" } ], diff --git a/MailResources/Assets.xcassets/Files/audio-file.imageset/audio-file-dark.svg b/MailResources/Assets.xcassets/Files/audio-file.imageset/audio-file-dark.svg new file mode 100644 index 000000000..319bf14f9 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/audio-file.imageset/audio-file-dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/MailResources/Assets.xcassets/Files/audio-file.imageset/audio-file-light.svg b/MailResources/Assets.xcassets/Files/audio-file.imageset/audio-file-light.svg new file mode 100644 index 000000000..4aa70f34c --- /dev/null +++ b/MailResources/Assets.xcassets/Files/audio-file.imageset/audio-file-light.svg @@ -0,0 +1,4 @@ + + + + diff --git a/MailResources/Assets.xcassets/Files/audio-file.imageset/audio-file.svg b/MailResources/Assets.xcassets/Files/audio-file.imageset/audio-file.svg deleted file mode 100644 index bbc361a85..000000000 --- a/MailResources/Assets.xcassets/Files/audio-file.imageset/audio-file.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/MailResources/Assets.xcassets/Files/code-file.imageset/Contents.json b/MailResources/Assets.xcassets/Files/code-file.imageset/Contents.json new file mode 100644 index 000000000..472929922 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/code-file.imageset/Contents.json @@ -0,0 +1,25 @@ +{ + "images" : [ + { + "filename" : "code-file-light.svg", + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "code-file-dark.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/MailResources/Assets.xcassets/Files/code-file.imageset/code-file-dark.svg b/MailResources/Assets.xcassets/Files/code-file.imageset/code-file-dark.svg new file mode 100644 index 000000000..794a4af24 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/code-file.imageset/code-file-dark.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/MailResources/Assets.xcassets/Files/code-file.imageset/code-file-light.svg b/MailResources/Assets.xcassets/Files/code-file.imageset/code-file-light.svg new file mode 100644 index 000000000..da0043d01 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/code-file.imageset/code-file-light.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/MailResources/Assets.xcassets/Files/common-file-text.imageset/Contents.json b/MailResources/Assets.xcassets/Files/common-file-text.imageset/Contents.json deleted file mode 100644 index 585455ede..000000000 --- a/MailResources/Assets.xcassets/Files/common-file-text.imageset/Contents.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "images" : [ - { - "filename" : "common-file-text.svg", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - }, - "properties" : { - "preserves-vector-representation" : true - } -} diff --git a/MailResources/Assets.xcassets/Files/doc-file.imageset/Contents.json b/MailResources/Assets.xcassets/Files/doc-file.imageset/Contents.json new file mode 100644 index 000000000..413a6309f --- /dev/null +++ b/MailResources/Assets.xcassets/Files/doc-file.imageset/Contents.json @@ -0,0 +1,25 @@ +{ + "images" : [ + { + "filename" : "doc-file-light.svg", + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "doc-file-dark.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/MailResources/Assets.xcassets/Files/common-file-text.imageset/common-file-text.svg b/MailResources/Assets.xcassets/Files/doc-file.imageset/doc-file-dark.svg similarity index 82% rename from MailResources/Assets.xcassets/Files/common-file-text.imageset/common-file-text.svg rename to MailResources/Assets.xcassets/Files/doc-file.imageset/doc-file-dark.svg index d2a9d73a0..fd4bd85a8 100644 --- a/MailResources/Assets.xcassets/Files/common-file-text.imageset/common-file-text.svg +++ b/MailResources/Assets.xcassets/Files/doc-file.imageset/doc-file-dark.svg @@ -1,8 +1,8 @@ - - - - - - + + + + + + diff --git a/MailResources/Assets.xcassets/Files/doc-file.imageset/doc-file-light.svg b/MailResources/Assets.xcassets/Files/doc-file.imageset/doc-file-light.svg new file mode 100644 index 000000000..2fef4c50b --- /dev/null +++ b/MailResources/Assets.xcassets/Files/doc-file.imageset/doc-file-light.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/MailResources/Assets.xcassets/Files/font-file.imageset/Contents.json b/MailResources/Assets.xcassets/Files/font-file.imageset/Contents.json new file mode 100644 index 000000000..9a8902685 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/font-file.imageset/Contents.json @@ -0,0 +1,25 @@ +{ + "images" : [ + { + "filename" : "font-file-light.svg", + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "font-file-dark.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/MailResources/Assets.xcassets/Files/font-file.imageset/font-file-dark.svg b/MailResources/Assets.xcassets/Files/font-file.imageset/font-file-dark.svg new file mode 100644 index 000000000..05b3f0761 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/font-file.imageset/font-file-dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/MailResources/Assets.xcassets/Files/font-file.imageset/font-file-light.svg b/MailResources/Assets.xcassets/Files/font-file.imageset/font-file-light.svg new file mode 100644 index 000000000..6f7bb4848 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/font-file.imageset/font-file-light.svg @@ -0,0 +1,4 @@ + + + + diff --git a/MailResources/Assets.xcassets/Files/grid-file.imageset/Contents.json b/MailResources/Assets.xcassets/Files/grid-file.imageset/Contents.json new file mode 100644 index 000000000..22b865ad3 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/grid-file.imageset/Contents.json @@ -0,0 +1,25 @@ +{ + "images" : [ + { + "filename" : "grid-file-light.svg", + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "grid-file-dark.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/MailResources/Assets.xcassets/Files/grid-file.imageset/grid-file-dark.svg b/MailResources/Assets.xcassets/Files/grid-file.imageset/grid-file-dark.svg new file mode 100644 index 000000000..9688049cf --- /dev/null +++ b/MailResources/Assets.xcassets/Files/grid-file.imageset/grid-file-dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/MailResources/Assets.xcassets/Files/grid-file.imageset/grid-file-light.svg b/MailResources/Assets.xcassets/Files/grid-file.imageset/grid-file-light.svg new file mode 100644 index 000000000..d42a9fd72 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/grid-file.imageset/grid-file-light.svg @@ -0,0 +1,4 @@ + + + + diff --git a/MailResources/Assets.xcassets/Files/ics-file.imageset/Contents.json b/MailResources/Assets.xcassets/Files/ics-file.imageset/Contents.json new file mode 100644 index 000000000..58a0f0d3f --- /dev/null +++ b/MailResources/Assets.xcassets/Files/ics-file.imageset/Contents.json @@ -0,0 +1,25 @@ +{ + "images" : [ + { + "filename" : "ics-file-light.svg", + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "ics-file-dark.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/MailResources/Assets.xcassets/Files/ics-file.imageset/ics-file-dark.svg b/MailResources/Assets.xcassets/Files/ics-file.imageset/ics-file-dark.svg new file mode 100644 index 000000000..ee4e67421 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/ics-file.imageset/ics-file-dark.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/MailResources/Assets.xcassets/Files/ics-file.imageset/ics-file-light.svg b/MailResources/Assets.xcassets/Files/ics-file.imageset/ics-file-light.svg new file mode 100644 index 000000000..545591ec6 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/ics-file.imageset/ics-file-light.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/MailResources/Assets.xcassets/Files/image-file-landscape.imageset/Contents.json b/MailResources/Assets.xcassets/Files/image-file-landscape.imageset/Contents.json deleted file mode 100644 index c40ff16c1..000000000 --- a/MailResources/Assets.xcassets/Files/image-file-landscape.imageset/Contents.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "images" : [ - { - "filename" : "image-file-landscape.svg", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - }, - "properties" : { - "preserves-vector-representation" : true - } -} diff --git a/MailResources/Assets.xcassets/Files/image-file-landscape.imageset/image-file-landscape.svg b/MailResources/Assets.xcassets/Files/image-file-landscape.imageset/image-file-landscape.svg deleted file mode 100644 index db552e837..000000000 --- a/MailResources/Assets.xcassets/Files/image-file-landscape.imageset/image-file-landscape.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/MailResources/Assets.xcassets/Files/image-file.imageset/Contents.json b/MailResources/Assets.xcassets/Files/image-file.imageset/Contents.json new file mode 100644 index 000000000..1060613c6 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/image-file.imageset/Contents.json @@ -0,0 +1,25 @@ +{ + "images" : [ + { + "filename" : "image-file-light.svg", + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "image-file-dark.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/MailResources/Assets.xcassets/Files/image-file.imageset/image-file-dark.svg b/MailResources/Assets.xcassets/Files/image-file.imageset/image-file-dark.svg new file mode 100644 index 000000000..21579790d --- /dev/null +++ b/MailResources/Assets.xcassets/Files/image-file.imageset/image-file-dark.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/MailResources/Assets.xcassets/Files/image-file.imageset/image-file-light.svg b/MailResources/Assets.xcassets/Files/image-file.imageset/image-file-light.svg new file mode 100644 index 000000000..d5c01f042 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/image-file.imageset/image-file-light.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/MailResources/Assets.xcassets/Files/office-file-adobe.imageset/Contents.json b/MailResources/Assets.xcassets/Files/office-file-adobe.imageset/Contents.json deleted file mode 100644 index 195fbcbc5..000000000 --- a/MailResources/Assets.xcassets/Files/office-file-adobe.imageset/Contents.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "images" : [ - { - "filename" : "office-file-adobe.svg", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - }, - "properties" : { - "preserves-vector-representation" : true - } -} diff --git a/MailResources/Assets.xcassets/Files/office-file-adobe.imageset/office-file-adobe.svg b/MailResources/Assets.xcassets/Files/office-file-adobe.imageset/office-file-adobe.svg deleted file mode 100644 index 456cf6672..000000000 --- a/MailResources/Assets.xcassets/Files/office-file-adobe.imageset/office-file-adobe.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/MailResources/Assets.xcassets/Files/office-file-graph.imageset/Contents.json b/MailResources/Assets.xcassets/Files/office-file-graph.imageset/Contents.json deleted file mode 100644 index dc0bb784e..000000000 --- a/MailResources/Assets.xcassets/Files/office-file-graph.imageset/Contents.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "images" : [ - { - "filename" : "office-file-graph.svg", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - }, - "properties" : { - "preserves-vector-representation" : true - } -} diff --git a/MailResources/Assets.xcassets/Files/office-file-graph.imageset/office-file-graph.svg b/MailResources/Assets.xcassets/Files/office-file-graph.imageset/office-file-graph.svg deleted file mode 100644 index 7b2d630e6..000000000 --- a/MailResources/Assets.xcassets/Files/office-file-graph.imageset/office-file-graph.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/MailResources/Assets.xcassets/Files/office-file-sheet.imageset/Contents.json b/MailResources/Assets.xcassets/Files/office-file-sheet.imageset/Contents.json deleted file mode 100644 index 9e3f333d4..000000000 --- a/MailResources/Assets.xcassets/Files/office-file-sheet.imageset/Contents.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "images" : [ - { - "filename" : "office-file-sheet.svg", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - }, - "properties" : { - "preserves-vector-representation" : true - } -} diff --git a/MailResources/Assets.xcassets/Files/office-file-sheet.imageset/office-file-sheet.svg b/MailResources/Assets.xcassets/Files/office-file-sheet.imageset/office-file-sheet.svg deleted file mode 100644 index 951a61bb7..000000000 --- a/MailResources/Assets.xcassets/Files/office-file-sheet.imageset/office-file-sheet.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/MailResources/Assets.xcassets/Files/pdf-file.imageset/Contents.json b/MailResources/Assets.xcassets/Files/pdf-file.imageset/Contents.json new file mode 100644 index 000000000..7d0d258db --- /dev/null +++ b/MailResources/Assets.xcassets/Files/pdf-file.imageset/Contents.json @@ -0,0 +1,25 @@ +{ + "images" : [ + { + "filename" : "pdf-file-light.svg", + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "pdf-file-dark.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/MailResources/Assets.xcassets/Files/pdf-file.imageset/pdf-file-dark.svg b/MailResources/Assets.xcassets/Files/pdf-file.imageset/pdf-file-dark.svg new file mode 100644 index 000000000..1e5710a45 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/pdf-file.imageset/pdf-file-dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/MailResources/Assets.xcassets/Files/pdf-file.imageset/pdf-file-light.svg b/MailResources/Assets.xcassets/Files/pdf-file.imageset/pdf-file-light.svg new file mode 100644 index 000000000..c8de375aa --- /dev/null +++ b/MailResources/Assets.xcassets/Files/pdf-file.imageset/pdf-file-light.svg @@ -0,0 +1,4 @@ + + + + diff --git a/MailResources/Assets.xcassets/Files/point-file.imageset/Contents.json b/MailResources/Assets.xcassets/Files/point-file.imageset/Contents.json new file mode 100644 index 000000000..0cfff6530 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/point-file.imageset/Contents.json @@ -0,0 +1,25 @@ +{ + "images" : [ + { + "filename" : "point-file-light.svg", + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "point-file-dark.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/MailResources/Assets.xcassets/Files/point-file.imageset/point-file-dark.svg b/MailResources/Assets.xcassets/Files/point-file.imageset/point-file-dark.svg new file mode 100644 index 000000000..904584d83 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/point-file.imageset/point-file-dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/MailResources/Assets.xcassets/Files/point-file.imageset/point-file-light.svg b/MailResources/Assets.xcassets/Files/point-file.imageset/point-file-light.svg new file mode 100644 index 000000000..c0c875120 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/point-file.imageset/point-file-light.svg @@ -0,0 +1,4 @@ + + + + diff --git a/MailResources/Assets.xcassets/Files/unknown-file.imageset/Contents.json b/MailResources/Assets.xcassets/Files/unknown-file.imageset/Contents.json index bc3df475b..010610427 100644 --- a/MailResources/Assets.xcassets/Files/unknown-file.imageset/Contents.json +++ b/MailResources/Assets.xcassets/Files/unknown-file.imageset/Contents.json @@ -1,7 +1,17 @@ { "images" : [ { - "filename" : "unknown-file.svg", + "filename" : "unknown-file-light.svg", + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "unknown-file-dark.svg", "idiom" : "universal" } ], diff --git a/MailResources/Assets.xcassets/Files/unknown-file.imageset/unknown-file.svg b/MailResources/Assets.xcassets/Files/unknown-file.imageset/unknown-file-dark.svg similarity index 86% rename from MailResources/Assets.xcassets/Files/unknown-file.imageset/unknown-file.svg rename to MailResources/Assets.xcassets/Files/unknown-file.imageset/unknown-file-dark.svg index ac4908969..f76bac150 100644 --- a/MailResources/Assets.xcassets/Files/unknown-file.imageset/unknown-file.svg +++ b/MailResources/Assets.xcassets/Files/unknown-file.imageset/unknown-file-dark.svg @@ -1,3 +1,3 @@ - + diff --git a/MailResources/Assets.xcassets/Files/unknown-file.imageset/unknown-file-light.svg b/MailResources/Assets.xcassets/Files/unknown-file.imageset/unknown-file-light.svg new file mode 100644 index 000000000..3ee431472 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/unknown-file.imageset/unknown-file-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/MailResources/Assets.xcassets/Files/vcard-file.imageset/Contents.json b/MailResources/Assets.xcassets/Files/vcard-file.imageset/Contents.json new file mode 100644 index 000000000..1e3911cf3 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/vcard-file.imageset/Contents.json @@ -0,0 +1,25 @@ +{ + "images" : [ + { + "filename" : "vcard-file-light.svg", + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "vcard-file-dark.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/MailResources/Assets.xcassets/Files/vcard-file.imageset/vcard-file-dark.svg b/MailResources/Assets.xcassets/Files/vcard-file.imageset/vcard-file-dark.svg new file mode 100644 index 000000000..455bd2208 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/vcard-file.imageset/vcard-file-dark.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/MailResources/Assets.xcassets/Files/vcard-file.imageset/vcard-file-light.svg b/MailResources/Assets.xcassets/Files/vcard-file.imageset/vcard-file-light.svg new file mode 100644 index 000000000..8268f2067 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/vcard-file.imageset/vcard-file-light.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/MailResources/Assets.xcassets/Files/video-file-play.imageset/Contents.json b/MailResources/Assets.xcassets/Files/video-file-play.imageset/Contents.json deleted file mode 100644 index d17b3f1c5..000000000 --- a/MailResources/Assets.xcassets/Files/video-file-play.imageset/Contents.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "images" : [ - { - "filename" : "video-file-play.svg", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - }, - "properties" : { - "preserves-vector-representation" : true - } -} diff --git a/MailResources/Assets.xcassets/Files/video-file.imageset/Contents.json b/MailResources/Assets.xcassets/Files/video-file.imageset/Contents.json new file mode 100644 index 000000000..b4cf361f0 --- /dev/null +++ b/MailResources/Assets.xcassets/Files/video-file.imageset/Contents.json @@ -0,0 +1,25 @@ +{ + "images" : [ + { + "filename" : "video-file-light.svg", + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "video-file-dark.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/MailResources/Assets.xcassets/Files/video-file-play.imageset/video-file-play.svg b/MailResources/Assets.xcassets/Files/video-file.imageset/video-file-dark.svg similarity index 90% rename from MailResources/Assets.xcassets/Files/video-file-play.imageset/video-file-play.svg rename to MailResources/Assets.xcassets/Files/video-file.imageset/video-file-dark.svg index ac7864037..96f25805e 100644 --- a/MailResources/Assets.xcassets/Files/video-file-play.imageset/video-file-play.svg +++ b/MailResources/Assets.xcassets/Files/video-file.imageset/video-file-dark.svg @@ -1,4 +1,4 @@ - - + + diff --git a/MailResources/Assets.xcassets/Files/video-file.imageset/video-file-light.svg b/MailResources/Assets.xcassets/Files/video-file.imageset/video-file-light.svg new file mode 100644 index 000000000..727c0696d --- /dev/null +++ b/MailResources/Assets.xcassets/Files/video-file.imageset/video-file-light.svg @@ -0,0 +1,4 @@ + + + + diff --git a/MailResources/Assets.xcassets/Files/zip-file.imageset/Contents.json b/MailResources/Assets.xcassets/Files/zip-file.imageset/Contents.json deleted file mode 100644 index c8b37b452..000000000 --- a/MailResources/Assets.xcassets/Files/zip-file.imageset/Contents.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "images" : [ - { - "filename" : "zip-file.svg", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - }, - "properties" : { - "preserves-vector-representation" : true - } -} diff --git a/MailResources/Assets.xcassets/Files/zip-file.imageset/zip-file.svg b/MailResources/Assets.xcassets/Files/zip-file.imageset/zip-file.svg deleted file mode 100644 index 39fd72890..000000000 --- a/MailResources/Assets.xcassets/Files/zip-file.imageset/zip-file.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - -