From af17254aa1d590d75b4ffefb5314054975b3c7bb Mon Sep 17 00:00:00 2001 From: chanhihi Date: Thu, 2 May 2024 23:44:54 +0900 Subject: [PATCH 01/13] docs: how to use in readme --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 4628625..00cbb15 100644 --- a/README.md +++ b/README.md @@ -98,3 +98,13 @@ + +# ๐Ÿ”Ž How To Use + +## ShareExtension + +## Internal Add Bookmark + +## List Context Menu + +## Darkmode \ No newline at end of file From 45df1d09c77e2fd253e7d9d705cb2a98fbb2a56b Mon Sep 17 00:00:00 2001 From: KIM CHANHEE <85754295+chanhihi@users.noreply.github.com> Date: Thu, 2 May 2024 23:51:15 +0900 Subject: [PATCH 02/13] docs: how to use in README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 00cbb15..7a74fbe 100644 --- a/README.md +++ b/README.md @@ -102,9 +102,13 @@ # ๐Ÿ”Ž How To Use ## ShareExtension +![1242*2688(3)](https://github.com/42Box/iOS/assets/85754295/cb1f0768-3fe6-40b1-9ca3-ff50f53119f4) ## Internal Add Bookmark +![1242*2688(4)](https://github.com/42Box/iOS/assets/85754295/7e83aeb6-8518-4183-8084-48e70087a304) ## List Context Menu +![1242*2688(5)](https://github.com/42Box/iOS/assets/85754295/82a5941c-e7d1-43f4-96bd-649ecfcc312e) -## Darkmode \ No newline at end of file +## Darkmode +![1242*2688(6)](https://github.com/42Box/iOS/assets/85754295/73f09320-2d85-4ba3-a3b8-067a49a33c55) From 5a2d2717274582620d216b52eea80ab36e7a5a2c Mon Sep 17 00:00:00 2001 From: chanhihi Date: Fri, 3 May 2024 00:08:45 +0900 Subject: [PATCH 03/13] docs: how to use in readme --- README.md | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7a74fbe..6314aa2 100644 --- a/README.md +++ b/README.md @@ -101,14 +101,31 @@ # ๐Ÿ”Ž How To Use -## ShareExtension -![1242*2688(3)](https://github.com/42Box/iOS/assets/85754295/cb1f0768-3fe6-40b1-9ca3-ff50f53119f4) +### Folder Edit -## Internal Add Bookmark -![1242*2688(4)](https://github.com/42Box/iOS/assets/85754295/7e83aeb6-8518-4183-8084-48e70087a304) +|Manage folders| ํด๋” ๊ด€๋ฆฌ| +|---|---| +image|image| -## List Context Menu -![1242*2688(5)](https://github.com/42Box/iOS/assets/85754295/82a5941c-e7d1-43f4-96bd-649ecfcc312e) +### Share Extension -## Darkmode -![1242*2688(6)](https://github.com/42Box/iOS/assets/85754295/73f09320-2d85-4ba3-a3b8-067a49a33c55) +|Importing from the other App| ์•ฑ ์™ธ๋ถ€์—์„œ ๊ฐ€์ ธ์˜ค๊ธฐ| +|---|---| +image|image| + +### Refresh Controller + +|Internal Add Bookmark| ๋‚ด๋ถ€์—์„œ ๋ถ๋งˆํฌ ์ถ”๊ฐ€ํ•˜๊ธฐ| +|---|---| +image|image| + +### Shortcuts for bookmark lists + +|Preview, Context menu| ๋ถ๋งˆํฌ๋ฆฌ์ŠคํŠธ๋“ค์˜ ๋‹จ์ถ•ํ‚ค๋“ค| +|---|---| +|image|image| + +### Settings menu +|Darkmode| ํ…Œ๋งˆ ๋ฐ ์„ค์ • | +|---|---| +|image|image| From 2f8d77787509ac03c8a736554181cdcf2c3fd171 Mon Sep 17 00:00:00 2001 From: KIM CHANHEE <85754295+chanhihi@users.noreply.github.com> Date: Fri, 3 May 2024 00:11:13 +0900 Subject: [PATCH 04/13] docs: how to use in README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6314aa2..5745ef2 100644 --- a/README.md +++ b/README.md @@ -99,13 +99,16 @@ +
+
+ # ๐Ÿ”Ž How To Use ### Folder Edit |Manage folders| ํด๋” ๊ด€๋ฆฌ| |---|---| -image|image| +image|image| ### Share Extension From bb0f89713b770fef74ae906e310ef6b45073f203 Mon Sep 17 00:00:00 2001 From: chanhihi Date: Fri, 3 May 2024 00:12:55 +0900 Subject: [PATCH 05/13] docs: resize images --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5745ef2..576cd85 100644 --- a/README.md +++ b/README.md @@ -108,27 +108,27 @@ |Manage folders| ํด๋” ๊ด€๋ฆฌ| |---|---| -image|image| +image|image| ### Share Extension |Importing from the other App| ์•ฑ ์™ธ๋ถ€์—์„œ ๊ฐ€์ ธ์˜ค๊ธฐ| |---|---| -image|image| +image|image| ### Refresh Controller |Internal Add Bookmark| ๋‚ด๋ถ€์—์„œ ๋ถ๋งˆํฌ ์ถ”๊ฐ€ํ•˜๊ธฐ| |---|---| -image|image| +image|image| ### Shortcuts for bookmark lists |Preview, Context menu| ๋ถ๋งˆํฌ๋ฆฌ์ŠคํŠธ๋“ค์˜ ๋‹จ์ถ•ํ‚ค๋“ค| |---|---| -|image|image| +|image|image| ### Settings menu |Darkmode| ํ…Œ๋งˆ ๋ฐ ์„ค์ • | |---|---| -|image|image| +|image|image| From 2b671fec0c66d05622f2abb82b643a05b6807f54 Mon Sep 17 00:00:00 2001 From: chanhihi Date: Fri, 3 May 2024 00:18:39 +0900 Subject: [PATCH 06/13] docs: separate howtouse --- HowToUse.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 HowToUse.md diff --git a/HowToUse.md b/HowToUse.md new file mode 100644 index 0000000..ff7dab0 --- /dev/null +++ b/HowToUse.md @@ -0,0 +1,30 @@ +# ๐Ÿ”Ž How To Use + +### Folder Edit + +|Manage folders| ํด๋” ๊ด€๋ฆฌ| +|---|---| +image|image| + +### Share Extension + +|Importing from the other App| ์•ฑ ์™ธ๋ถ€์—์„œ ๊ฐ€์ ธ์˜ค๊ธฐ| +|---|---| +image|image| + +### Refresh Controller + +|Internal Add Bookmark| ๋‚ด๋ถ€์—์„œ ๋ถ๋งˆํฌ ์ถ”๊ฐ€ํ•˜๊ธฐ| +|---|---| +image|image| + +### Shortcuts for bookmark lists + +|Preview, Context menu| ๋ถ๋งˆํฌ๋ฆฌ์ŠคํŠธ๋“ค์˜ ๋‹จ์ถ•ํ‚ค๋“ค| +|---|---| +|image|image| + +### Settings menu +|Darkmode| ํ…Œ๋งˆ ๋ฐ ์„ค์ • | +|---|---| +|image|image| From afaadc956a48e00f2e137ac8fd6f0f6b6f39e670 Mon Sep 17 00:00:00 2001 From: chanhihi Date: Fri, 3 May 2024 00:24:54 +0900 Subject: [PATCH 07/13] docs: 1col --- HowToUse.md | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/HowToUse.md b/HowToUse.md index ff7dab0..b90c25a 100644 --- a/HowToUse.md +++ b/HowToUse.md @@ -2,29 +2,39 @@ ### Folder Edit -|Manage folders| ํด๋” ๊ด€๋ฆฌ| -|---|---| -image|image| +|Manage folders| +|---| +|image| +|ํด๋” ๊ด€๋ฆฌ| +|image| ### Share Extension -|Importing from the other App| ์•ฑ ์™ธ๋ถ€์—์„œ ๊ฐ€์ ธ์˜ค๊ธฐ| -|---|---| -image|image| +|Importing from the other App| +|---| +|image| +|์•ฑ ์™ธ๋ถ€์—์„œ ๊ฐ€์ ธ์˜ค๊ธฐ| +|image| ### Refresh Controller -|Internal Add Bookmark| ๋‚ด๋ถ€์—์„œ ๋ถ๋งˆํฌ ์ถ”๊ฐ€ํ•˜๊ธฐ| -|---|---| -image|image| +|Internal Add Bookmark| +|---| +|image| +|๋‚ด๋ถ€์—์„œ ๋ถ๋งˆํฌ ์ถ”๊ฐ€ํ•˜๊ธฐ| +|image| ### Shortcuts for bookmark lists -|Preview, Context menu| ๋ถ๋งˆํฌ๋ฆฌ์ŠคํŠธ๋“ค์˜ ๋‹จ์ถ•ํ‚ค๋“ค| -|---|---| -|image|image| +|Preview, Context menu| +|---| +|image| +|๋ถ๋งˆํฌ๋ฆฌ์ŠคํŠธ๋“ค์˜ ์ƒํ˜ธ์ž‘์šฉ| +|image| ### Settings menu -|Darkmode| ํ…Œ๋งˆ ๋ฐ ์„ค์ • | -|---|---| -|image|image| +|Darkmode| +|---| +|image| +| ํ…Œ๋งˆ ๋ฐ ์„ค์ • | +|image| From 5e784046db8fbfb15209f0b253d705fc54920047 Mon Sep 17 00:00:00 2001 From: chanhihi Date: Fri, 3 May 2024 00:28:32 +0900 Subject: [PATCH 08/13] docs: develop --- HowToUse.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/HowToUse.md b/HowToUse.md index b90c25a..8b11610 100644 --- a/HowToUse.md +++ b/HowToUse.md @@ -2,39 +2,39 @@ ### Folder Edit -|Manage folders| -|---| -|image| |ํด๋” ๊ด€๋ฆฌ| +|:---:| +|image| +|Manage folders| |image| ### Share Extension -|Importing from the other App| -|---| -|image| |์•ฑ ์™ธ๋ถ€์—์„œ ๊ฐ€์ ธ์˜ค๊ธฐ| +|:---:| +|image| +|Importing from the other App| |image| ### Refresh Controller -|Internal Add Bookmark| -|---| -|image| |๋‚ด๋ถ€์—์„œ ๋ถ๋งˆํฌ ์ถ”๊ฐ€ํ•˜๊ธฐ| +|:---:| +|image| +|Internal Add Bookmark| |image| ### Shortcuts for bookmark lists -|Preview, Context menu| -|---| -|image| |๋ถ๋งˆํฌ๋ฆฌ์ŠคํŠธ๋“ค์˜ ์ƒํ˜ธ์ž‘์šฉ| +|:---:| +|image| +|Preview, Context menu| |image| ### Settings menu -|Darkmode| -|---| +|ํ…Œ๋งˆ ๋ฐ ์„ค์ •| +|:---:| |image| -| ํ…Œ๋งˆ ๋ฐ ์„ค์ • | +|Theme and Settings| |image| From 352fbade0570f3ae39f7f71551f84dcc2abbba53 Mon Sep 17 00:00:00 2001 From: chanhihi Date: Fri, 3 May 2024 01:10:32 +0900 Subject: [PATCH 09/13] docs: fix width --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 576cd85..03f0942 100644 --- a/README.md +++ b/README.md @@ -108,27 +108,27 @@ |Manage folders| ํด๋” ๊ด€๋ฆฌ| |---|---| -image|image| +image|image| ### Share Extension |Importing from the other App| ์•ฑ ์™ธ๋ถ€์—์„œ ๊ฐ€์ ธ์˜ค๊ธฐ| |---|---| -image|image| +image|image| ### Refresh Controller |Internal Add Bookmark| ๋‚ด๋ถ€์—์„œ ๋ถ๋งˆํฌ ์ถ”๊ฐ€ํ•˜๊ธฐ| |---|---| -image|image| +image|image| ### Shortcuts for bookmark lists |Preview, Context menu| ๋ถ๋งˆํฌ๋ฆฌ์ŠคํŠธ๋“ค์˜ ๋‹จ์ถ•ํ‚ค๋“ค| |---|---| -|image|image| +|image|image| ### Settings menu |Darkmode| ํ…Œ๋งˆ ๋ฐ ์„ค์ • | |---|---| -|image|image| +|image|image| From 4e10302b40f7d217f0d0e700fbefc7bfc499f362 Mon Sep 17 00:00:00 2001 From: chanhihi Date: Fri, 3 May 2024 01:14:30 +0900 Subject: [PATCH 10/13] docs: howtouse in readme --- README.md | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 03f0942..658b48f 100644 --- a/README.md +++ b/README.md @@ -106,29 +106,39 @@ ### Folder Edit -|Manage folders| ํด๋” ๊ด€๋ฆฌ| -|---|---| -image|image| +|ํด๋” ๊ด€๋ฆฌ| +|:---:| +|image| +|Manage folders| +|image| ### Share Extension -|Importing from the other App| ์•ฑ ์™ธ๋ถ€์—์„œ ๊ฐ€์ ธ์˜ค๊ธฐ| -|---|---| -image|image| +|์•ฑ ์™ธ๋ถ€์—์„œ ๊ฐ€์ ธ์˜ค๊ธฐ| +|:---:| +|image| +|Importing from the other App| +|image| ### Refresh Controller -|Internal Add Bookmark| ๋‚ด๋ถ€์—์„œ ๋ถ๋งˆํฌ ์ถ”๊ฐ€ํ•˜๊ธฐ| -|---|---| -image|image| +|๋‚ด๋ถ€์—์„œ ๋ถ๋งˆํฌ ์ถ”๊ฐ€ํ•˜๊ธฐ| +|:---:| +|image| +|Internal Add Bookmark| +|image| ### Shortcuts for bookmark lists -|Preview, Context menu| ๋ถ๋งˆํฌ๋ฆฌ์ŠคํŠธ๋“ค์˜ ๋‹จ์ถ•ํ‚ค๋“ค| -|---|---| -|image|image| +|๋ถ๋งˆํฌ๋ฆฌ์ŠคํŠธ๋“ค์˜ ์ƒํ˜ธ์ž‘์šฉ| +|:---:| +|image| +|Preview, Context menu| +|image| ### Settings menu -|Darkmode| ํ…Œ๋งˆ ๋ฐ ์„ค์ • | -|---|---| -|image|image| +|ํ…Œ๋งˆ ๋ฐ ์„ค์ •| +|:---:| +|image| +|Theme and Settings| +|image| From 992f19ba32ec4e9fb9f6201d24c429680fce5043 Mon Sep 17 00:00:00 2001 From: chanhihi Date: Fri, 3 May 2024 01:15:16 +0900 Subject: [PATCH 11/13] feat: favorite default url --- iBox/Sources/Initializer/DefaultData.swift | 5 ++++- iBox/Sources/Initializer/DefaultDataModel.swift | 17 ++++++++++------- iBox/Sources/Shared/WebViewPreloader.swift | 2 +- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/iBox/Sources/Initializer/DefaultData.swift b/iBox/Sources/Initializer/DefaultData.swift index b33ea54..ad076da 100644 --- a/iBox/Sources/Initializer/DefaultData.swift +++ b/iBox/Sources/Initializer/DefaultData.swift @@ -28,7 +28,7 @@ class DefaultData { static func fetchDefaultData(completion: @escaping ([Folder]) -> Void) { let localDic: [String : String] = ["Seoul" : "default-kr", "default" : "default"] - let cityName = "Seoul" // ์ถ”ํ›„ global ์˜ˆ์ • + let cityName = "Seoul" let local = localDic[cityName] ?? "default" let url = URL(string: "https://raw.githubusercontent.com/42Box/versioning/main/\(local).json")! @@ -42,6 +42,9 @@ class DefaultData { do { let folderData = try JSONDecoder().decode(FolderData.self, from: data) let folders = [Folder(id: UUID(), name: "42 \(cityName)", bookmarks: folderData.list.map { Bookmark(id: UUID(), name: $0.name, url: URL(string: $0.url)!) })] + if let defaultURLData = URL(string: folderData.favorite) { + DefaultDataLoader.defaultURL = defaultURLData + } completion(folders) } catch { print("Error decoding JSON: \(error)") diff --git a/iBox/Sources/Initializer/DefaultDataModel.swift b/iBox/Sources/Initializer/DefaultDataModel.swift index 7a3bb89..eb26ada 100644 --- a/iBox/Sources/Initializer/DefaultDataModel.swift +++ b/iBox/Sources/Initializer/DefaultDataModel.swift @@ -9,6 +9,7 @@ import Foundation struct FolderData: Codable { + var favorite: String var list: [BookmarkData] } @@ -18,14 +19,16 @@ struct BookmarkData: Codable { } struct DefaultDataLoader { + static var defaultURL = URL(string: "https://github.com/42Box/iOS/blob/main/HowToUse.md#-how-to-use")! static let defaultData = [ - 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/")!), - Bookmark(id: UUID(), name: "์ง‘ํ˜„์ „", url: URL(string: "https://42library.kr/")!), - Bookmark(id: UUID(), name: "42gg", url: URL(string: "https://gg.42seoul.kr/")!), - Bookmark(id: UUID(), name: "24HANE", url: URL(string: "https://24hoursarenotenough.42seoul.kr/")!) + Folder(id: UUID(), name: "42Box", bookmarks: [ + Bookmark(id: UUID(), name: "How to use 42Box", url: URL(string: "https://github.com/42Box/iOS/blob/main/HowToUse.md#-how-to-use")!), +// 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/")!), +// Bookmark(id: UUID(), name: "์ง‘ํ˜„์ „", url: URL(string: "https://42library.kr/")!), +// Bookmark(id: UUID(), name: "42gg", url: URL(string: "https://gg.42seoul.kr/")!), +// Bookmark(id: UUID(), name: "24HANE", url: URL(string: "https://24hoursarenotenough.42seoul.kr/")!) ]) ] } diff --git a/iBox/Sources/Shared/WebViewPreloader.swift b/iBox/Sources/Shared/WebViewPreloader.swift index 734c0df..5e38112 100644 --- a/iBox/Sources/Shared/WebViewPreloader.swift +++ b/iBox/Sources/Shared/WebViewPreloader.swift @@ -11,7 +11,7 @@ import WebKit class WebViewPreloader { static let shared = WebViewPreloader() private var favoriteView: (url: URL, webView: WebView)? - private var defaultUrl = URL(string: "https://profile.intra.42.fr/")! + private var defaultUrl = DefaultDataLoader.defaultURL private init() {} From 22af69c5903e59aee1d5351563b8c3262aa41524 Mon Sep 17 00:00:00 2001 From: chanhihi Date: Fri, 3 May 2024 01:15:34 +0900 Subject: [PATCH 12/13] build: fix version --- Project.swift | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Project.swift b/Project.swift index 3fbb9ed..cdb974f 100644 --- a/Project.swift +++ b/Project.swift @@ -9,6 +9,14 @@ protocol ProjectFactory { func generateTarget() -> [Target] } +// MARK: - Plist.Value Extension +extension Plist.Value { + static var displayName: Plist.Value = "42Box" + static var displayShareExtensionName: Plist.Value = "42Box.Share" + static var appVersion: Plist.Value = "1.0.1" + +} + // MARK: - iBox Factory class iBoxFactory: ProjectFactory { @@ -29,9 +37,9 @@ class iBoxFactory: ProjectFactory { private let appInfoPlist: [String: Plist.Value] = [ "ITSAppUsesNonExemptEncryption": false, - "CFBundleDisplayName": "42Box", + "CFBundleDisplayName": Plist.Value.displayName, "CFBundleName": "iBox", - "CFBundleShortVersionString": "1.0.0", + "CFBundleShortVersionString": Plist.Value.appVersion, "CFBundleVersion": "1", "UILaunchStoryboardName": "LaunchScreen", "UIApplicationSceneManifest": [ @@ -58,8 +66,8 @@ class iBoxFactory: ProjectFactory { ] private let shareExtensionInfoPlist: [String: Plist.Value] = [ - "CFBundleDisplayName": "42Box.Share", - "CFBundleShortVersionString": "1.0.0", + "CFBundleDisplayName": Plist.Value.displayShareExtensionName, + "CFBundleShortVersionString": Plist.Value.appVersion, "CFBundleVersion": "1", "NSExtension": [ "NSExtensionAttributes": [ From 4611f42a3b09040349e70b2f87d9813843485632 Mon Sep 17 00:00:00 2001 From: chanhihi Date: Fri, 3 May 2024 01:15:56 +0900 Subject: [PATCH 13/13] chore: change status --- .../CustomLaunchScreenViewController.swift | 4 +++- iBox/Sources/Extension/UIView+Extension.swift | 11 ----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/iBox/Sources/CustomLaunchScreen/CustomLaunchScreenViewController.swift b/iBox/Sources/CustomLaunchScreen/CustomLaunchScreenViewController.swift index 4110b61..9ddb17a 100644 --- a/iBox/Sources/CustomLaunchScreen/CustomLaunchScreenViewController.swift +++ b/iBox/Sources/CustomLaunchScreen/CustomLaunchScreenViewController.swift @@ -44,7 +44,9 @@ class CustomLaunchScreenViewController: UIViewController { switch result { case .success, .maxRetryReached, .later: DefaultData.insertDefaultDataIfNeeded() { - self?.transitionToNextScreen() + DispatchQueue.main.async { + self?.transitionToNextScreen() + } } print("App ์ •์ƒ ์‹คํ–‰") case .urlError: diff --git a/iBox/Sources/Extension/UIView+Extension.swift b/iBox/Sources/Extension/UIView+Extension.swift index e7f584c..67979d5 100644 --- a/iBox/Sources/Extension/UIView+Extension.swift +++ b/iBox/Sources/Extension/UIView+Extension.swift @@ -40,15 +40,4 @@ extension UIView { } } - // MARK: - ๋ทฐ ๊ณ„์ธต ๊ตฌ์กฐ log - func printViewHierarchy(level: Int = 0) { - let padding = String(repeating: " ", count: level * 2) - let viewInfo = "\(padding)\(type(of: self)) - Frame: \(self.frame)" - print(viewInfo) - - for subview in self.subviews { - subview.printViewHierarchy(level: level + 1) - } - } - }