diff --git a/iBox/Sources/AppDelegate.swift b/iBox/Sources/AppDelegate.swift index 0da8b22..e52e659 100644 --- a/iBox/Sources/AppDelegate.swift +++ b/iBox/Sources/AppDelegate.swift @@ -17,9 +17,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate { versioningHandler.checkAppVersion { result in AppStateManager.shared.isVersionCheckCompleted = result } - preloadFavoriteWeb() - versioningHandler.checkAppVersion() + return true } diff --git a/iBox/Sources/Presenter/BoxList/AddBookmark/AddBookmarkView.swift b/iBox/Sources/BoxList/AddBookmark/AddBookmarkView.swift similarity index 100% rename from iBox/Sources/Presenter/BoxList/AddBookmark/AddBookmarkView.swift rename to iBox/Sources/BoxList/AddBookmark/AddBookmarkView.swift diff --git a/iBox/Sources/Presenter/BoxList/AddBookmark/AddBookmarkViewController.swift b/iBox/Sources/BoxList/AddBookmark/AddBookmarkViewController.swift similarity index 100% rename from iBox/Sources/Presenter/BoxList/AddBookmark/AddBookmarkViewController.swift rename to iBox/Sources/BoxList/AddBookmark/AddBookmarkViewController.swift diff --git a/iBox/Sources/Presenter/BoxList/BoxListCell.swift b/iBox/Sources/BoxList/BoxListCell.swift similarity index 100% rename from iBox/Sources/Presenter/BoxList/BoxListCell.swift rename to iBox/Sources/BoxList/BoxListCell.swift diff --git a/iBox/Sources/ViewModel/BoxListCellViewModel.swift b/iBox/Sources/BoxList/BoxListCellViewModel.swift similarity index 100% rename from iBox/Sources/ViewModel/BoxListCellViewModel.swift rename to iBox/Sources/BoxList/BoxListCellViewModel.swift diff --git a/iBox/Sources/ViewModel/BoxListSectionViewModel.swift b/iBox/Sources/BoxList/BoxListSectionViewModel.swift similarity index 93% rename from iBox/Sources/ViewModel/BoxListSectionViewModel.swift rename to iBox/Sources/BoxList/BoxListSectionViewModel.swift index e106344..43d0f53 100644 --- a/iBox/Sources/ViewModel/BoxListSectionViewModel.swift +++ b/iBox/Sources/BoxList/BoxListSectionViewModel.swift @@ -28,10 +28,6 @@ class BoxListSectionViewModel: Identifiable { folder.name } - var color: ColorName { - folder.color - } - var isOpened: Bool { get { folder.isOpened diff --git a/iBox/Sources/Presenter/BoxList/BoxListView.swift b/iBox/Sources/BoxList/BoxListView.swift similarity index 98% rename from iBox/Sources/Presenter/BoxList/BoxListView.swift rename to iBox/Sources/BoxList/BoxListView.swift index cc05316..70a5e04 100644 --- a/iBox/Sources/Presenter/BoxList/BoxListView.swift +++ b/iBox/Sources/BoxList/BoxListView.swift @@ -141,7 +141,6 @@ extension BoxListView: UITableViewDelegate { guard let viewModel else { return nil } let button = FolderButton(isOpen: viewModel.boxList[section].isOpened) button.setFolderName(viewModel.boxList[section].name) - button.setFolderColor(viewModel.boxList[section].color.toUIColor()) button.tag = section button.addTarget(self, action: #selector(handleOpenClose), for: .touchUpInside) diff --git a/iBox/Sources/Presenter/BoxList/BoxListViewController.swift b/iBox/Sources/BoxList/BoxListViewController.swift similarity index 100% rename from iBox/Sources/Presenter/BoxList/BoxListViewController.swift rename to iBox/Sources/BoxList/BoxListViewController.swift diff --git a/iBox/Sources/ViewModel/BoxListViewModel.swift b/iBox/Sources/BoxList/BoxListViewModel.swift similarity index 100% rename from iBox/Sources/ViewModel/BoxListViewModel.swift rename to iBox/Sources/BoxList/BoxListViewModel.swift diff --git a/iBox/Sources/Presenter/BoxList/Edit/EditCell.swift b/iBox/Sources/BoxList/Edit/EditCell.swift similarity index 100% rename from iBox/Sources/Presenter/BoxList/Edit/EditCell.swift rename to iBox/Sources/BoxList/Edit/EditCell.swift diff --git a/iBox/Sources/Presenter/BoxList/Edit/EditView.swift b/iBox/Sources/BoxList/Edit/EditView.swift similarity index 100% rename from iBox/Sources/Presenter/BoxList/Edit/EditView.swift rename to iBox/Sources/BoxList/Edit/EditView.swift diff --git a/iBox/Sources/Presenter/BoxList/Edit/EditViewController.swift b/iBox/Sources/BoxList/Edit/EditViewController.swift similarity index 100% rename from iBox/Sources/Presenter/BoxList/Edit/EditViewController.swift rename to iBox/Sources/BoxList/Edit/EditViewController.swift diff --git a/iBox/Sources/Presenter/BoxList/EditBookmark/EditBookmarkView.swift b/iBox/Sources/BoxList/EditBookmark/EditBookmarkView.swift similarity index 100% rename from iBox/Sources/Presenter/BoxList/EditBookmark/EditBookmarkView.swift rename to iBox/Sources/BoxList/EditBookmark/EditBookmarkView.swift diff --git a/iBox/Sources/Presenter/BoxList/EditBookmark/EditBookmarkViewController.swift b/iBox/Sources/BoxList/EditBookmark/EditBookmarkViewController.swift similarity index 100% rename from iBox/Sources/Presenter/BoxList/EditBookmark/EditBookmarkViewController.swift rename to iBox/Sources/BoxList/EditBookmark/EditBookmarkViewController.swift diff --git a/iBox/Sources/Presenter/BoxList/EditFolder/EditFolderView.swift b/iBox/Sources/BoxList/EditFolder/EditFolderView.swift similarity index 100% rename from iBox/Sources/Presenter/BoxList/EditFolder/EditFolderView.swift rename to iBox/Sources/BoxList/EditFolder/EditFolderView.swift diff --git a/iBox/Sources/Presenter/BoxList/EditFolder/EditFolderViewController.swift b/iBox/Sources/BoxList/EditFolder/EditFolderViewController.swift similarity index 100% rename from iBox/Sources/Presenter/BoxList/EditFolder/EditFolderViewController.swift rename to iBox/Sources/BoxList/EditFolder/EditFolderViewController.swift diff --git a/iBox/Sources/Presenter/BoxList/FolderButton.swift b/iBox/Sources/BoxList/FolderButton.swift similarity index 94% rename from iBox/Sources/Presenter/BoxList/FolderButton.swift rename to iBox/Sources/BoxList/FolderButton.swift index 6f667b2..d584bad 100644 --- a/iBox/Sources/Presenter/BoxList/FolderButton.swift +++ b/iBox/Sources/BoxList/FolderButton.swift @@ -18,6 +18,7 @@ class FolderButton: UIButton { private let folderImageView = UIImageView().then { $0.image = UIImage(systemName: "folder.fill") $0.contentMode = .scaleAspectFit + $0.tintColor = .gray } private let folderNameLabel = UILabel().then { @@ -78,9 +79,9 @@ class FolderButton: UIButton { folderNameLabel.text = name } - func setFolderColor(_ color: UIColor) { - folderImageView.tintColor = color - } +// func setFolderColor(_ color: UIColor) { +// folderImageView.tintColor = color +// } func toggleStatus() { isOpen = !isOpen diff --git a/iBox/Sources/Presenter/CustomLaunchScreen/CustomLaunchScreenView.swift b/iBox/Sources/CustomLaunchScreen/CustomLaunchScreenView.swift similarity index 100% rename from iBox/Sources/Presenter/CustomLaunchScreen/CustomLaunchScreenView.swift rename to iBox/Sources/CustomLaunchScreen/CustomLaunchScreenView.swift diff --git a/iBox/Sources/Presenter/CustomLaunchScreen/CustomLaunchScreenViewController.swift b/iBox/Sources/CustomLaunchScreen/CustomLaunchScreenViewController.swift similarity index 100% rename from iBox/Sources/Presenter/CustomLaunchScreen/CustomLaunchScreenViewController.swift rename to iBox/Sources/CustomLaunchScreen/CustomLaunchScreenViewController.swift diff --git a/iBox/Sources/Presenter/Favorite/FavoriteView.swift b/iBox/Sources/Favorite/FavoriteView.swift similarity index 100% rename from iBox/Sources/Presenter/Favorite/FavoriteView.swift rename to iBox/Sources/Favorite/FavoriteView.swift diff --git a/iBox/Sources/Presenter/Favorite/FavoriteViewController.swift b/iBox/Sources/Favorite/FavoriteViewController.swift similarity index 100% rename from iBox/Sources/Presenter/Favorite/FavoriteViewController.swift rename to iBox/Sources/Favorite/FavoriteViewController.swift diff --git a/iBox/Sources/Presenter/MainTabBarController.swift b/iBox/Sources/Main/MainTabBarController.swift similarity index 100% rename from iBox/Sources/Presenter/MainTabBarController.swift rename to iBox/Sources/Main/MainTabBarController.swift diff --git a/iBox/Sources/Model/Folder.swift b/iBox/Sources/Model/Folder.swift index 261755f..398a028 100644 --- a/iBox/Sources/Model/Folder.swift +++ b/iBox/Sources/Model/Folder.swift @@ -10,7 +10,6 @@ import Foundation struct Folder { var id: UUID let name: String - let color: ColorName let bookmarks: [Bookmark] var isOpened: Bool = false } diff --git a/iBox/Sources/Presenter/MyPage/HomeTab/HomeTabSelectorCell.swift b/iBox/Sources/MyPage/HomeTab/HomeTabSelectorCell.swift similarity index 100% rename from iBox/Sources/Presenter/MyPage/HomeTab/HomeTabSelectorCell.swift rename to iBox/Sources/MyPage/HomeTab/HomeTabSelectorCell.swift diff --git a/iBox/Sources/Presenter/MyPage/HomeTab/HomeTabSelectorView.swift b/iBox/Sources/MyPage/HomeTab/HomeTabSelectorView.swift similarity index 100% rename from iBox/Sources/Presenter/MyPage/HomeTab/HomeTabSelectorView.swift rename to iBox/Sources/MyPage/HomeTab/HomeTabSelectorView.swift diff --git a/iBox/Sources/Presenter/MyPage/HomeTab/HomeTabSelectorViewController.swift b/iBox/Sources/MyPage/HomeTab/HomeTabSelectorViewController.swift similarity index 100% rename from iBox/Sources/Presenter/MyPage/HomeTab/HomeTabSelectorViewController.swift rename to iBox/Sources/MyPage/HomeTab/HomeTabSelectorViewController.swift diff --git a/iBox/Sources/ViewModel/HomeTabSelectorViewModel.swift b/iBox/Sources/MyPage/HomeTab/HomeTabSelectorViewModel.swift similarity index 100% rename from iBox/Sources/ViewModel/HomeTabSelectorViewModel.swift rename to iBox/Sources/MyPage/HomeTab/HomeTabSelectorViewModel.swift diff --git a/iBox/Sources/ViewModel/MyPageCellViewModel.swift b/iBox/Sources/MyPage/MyPageCellViewModel.swift similarity index 100% rename from iBox/Sources/ViewModel/MyPageCellViewModel.swift rename to iBox/Sources/MyPage/MyPageCellViewModel.swift diff --git a/iBox/Sources/Presenter/MyPage/MyPageItemCell.swift b/iBox/Sources/MyPage/MyPageItemCell.swift similarity index 100% rename from iBox/Sources/Presenter/MyPage/MyPageItemCell.swift rename to iBox/Sources/MyPage/MyPageItemCell.swift diff --git a/iBox/Sources/ViewModel/MyPageSectionViewModel.swift b/iBox/Sources/MyPage/MyPageSectionViewModel.swift similarity index 100% rename from iBox/Sources/ViewModel/MyPageSectionViewModel.swift rename to iBox/Sources/MyPage/MyPageSectionViewModel.swift diff --git a/iBox/Sources/Presenter/MyPage/MyPageView.swift b/iBox/Sources/MyPage/MyPageView.swift similarity index 100% rename from iBox/Sources/Presenter/MyPage/MyPageView.swift rename to iBox/Sources/MyPage/MyPageView.swift diff --git a/iBox/Sources/Presenter/MyPage/MyPageViewController.swift b/iBox/Sources/MyPage/MyPageViewController.swift similarity index 100% rename from iBox/Sources/Presenter/MyPage/MyPageViewController.swift rename to iBox/Sources/MyPage/MyPageViewController.swift diff --git a/iBox/Sources/ViewModel/MyPageViewModel.swift b/iBox/Sources/MyPage/MyPageViewModel.swift similarity index 100% rename from iBox/Sources/ViewModel/MyPageViewModel.swift rename to iBox/Sources/MyPage/MyPageViewModel.swift diff --git a/iBox/Sources/Presenter/MyPage/Profile/ProfileView.swift b/iBox/Sources/MyPage/Profile/ProfileView.swift similarity index 100% rename from iBox/Sources/Presenter/MyPage/Profile/ProfileView.swift rename to iBox/Sources/MyPage/Profile/ProfileView.swift diff --git a/iBox/Sources/Presenter/MyPage/Profile/ProfileViewController.swift b/iBox/Sources/MyPage/Profile/ProfileViewController.swift similarity index 100% rename from iBox/Sources/Presenter/MyPage/Profile/ProfileViewController.swift rename to iBox/Sources/MyPage/Profile/ProfileViewController.swift diff --git a/iBox/Sources/Presenter/MyPage/Theme/ThemeCell.swift b/iBox/Sources/MyPage/Theme/ThemeCell.swift similarity index 100% rename from iBox/Sources/Presenter/MyPage/Theme/ThemeCell.swift rename to iBox/Sources/MyPage/Theme/ThemeCell.swift diff --git a/iBox/Sources/Presenter/MyPage/Theme/ThemeView.swift b/iBox/Sources/MyPage/Theme/ThemeView.swift similarity index 100% rename from iBox/Sources/Presenter/MyPage/Theme/ThemeView.swift rename to iBox/Sources/MyPage/Theme/ThemeView.swift diff --git a/iBox/Sources/Presenter/MyPage/Theme/ThemeViewController.swift b/iBox/Sources/MyPage/Theme/ThemeViewController.swift similarity index 100% rename from iBox/Sources/Presenter/MyPage/Theme/ThemeViewController.swift rename to iBox/Sources/MyPage/Theme/ThemeViewController.swift diff --git a/iBox/Sources/ViewModel/ThemeViewModel.swift b/iBox/Sources/MyPage/Theme/ThemeViewModel.swift similarity index 100% rename from iBox/Sources/ViewModel/ThemeViewModel.swift rename to iBox/Sources/MyPage/Theme/ThemeViewModel.swift diff --git a/iBox/Sources/SceneDelegate.swift b/iBox/Sources/SceneDelegate.swift index 936c962..194f154 100644 --- a/iBox/Sources/SceneDelegate.swift +++ b/iBox/Sources/SceneDelegate.swift @@ -39,7 +39,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { let isDefaultDataInserted = UserDefaultsManager.isDefaultDataInserted if !isDefaultDataInserted { let defaultData = [ - Folder(id: UUID(), name: "42 폴더", color: .gray, bookmarks: [ + Folder(id: UUID(), name: "42 폴더", bookmarks: [ Bookmark(id: UUID(), name: "42 Intra", url: URL(string: "https://profile.intra.42.fr/")!), Bookmark(id: UUID(), name: "42Where", url: URL(string: "https://www.where42.kr/")! ), Bookmark(id: UUID(), name: "42Stat", url: URL(string: "https://stat.42seoul.kr/")!), diff --git a/iBox/Sources/Utils/CoreDataManager.swift b/iBox/Sources/Shared/CoreDataManager.swift similarity index 98% rename from iBox/Sources/Utils/CoreDataManager.swift rename to iBox/Sources/Shared/CoreDataManager.swift index 3ee52f4..524c856 100644 --- a/iBox/Sources/Utils/CoreDataManager.swift +++ b/iBox/Sources/Shared/CoreDataManager.swift @@ -47,7 +47,7 @@ extension CoreDataManager { let newFolder = FolderEntity(context: context) newFolder.id = folder.id newFolder.name = folder.name - newFolder.color = folder.color.rawValue +// newFolder.color = folder.color.rawValue newFolder.order = lastFolderOrder lastFolderOrder += 1 let bookmarks = NSMutableOrderedSet() @@ -71,7 +71,7 @@ extension CoreDataManager { let newFolder = FolderEntity(context: context) newFolder.id = folder.id newFolder.name = folder.name - newFolder.color = folder.color.rawValue +// newFolder.color = folder.color.rawValue newFolder.order = lastFolderOrder lastFolderOrder += 1 let bookmarks = NSMutableOrderedSet() @@ -131,7 +131,7 @@ extension CoreDataManager { guard let folderId = folderEntity.id else { return [] } lastBookmarkOrder[folderId] = (bookmarkEntities.last?.order ?? -1) + 1 let bookmarks = bookmarkEntities.map{ Bookmark(id: $0.id ?? UUID(), name: $0.name ?? "" , url: $0.url ?? URL(string: "")!) } - folders.append(Folder(id: folderEntity.id ?? UUID(), name: folderEntity.name ?? "", color: ColorName(rawValue: folderEntity.color ?? "gray") ?? .gray , bookmarks: bookmarks)) + folders.append(Folder(id: folderEntity.id ?? UUID(), name: folderEntity.name ?? "", bookmarks: bookmarks)) } return folders diff --git a/iBox/Sources/Utils/UserDefaultsManager.swift b/iBox/Sources/Shared/UserDefaultsManager.swift similarity index 100% rename from iBox/Sources/Utils/UserDefaultsManager.swift rename to iBox/Sources/Shared/UserDefaultsManager.swift diff --git a/iBox/Sources/Utils/WebViewPreloader.swift b/iBox/Sources/Shared/WebViewPreloader.swift similarity index 100% rename from iBox/Sources/Utils/WebViewPreloader.swift rename to iBox/Sources/Shared/WebViewPreloader.swift diff --git a/iBox/Sources/Utils/ColorName.swift b/iBox/Sources/Utils/ColorName.swift deleted file mode 100644 index 592876a..0000000 --- a/iBox/Sources/Utils/ColorName.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// ColorName.swift -// iBox -// -// Created by 이지현 on 1/3/24. -// - -import UIKit - -enum ColorName: String { - case gray - case green - case red - case blue - case yellow - - func toUIColor() -> UIColor { - switch self { - case .gray: - return UIColor.systemGray2 - case .green: - return UIColor.systemGreen - case .red: - return UIColor.systemRed - case .blue: - return UIColor.systemBlue - case .yellow: - return UIColor.systemYellow - } - } -} diff --git a/iBox/Sources/Presenter/Web/WebView.swift b/iBox/Sources/Web/WebView.swift similarity index 100% rename from iBox/Sources/Presenter/Web/WebView.swift rename to iBox/Sources/Web/WebView.swift diff --git a/iBox/Sources/Presenter/Web/WebViewController.swift b/iBox/Sources/Web/WebViewController.swift similarity index 100% rename from iBox/Sources/Presenter/Web/WebViewController.swift rename to iBox/Sources/Web/WebViewController.swift