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 */; };
|
02AE650029363DC1005A4AF3 /* BeRealTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02AE64FF29363DC1005A4AF3 /* BeRealTests.swift */; };
|
||||||
02AE650A29363DC1005A4AF3 /* BeRealUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02AE650929363DC1005A4AF3 /* BeRealUITests.swift */; };
|
02AE650A29363DC1005A4AF3 /* BeRealUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02AE650929363DC1005A4AF3 /* BeRealUITests.swift */; };
|
||||||
02AE650C29363DC1005A4AF3 /* BeRealUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02AE650B29363DC1005A4AF3 /* BeRealUITestsLaunchTests.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 */; };
|
02FFFD7B29395DD200306533 /* String+Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02FFFD7A29395DD200306533 /* String+Constants.swift */; };
|
||||||
4694AAA0293A7C8800D54903 /* Modules in Frameworks */ = {isa = PBXBuildFile; productRef = 4694AA9F293A7C8800D54903 /* Modules */; };
|
4694AAA0293A7C8800D54903 /* Modules in Frameworks */ = {isa = PBXBuildFile; productRef = 4694AA9F293A7C8800D54903 /* Modules */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
@ -53,12 +47,6 @@
|
|||||||
02AE650529363DC1005A4AF3 /* BeRealUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BeRealUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
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>"; };
|
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>"; };
|
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>"; };
|
02FFFD7A29395DD200306533 /* String+Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Constants.swift"; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
@ -113,7 +101,6 @@
|
|||||||
02AE64ED29363DBF005A4AF3 /* BeReal */ = {
|
02AE64ED29363DBF005A4AF3 /* BeReal */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
02B334E2293A908800C45E31 /* Browse */,
|
|
||||||
02FFFD7929395DBF00306533 /* Extensions */,
|
02FFFD7929395DBF00306533 /* Extensions */,
|
||||||
02AE64EE29363DBF005A4AF3 /* BeRealApp.swift */,
|
02AE64EE29363DBF005A4AF3 /* BeRealApp.swift */,
|
||||||
02AE64F029363DBF005A4AF3 /* ContentView.swift */,
|
02AE64F029363DBF005A4AF3 /* ContentView.swift */,
|
||||||
@ -148,51 +135,6 @@
|
|||||||
path = BeRealUITests;
|
path = BeRealUITests;
|
||||||
sourceTree = "<group>";
|
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 */ = {
|
02FFFD7929395DBF00306533 /* Extensions */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@ -342,15 +284,9 @@
|
|||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
02CE555B293B1D8400730DC9 /* BrowseView.swift in Sources */,
|
|
||||||
02B334E8293A93DC00C45E31 /* FolderItem.swift in Sources */,
|
|
||||||
02AE64F129363DBF005A4AF3 /* ContentView.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 */,
|
02AE64EF29363DBF005A4AF3 /* BeRealApp.swift in Sources */,
|
||||||
02FFFD7B29395DD200306533 /* String+Constants.swift in Sources */,
|
02FFFD7B29395DD200306533 /* String+Constants.swift in Sources */,
|
||||||
02CE555E293B34E900730DC9 /* BrowseToolbar.swift in Sources */,
|
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import Browse
|
||||||
import Login
|
import Login
|
||||||
|
|
||||||
struct ContentView: View {
|
struct ContentView: View {
|
||||||
|
@ -12,7 +12,8 @@ let package = Package(
|
|||||||
.library(
|
.library(
|
||||||
name: "Modules",
|
name: "Modules",
|
||||||
targets: [
|
targets: [
|
||||||
"Login"
|
"Login",
|
||||||
|
"Browse"
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -21,5 +22,9 @@ let package = Package(
|
|||||||
name: "Login",
|
name: "Login",
|
||||||
resources: [.process("Resources")]
|
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.
|
// TODO: Implement the creation of a new folder.
|
||||||
} label: {
|
} label: {
|
||||||
Label {
|
Label {
|
||||||
Text("Create a new folder")
|
Text(
|
||||||
|
"browse.toolbar_item.button.add_folder.text",
|
||||||
|
bundle: .module,
|
||||||
|
comment: "Add folder button text."
|
||||||
|
)
|
||||||
} icon: {
|
} icon: {
|
||||||
Image.newFolder
|
Image.newFolder
|
||||||
}
|
}
|
||||||
@ -26,14 +30,22 @@ struct BrowseToolbar: ToolbarContent {
|
|||||||
// TODO: Implement the upload of a file from the device to the API.
|
// TODO: Implement the upload of a file from the device to the API.
|
||||||
} label: {
|
} label: {
|
||||||
Label {
|
Label {
|
||||||
Text("Upload a file")
|
Text(
|
||||||
|
"browse.toolbar_item.button.add_file.text",
|
||||||
|
bundle: .module,
|
||||||
|
comment: "Add file button text."
|
||||||
|
)
|
||||||
} icon: {
|
} icon: {
|
||||||
Image.newFile
|
Image.newFile
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} label: {
|
} label: {
|
||||||
Label {
|
Label {
|
||||||
Text("Add file and/or folder")
|
Text(
|
||||||
|
"browse.toolbar_item.menu.add_actions.text",
|
||||||
|
bundle: .module,
|
||||||
|
comment: "Add actions menu text."
|
||||||
|
)
|
||||||
} icon: {
|
} icon: {
|
||||||
Image.add
|
Image.add
|
||||||
.foregroundColor(.red)
|
.foregroundColor(.red)
|
||||||
@ -45,8 +57,16 @@ struct BrowseToolbar: ToolbarContent {
|
|||||||
Button {
|
Button {
|
||||||
// TODO: Implement the show of the user profile.
|
// TODO: Implement the show of the user profile.
|
||||||
} label: {
|
} label: {
|
||||||
Image.profile
|
Label {
|
||||||
.foregroundColor(.red)
|
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
|
import SwiftUI
|
||||||
|
|
||||||
struct BrowseView: View {
|
public struct BrowseView: View {
|
||||||
var body: some View {
|
|
||||||
|
// MARK: Initialisers
|
||||||
|
|
||||||
|
public init() {}
|
||||||
|
|
||||||
|
// MARK: Body
|
||||||
|
|
||||||
|
public var body: some View {
|
||||||
List {
|
List {
|
||||||
Group {
|
Group {
|
||||||
Group {
|
Group {
|
||||||
@ -67,7 +74,11 @@ struct BrowseView: View {
|
|||||||
// TODO: Implement the removal of the item from the API.
|
// TODO: Implement the removal of the item from the API.
|
||||||
} label: {
|
} label: {
|
||||||
Label {
|
Label {
|
||||||
Text("Delete item")
|
Text(
|
||||||
|
"browse.swipe_action.delete_item.text",
|
||||||
|
bundle: .module,
|
||||||
|
comment: "Delete item swipe action text."
|
||||||
|
)
|
||||||
} icon: {
|
} icon: {
|
||||||
Image.trash
|
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.
|
// TODO: Implement the downloading of the data of the item from the API into the device.
|
||||||
} label: {
|
} label: {
|
||||||
Label {
|
Label {
|
||||||
Text("Download item")
|
Text(
|
||||||
|
"browse.swipe_action.download_item.text",
|
||||||
|
bundle: .module,
|
||||||
|
comment: "Download item swipe action text."
|
||||||
|
)
|
||||||
} icon: {
|
} icon: {
|
||||||
Image.download
|
Image.download
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user