Skip to content

Commit

Permalink
Add new settings view
Browse files Browse the repository at this point in the history
  • Loading branch information
jeksys committed May 31, 2021
2 parents 74a1807 + 150c6f8 commit e49d89b
Show file tree
Hide file tree
Showing 32 changed files with 495 additions and 11 deletions.
20 changes: 20 additions & 0 deletions Tella.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
D5B823EB262774E00008E04B /* AppView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5D5696C262747E100C45416 /* AppView.swift */; };
D5B823F0262775D80008E04B /* CryptoManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5B823EF262775D80008E04B /* CryptoManager.swift */; };
D5DA7F982646220100B00FDA /* FileGroupButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5DA7F972646220100B00FDA /* FileGroupButtonView.swift */; };
D5DA7F9B2648D05400B00FDA /* FileListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5DA7F9A2648D05400B00FDA /* FileListView.swift */; };
D5DAFDCE265384C4002F3942 /* SettingsViewV2.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5DAFDCC265384C4002F3942 /* SettingsViewV2.swift */; };
D5DAFDCF265384C4002F3942 /* SettingModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5DAFDCD265384C4002F3942 /* SettingModel.swift */; };
D75F9E9C25342539006F6212 /* RecordViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D75F9E9B25342539006F6212 /* RecordViewModel.swift */; };
D7CFC37F254260D300CCB352 /* RecordView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7CFC37E254260D300CCB352 /* RecordView.swift */; };
D7F55FC825348FA50028739E /* RecordState.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7F55FC725348FA50028739E /* RecordState.swift */; };
Expand Down Expand Up @@ -175,6 +178,9 @@
D5D56974262747F100C45416 /* CameraView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CameraView.swift; sourceTree = "<group>"; };
D5D56979262747F700C45416 /* MicView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MicView.swift; sourceTree = "<group>"; };
D5DA7F972646220100B00FDA /* FileGroupButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileGroupButtonView.swift; sourceTree = "<group>"; };
D5DA7F9A2648D05400B00FDA /* FileListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileListView.swift; sourceTree = "<group>"; };
D5DAFDCC265384C4002F3942 /* SettingsViewV2.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsViewV2.swift; sourceTree = "<group>"; };
D5DAFDCD265384C4002F3942 /* SettingModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingModel.swift; sourceTree = "<group>"; };
D75F9E9B25342539006F6212 /* RecordViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecordViewModel.swift; sourceTree = "<group>"; };
D7CFC37E254260D300CCB352 /* RecordView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecordView.swift; sourceTree = "<group>"; };
D7F55FC725348FA50028739E /* RecordState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecordState.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -300,12 +306,15 @@
D5D5696C262747E100C45416 /* AppView.swift */,
D50727CB2625573200BBC370 /* HomeView.swift */,
D572EAC3263A381400CE191A /* HomeView */,
D5DA7F992648D02C00B00FDA /* FileListView */,
D5D56974262747F100C45416 /* CameraView.swift */,
D5D56979262747F700C45416 /* MicView.swift */,
D5163989263113C6003A11B5 /* UploadView.swift */,
D572EACA263A43C100CE191A /* FileDetailView.swift */,
D572EAC2263A380700CE191A /* FileManager */,
D516397B2631113B003A11B5 /* Styles.swift */,
D5DAFDCC265384C4002F3942 /* SettingsViewV2.swift */,
D5DAFDCD265384C4002F3942 /* SettingModel.swift */,
);
path = Views;
sourceTree = "<group>";
Expand Down Expand Up @@ -364,6 +373,14 @@
path = Mocks;
sourceTree = "<group>";
};
D5DA7F992648D02C00B00FDA /* FileListView */ = {
isa = PBXGroup;
children = (
D5DA7F9A2648D05400B00FDA /* FileListView.swift */,
);
path = FileListView;
sourceTree = "<group>";
};
D75F9E9A253424F7006F6212 /* audio */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -732,11 +749,13 @@
6DC2ABC9245029BC004579DF /* PasswordView.swift in Sources */,
D5B823EB262774E00008E04B /* AppView.swift in Sources */,
D57F5E9026152A4800C1DA47 /* Datable.swift in Sources */,
D5DAFDCF265384C4002F3942 /* SettingModel.swift in Sources */,
F66E65AD23E3207D000F93E5 /* AppDelegate.swift in Sources */,
D7F55FCD25348FB80028739E /* AudioManager.swift in Sources */,
D5DA7F982646220100B00FDA /* FileGroupButtonView.swift in Sources */,
D51639802631130E003A11B5 /* HomeView.swift in Sources */,
0F3DC3E52523951C0024B4A0 /* BundleInfo.swift in Sources */,
D5DAFDCE265384C4002F3942 /* SettingsViewV2.swift in Sources */,
6D14AAD223FB08D60094D71D /* CameraView.swift in Sources */,
D53B77012601CA3A0001CD34 /* VaultManager.swift in Sources */,
6DC2ABCB24502D08004579DF /* ChangeView.swift in Sources */,
Expand Down Expand Up @@ -767,6 +786,7 @@
D7F55FC825348FA50028739E /* RecordState.swift in Sources */,
F66E65AF23E3207D000F93E5 /* SceneDelegate.swift in Sources */,
CE02ED7F24E42B3900014176 /* UserDefaultsProperty.swift in Sources */,
D5DA7F9B2648D05400B00FDA /* FileListView.swift in Sources */,
D516397C2631113B003A11B5 /* Styles.swift in Sources */,
6DD4C03A240F547300491438 /* Util.swift in Sources */,
F66E65B123E3207D000F93E5 /* ContentView.swift in Sources */,
Expand Down
9 changes: 9 additions & 0 deletions Tella/HostingController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//
// HostingController.swift
// Tella
//
// Created by Evgeny Yagrushkin on 2021-05-30.
// Copyright © 2021 INTERNEWS. All rights reserved.
//

