浏览代码

Improved code

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 年之前
父节点
当前提交
9bb0ef0056
共有 3 个文件被更改,包括 0 次插入53 次删除
  1. 0 4
      Nextcloud.xcodeproj/project.pbxproj
  2. 0 37
      iOSClient/Brand/NCBrandSettings.swift
  3. 0 12
      iOSClient/Settings/NCManageE2EE.swift

+ 0 - 4
Nextcloud.xcodeproj/project.pbxproj

@@ -147,7 +147,6 @@
 		F719D9E2288D396100762E33 /* NCColorPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = F719D9E1288D396100762E33 /* NCColorPicker.swift */; };
 		F71CD6CA2930D7B1006C95C1 /* NCApplicationHandle.swift in Sources */ = {isa = PBXBuildFile; fileRef = F71CD6C92930D7B1006C95C1 /* NCApplicationHandle.swift */; };
 		F7226EDC1EE4089300EBECB1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7226EDB1EE4089300EBECB1 /* Main.storyboard */; };
-		F7237DD1295463E700A9D8B7 /* NCBrandSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7237DD0295463E700A9D8B7 /* NCBrandSettings.swift */; };
 		F723985C253C95CE00257F49 /* NCViewerRichdocument.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F723985B253C95CE00257F49 /* NCViewerRichdocument.storyboard */; };
 		F7239871253D86B600257F49 /* NCEmptyDataSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7239870253D86B600257F49 /* NCEmptyDataSet.swift */; };
 		F7239877253D86D300257F49 /* NCEmptyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7239876253D86D300257F49 /* NCEmptyView.xib */; };
@@ -777,7 +776,6 @@
 		F719D9E1288D396100762E33 /* NCColorPicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCColorPicker.swift; sourceTree = "<group>"; };
 		F71CD6C92930D7B1006C95C1 /* NCApplicationHandle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCApplicationHandle.swift; sourceTree = "<group>"; };
 		F7226EDB1EE4089300EBECB1 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
-		F7237DD0295463E700A9D8B7 /* NCBrandSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCBrandSettings.swift; sourceTree = "<group>"; };
 		F723985B253C95CE00257F49 /* NCViewerRichdocument.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = NCViewerRichdocument.storyboard; sourceTree = "<group>"; };
 		F7239870253D86B600257F49 /* NCEmptyDataSet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCEmptyDataSet.swift; sourceTree = "<group>"; };
 		F7239876253D86D300257F49 /* NCEmptyView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NCEmptyView.xib; sourceTree = "<group>"; };
@@ -1934,7 +1932,6 @@
 				F70F96AF2874394B006C8379 /* Nextcloud-Bridging-Header.h */,
 				F73CB5771ED46807005F2A5A /* NCBridgeSwift.h */,
 				F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */,
-				F7237DD0295463E700A9D8B7 /* NCBrandSettings.swift */,
 			);
 			path = Brand;
 			sourceTree = "<group>";
@@ -3083,7 +3080,6 @@
 				F76673ED22C901F6007ED366 /* FileProviderDomain.swift in Sources */,
 				F7A321AD1E9E6AD50069AD1B /* CCAdvanced.m in Sources */,
 				F77B0E4F1D118A16002130FE /* CCManageAutoUpload.m in Sources */,
-				F7237DD1295463E700A9D8B7 /* NCBrandSettings.swift in Sources */,
 				F7BAADC81ED5A87C00B7EAD4 /* NCDatabase.swift in Sources */,
 				F75C0C4823D1FAE300163CC8 /* NCRichWorkspaceCommon.swift in Sources */,
 				F78ACD4A21903F850088454D /* NCTrashListCell+NCTrashCellProtocol.swift in Sources */,

+ 0 - 37
iOSClient/Brand/NCBrandSettings.swift

