Skip to content

Commit

Permalink
iPad対応再開
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuz0u committed Jan 5, 2021
1 parent cc94d15 commit 6fadf82
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 36 deletions.
16 changes: 8 additions & 8 deletions EhPanda.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.2;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -421,7 +421,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.2;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
Expand All @@ -438,12 +438,12 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = EhPanda/EhPanda.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = 9SKQ7QTZ74;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = "$(SRCROOT)/EhPanda/アプリ/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.2;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -452,7 +452,7 @@
PRODUCT_BUNDLE_IDENTIFIER = zeng.EhPanda;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
Expand All @@ -463,12 +463,12 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = EhPanda/EhPanda.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = 9SKQ7QTZ74;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = "$(SRCROOT)/EhPanda/アプリ/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.2;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -477,7 +477,7 @@
PRODUCT_BUNDLE_IDENTIFIER = zeng.EhPanda;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
Expand Down
1 change: 0 additions & 1 deletion EhPanda/アプリ/Common.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public func didLogin() -> Bool {
return true
}


public var exx: Bool {
UserDefaults.standard.string(forKey: "entry") == "Rra3MKpjKBJLgraHqt9t"
}
Expand Down
2 changes: 2 additions & 0 deletions EhPanda/アプリ/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"お探しの情報が見つかりませんでした" = "Your search didn't match any docs.";
"やり直す" = "RETRY";
"ネットワーク障害が発生しました\nしばらくしてからもう一度お試しください" = "A Network error occurred.\nPlease try again later.";
"スワイプ" = "SWIPE";
"読みたいものを選択してください" = "Please select at least one to show detail";

// MARK: HomeView
"検索" = "Search";
Expand Down
4 changes: 3 additions & 1 deletion EhPanda/アプリ/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
"読み込み中..." = "加载中...";
"ご利用にはログインが必要です" = "请登陆以使用这个App";
"ログイン" = "登陆";
"お探しの情報が見つかりませんでした" = "未能找到你搜索的信息";
"お探しの情報が見つかりませんでした" = "未能找到你需要的信息";
"やり直す" = "重试";
"ネットワーク障害が発生しました\nしばらくしてからもう一度お試しください" = "网络发生故障\n请稍后再试";
"スワイプ" = "划动屏幕";
"読みたいものを選択してください" = "请至少选择一项以查看详情";

// MARK: HomeView
"検索" = "搜索";
Expand Down
47 changes: 23 additions & 24 deletions EhPanda/ビュー/DetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -163,27 +163,28 @@ private struct DescScrollView: View {
let detail: MangaDetail

var body: some View {
HStack(alignment: .center) {
DescScrollItem(title: "気に入り".lString(),
value: detail.likeCount,
numeral: "".lString())
Spacer()
DescScrollItem(title: "言語".lString(),
value: detail.languageAbbr,
numeral: detail.translatedLanguage.lString())
Spacer()
DescScrollRatingItem(title: detail.ratingCount + "件の評価".lString(),
rating: manga.rating)
Spacer()
DescScrollItem(title: "ページ".lString(),
value: detail.pageCount,
numeral: "".lString())
Spacer()
DescScrollItem(title: "サイズ".lString(),
value: detail.sizeCount,
numeral: detail.sizeType)
ScrollView(.horizontal, showsIndicators: false) {
HStack(alignment: .center) {
DescScrollItem(title: "気に入り".lString(),
value: detail.likeCount,
numeral: "".lString())
Divider()
DescScrollItem(title: "言語".lString(),
value: detail.languageAbbr,
numeral: detail.translatedLanguage.lString())
Divider()
DescScrollRatingItem(title: detail.ratingCount + "件の評価".lString(),
rating: manga.rating)
Divider()
DescScrollItem(title: "ページ".lString(),
value: detail.pageCount,
numeral: "".lString())
Divider()
DescScrollItem(title: "サイズ".lString(),
value: detail.sizeCount,
numeral: detail.sizeType)
}
}
.padding(.horizontal)
}
}

Expand All @@ -203,8 +204,7 @@ private struct DescScrollItem: View {
Text(numeral)
.font(.caption)
}
.fixedSize()
.frame(maxWidth: 50)
.frame(minWidth: 80)
}
}

Expand All @@ -222,8 +222,7 @@ private struct DescScrollRatingItem: View {
.font(.title3)
RatingView(rating: rating, .primary)
}
.fixedSize()
.frame(maxWidth: 60)
.frame(minWidth: 80)
}
}

Expand Down
3 changes: 1 addition & 2 deletions EhPanda/ビュー/HomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,8 @@ struct HomeView: View {
}
}
}

)
.navigationViewStyle(StackNavigationViewStyle())
SecondaryView()
}
}
}
Expand Down
33 changes: 33 additions & 0 deletions EhPanda/ビュー/ツール/AlertView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,36 @@ struct GenericRetryView: View {
}
}
}

struct SecondaryView: View {
@State var showTips = false

var body: some View {
ZStack {
if showTips {
HStack {
VStack {
Text("スワイプ")
Image(systemName: "arrow.right")
.font(.system(size: 80))
Text("スワイプ")
}
Spacer()
}
}
VStack {
Image(systemName: "arrow.left.circle.fill")
.font(.system(size: 100))
.padding(.bottom, 30)
Text("読みたいものを選択してください")
.fontWeight(.bold)
.font(.title)
}
}
.onTapGesture {
withAnimation {
showTips.toggle()
}
}
}
}

0 comments on commit 6fadf82

Please sign in to comment.