Moved all the Browse UI files into their own Browse module.
This commit is contained in:
parent
b81d846aa8
commit
d0b39e6641
@ -14,12 +14,6 @@
|
||||
02AE650029363DC1005A4AF3 /* BeRealTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02AE64FF29363DC1005A4AF3 /* BeRealTests.swift */; };
|
||||
02AE650A29363DC1005A4AF3 /* BeRealUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02AE650929363DC1005A4AF3 /* BeRealUITests.swift */; };
|
||||
02AE650C29363DC1005A4AF3 /* BeRealUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02AE650B29363DC1005A4AF3 /* BeRealUITestsLaunchTests.swift */; };
|
||||
02B334E8293A93DC00C45E31 /* FolderItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02B334E7293A93DC00C45E31 /* FolderItem.swift */; };
|
||||
02CE5554293B130100730DC9 /* DocumentItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02CE5553293B130100730DC9 /* DocumentItem.swift */; };
|
||||
02CE5557293B134200730DC9 /* Image+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02CE5556293B134200730DC9 /* Image+Helpers.swift */; };
|
||||
02CE5559293B1AB600730DC9 /* Text+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02CE5558293B1AB600730DC9 /* Text+Helpers.swift */; };
|
||||
02CE555B293B1D8400730DC9 /* BrowseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02CE555A293B1D8400730DC9 /* BrowseView.swift */; };
|
||||
02CE555E293B34E900730DC9 /* BrowseToolbar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02CE555D293B34E900730DC9 /* BrowseToolbar.swift */; };
|
||||
02FFFD7B29395DD200306533 /* String+Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02FFFD7A29395DD200306533 /* String+Constants.swift */; };
|
||||
4694AAA0293A7C8800D54903 /* Modules in Frameworks */ = {isa = PBXBuildFile; productRef = 4694AA9F293A7C8800D54903 /* Modules */; };
|
||||
/* End PBXBuildFile section */
|
||||
@ -53,12 +47,6 @@
|
||||
02AE650529363DC1005A4AF3 /* BeRealUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BeRealUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
02AE650929363DC1005A4AF3 /* BeRealUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BeRealUITests.swift; sourceTree = "<group>"; };
|
||||
02AE650B29363DC1005A4AF3 /* BeRealUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BeRealUITestsLaunchTests.swift; sourceTree = "<group>"; };
|
||||
02B334E7293A93DC00C45E31 /* FolderItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FolderItem.swift; sourceTree = "<group>"; };
|
||||
02CE5553293B130100730DC9 /* DocumentItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DocumentItem.swift; sourceTree = "<group>"; };
|
||||
02CE5556293B134200730DC9 /* Image+Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Image+Helpers.swift"; sourceTree = "<group>"; };
|
||||
02CE5558293B1AB600730DC9 /* Text+Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Text+Helpers.swift"; sourceTree = "<group>"; };
|
||||
02CE555A293B1D8400730DC9 /* BrowseView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowseView.swift; sourceTree = "<group>"; };
|
||||
02CE555D293B34E900730DC9 /* BrowseToolbar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowseToolbar.swift; sourceTree = "<group>"; };
|
||||
02FFFD7A29395DD200306533 /* String+Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Constants.swift"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
@ -113,7 +101,6 @@
|
||||
02AE64ED29363DBF005A4AF3 /* BeReal */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
02B334E2293A908800C45E31 /* Browse */,
|
||||
02FFFD7929395DBF00306533 /* Extensions */,
|
||||
02AE64EE29363DBF005A4AF3 /* BeRealApp.swift */,
|
||||
02AE64F029363DBF005A4AF3 /* ContentView.swift */,
|
||||
@ -148,51 +135,6 @@
|
||||
path = BeRealUITests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
02B334E2293A908800C45E31 /* Browse */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
02CE5555293B131D00730DC9 /* Extensions */,
|
||||
02B334E6293A93CE00C45E31 /* Components */,
|
||||
02CE555C293B34CF00730DC9 /* Toolbars */,
|
||||
02B334E5293A93C400C45E31 /* Views */,
|
||||
);
|
||||
path = Browse;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
02B334E5293A93C400C45E31 /* Views */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
02CE555A293B1D8400730DC9 /* BrowseView.swift */,
|
||||
);
|
||||
path = Views;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
02B334E6293A93CE00C45E31 /* Components */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
02B334E7293A93DC00C45E31 /* FolderItem.swift */,
|
||||
02CE5553293B130100730DC9 /* DocumentItem.swift */,
|
||||
);
|
||||
path = Components;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
02CE5555293B131D00730DC9 /* Extensions */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
02CE5556293B134200730DC9 /* Image+Helpers.swift */,
|
||||
02CE5558293B1AB600730DC9 /* Text+Helpers.swift */,
|
||||
);
|
||||
path = Extensions;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
02CE555C293B34CF00730DC9 /* Toolbars */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
02CE555D293B34E900730DC9 /* BrowseToolbar.swift */,
|
||||
);
|
||||
path = Toolbars;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
02FFFD7929395DBF00306533 /* Extensions */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -342,15 +284,9 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
02CE555B293B1D8400730DC9 /* BrowseView.swift in Sources */,
|
||||
02B334E8293A93DC00C45E31 /* FolderItem.swift in Sources */,
|
||||
02AE64F129363DBF005A4AF3 /* ContentView.swift in Sources */,
|
||||
02CE5554293B130100730DC9 /* DocumentItem.swift in Sources */,
|
||||
02CE5557293B134200730DC9 /* Image+Helpers.swift in Sources */,
|
||||
02CE5559293B1AB600730DC9 /* Text+Helpers.swift in Sources */,
|
||||
02AE64EF29363DBF005A4AF3 /* BeRealApp.swift in Sources */,
|
||||
02FFFD7B29395DD200306533 /* String+Constants.swift in Sources */,
|
||||
02CE555E293B34E900730DC9 /* BrowseToolbar.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import Browse
|
||||
import Login
|
||||
|
||||
struct ContentView: View {
|
||||
|
@ -12,7 +12,8 @@ let package = Package(
|
||||
.library(
|
||||
name: "Modules",
|
||||
targets: [
|
||||
"Login"
|
||||
"Login",
|
||||
"Browse"
|
||||
]
|
||||
),
|
||||
],
|
||||
@ -21,5 +22,9 @@ let package = Package(
|
||||
name: "Login",
|
||||
resources: [.process("Resources")]
|
||||
),
|
||||
.target(
|
||||
name: "Browse",
|
||||
resources: [.process("Resources")]
|
||||
)
|
||||
]
|
||||
)
|
||||
|
@ -0,0 +1,14 @@
|
||||
/*
|
||||
Localizable.strings
|
||||
Browse
|
||||
|
||||
Created by Javier Cicchelli on 03/12/2022.
|
||||
Copyright © 2022 Röck+Cöde. All rights reserved.
|
||||
*/
|
||||
|
||||
"browse.toolbar_item.menu.add_actions.text" = "Add file and/or folder";
|
||||
"browse.toolbar_item.button.add_folder.text" = "Create a new folder";
|
||||
"browse.toolbar_item.button.add_file.text" = "Upload a file";
|
||||
"browse.toolbar_item.button.show_profile.text" = "Show profile";
|
||||
"browse.swipe_action.delete_item.text" = "Delete item";
|
||||
"browse.swipe_action.download_item.text" = "Download item";
|
@ -16,7 +16,11 @@ struct BrowseToolbar: ToolbarContent {
|
||||
// TODO: Implement the creation of a new folder.
|
||||
} label: {
|
||||
Label {
|
||||
Text("Create a new folder")
|
||||
Text(
|
||||
"browse.toolbar_item.button.add_folder.text",
|
||||
bundle: .module,
|
||||
comment: "Add folder button text."
|
||||
)
|
||||
} icon: {
|
||||
Image.newFolder
|
||||
}
|
||||
@ -26,14 +30,22 @@ struct BrowseToolbar: ToolbarContent {
|
||||
// TODO: Implement the upload of a file from the device to the API.
|
||||
} label: {
|
||||
Label {
|
||||
Text("Upload a file")
|
||||
Text(
|
||||
"browse.toolbar_item.button.add_file.text",
|
||||
bundle: .module,
|
||||
comment: "Add file button text."
|
||||
)
|
||||
} icon: {
|
||||
Image.newFile
|
||||
}
|
||||
}
|
||||
} label: {
|
||||
Label {
|
||||
Text("Add file and/or folder")
|
||||
Text(
|
||||
"browse.toolbar_item.menu.add_actions.text",
|
||||
bundle: .module,
|
||||
comment: "Add actions menu text."
|
||||
)
|
||||
} icon: {
|
||||
Image.add
|
||||
.foregroundColor(.red)
|
||||
@ -45,8 +57,16 @@ struct BrowseToolbar: ToolbarContent {
|
||||
Button {
|
||||
// TODO: Implement the show of the user profile.
|
||||
} label: {
|
||||
Image.profile
|
||||
.foregroundColor(.red)
|
||||
Label {
|
||||
Text(
|
||||
"browse.toolbar_item.button.show_profile.text",
|
||||
bundle: .module,
|
||||
comment: "Show profile button text."
|
||||
)
|
||||
} icon: {
|
||||
Image.profile
|
||||
.foregroundColor(.red)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -8,8 +8,15 @@
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct BrowseView: View {
|
||||
var body: some View {
|
||||
public struct BrowseView: View {
|
||||
|
||||
// MARK: Initialisers
|
||||
|
||||
public init() {}
|
||||
|
||||
// MARK: Body
|
||||
|
||||
public var body: some View {
|
||||
List {
|
||||
Group {
|
||||
Group {
|
||||
@ -67,7 +74,11 @@ struct BrowseView: View {
|
||||
// TODO: Implement the removal of the item from the API.
|
||||
} label: {
|
||||
Label {
|
||||
Text("Delete item")
|
||||
Text(
|
||||
"browse.swipe_action.delete_item.text",
|
||||
bundle: .module,
|
||||
comment: "Delete item swipe action text."
|
||||
)
|
||||
} icon: {
|
||||
Image.trash
|
||||
}
|
||||
@ -79,7 +90,11 @@ struct BrowseView: View {
|
||||
// TODO: Implement the downloading of the data of the item from the API into the device.
|
||||
} label: {
|
||||
Label {
|
||||
Text("Download item")
|
||||
Text(
|
||||
"browse.swipe_action.download_item.text",
|
||||
bundle: .module,
|
||||
comment: "Download item swipe action text."
|
||||
)
|
||||
} icon: {
|
||||
Image.download
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user