@@ -1,37 +0,0 @@
-//
-//  NCBrandSettings.swift
-//  Nextcloud
-//
-//  Created by Marino Faggiana on 22/12/22.
-//  Copyright © 2022 Marino Faggiana. All rights reserved.
-//
-//  Author Marino Faggiana <marino.faggiana@nextcloud.com>
-//
-//  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 <http://www.gnu.org/licenses/>.
-//
-
-import Foundation
-import SwiftUI
-
-class NCBrandSettings: NSObject {
-    static let shared: NCBrandSettings = {
-        let instance = NCBrandSettings()
-        return instance
-    }()
-
-    // MARK: - Settings views
-
-    let settingsSizeImage: CGFloat = 25
-    let settingsFont: Font = .subheadline
-}

+ 0 - 12
iOSClient/Settings/NCManageE2EE.swift

@@ -175,12 +175,10 @@ struct NCViewE2EE: View {
                     Section(header: Text(""), footer: Text(manageE2EE.statusOfService + "\n\n" + "End-to-End Encryption " + versionE2EE)) {
                         Label {
                             Text(NSLocalizedString("_e2e_settings_activated_", comment: ""))
-                                .font(NCBrandSettings.shared.settingsFont)
                         } icon: {
                             Image(systemName: "checkmark.circle.fill")
                                 .resizable()
                                 .scaledToFit()
-                                .frame(width: NCBrandSettings.shared.settingsSizeImage, height: NCBrandSettings.shared.settingsSizeImage)
                                 .foregroundColor(.green)
                         }
                     }
@@ -188,12 +186,10 @@ struct NCViewE2EE: View {
                     HStack {
                         Label {
                             Text(NSLocalizedString("_e2e_settings_read_passphrase_", comment: ""))
-                                .font(NCBrandSettings.shared.settingsFont)
                         } icon: {
                             Image(systemName: "eye")
                                 .resizable()
                                 .scaledToFit()
-                                .frame(width: NCBrandSettings.shared.settingsSizeImage, height: NCBrandSettings.shared.settingsSizeImage)
                                 .foregroundColor(Color(UIColor.systemGray))
                         }
                         Spacer()
@@ -210,12 +206,10 @@ struct NCViewE2EE: View {
                     HStack {
                         Label {
                             Text(NSLocalizedString("_e2e_settings_remove_", comment: ""))
-                                .font(NCBrandSettings.shared.settingsFont)
                         } icon: {
                             Image(systemName: "trash.circle")
                                 .resizable()
                                 .scaledToFit()
-                                .frame(width: NCBrandSettings.shared.settingsSizeImage, height: NCBrandSettings.shared.settingsSizeImage)
                                 .foregroundColor(Color.red)
                         }
                         Spacer()
@@ -242,12 +236,10 @@ struct NCViewE2EE: View {
                         HStack {
                             Label {
                                 Text(NSLocalizedString("_e2e_settings_start_", comment: ""))
-                                    .font(NCBrandSettings.shared.settingsFont)
                             } icon: {
                                 Image(systemName: "play.circle")
                                     .resizable()
                                     .scaledToFit()
-                                    .frame(width: NCBrandSettings.shared.settingsSizeImage, height: NCBrandSettings.shared.settingsSizeImage)
                                     .foregroundColor(.green)
                             }
                             Spacer()
@@ -281,12 +273,10 @@ struct DeleteCerificateSection: View {
             HStack {
                 Label {
                     Text("Delete Certificate")
-                        .font(NCBrandSettings.shared.settingsFont)
                 } icon: {
                     Image(systemName: "exclamationmark.triangle")
                         .resizable()
                         .scaledToFit()
-                        .frame(width: NCBrandSettings.shared.settingsSizeImage, height: NCBrandSettings.shared.settingsSizeImage)
                         .foregroundColor(Color(UIColor.systemGray))
                 }
                 Spacer()
@@ -305,12 +295,10 @@ struct DeleteCerificateSection: View {
             HStack {
                 Label {
                     Text("Delete PrivateKey")
-                        .font(NCBrandSettings.shared.settingsFont)
                 } icon: {
                     Image(systemName: "exclamationmark.triangle")
                         .resizable()
                         .scaledToFit()
-                        .frame(width: NCBrandSettings.shared.settingsSizeImage, height: NCBrandSettings.shared.settingsSizeImage)
                         .foregroundColor(Color(UIColor.systemGray))
                 }
                 Spacer()