From 6ea9a2a26479da2c9a104976c589e23fcfdd99ff Mon Sep 17 00:00:00 2001 From: Gk40002148 Date: Tue, 8 Mar 2022 13:48:09 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E3=83=A9=E3=82=A4=E3=82=BB=E3=83=B3?= =?UTF-8?q?=E3=82=B9=E8=A1=A8=E7=A4=BA=E6=A9=9F=E8=83=BD=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../License/Builder/LicenseViewBuilder.swift | 2 +- .../Presenter/LicenseViewPresenter.swift | 21 +++++++++++++++++-- .../View/LicenseViewController.storyboard | 8 ++++--- .../License/View/LicenseViewController.swift | 4 ++++ .../Strings/Chinese-Simplified.strings | 4 ++++ .../Strings/Chinese-Traditional.strings | 4 ++++ AgileWorks/AgileWorks/Strings/English.strings | 4 ++++ .../AgileWorks/Strings/Japanese.strings | 4 ++++ .../Strings/en.lproj/Localizable.strings | 4 ++++ .../Strings/ja.lproj/Localizable.strings | 4 ++++ .../Strings/zh-Hans.lproj/Localizable.strings | 4 ++++ .../Strings/zh-Hant.lproj/Localizable.strings | 4 ++++ .../View/MenuTableViewController.swift | 9 +++++++- 13 files changed, 69 insertions(+), 7 deletions(-) diff --git a/AgileWorks/AgileWorks/License/Builder/LicenseViewBuilder.swift b/AgileWorks/AgileWorks/License/Builder/LicenseViewBuilder.swift index 38c1fde..d682c1b 100644 --- a/AgileWorks/AgileWorks/License/Builder/LicenseViewBuilder.swift +++ b/AgileWorks/AgileWorks/License/Builder/LicenseViewBuilder.swift @@ -17,7 +17,7 @@ struct LicenseViewBuilderImpl: LicenseViewBuilder { func build(nextTarget: LicenseViewSwitchTarget) -> LicenseViewController { let viewController = storyboard() - viewController.inject(presenter: LicenseViewPresenterImpl(nextTarget: nextTarget)) + viewController.inject(presenter: LicenseViewPresenterImpl(nextTarget: nextTarget, view: viewController)) return viewController } } diff --git a/AgileWorks/AgileWorks/License/Presenter/LicenseViewPresenter.swift b/AgileWorks/AgileWorks/License/Presenter/LicenseViewPresenter.swift index cec6663..bc30bd8 100644 --- a/AgileWorks/AgileWorks/License/Presenter/LicenseViewPresenter.swift +++ b/AgileWorks/AgileWorks/License/Presenter/LicenseViewPresenter.swift @@ -7,36 +7,53 @@ // import Foundation +import UIKit protocol LicenseViewPresenter { func licenseContent() -> NSAttributedString + func acceptLabel() -> String func onAccepted() } enum LicenseViewSwitchTarget { case mainScreen case logout + case close } class LicenseViewPresenterImpl: LicenseViewPresenter { + let view: UIViewController? private let nextTarget: LicenseViewSwitchTarget - init(nextTarget: LicenseViewSwitchTarget) { + init(nextTarget: LicenseViewSwitchTarget, view: UIViewController) { self.nextTarget = nextTarget + self.view = view } func licenseContent() -> NSAttributedString { return readLicenseContents() } + func acceptLabel() -> String { + if nextTarget == .close { + return localizadString(key: "Close", comment: "") + } else { + return localizadString(key: "LicenseAccept", comment: "") + } + } + func onAccepted() { - writeAcceptedLicenseVersionToCurrentVersion() + if nextTarget != .close { + writeAcceptedLicenseVersionToCurrentVersion() + } switch nextTarget { case .mainScreen: AppDelegate.shared.rootViewController.switchToMainScreen() case .logout: AppDelegate.shared.rootViewController.switchToLogout() + case .close: + view!.dismiss(animated: true, completion: nil) } } } diff --git a/AgileWorks/AgileWorks/License/View/LicenseViewController.storyboard b/AgileWorks/AgileWorks/License/View/LicenseViewController.storyboard index 1f0b825..d6cbf07 100644 --- a/AgileWorks/AgileWorks/License/View/LicenseViewController.storyboard +++ b/AgileWorks/AgileWorks/License/View/LicenseViewController.storyboard @@ -1,9 +1,9 @@ - + - + @@ -12,7 +12,7 @@ - + @@ -52,7 +52,9 @@ + + diff --git a/AgileWorks/AgileWorks/License/View/LicenseViewController.swift b/AgileWorks/AgileWorks/License/View/LicenseViewController.swift index bb30bae..69ec9b7 100644 --- a/AgileWorks/AgileWorks/License/View/LicenseViewController.swift +++ b/AgileWorks/AgileWorks/License/View/LicenseViewController.swift @@ -11,6 +11,8 @@ import UIKit class LicenseViewController: UIViewController { private var presenter: LicenseViewPresenter! + @IBOutlet private var licenseTitle: UILabel! + @IBOutlet private var acceptButton: UIButton! @IBOutlet private var licenseContentsText: UITextView! func inject(presenter: LicenseViewPresenter) { @@ -20,6 +22,8 @@ class LicenseViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() licenseContentsText.attributedText = presenter.licenseContent() + acceptButton.setTitle(presenter.acceptLabel(), for: .normal) + licenseTitle.text = localizadString(key: "LicenseViewTitle", comment: "") } @IBAction private func onAcceptButtonTouched(_ sender: UIButton) { diff --git a/AgileWorks/AgileWorks/Strings/Chinese-Simplified.strings b/AgileWorks/AgileWorks/Strings/Chinese-Simplified.strings index 490904d..5112996 100644 --- a/AgileWorks/AgileWorks/Strings/Chinese-Simplified.strings +++ b/AgileWorks/AgileWorks/Strings/Chinese-Simplified.strings @@ -39,6 +39,10 @@ "LicenseTitle" = "许可证"; "OpenLicenseTitle" = "开放许可证"; +// License +"LicenseViewTitle" = "利用許諾"; +"LicenseAccept" = "利用許諾に同意します"; + // Approval "ApprovalTitle" = "承認一覧"; "ApprovalData" = "%1$@ (%2$@)"; diff --git a/AgileWorks/AgileWorks/Strings/Chinese-Traditional.strings b/AgileWorks/AgileWorks/Strings/Chinese-Traditional.strings index eeef277..d598bbf 100644 --- a/AgileWorks/AgileWorks/Strings/Chinese-Traditional.strings +++ b/AgileWorks/AgileWorks/Strings/Chinese-Traditional.strings @@ -39,6 +39,10 @@ "LicenseTitle" = "授權"; "OpenLicenseTitle" = "開放許可證"; +// License +"LicenseViewTitle" = "利用許諾"; +"LicenseAccept" = "利用許諾に同意します"; + // Approval "ApprovalTitle" = "承認一覧"; "ApprovalData" = "%1$@ (%2$@)"; diff --git a/AgileWorks/AgileWorks/Strings/English.strings b/AgileWorks/AgileWorks/Strings/English.strings index 01545fa..3a3f225 100644 --- a/AgileWorks/AgileWorks/Strings/English.strings +++ b/AgileWorks/AgileWorks/Strings/English.strings @@ -39,6 +39,10 @@ "LicenseTitle" = "License"; "OpenLicenseTitle" = "Open license"; +// License +"LicenseViewTitle" = "利用許諾"; +"LicenseAccept" = "利用許諾に同意します"; + // Approval "ApprovalTitle" = "承認一覧"; "ApprovalData" = "%1$@ (%2$@)"; diff --git a/AgileWorks/AgileWorks/Strings/Japanese.strings b/AgileWorks/AgileWorks/Strings/Japanese.strings index 887c5ac..808d00b 100644 --- a/AgileWorks/AgileWorks/Strings/Japanese.strings +++ b/AgileWorks/AgileWorks/Strings/Japanese.strings @@ -39,6 +39,10 @@ "LicenseTitle" = "ライセンス"; "OpenLicenseTitle" = "オープンソースライセンス"; +// License +"LicenseViewTitle" = "利用許諾"; +"LicenseAccept" = "利用許諾に同意します"; + // Approval "ApprovalTitle" = "承認一覧"; "ApprovalData" = "%1$@ (%2$@)"; diff --git a/AgileWorks/AgileWorks/Strings/en.lproj/Localizable.strings b/AgileWorks/AgileWorks/Strings/en.lproj/Localizable.strings index a393d54..eba399d 100644 --- a/AgileWorks/AgileWorks/Strings/en.lproj/Localizable.strings +++ b/AgileWorks/AgileWorks/Strings/en.lproj/Localizable.strings @@ -39,6 +39,10 @@ "LicenseTitle" = "License"; "OpenLicenseTitle" = "Open license"; +// License +"LicenseViewTitle" = "利用許諾"; +"LicenseAccept" = "利用許諾に同意します"; + // Approval "ApprovalTitle" = "承認一覧"; "ApprovalData" = "%1$@ (%2$@)"; diff --git a/AgileWorks/AgileWorks/Strings/ja.lproj/Localizable.strings b/AgileWorks/AgileWorks/Strings/ja.lproj/Localizable.strings index 1661cf3..39d1811 100644 --- a/AgileWorks/AgileWorks/Strings/ja.lproj/Localizable.strings +++ b/AgileWorks/AgileWorks/Strings/ja.lproj/Localizable.strings @@ -39,6 +39,10 @@ "LicenseTitle" = "ライセンス"; "OpenLicenseTitle" = "オープンソースライセンス"; +// License +"LicenseViewTitle" = "利用許諾"; +"LicenseAccept" = "利用許諾に同意します"; + // Approval "ApprovalTitle" = "承認一覧"; "ApprovalData" = "%1$@ (%2$@)"; diff --git a/AgileWorks/AgileWorks/Strings/zh-Hans.lproj/Localizable.strings b/AgileWorks/AgileWorks/Strings/zh-Hans.lproj/Localizable.strings index 0830b49..450f32a 100644 --- a/AgileWorks/AgileWorks/Strings/zh-Hans.lproj/Localizable.strings +++ b/AgileWorks/AgileWorks/Strings/zh-Hans.lproj/Localizable.strings @@ -39,6 +39,10 @@ "LicenseTitle" = "许可证"; "OpenLicenseTitle" = "开放许可证"; +// License +"LicenseViewTitle" = "利用許諾"; +"LicenseAccept" = "利用許諾に同意します"; + // Approval "ApprovalTitle" = "承認一覧"; "ApprovalData" = "%1$@ (%2$@)"; diff --git a/AgileWorks/AgileWorks/Strings/zh-Hant.lproj/Localizable.strings b/AgileWorks/AgileWorks/Strings/zh-Hant.lproj/Localizable.strings index d5feab6..ba872a9 100644 --- a/AgileWorks/AgileWorks/Strings/zh-Hant.lproj/Localizable.strings +++ b/AgileWorks/AgileWorks/Strings/zh-Hant.lproj/Localizable.strings @@ -39,6 +39,10 @@ "LicenseTitle" = "授權"; "OpenLicenseTitle" = "開放許可證"; +// License +"LicenseViewTitle" = "利用許諾"; +"LicenseAccept" = "利用許諾に同意します"; + // Approval "ApprovalTitle" = "承認一覧"; "ApprovalData" = "%1$@ (%2$@)"; diff --git a/AgileWorks/AgileWorks/WebView/View/MenuTableViewController.swift b/AgileWorks/AgileWorks/WebView/View/MenuTableViewController.swift index e571549..089859e 100644 --- a/AgileWorks/AgileWorks/WebView/View/MenuTableViewController.swift +++ b/AgileWorks/AgileWorks/WebView/View/MenuTableViewController.swift @@ -64,7 +64,14 @@ class MenuTableViewController: UITableViewController { // ライセンスセルタップ処理 private func pushToLicense() { // ライセンスタップ時処理 - print("ライセンス タップ") + let license = LicenseViewBuilderImpl().build(nextTarget: .close) + license.modalPresentationStyle = .overFullScreen + license.modalTransitionStyle = .crossDissolve + self.present(license, animated: false, completion: nil) + // セルの選択解除 + if let indexPath = self.tableView.indexPath(for: self.licenseCell) { + self.tableView.deselectRow(at: indexPath, animated: true) + } } // オープンソースライセンスセルタップ処理 private func pushToOpenLicense() { -- GitLab From cf9ec97d04e7034a7e3393d30220d75cae9d587c Mon Sep 17 00:00:00 2001 From: Gk40002148 Date: Fri, 11 Mar 2022 16:33:03 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E3=82=AA=E3=83=BC=E3=83=97=E3=83=B3?= =?UTF-8?q?=E3=82=BD=E3=83=BC=E3=82=B9=E3=83=A9=E3=82=A4=E3=82=BB=E3=83=B3?= =?UTF-8?q?=E3=82=B9=E8=A1=A8=E7=A4=BA=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AgileWorks.xcodeproj/project.pbxproj | 68 +++++++++- .../Builder/OpenLicenseBuilder.swift | 44 +++++++ .../Cell/OpenLicenseTableViewCell.swift | 23 ++++ ...OpenLicenseDetailViewController.storyboard | 55 ++++++++ .../OpenLicenseDetailViewController.swift | 25 ++++ .../View/OpenLicenseTableViewController.swift | 90 +++++++++++++ .../View/OpenLicenseViewController.storyboard | 121 ++++++++++++++++++ .../View/OpenLicenseViewController.swift | 28 ++++ ...om.mono0926.LicensePlist.latest_result.txt | 14 ++ .../com.mono0926.LicensePlist.plist | 24 ++++ .../com.mono0926.LicensePlist/DropDown.plist | 35 +++++ .../FloatingPanel.plist | 35 +++++ .../KeychainAccess.plist | 37 ++++++ .../Strings/Chinese-Simplified.strings | 5 +- .../Strings/Chinese-Traditional.strings | 5 +- AgileWorks/AgileWorks/Strings/English.strings | 5 +- .../AgileWorks/Strings/Japanese.strings | 3 + .../Strings/en.lproj/Localizable.strings | 5 +- .../Strings/ja.lproj/Localizable.strings | 3 + .../Strings/zh-Hans.lproj/Localizable.strings | 5 +- .../Strings/zh-Hant.lproj/Localizable.strings | 5 +- .../View/MenuTableViewController.swift | 9 +- 22 files changed, 633 insertions(+), 11 deletions(-) create mode 100644 AgileWorks/AgileWorks/OpenLicense/Builder/OpenLicenseBuilder.swift create mode 100644 AgileWorks/AgileWorks/OpenLicense/Cell/OpenLicenseTableViewCell.swift create mode 100644 AgileWorks/AgileWorks/OpenLicense/View/OpenLicenseDetailViewController.storyboard create mode 100644 AgileWorks/AgileWorks/OpenLicense/View/OpenLicenseDetailViewController.swift create mode 100644 AgileWorks/AgileWorks/OpenLicense/View/OpenLicenseTableViewController.swift create mode 100644 AgileWorks/AgileWorks/OpenLicense/View/OpenLicenseViewController.storyboard create mode 100644 AgileWorks/AgileWorks/OpenLicense/View/OpenLicenseViewController.swift create mode 100644 AgileWorks/AgileWorks/Settings.bundle/com.mono0926.LicensePlist/DropDown.plist create mode 100644 AgileWorks/AgileWorks/Settings.bundle/com.mono0926.LicensePlist/FloatingPanel.plist create mode 100644 AgileWorks/AgileWorks/Settings.bundle/com.mono0926.LicensePlist/KeychainAccess.plist diff --git a/AgileWorks/AgileWorks.xcodeproj/project.pbxproj b/AgileWorks/AgileWorks.xcodeproj/project.pbxproj index 2ec4c6f..258e93d 100644 --- a/AgileWorks/AgileWorks.xcodeproj/project.pbxproj +++ b/AgileWorks/AgileWorks.xcodeproj/project.pbxproj @@ -142,12 +142,19 @@ BDEA2CD6246CDF2300D3E15F /* KeychainDataStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDEA2CD4246CDAEF00D3E15F /* KeychainDataStore.swift */; }; BDEB7D8E23F5293900EFAF31 /* Podfile in Resources */ = {isa = PBXBuildFile; fileRef = BDEB7D8D23F5293800EFAF31 /* Podfile */; }; BDEE85F82408A887006A6BF7 /* MainTabBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDEE85F72408A887006A6BF7 /* MainTabBarViewController.swift */; }; + C50CF78E27D86DC90042C210 /* OpenLicenseBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = C50CF78D27D86DC90042C210 /* OpenLicenseBuilder.swift */; }; + C50CF79027D870720042C210 /* OpenLicenseViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C50CF78F27D870720042C210 /* OpenLicenseViewController.storyboard */; }; + C50CF79227D8708B0042C210 /* OpenLicenseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C50CF79127D8708B0042C210 /* OpenLicenseViewController.swift */; }; C51EF0E92769FA2E00361B38 /* WebViewScriptMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = C51EF0E82769FA2E00361B38 /* WebViewScriptMessageHandler.swift */; }; C535772C2754D12600EAA660 /* WebViewBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = C535772B2754D12600EAA660 /* WebViewBuilder.swift */; }; C535772E2754D5C500EAA660 /* WebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C535772D2754D5C500EAA660 /* WebViewController.swift */; }; C53577372758AC1100EAA660 /* WebViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C53577362758AC1100EAA660 /* WebViewController.storyboard */; }; C5848EB827BC8EBC00AA796D /* MenuViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5848EB727BC8EBB00AA796D /* MenuViewController.swift */; }; C5848EBA27BCE0F100AA796D /* MenuTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5848EB927BCE0F100AA796D /* MenuTableViewController.swift */; }; + C599740827D992A5006F5AAC /* OpenLicenseTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C599740727D992A5006F5AAC /* OpenLicenseTableViewController.swift */; }; + C599740B27D992E9006F5AAC /* OpenLicenseTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C599740A27D992E9006F5AAC /* OpenLicenseTableViewCell.swift */; }; + C599740D27D9E634006F5AAC /* OpenLicenseDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C599740C27D9E633006F5AAC /* OpenLicenseDetailViewController.swift */; }; + C599740F27D9E64E006F5AAC /* OpenLicenseDetailViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C599740E27D9E64E006F5AAC /* OpenLicenseDetailViewController.storyboard */; }; C5E5A4C827853BEF00668C7D /* QRCodeReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5E5A4C727853BEF00668C7D /* QRCodeReader.swift */; }; CRJ55ZZNLTXIY1R10AXQL1VZ /* LoginViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = VRZQMTKT1ZML0OSDGAKBK8ID /* LoginViewController.storyboard */; }; DO2X5NYERJY3QMXCZGA5H9OJ /* LoginBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = S1PC5HEYRKFTSW5UN7TH5ZBG /* LoginBuilder.swift */; }; @@ -317,12 +324,19 @@ BDEB7D8D23F5293800EFAF31 /* Podfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; BDEB7D8F23F530A400EFAF31 /* KeychainAccess.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = KeychainAccess.framework; sourceTree = BUILT_PRODUCTS_DIR; }; BDEE85F72408A887006A6BF7 /* MainTabBarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTabBarViewController.swift; sourceTree = ""; }; + C50CF78D27D86DC90042C210 /* OpenLicenseBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenLicenseBuilder.swift; sourceTree = ""; }; + C50CF78F27D870720042C210 /* OpenLicenseViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = OpenLicenseViewController.storyboard; sourceTree = ""; }; + C50CF79127D8708B0042C210 /* OpenLicenseViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenLicenseViewController.swift; sourceTree = ""; }; C51EF0E82769FA2E00361B38 /* WebViewScriptMessageHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewScriptMessageHandler.swift; sourceTree = ""; }; C535772B2754D12600EAA660 /* WebViewBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewBuilder.swift; sourceTree = ""; }; C535772D2754D5C500EAA660 /* WebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewController.swift; sourceTree = ""; }; C53577362758AC1100EAA660 /* WebViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = WebViewController.storyboard; sourceTree = ""; }; C5848EB727BC8EBB00AA796D /* MenuViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuViewController.swift; sourceTree = ""; }; C5848EB927BCE0F100AA796D /* MenuTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuTableViewController.swift; sourceTree = ""; }; + C599740727D992A5006F5AAC /* OpenLicenseTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenLicenseTableViewController.swift; sourceTree = ""; }; + C599740A27D992E9006F5AAC /* OpenLicenseTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenLicenseTableViewCell.swift; sourceTree = ""; }; + C599740C27D9E633006F5AAC /* OpenLicenseDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenLicenseDetailViewController.swift; sourceTree = ""; }; + C599740E27D9E64E006F5AAC /* OpenLicenseDetailViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = OpenLicenseDetailViewController.storyboard; sourceTree = ""; }; C5E5A4C727853BEF00668C7D /* QRCodeReader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRCodeReader.swift; sourceTree = ""; }; CF516C40B9AA44C977664C98 /* Pods_All_AgileWorks.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_All_AgileWorks.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D6OQPE9ANL0AFC3W41FQ3BH6 /* LoginUseCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginUseCase.swift; sourceTree = ""; }; @@ -783,6 +797,7 @@ C53577282754D02400EAA660 /* WebView */, 3107AA7B243B369900F23BFB /* Form */, 76AE52DB25D358D700AFA45A /* License */, + C50CF78A27D86D760042C210 /* OpenLicense */, BDEB7D8D23F5293800EFAF31 /* Podfile */, BDA1832823F406A600C9A6DD /* README.md */, 75917F9A27BDEC880051E201 /* Strings */, @@ -812,6 +827,36 @@ path = WebClient; sourceTree = ""; }; + C50CF78A27D86D760042C210 /* OpenLicense */ = { + isa = PBXGroup; + children = ( + C50CF78B27D86D8A0042C210 /* Builder */, + C599740927D992B1006F5AAC /* Cell */, + C50CF78C27D86D950042C210 /* View */, + ); + path = OpenLicense; + sourceTree = ""; + }; + C50CF78B27D86D8A0042C210 /* Builder */ = { + isa = PBXGroup; + children = ( + C50CF78D27D86DC90042C210 /* OpenLicenseBuilder.swift */, + ); + path = Builder; + sourceTree = ""; + }; + C50CF78C27D86D950042C210 /* View */ = { + isa = PBXGroup; + children = ( + C50CF78F27D870720042C210 /* OpenLicenseViewController.storyboard */, + C50CF79127D8708B0042C210 /* OpenLicenseViewController.swift */, + C599740727D992A5006F5AAC /* OpenLicenseTableViewController.swift */, + C599740C27D9E633006F5AAC /* OpenLicenseDetailViewController.swift */, + C599740E27D9E64E006F5AAC /* OpenLicenseDetailViewController.storyboard */, + ); + path = View; + sourceTree = ""; + }; C53577282754D02400EAA660 /* WebView */ = { isa = PBXGroup; children = ( @@ -841,6 +886,14 @@ path = View; sourceTree = ""; }; + C599740927D992B1006F5AAC /* Cell */ = { + isa = PBXGroup; + children = ( + C599740A27D992E9006F5AAC /* OpenLicenseTableViewCell.swift */, + ); + path = Cell; + sourceTree = ""; + }; ETCUTRCSRVUF3YT1U0HUMDJ4 /* Splash */ = { isa = PBXGroup; children = ( @@ -1048,7 +1101,9 @@ buildActionMask = 2147483647; files = ( C53577372758AC1100EAA660 /* WebViewController.storyboard in Resources */, + C50CF79027D870720042C210 /* OpenLicenseViewController.storyboard in Resources */, BDEB7D8E23F5293900EFAF31 /* Podfile in Resources */, + C599740F27D9E64E006F5AAC /* OpenLicenseDetailViewController.storyboard in Resources */, BDA1833123F41A4C00C9A6DD /* Images.xcassets in Resources */, BDA1831F23F3FD8000C9A6DD /* LaunchScreen.storyboard in Resources */, BDA1831C23F3FD8000C9A6DD /* Assets.xcassets in Resources */, @@ -1222,6 +1277,7 @@ BD7A8009241A16B90040B418 /* NotificationParser.swift in Sources */, BDEE85F82408A887006A6BF7 /* MainTabBarViewController.swift in Sources */, BD71FA4B24C15FEE00C054C9 /* FormBuilder.swift in Sources */, + C599740827D992A5006F5AAC /* OpenLicenseTableViewController.swift in Sources */, 3AA9579E2463B14700AD05DC /* SearchRequest.swift in Sources */, 761F49E2255511A1007708D8 /* NumberUtility.swift in Sources */, 76D1C0DF25E38D0A004DF611 /* GetServiceInfoEndpoint.swift in Sources */, @@ -1233,6 +1289,7 @@ BD6C1AE624A474050057756F /* GetDeviceEndpoint.swift in Sources */, BD71FA3E24C140F900C054C9 /* MainTabBarViewBuilder.swift in Sources */, R6H04H001ZF9O1R6J8L87VB3 /* LoginPresenter.swift in Sources */, + C599740D27D9E634006F5AAC /* OpenLicenseDetailViewController.swift in Sources */, BD86A6B124067EB3007B48F1 /* APIResult.swift in Sources */, BDAB1F71240D0E5C00EA15FD /* GetSessionEndpoint.swift in Sources */, 3AA9579C2463AB2700AD05DC /* PostSearchItemEndpoint.swift in Sources */, @@ -1245,6 +1302,7 @@ 76D1DC1E2592FE3400429C70 /* GetDocumentInfoEndpoint.swift in Sources */, 3A1F975424AF2D6700AE6A42 /* ModalFullCollectionViewController.swift in Sources */, BD8D55D92420609000A667B0 /* XCGLoggerExtensions.swift in Sources */, + C599740B27D992E9006F5AAC /* OpenLicenseTableViewCell.swift in Sources */, 76AE533325D37B0200AFA45A /* LicenseViewPresenter.swift in Sources */, 76CEA0542511A36E0074837A /* WfAction.swift in Sources */, 76AE530725D3652400AFA45A /* LicenseViewBuilder.swift in Sources */, @@ -1265,12 +1323,14 @@ 3AED7EE42449387600FC6BCC /* SearchResponse.swift in Sources */, 76AE530025D3626800AFA45A /* LicenseViewController.swift in Sources */, BDAB1F6D240D0D0000EA15FD /* UserDefaultsExtensions.swift in Sources */, + C50CF78E27D86DC90042C210 /* OpenLicenseBuilder.swift in Sources */, 76C7AA02250B05CA000A0FE6 /* SubWebViewStack.swift in Sources */, BD969631240C9CD400521925 /* SessionInfo.swift in Sources */, BD928CCE2407500400ED04C2 /* UserDefaultsDataStore.swift in Sources */, BD5061B4242866780014F3FA /* Configuration.swift in Sources */, 76AE52DD25D35CDC00AFA45A /* LicenseUtility.swift in Sources */, BDAB1F6F240D0D1400EA15FD /* APIEndpoint.swift in Sources */, + C50CF79227D8708B0042C210 /* OpenLicenseViewController.swift in Sources */, 761F4A49255D15DA007708D8 /* AppShared.swift in Sources */, BD6C1AEA24A4775C0057756F /* UIDeviceExtensions.swift in Sources */, BD72589F240E69E000928CE9 /* OAuthService.swift in Sources */, @@ -1743,7 +1803,7 @@ BD10D30C24E39AA400A0DFDC /* Debug-Production */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = "Release-Production"; + defaultConfigurationName = "Debug-Production"; }; 7672AD76257EFF500063884A /* Build configuration list for PBXNativeTarget "ShareExtension" */ = { isa = XCConfigurationList; @@ -1752,7 +1812,7 @@ 7672AD75257EFF500063884A /* Debug-Production */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = "Release-Production"; + defaultConfigurationName = "Debug-Production"; }; BDA1830A23F3FD7F00C9A6DD /* Build configuration list for PBXProject "AgileWorks" */ = { isa = XCConfigurationList; @@ -1761,7 +1821,7 @@ BD10D30A24E39AA400A0DFDC /* Debug-Production */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = "Release-Production"; + defaultConfigurationName = "Debug-Production"; }; BDA1832323F3FD8000C9A6DD /* Build configuration list for PBXNativeTarget "AgileWorks" */ = { isa = XCConfigurationList; @@ -1770,7 +1830,7 @@ BD10D30B24E39AA400A0DFDC /* Debug-Production */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = "Release-Production"; + defaultConfigurationName = "Debug-Production"; }; /* End XCConfigurationList section */ }; diff --git a/AgileWorks/AgileWorks/OpenLicense/Builder/OpenLicenseBuilder.swift b/AgileWorks/AgileWorks/OpenLicense/Builder/OpenLicenseBuilder.swift new file mode 100644 index 0000000..0b7c039 --- /dev/null +++ b/AgileWorks/AgileWorks/OpenLicense/Builder/OpenLicenseBuilder.swift @@ -0,0 +1,44 @@ +// +// OpenLicenseBuilder.swift +// AgileWorks +// +// Created by Gk40002148 on 2022/03/09. +// Copyright © 2022 ATLED CORP. All rights reserved. +// + +import UIKit + +protocol OpenLicenseBuilder { + func build() -> UINavigationController +} + +struct OpenLicenseBuilderImpl: OpenLicenseBuilder { + let naviIdentifier = "OpenLicenseNavigationController" + let identifier = "OpenLicenseViewController" + + func build() -> UINavigationController { + let viewController = storyboard() + + let naviController = storyboardNavigation() + naviController.setViewControllers([viewController], animated: false) + + return naviController + } +} + +extension OpenLicenseBuilderImpl { + private func storyboardNavigation() -> UINavigationController { + let storyboard = mainStoryboard() + let viewController = storyboard.instantiateViewController(withIdentifier: naviIdentifier) as! UINavigationController + return viewController + } + private func storyboard() -> OpenLicenseViewController { + let storyboard = UIStoryboard(name: identifier, bundle: Bundle.main) + let viewController = storyboard.instantiateViewController(withIdentifier: identifier) as! OpenLicenseViewController + return viewController + } + private func mainStoryboard() -> UIStoryboard { + let storyboard = UIStoryboard(name: identifier, bundle: nil) + return storyboard + } +} diff --git a/AgileWorks/AgileWorks/OpenLicense/Cell/OpenLicenseTableViewCell.swift b/AgileWorks/AgileWorks/OpenLicense/Cell/OpenLicenseTableViewCell.swift new file mode 100644 index 0000000..206c90a --- /dev/null +++ b/AgileWorks/AgileWorks/OpenLicense/Cell/OpenLicenseTableViewCell.swift @@ -0,0 +1,23 @@ +// +// OpenLicenseTableViewCell.swift +// AgileWorks +// +// Created by Gk40002148 on 2022/03/10. +// Copyright © 2022 ATLED CORP. All rights reserved. +// + +import UIKit + +class OpenLicenseTableViewCell: UITableViewCell { + @IBOutlet private var license: UILabel! + + override func awakeFromNib() { + super.awakeFromNib() + } + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + } + func configure(license: String) { + self.license.text = license + } +} diff --git a/AgileWorks/AgileWorks/OpenLicense/View/OpenLicenseDetailViewController.storyboard b/AgileWorks/AgileWorks/OpenLicense/View/OpenLicenseDetailViewController.storyboard new file mode 100644 index 0000000..ceb7598 --- /dev/null +++ b/AgileWorks/AgileWorks/OpenLicense/View/OpenLicenseDetailViewController.storyboard @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AgileWorks/AgileWorks/OpenLicense/View/OpenLicenseDetailViewController.swift b/AgileWorks/AgileWorks/OpenLicense/View/OpenLicenseDetailViewController.swift new file mode 100644 index 0000000..e8cdf45 --- /dev/null +++ b/AgileWorks/AgileWorks/OpenLicense/View/OpenLicenseDetailViewController.swift @@ -0,0 +1,25 @@ +// +// OpenLicenseDetailViewController.swift +// AgileWorks +// +// Created by Gk40002148 on 2022/03/10. +// Copyright © 2022 ATLED CORP. All rights reserved. +// + +import UIKit + +class OpenLicenseDetailViewController: UIViewController { + @IBOutlet private var detailContentsText: UITextView! + private var contentsText: String! + let stringAttributes: [NSAttributedString.Key: Any] = [ + .font: UIFont.systemFont(ofSize: 12) + ] + + func inject(contentsText: String) { + self.contentsText = contentsText + } + override func viewDidLoad() { + super.viewDidLoad() + detailContentsText.attributedText = NSAttributedString(string: contentsText, attributes: stringAttributes) + } +} diff --git a/AgileWorks/AgileWorks/OpenLicense/View/OpenLicenseTableViewController.swift b/AgileWorks/AgileWorks/OpenLicense/View/OpenLicenseTableViewController.swift new file mode 100644 index 0000000..b14cf31 --- /dev/null +++ b/AgileWorks/AgileWorks/OpenLicense/View/OpenLicenseTableViewController.swift @@ -0,0 +1,90 @@ +// +// OpenLicenseTableViewController.swift +// AgileWorks +// +// Created by Gk40002148 on 2022/03/10. +// Copyright © 2022 ATLED CORP. All rights reserved. +// + +import UIKit + +class OpenLicenseTableViewController: UITableViewController { + // 共通のパス + private let licensePlistPath = "./Settings.bundle/com.mono0926.LicensePlist" + private let fileManager = FileManager.default + // com.mono0926.LicensePlist OSS ファイル名 一覧 + private var openLicenseList: [String] = [] + // OSS 詳細 + // key : ファイル名 + // val : 詳細 + private var contentsList: [String: String] = [:] + + override func viewDidLoad() { + super.viewDidLoad() + self.setupLibraryList() + } + // Section 数設定 + override func numberOfSections(in tableView: UITableView) -> Int { + return 1 + } + // List 行数設定 + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return openLicenseList.count + } + // Cell 高さ設定 + override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 40 + } + // Cell 生成 + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "OpenLicenseTableViewCell") as! OpenLicenseTableViewCell + + cell.configure(license: openLicenseList[indexPath.row]) + return cell + } + // Cell 選択時処理 + override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + let storyboard = UIStoryboard(name: "OpenLicenseDetailViewController", bundle: nil) + let viewController = storyboard.instantiateViewController(withIdentifier: "OpenLicenseDetailViewController") as! OpenLicenseDetailViewController + // OSS 名を取得し、詳細情報を表示 + let licenseName = openLicenseList[indexPath.row] + viewController.inject(contentsText: contentsList[licenseName] ?? "") + self.navigationController?.pushViewController(viewController, animated: true) + // Cell 選択解除 + self.tableView.deselectRow(at: indexPath, animated: true) + } + // OSS 一覧取得 + private func setupLibraryList() { + if let path: String = Bundle.main.path(forResource: licensePlistPath, ofType: "") { + do { + // OSS PList 一覧取得 + let files = try fileManager.contentsOfDirectory(atPath: path) + files.forEach { + var libraryName = "" + var libraryDetail = "" + + // .plistが含まれるため、名前だけにする + let temp = $0.split(separator: ".") + libraryName = String(temp.first ?? "") + + let searchPath = licensePlistPath + "/" + $0 + + let filePath = Bundle.main.path(forResource: searchPath, ofType: nil) + // OSS 詳細取得 + if let infoList = NSMutableDictionary(contentsOfFile: filePath!) { + let data = infoList.value(forKeyPath: "PreferenceSpecifiers") as? [[String: String]] + if let footerData = data![0]["FooterText"] { + libraryDetail = String(describing: footerData) + } + } + openLicenseList.append(libraryName) + contentsList[libraryName] = libraryDetail + } + // OSS をアルファベット順にソート + openLicenseList.sort { $0.lowercased() < $1.lowercased() } + } catch { + log.e(error) + } + } + } +} diff --git a/AgileWorks/AgileWorks/OpenLicense/View/OpenLicenseViewController.storyboard b/AgileWorks/AgileWorks/OpenLicense/View/OpenLicenseViewController.storyboard new file mode 100644 index 0000000..9f54235 --- /dev/null +++ b/AgileWorks/AgileWorks/OpenLicense/View/OpenLicenseViewController.storyboard @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AgileWorks/AgileWorks/OpenLicense/View/OpenLicenseViewController.swift b/AgileWorks/AgileWorks/OpenLicense/View/OpenLicenseViewController.swift new file mode 100644 index 0000000..2768d16 --- /dev/null +++ b/AgileWorks/AgileWorks/OpenLicense/View/OpenLicenseViewController.swift @@ -0,0 +1,28 @@ +// +// OpenLicenseViewController.swift +// AgileWorks +// +// Created by Gk40002148 on 2022/03/09. +// Copyright © 2022 ATLED CORP. All rights reserved. +// + +import UIKit + +class OpenLicenseViewController: UIViewController { + @IBOutlet private var closeButton: UIButton! + + override func viewDidLoad() { + super.viewDidLoad() + + closeButton.setTitle(localizadString(key: "Close", comment: ""), for: .normal) + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + self.navigationItem.title = localizadString(key: "OpenLicenseViewTitle", comment: "") + } + + @IBAction private func onCloseButtonTouched(_ sender: UIButton) { + dismiss(animated: true, completion: nil) + } +} diff --git a/AgileWorks/AgileWorks/Settings.bundle/com.mono0926.LicensePlist.latest_result.txt b/AgileWorks/AgileWorks/Settings.bundle/com.mono0926.LicensePlist.latest_result.txt index 3f7308f..a90e920 100644 --- a/AgileWorks/AgileWorks/Settings.bundle/com.mono0926.LicensePlist.latest_result.txt +++ b/AgileWorks/AgileWorks/Settings.bundle/com.mono0926.LicensePlist.latest_result.txt @@ -7,6 +7,10 @@ name: Crashlytics, nameSpecified: body: Fabric: Copyright 20… version: 3.14.0 +name: DropDown, nameSpecified: +body: The MIT License (MIT… +version: 2.3.13 + name: Fabric, nameSpecified: body: Fabric: Copyright 20… version: 1.10.2 @@ -55,6 +59,12 @@ body: … version: 4.3.0 +name: FloatingPanel, nameSpecified: +body: MIT License + +Copyrig… +version: 1.7.5 + name: GoogleAppMeasurement, nameSpecified: body: Copyright 2020 Googl… version: 6.3.0 @@ -74,6 +84,10 @@ body: … version: 6.5.1 +name: KeychainAccess, nameSpecified: +body: The MIT License (MIT… +version: 4.1.0 + name: LicensePlist, nameSpecified: body: MIT License diff --git a/AgileWorks/AgileWorks/Settings.bundle/com.mono0926.LicensePlist.plist b/AgileWorks/AgileWorks/Settings.bundle/com.mono0926.LicensePlist.plist index da9941e..286cfd7 100644 --- a/AgileWorks/AgileWorks/Settings.bundle/com.mono0926.LicensePlist.plist +++ b/AgileWorks/AgileWorks/Settings.bundle/com.mono0926.LicensePlist.plist @@ -26,6 +26,14 @@ Type PSChildPaneSpecifier + + File + com.mono0926.LicensePlist/DropDown + Title + DropDown + Type + PSChildPaneSpecifier + File com.mono0926.LicensePlist/Fabric @@ -106,6 +114,14 @@ Type PSChildPaneSpecifier + + File + com.mono0926.LicensePlist/FloatingPanel + Title + FloatingPanel + Type + PSChildPaneSpecifier + File com.mono0926.LicensePlist/GoogleAppMeasurement @@ -138,6 +154,14 @@ Type PSChildPaneSpecifier + + File + com.mono0926.LicensePlist/KeychainAccess + Title + KeychainAccess + Type + PSChildPaneSpecifier + File com.mono0926.LicensePlist/LicensePlist diff --git a/AgileWorks/AgileWorks/Settings.bundle/com.mono0926.LicensePlist/DropDown.plist b/AgileWorks/AgileWorks/Settings.bundle/com.mono0926.LicensePlist/DropDown.plist new file mode 100644 index 0000000..8b1525f --- /dev/null +++ b/AgileWorks/AgileWorks/Settings.bundle/com.mono0926.LicensePlist/DropDown.plist @@ -0,0 +1,35 @@ + + + + + PreferenceSpecifiers + + + FooterText + The MIT License (MIT) + +Copyright (c) 2014 kevin-hirsch + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + Type + PSGroupSpecifier + + + + diff --git a/AgileWorks/AgileWorks/Settings.bundle/com.mono0926.LicensePlist/FloatingPanel.plist b/AgileWorks/AgileWorks/Settings.bundle/com.mono0926.LicensePlist/FloatingPanel.plist new file mode 100644 index 0000000..f3d65a6 --- /dev/null +++ b/AgileWorks/AgileWorks/Settings.bundle/com.mono0926.LicensePlist/FloatingPanel.plist @@ -0,0 +1,35 @@ + + + + + PreferenceSpecifiers + + + FooterText + MIT License + +Copyright (c) 2018 Shin Yamamoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + Type + PSGroupSpecifier + + + + diff --git a/AgileWorks/AgileWorks/Settings.bundle/com.mono0926.LicensePlist/KeychainAccess.plist b/AgileWorks/AgileWorks/Settings.bundle/com.mono0926.LicensePlist/KeychainAccess.plist new file mode 100644 index 0000000..194ceb6 --- /dev/null +++ b/AgileWorks/AgileWorks/Settings.bundle/com.mono0926.LicensePlist/KeychainAccess.plist @@ -0,0 +1,37 @@ + + + + + PreferenceSpecifiers + + + FooterText + The MIT License (MIT) + +Copyright (c) 2014 kishikawa katsumi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + Type + PSGroupSpecifier + + + + diff --git a/AgileWorks/AgileWorks/Strings/Chinese-Simplified.strings b/AgileWorks/AgileWorks/Strings/Chinese-Simplified.strings index 5112996..cf25da7 100644 --- a/AgileWorks/AgileWorks/Strings/Chinese-Simplified.strings +++ b/AgileWorks/AgileWorks/Strings/Chinese-Simplified.strings @@ -40,9 +40,12 @@ "OpenLicenseTitle" = "开放许可证"; // License -"LicenseViewTitle" = "利用許諾"; +"LicenseViewTitle" = "许可证"; "LicenseAccept" = "利用許諾に同意します"; +// Open License +"OpenLicenseViewTitle" = "开放许可证"; + // Approval "ApprovalTitle" = "承認一覧"; "ApprovalData" = "%1$@ (%2$@)"; diff --git a/AgileWorks/AgileWorks/Strings/Chinese-Traditional.strings b/AgileWorks/AgileWorks/Strings/Chinese-Traditional.strings index d598bbf..c43536e 100644 --- a/AgileWorks/AgileWorks/Strings/Chinese-Traditional.strings +++ b/AgileWorks/AgileWorks/Strings/Chinese-Traditional.strings @@ -40,9 +40,12 @@ "OpenLicenseTitle" = "開放許可證"; // License -"LicenseViewTitle" = "利用許諾"; +"LicenseViewTitle" = "授權"; "LicenseAccept" = "利用許諾に同意します"; +// Open License +"OpenLicenseViewTitle" = "開放許可證"; + // Approval "ApprovalTitle" = "承認一覧"; "ApprovalData" = "%1$@ (%2$@)"; diff --git a/AgileWorks/AgileWorks/Strings/English.strings b/AgileWorks/AgileWorks/Strings/English.strings index 3a3f225..6cfee6f 100644 --- a/AgileWorks/AgileWorks/Strings/English.strings +++ b/AgileWorks/AgileWorks/Strings/English.strings @@ -40,9 +40,12 @@ "OpenLicenseTitle" = "Open license"; // License -"LicenseViewTitle" = "利用許諾"; +"LicenseViewTitle" = "License"; "LicenseAccept" = "利用許諾に同意します"; +// Open License +"OpenLicenseViewTitle" = "Open license"; + // Approval "ApprovalTitle" = "承認一覧"; "ApprovalData" = "%1$@ (%2$@)"; diff --git a/AgileWorks/AgileWorks/Strings/Japanese.strings b/AgileWorks/AgileWorks/Strings/Japanese.strings index 808d00b..63ef4a6 100644 --- a/AgileWorks/AgileWorks/Strings/Japanese.strings +++ b/AgileWorks/AgileWorks/Strings/Japanese.strings @@ -43,6 +43,9 @@ "LicenseViewTitle" = "利用許諾"; "LicenseAccept" = "利用許諾に同意します"; +// Open License +"OpenLicenseViewTitle" = "オープンソースライセンス"; + // Approval "ApprovalTitle" = "承認一覧"; "ApprovalData" = "%1$@ (%2$@)"; diff --git a/AgileWorks/AgileWorks/Strings/en.lproj/Localizable.strings b/AgileWorks/AgileWorks/Strings/en.lproj/Localizable.strings index eba399d..9173a41 100644 --- a/AgileWorks/AgileWorks/Strings/en.lproj/Localizable.strings +++ b/AgileWorks/AgileWorks/Strings/en.lproj/Localizable.strings @@ -40,9 +40,12 @@ "OpenLicenseTitle" = "Open license"; // License -"LicenseViewTitle" = "利用許諾"; +"LicenseViewTitle" = "License"; "LicenseAccept" = "利用許諾に同意します"; +// Open License +"OpenLicenseViewTitle" = "Open license"; + // Approval "ApprovalTitle" = "承認一覧"; "ApprovalData" = "%1$@ (%2$@)"; diff --git a/AgileWorks/AgileWorks/Strings/ja.lproj/Localizable.strings b/AgileWorks/AgileWorks/Strings/ja.lproj/Localizable.strings index 39d1811..ec93462 100644 --- a/AgileWorks/AgileWorks/Strings/ja.lproj/Localizable.strings +++ b/AgileWorks/AgileWorks/Strings/ja.lproj/Localizable.strings @@ -43,6 +43,9 @@ "LicenseViewTitle" = "利用許諾"; "LicenseAccept" = "利用許諾に同意します"; +// Open License +"OpenLicenseViewTitle" = "オープンソースライセンス"; + // Approval "ApprovalTitle" = "承認一覧"; "ApprovalData" = "%1$@ (%2$@)"; diff --git a/AgileWorks/AgileWorks/Strings/zh-Hans.lproj/Localizable.strings b/AgileWorks/AgileWorks/Strings/zh-Hans.lproj/Localizable.strings index 450f32a..52ff48b 100644 --- a/AgileWorks/AgileWorks/Strings/zh-Hans.lproj/Localizable.strings +++ b/AgileWorks/AgileWorks/Strings/zh-Hans.lproj/Localizable.strings @@ -40,9 +40,12 @@ "OpenLicenseTitle" = "开放许可证"; // License -"LicenseViewTitle" = "利用許諾"; +"LicenseViewTitle" = "许可证"; "LicenseAccept" = "利用許諾に同意します"; +// Open License +"OpenLicenseViewTitle" = "开放许可证"; + // Approval "ApprovalTitle" = "承認一覧"; "ApprovalData" = "%1$@ (%2$@)"; diff --git a/AgileWorks/AgileWorks/Strings/zh-Hant.lproj/Localizable.strings b/AgileWorks/AgileWorks/Strings/zh-Hant.lproj/Localizable.strings index ba872a9..e7a5059 100644 --- a/AgileWorks/AgileWorks/Strings/zh-Hant.lproj/Localizable.strings +++ b/AgileWorks/AgileWorks/Strings/zh-Hant.lproj/Localizable.strings @@ -40,9 +40,12 @@ "OpenLicenseTitle" = "開放許可證"; // License -"LicenseViewTitle" = "利用許諾"; +"LicenseViewTitle" = "授權"; "LicenseAccept" = "利用許諾に同意します"; +// Open License +"OpenLicenseViewTitle" = "開放許可證"; + // Approval "ApprovalTitle" = "承認一覧"; "ApprovalData" = "%1$@ (%2$@)"; diff --git a/AgileWorks/AgileWorks/WebView/View/MenuTableViewController.swift b/AgileWorks/AgileWorks/WebView/View/MenuTableViewController.swift index 089859e..4cf1861 100644 --- a/AgileWorks/AgileWorks/WebView/View/MenuTableViewController.swift +++ b/AgileWorks/AgileWorks/WebView/View/MenuTableViewController.swift @@ -76,6 +76,13 @@ class MenuTableViewController: UITableViewController { // オープンソースライセンスセルタップ処理 private func pushToOpenLicense() { // オープンソースライセンスタップ時処理 - print("オープンソースライセンス タップ") + let openLicense = OpenLicenseBuilderImpl().build() + openLicense.modalPresentationStyle = .overFullScreen + openLicense.modalTransitionStyle = .crossDissolve + self.present(openLicense, animated: false, completion: nil) + // セルの選択解除 + if let indexPath = self.tableView.indexPath(for: self.openLicenseCell) { + self.tableView.deselectRow(at: indexPath, animated: true) + } } } -- GitLab