diff --git a/AgileWorks/AgileWorks.xcodeproj/project.pbxproj b/AgileWorks/AgileWorks.xcodeproj/project.pbxproj index 10691b20fcf45ac6af5be1619e51502229b83c45..5c044bcc696830a87660c69451c1d99bed40e381 100644 --- a/AgileWorks/AgileWorks.xcodeproj/project.pbxproj +++ b/AgileWorks/AgileWorks.xcodeproj/project.pbxproj @@ -43,6 +43,10 @@ 75917FB527C371390051E201 /* StringsUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75917FB227C371390051E201 /* StringsUtility.swift */; }; 75917FB627C372C80051E201 /* XCGLoggerExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD8D55D82420609000A667B0 /* XCGLoggerExtensions.swift */; }; 75917FB727C373060051E201 /* UserDefaultsExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAB1F6C240D0D0000EA15FD /* UserDefaultsExtensions.swift */; }; + 75BC052D29ECE87500E21941 /* ServerSwitchingBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75BC052C29ECE87500E21941 /* ServerSwitchingBuilder.swift */; }; + 75BC052F29ECE8AC00E21941 /* ServerSwitchingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75BC052E29ECE8AC00E21941 /* ServerSwitchingViewController.swift */; }; + 75BC053229ED087000E21941 /* ServerSwitchingViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 75BC053129ED087000E21941 /* ServerSwitchingViewController.storyboard */; }; + 75BC053429EDA23700E21941 /* MordalViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75BC053329EDA23700E21941 /* MordalViewController.swift */; }; 75EDD2272806618A0068B4BC /* WidgetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EDD2262806618A0068B4BC /* WidgetView.swift */; }; 75EDD2282806618A0068B4BC /* WidgetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EDD2262806618A0068B4BC /* WidgetView.swift */; }; 75EDD2292806618A0068B4BC /* WidgetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EDD2262806618A0068B4BC /* WidgetView.swift */; }; @@ -244,6 +248,10 @@ 75917F9F27BDF2050051E201 /* Chinese-Simplified.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = "Chinese-Simplified.strings"; sourceTree = ""; }; 75917FA127BDF2250051E201 /* Chinese-Traditional.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = "Chinese-Traditional.strings"; sourceTree = ""; }; 75917FB227C371390051E201 /* StringsUtility.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringsUtility.swift; sourceTree = ""; }; + 75BC052C29ECE87500E21941 /* ServerSwitchingBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerSwitchingBuilder.swift; sourceTree = ""; }; + 75BC052E29ECE8AC00E21941 /* ServerSwitchingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerSwitchingViewController.swift; sourceTree = ""; }; + 75BC053129ED087000E21941 /* ServerSwitchingViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = ServerSwitchingViewController.storyboard; sourceTree = ""; }; + 75BC053329EDA23700E21941 /* MordalViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MordalViewController.swift; sourceTree = ""; }; 75EDD2262806618A0068B4BC /* WidgetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidgetView.swift; sourceTree = ""; }; 75EF9CAC27E9E983003178A3 /* WidgetExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = WidgetExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 75EF9CAD27E9E983003178A3 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; }; @@ -481,6 +489,33 @@ path = Strings; sourceTree = ""; }; + 75BC052729ECE1FB00E21941 /* ServerSwitching */ = { + isa = PBXGroup; + children = ( + 75BC052829ECE2F500E21941 /* Builder */, + 75BC052929ECE30900E21941 /* View */, + ); + path = ServerSwitching; + sourceTree = ""; + }; + 75BC052829ECE2F500E21941 /* Builder */ = { + isa = PBXGroup; + children = ( + 75BC052C29ECE87500E21941 /* ServerSwitchingBuilder.swift */, + ); + path = Builder; + sourceTree = ""; + }; + 75BC052929ECE30900E21941 /* View */ = { + isa = PBXGroup; + children = ( + 75BC052E29ECE8AC00E21941 /* ServerSwitchingViewController.swift */, + 75BC053129ED087000E21941 /* ServerSwitchingViewController.storyboard */, + 75BC053329EDA23700E21941 /* MordalViewController.swift */, + ); + path = View; + sourceTree = ""; + }; 75EF9CB127E9E983003178A3 /* WidgetExtension */ = { isa = PBXGroup; children = ( @@ -790,6 +825,7 @@ C57DCAA727C8954B000A2ABC /* Profile */, 76AE52DB25D358D700AFA45A /* License */, C50CF78A27D86D760042C210 /* OpenLicense */, + 75BC052729ECE1FB00E21941 /* ServerSwitching */, BDEB7D8D23F5293800EFAF31 /* Podfile */, BDA1832823F406A600C9A6DD /* README.md */, 75917F9A27BDEC880051E201 /* Strings */, @@ -1181,6 +1217,7 @@ C599740F27D9E64E006F5AAC /* OpenLicenseDetailViewController.storyboard in Resources */, BDA1833123F41A4C00C9A6DD /* Images.xcassets in Resources */, BDA1831F23F3FD8000C9A6DD /* LaunchScreen.storyboard in Resources */, + 75BC053229ED087000E21941 /* ServerSwitchingViewController.storyboard in Resources */, C59C21FE282E318100DDF5CC /* License-ja.rtf in Resources */, BDA1831C23F3FD8000C9A6DD /* Assets.xcassets in Resources */, 76AE52D725D358A800AFA45A /* License.rtf in Resources */, @@ -1370,6 +1407,7 @@ BDBBF838243C9EA300EEB25D /* GetApprovalsEndpoint.swift in Sources */, BD7DC0F224C0608800C3FBED /* ErrorResponse.swift in Sources */, C52221BC27FD67EA00494390 /* SubViewStack.swift in Sources */, + 75BC052F29ECE8AC00E21941 /* ServerSwitchingViewController.swift in Sources */, BD7A8007241A16B90040B418 /* DeepLinkParser.swift in Sources */, BD7A8009241A16B90040B418 /* NotificationParser.swift in Sources */, BDEE85F82408A887006A6BF7 /* MainTabBarViewController.swift in Sources */, @@ -1389,6 +1427,8 @@ BD86A6B124067EB3007B48F1 /* APIResult.swift in Sources */, BDAB1F71240D0E5C00EA15FD /* GetSessionEndpoint.swift in Sources */, BDAABA1D24A3627B0077EC69 /* DeviceResponse.swift in Sources */, + 75BC053429EDA23700E21941 /* MordalViewController.swift in Sources */, + 75BC052D29ECE87500E21941 /* ServerSwitchingBuilder.swift in Sources */, BDA1832B23F4079400C9A6DD /* RootViewController.swift in Sources */, C57DCAAE27C89823000A2ABC /* ProfileViewController.swift in Sources */, OZPVEGK5OCQVK53RHNWXAVSG /* LoginViewController.swift in Sources */, diff --git a/AgileWorks/AgileWorks/ServerSwitching/Builder/ServerSwitchingBuilder.swift b/AgileWorks/AgileWorks/ServerSwitching/Builder/ServerSwitchingBuilder.swift new file mode 100644 index 0000000000000000000000000000000000000000..c40d8c974be303c23be3b03f0d2c95e7e597b500 --- /dev/null +++ b/AgileWorks/AgileWorks/ServerSwitching/Builder/ServerSwitchingBuilder.swift @@ -0,0 +1,32 @@ +// +// ServerSwitchingBuilder.swift +// AgileWorks +// +// Created by Azuma Kasumi on 2023/04/17. +// Copyright © 2023 ATLED CORP. All rights reserved. +// + +import UIKit + +protocol ServerSwitchingBuilder { + func build() -> UIViewController +} + +struct ServerSwitchingBuilderImpl: ServerSwitchingBuilder { + let identifier = "ServerSwitchingViewController" + + func build() -> UIViewController { + let viewController = storyboard() + + return viewController + } +} + +extension ServerSwitchingBuilderImpl { + private func storyboard() -> ServerSwitchingViewController { + let storyboard = UIStoryboard(name: identifier, bundle: Bundle.main) + let viewController = storyboard.instantiateViewController(withIdentifier: identifier) as! ServerSwitchingViewController + return viewController + } +} + diff --git a/AgileWorks/AgileWorks/ServerSwitching/View/MordalViewController.swift b/AgileWorks/AgileWorks/ServerSwitching/View/MordalViewController.swift new file mode 100644 index 0000000000000000000000000000000000000000..8474044a3d6f7235d1ef89f7a6792cabbb3b7281 --- /dev/null +++ b/AgileWorks/AgileWorks/ServerSwitching/View/MordalViewController.swift @@ -0,0 +1,23 @@ +// +// MordalViewController.swift +// AgileWorks +// +// Created by Azuma Kasumi on 2023/04/18. +// Copyright © 2023 ATLED CORP. All rights reserved. +// + +import UIKit +import FloatingPanel + +class MordalViewController: UIViewController { + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + static func fromStoryboard(_ storyboard: UIStoryboard = UIStoryboard(name: "ServerSwitchingViewController", bundle: nil)) -> MordalViewController { + let controller = storyboard.instantiateViewController(withIdentifier: "MordalViewController") as! MordalViewController + return controller + } +} diff --git a/AgileWorks/AgileWorks/ServerSwitching/View/ServerSwitchingViewController.swift b/AgileWorks/AgileWorks/ServerSwitching/View/ServerSwitchingViewController.swift new file mode 100644 index 0000000000000000000000000000000000000000..3ebe6b991b239771edd58acfb8032deff4c2b077 --- /dev/null +++ b/AgileWorks/AgileWorks/ServerSwitching/View/ServerSwitchingViewController.swift @@ -0,0 +1,106 @@ +// +// ServerSwitchingViewController.swift +// AgileWorks +// +// Created by Azuma Kasumi on 2023/04/17. +// Copyright © 2023 ATLED CORP. All rights reserved. +// + +import UIKit +import FloatingPanel + +class ServerSwitchingViewController: UIViewController, UIGestureRecognizerDelegate { + let fpc = FloatingPanelController() + + override func viewDidLoad() { + super.viewDidLoad() + + //モーダル外の背景色 + self.view.backgroundColor = UIColor.lightGray.withAlphaComponent(0.3) + + //タップ検知 + let tapGesture = UITapGestureRecognizer(target: self, action: #selector(tapped(_:))) + tapGesture.delegate = self + self.view.addGestureRecognizer(tapGesture) + + //モーダルの設定 + fpc.delegate = self + //角丸 + fpc.surfaceView.cornerRadius = 24.0 + //下スワイプで閉じる + fpc.isRemovalInteractionEnabled = true + let mordalVC = MordalViewController.fromStoryboard() + self.view.addSubview(fpc.view) + fpc.set(contentViewController: mordalVC) + fpc.addPanel(toParent: self) + } + + func closeView() { + self.dismiss(animated: true, completion: nil) + } + + //モーダル外タップで閉じる + @objc func tapped(_ sender: UITapGestureRecognizer) { + closeView() + } + + func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool { + if touch.view == self.view { + return true + } + return false + } +} + +extension ServerSwitchingViewController: FloatingPanelControllerDelegate { + // カスタマイズしたレイアウトに変更 + func floatingPanel(_ vc: FloatingPanelController, layoutFor newCollection: UITraitCollection) -> FloatingPanelLayout? { + return CustomFloatingPanelLayout() + } + //モーダルがスワイプ削除される + func floatingPanelDidEndDraggingToRemove(_ vc: FloatingPanelController, withVelocity velocity: CGPoint){ + closeView() + } +} + +class CustomFloatingPanelLayout: FloatingPanelLayout { + // 初期位置 + var initialPosition: FloatingPanelPosition { + return .half + } + + // カスタマイズした高さ + func insetFor(position: FloatingPanelPosition) -> CGFloat? { + switch position { + case .full: return 16.0 + case .half: return 350.0 + case .tip: return 44.0 + default: return nil + } + } + + func prepareLayout(surfaceView: UIView, in view: UIView) -> [NSLayoutConstraint]{ + var screenHeight = UIScreen.main.bounds.height + var screenWidth = UIScreen.main.bounds.width + var mordalWidth = screenWidth + //iPad + if UIDevice.current.userInterfaceIdiom == .pad { + mordalWidth = 500 + } else { //iPhone + //端末が横向き + if screenWidth > screenHeight { + mordalWidth = screenHeight + } + } + + return [ + surfaceView.centerXAnchor.constraint(equalTo: view.centerXAnchor), + surfaceView.widthAnchor.constraint(equalToConstant: mordalWidth), + ] + } + + // サポートするモーダルサイズ + var supportedPositions: Set { + return [.half] + } +} diff --git a/AgileWorks/AgileWorks/ServerSwitching/View/serverSwitchingViewController.storyboard b/AgileWorks/AgileWorks/ServerSwitching/View/serverSwitchingViewController.storyboard new file mode 100644 index 0000000000000000000000000000000000000000..7f04f14b0d25ac04bf00a72ab17cf67aae33a2c3 --- /dev/null +++ b/AgileWorks/AgileWorks/ServerSwitching/View/serverSwitchingViewController.storyboard @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AgileWorks/AgileWorks/Strings/Chinese-Simplified.strings b/AgileWorks/AgileWorks/Strings/Chinese-Simplified.strings index f39da1e1cf100c442fd80a7d1f44a3a624727e5b..7d800c1fef1f3e5275f9938158556beb83e9d36f 100644 --- a/AgileWorks/AgileWorks/Strings/Chinese-Simplified.strings +++ b/AgileWorks/AgileWorks/Strings/Chinese-Simplified.strings @@ -56,6 +56,9 @@ // Open License "OpenLicenseViewTitle" = "开放许可证"; +//server +"ServerTitle" = "接続先サーバー"; + // Notification "DocOverrideConfirm" = "由通知点选的文件已经显示了。\n你想放弃当前的编辑并显示一个新的文件吗?"; diff --git a/AgileWorks/AgileWorks/Strings/Chinese-Traditional.strings b/AgileWorks/AgileWorks/Strings/Chinese-Traditional.strings index de02fa7380691b602ca77b5f0023f23fb9816ea3..4168400356c644fd98ab2db646f41efbd9f155d0 100644 --- a/AgileWorks/AgileWorks/Strings/Chinese-Traditional.strings +++ b/AgileWorks/AgileWorks/Strings/Chinese-Traditional.strings @@ -56,6 +56,9 @@ // Open License "OpenLicenseViewTitle" = "開放許可證"; +//server +"ServerTitle" = "接続先サーバー"; + // Notification "DocOverrideConfirm" = "由通知點選的文件已經顯示了。 \n你想放棄當前的編輯並顯示一個新的文件嗎?"; diff --git a/AgileWorks/AgileWorks/Strings/English.strings b/AgileWorks/AgileWorks/Strings/English.strings index e4bc950a994a503421cdecde94afe88a78e77136..527ffdb2642ecd62b071c7ef9615e68a7e534d1a 100644 --- a/AgileWorks/AgileWorks/Strings/English.strings +++ b/AgileWorks/AgileWorks/Strings/English.strings @@ -56,6 +56,9 @@ // Open License "OpenLicenseViewTitle" = "Open license"; +//server +"ServerTitle" = "接続先サーバー"; + // Notification "DocOverrideConfirm" = "A document by a notification tap is already displayed.\nDo you want to discard the current edits and display a new document?"; diff --git a/AgileWorks/AgileWorks/Strings/Japanese.strings b/AgileWorks/AgileWorks/Strings/Japanese.strings index a4fb0de5af508a02d66a75b1b3b94c722c3abe63..471ddc01a6d000f71367eee3a73c14ddbb5b5e57 100644 --- a/AgileWorks/AgileWorks/Strings/Japanese.strings +++ b/AgileWorks/AgileWorks/Strings/Japanese.strings @@ -56,6 +56,9 @@ // Open License "OpenLicenseViewTitle" = "オープンソースライセンス"; +//server +"ServerTitle" = "接続先サーバー"; + // Notification "DocOverrideConfirm" = "既に通知タップによる書類が表示されています。\n現在の編集内容を破棄し、新たな書類を表示しますか?"; diff --git a/AgileWorks/AgileWorks/Strings/en.lproj/Localizable.strings b/AgileWorks/AgileWorks/Strings/en.lproj/Localizable.strings index e01736386372f869e0fb071ca5ddeb2f1166e749..7f2918a2e7d69ce9492609d16171ed4af02be0b4 100644 --- a/AgileWorks/AgileWorks/Strings/en.lproj/Localizable.strings +++ b/AgileWorks/AgileWorks/Strings/en.lproj/Localizable.strings @@ -56,6 +56,9 @@ // Open License "OpenLicenseViewTitle" = "Open license"; +//server +"ServerTitle" = "接続先サーバー"; + // Notification "DocOverrideConfirm" = "A document by a notification tap is already displayed.\nDo you want to discard the current edits and display a new document?"; diff --git a/AgileWorks/AgileWorks/Strings/ja.lproj/Localizable.strings b/AgileWorks/AgileWorks/Strings/ja.lproj/Localizable.strings index 31e6319a3148ba35ab0d4e742984994f19843b6f..529cfff8a8d8b07de58ac75d4d247b181a69e7bd 100644 --- a/AgileWorks/AgileWorks/Strings/ja.lproj/Localizable.strings +++ b/AgileWorks/AgileWorks/Strings/ja.lproj/Localizable.strings @@ -56,6 +56,9 @@ // Open License "OpenLicenseViewTitle" = "オープンソースライセンス"; +//server +"ServerTitle" = "接続先サーバー"; + // Notification "DocOverrideConfirm" = "既に通知タップによる書類が表示されています。\n現在の編集内容を破棄し、新たな書類を表示しますか?"; diff --git a/AgileWorks/AgileWorks/Strings/zh-Hans.lproj/Localizable.strings b/AgileWorks/AgileWorks/Strings/zh-Hans.lproj/Localizable.strings index 6dc7b16d9397e0b3d69d30a8164c3c48bf11f59f..19b2444df76dbd54b4aefb82dda79dc03ec5a87b 100644 --- a/AgileWorks/AgileWorks/Strings/zh-Hans.lproj/Localizable.strings +++ b/AgileWorks/AgileWorks/Strings/zh-Hans.lproj/Localizable.strings @@ -56,6 +56,9 @@ // Open License "OpenLicenseViewTitle" = "开放许可证"; +//server +"ServerTitle" = "接続先サーバー"; + // Notification "DocOverrideConfirm" = "由通知点选的文件已经显示了。\n你想放弃当前的编辑并显示一个新的文件吗?"; diff --git a/AgileWorks/AgileWorks/Strings/zh-Hant.lproj/Localizable.strings b/AgileWorks/AgileWorks/Strings/zh-Hant.lproj/Localizable.strings index 6e180c6ebe7a7493c6f4499408d9c571eeb32d77..a4898c37fbfc1b4d4866d677122dd07d3852d53b 100644 --- a/AgileWorks/AgileWorks/Strings/zh-Hant.lproj/Localizable.strings +++ b/AgileWorks/AgileWorks/Strings/zh-Hant.lproj/Localizable.strings @@ -56,6 +56,9 @@ // Open License "OpenLicenseViewTitle" = "開放許可證"; +//server +"ServerTitle" = "接続先サーバー"; + // Notification "DocOverrideConfirm" = "由通知點選的文件已經顯示了。 \n你想放棄當前的編輯並顯示一個新的文件嗎?"; diff --git a/AgileWorks/AgileWorks/WebView/View/MenuTableViewController.swift b/AgileWorks/AgileWorks/WebView/View/MenuTableViewController.swift index 77850b6377c6da78d1e02a382f6469346eeaa2ed..368a19e414ca4a79cc052aebf292e1404cde32f9 100644 --- a/AgileWorks/AgileWorks/WebView/View/MenuTableViewController.swift +++ b/AgileWorks/AgileWorks/WebView/View/MenuTableViewController.swift @@ -16,8 +16,10 @@ class MenuTableViewController: UITableViewController { @IBOutlet private var licenseCell: UITableViewCell! @IBOutlet private var licenseLabel: UILabel! @IBOutlet private var openLicenseCell: UITableViewCell! - @IBOutlet private var openLicenseLable: UILabel! - + @IBOutlet private var openLicenseLabel: UILabel! + @IBOutlet private var serverCell: UITableViewCell! + @IBOutlet private var serverLabel: UILabel! + override func viewDidLoad() { super.viewDidLoad() self.tableView.separatorColor = UIColor(named: getDisplayString(key: "SeparatorColor", comment: "")) @@ -40,6 +42,8 @@ class MenuTableViewController: UITableViewController { self.pushToLicense() } else if let staticIndexPath = tableView.indexPath(for: self.openLicenseCell), staticIndexPath == indexPath { self.pushToOpenLicense() + } else if let staticIndecPath = tableView.indexPath(for: self.serverCell), staticIndecPath == indexPath { + self.pushToServer() } // メニュークローズ if let parent = self.parent as? MenuViewController { @@ -53,7 +57,8 @@ class MenuTableViewController: UITableViewController { self.profileLabel.text = getDisplayString(key: "ProfileTitle", comment: "") self.logoutLabel.text = getDisplayString(key: "LogoutTitle", comment: "") self.licenseLabel.text = getDisplayString(key: "LicenseTitle", comment: "") - self.openLicenseLable.text = getDisplayString(key: "OpenLicenseTitle", comment: "") + self.openLicenseLabel.text = getDisplayString(key: "OpenLicenseTitle", comment: "") + self.serverLabel.text = getDisplayString(key: "ServerTitle", comment: "") } // プロファイルセルタップ処理 private func pushToProfile() { @@ -107,4 +112,17 @@ class MenuTableViewController: UITableViewController { self.tableView.deselectRow(at: indexPath, animated: true) } } + + //接続先サーバーセルタップ処理 + private func pushToServer() { + let serverSwitching = ServerSwitchingBuilderImpl().build() + serverSwitching.modalPresentationStyle = .overFullScreen + serverSwitching.modalTransitionStyle = .crossDissolve + self.present(serverSwitching, animated: false, completion: nil) + + // セルの選択解除 + if let indexPath = self.tableView.indexPath(for: self.serverCell) { + self.tableView.deselectRow(at: indexPath, animated: true) + } + } } diff --git a/AgileWorks/AgileWorks/WebView/View/MenuViewController.swift b/AgileWorks/AgileWorks/WebView/View/MenuViewController.swift index ba9747577d62cef25e01b70c2020562c64fc0394..07e6ba3ba31d449f8190612dbac7fdae0f4405c5 100644 --- a/AgileWorks/AgileWorks/WebView/View/MenuViewController.swift +++ b/AgileWorks/AgileWorks/WebView/View/MenuViewController.swift @@ -11,7 +11,7 @@ import UIKit class MenuViewController: UIViewController { @IBOutlet private var menuView: UIView! @IBOutlet private var nameLabel: UILabel! - + @IBOutlet private var serverLabel: UILabel! override func viewDidLoad() { super.viewDidLoad() @@ -61,14 +61,17 @@ class MenuViewController: UIViewController { // 各種セットアップ private func setup() { self.nameLabel.text = "" + self.serverLabel.text = "" // セッション情報取得 loadSessionInfo { result in switch result { case .success(let response): let userName = response.user.name + let serverName = "サーバー識別名" //TODO response.server.name let sessionId = response.sessionId DispatchQueue.main.async { self.nameLabel.text = userName + self.serverLabel.text = serverName KeychainDataStore().writeSessionID(sessionID: sessionId) } case .failure: diff --git a/AgileWorks/AgileWorks/WebView/View/WebViewController.storyboard b/AgileWorks/AgileWorks/WebView/View/WebViewController.storyboard index 19d9eca851f2e4f6f01c77bb8f1c1bc7dcf3a9be..897f2d648b252cc8cbd3040641fd53084b4d18e6 100644 --- a/AgileWorks/AgileWorks/WebView/View/WebViewController.storyboard +++ b/AgileWorks/AgileWorks/WebView/View/WebViewController.storyboard @@ -1,9 +1,9 @@ - + - + @@ -20,15 +20,15 @@ - +