import Foundation
21 changes: 21 additions & 0 deletions Tella/NewAssets.xcassets/checkbox.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "checkbox.pdf",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
21 changes: 21 additions & 0 deletions Tella/NewAssets.xcassets/file.action.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "more.pdf",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
21 changes: 21 additions & 0 deletions Tella/NewAssets.xcassets/file.search.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "right items.pdf",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
21 changes: 21 additions & 0 deletions Tella/NewAssets.xcassets/file.sort.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "forward.pdf",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
21 changes: 21 additions & 0 deletions Tella/NewAssets.xcassets/filetype.audio.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Icon.pdf",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
21 changes: 21 additions & 0 deletions Tella/NewAssets.xcassets/filetype.document.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "outlined.pdf",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
21 changes: 21 additions & 0 deletions Tella/NewAssets.xcassets/filetype.folder.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Shape.pdf",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
21 changes: 21 additions & 0 deletions Tella/NewAssets.xcassets/grid.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "grid.pdf",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file added Tella/NewAssets.xcassets/grid.imageset/grid.pdf
Binary file not shown.
21 changes: 21 additions & 0 deletions Tella/NewAssets.xcassets/tella_Logo.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Tella Logo (for dark backgrounds).pdf",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
11 changes: 10 additions & 1 deletion Tella/SettingsView.swift → Tella/SettingsView_old.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import SwiftUI

struct SettingsView: View {
struct SettingsView_old: View {
@EnvironmentObject private var appViewState: AppViewState
@State var currentView: SettingsEnum = .MAIN
@State private var shutdownWarningDisplayed = false
Expand Down Expand Up @@ -87,3 +87,12 @@ struct SettingsView: View {
getViewContents(currentView)
}
}

struct SettingsView_Previews: PreviewProvider {

static var previews: some View {
NavigationView {
SettingsView_old()
}
}
}
2 changes: 2 additions & 0 deletions Tella/Views/AppView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ struct AppView: View {

private func setupApperance() {

UITableView.appearance().separatorStyle = .none

UITabBar.appearance().barTintColor = Styles.Colors.backgroundTab

UINavigationBar.appearance().backgroundColor = Styles.Colors.backgroundMain
Expand Down
78 changes: 78 additions & 0 deletions Tella/Views/FileListView/FileListView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
//
// Copyright © 2021 INTERNEWS. All rights reserved.
//

import SwiftUI

struct FileListView: View {

init() {
UITableView.appearance().separatorStyle = .none
UITableView.appearance().tableFooterView = UIView()
UITableView.appearance().separatorColor = .clear
}

var body: some View {
List{
FileGridItem()
FileListItem()
FileListItem()
FileListItem()
}
}
}

struct FileListItem: View {

var body: some View {

HStack(spacing: 0){
Image("test_image")
.resizable()
.frame(width: 35, height: 35)
.background(Color.gray)
.cornerRadius(5)
VStack(alignment: .leading, spacing: 0){
Text("Polling interview")
.font(Font(UIFont.boldSystemFont(ofSize: 14)))
.foregroundColor(Color.white)
Text("18 may 2021")
.font(Font(UIFont.systemFont(ofSize: 10)))
.foregroundColor(Color(white: 0.8))
}
.padding(EdgeInsets(top: 0, leading: 27, bottom: 0, trailing: 16))
Spacer()
Image("test_image")
.resizable()
.frame(width: 35, height: 35)
.background(Color.gray)
}
.listRowBackground(Color(Styles.Colors.backgroundMain))
.frame(height: 45)
.padding(EdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 0))
.listRowBackground(Color.yellow)
}
}

struct FileGridItem: View {
var body: some View {
HStack() {
Image("test_image")
.resizable()
.frame(width: 35, height: 35)
Text("landmark.name")
}
}
}



struct FileListView_Previews: PreviewProvider {
static var previews: some View {
FileListView()
// VStack{
// FileListItem()
// FileGridItem()
// }.frame(width: 500, height: 100, alignment: .leading)
}
}
4 changes: 0 additions & 4 deletions Tella/Views/FileManager/FileManagerView.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
//
// FileManagerView.swift
// Tella
//
// Created by Evgeny Yagrushkin on 2021-04-12.
// Copyright © 2021 INTERNEWS. All rights reserved.
//

Expand Down
Loading

0 comments on commit e49d89b

Please sign in to comment.