Skip to content

Commit

Permalink
Merge pull request #145 from tatsuz0u/develop
Browse files Browse the repository at this point in the history
Lots of features
  • Loading branch information
tatsuz0u committed Sep 25, 2021
2 parents 759b678 + 42f5feb commit ff790bd
Show file tree
Hide file tree
Showing 38 changed files with 902 additions and 273 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
types: [closed]
env:
DEVELOPER_DIR: /Applications/Xcode_13.0.app
APP_VERSION: '1.2.2'
APP_VERSION: '1.3.0'
SCHEME_NAME: 'EhPanda'
ALTSTORE_JSON_PATH: './AltStore.json'
BUILDS_PATH: '/tmp/action-builds'
Expand Down
25 changes: 24 additions & 1 deletion EhPanda.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
ABE1867826A1733000689FDC /* LaboratorySettingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABE1867726A1733000689FDC /* LaboratorySettingView.swift */; };
ABE1867F26A18DD000689FDC /* SwiftyBeaver in Frameworks */ = {isa = PBXBuildFile; productRef = ABE1867E26A18DD000689FDC /* SwiftyBeaver */; };
ABE2AE752699F238001D47AA /* AppEnvStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABE2AE742699F238001D47AA /* AppEnvStorage.swift */; };
ABE9401526FF158D0085E158 /* QuickSearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABE9401426FF158D0085E158 /* QuickSearchView.swift */; };
ABE9402D26FF89220085E158 /* AlertKit in Frameworks */ = {isa = PBXBuildFile; productRef = ABE9402C26FF89220085E158 /* AlertKit */; };
ABEA1FE625A9B40B002966B9 /* Setting.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABEA1FE525A9B40B002966B9 /* Setting.swift */; };
ABEE0AFA2595C6F800C997AE /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = ABEE0AFC2595C6F800C997AE /* Localizable.strings */; };
ABF313A525B1AB6600D47A2F /* Misc.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABF313A425B1AB6600D47A2F /* Misc.swift */; };
Expand Down Expand Up @@ -238,6 +240,8 @@
ABE2AE742699F238001D47AA /* AppEnvStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppEnvStorage.swift; sourceTree = "<group>"; };
ABE9376C265DCD9400EA8B30 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/Localizable.strings"; sourceTree = "<group>"; };
ABE9376D265DCD9400EA8B30 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
ABE9401426FF158D0085E158 /* QuickSearchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuickSearchView.swift; sourceTree = "<group>"; };
ABE9401626FF2E610085E158 /* Model 4.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Model 4.xcdatamodel"; sourceTree = "<group>"; };
ABEA1FE525A9B40B002966B9 /* Setting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Setting.swift; sourceTree = "<group>"; };
ABEE0AFB2595C6F800C997AE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
ABEE0AFE2595C73D00C997AE /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -293,6 +297,7 @@
files = (
ABD7005926B1C31500DC59C9 /* Kanna in Frameworks */,
AB19D619266E5C6700BA752A /* TTProgressHUD in Frameworks */,
ABE9402D26FF89220085E158 /* AlertKit in Frameworks */,
AB0F68AF26A6D92F00AC3A54 /* DeprecatedAPI in Frameworks */,
ABB944DD26DBBB1800C365C1 /* Kingfisher in Frameworks */,
AB6505A026B0027800F91E9D /* SwiftUIPager in Frameworks */,
Expand Down Expand Up @@ -563,6 +568,7 @@
ABF45AC225F3313D00ECB568 /* HomeView.swift */,
ABF45AC125F3313D00ECB568 /* FilterView.swift */,
ABF45AC425F3313D00ECB568 /* AuthView.swift */,
ABE9401426FF158D0085E158 /* QuickSearchView.swift */,
);
path = Home;
sourceTree = "<group>";
Expand Down Expand Up @@ -675,6 +681,7 @@
ABD4032326B6EC6800001B8C /* WaterfallGrid */,
ABAC82FD26BC4A96009F5026 /* OpenCC */,
ABB944DC26DBBB1800C365C1 /* Kingfisher */,
ABE9402C26FF89220085E158 /* AlertKit */,
);
productName = EhPanda;
productReference = ABC3C7542593696C00E0C11B /* EhPanda.app */;
Expand Down Expand Up @@ -743,6 +750,7 @@
ABD4032226B6EC6800001B8C /* XCRemoteSwiftPackageReference "WaterfallGrid" */,
ABAC82FC26BC4866009F5026 /* XCRemoteSwiftPackageReference "SwiftyOpenCC" */,
ABB944DB26DBBB1800C365C1 /* XCRemoteSwiftPackageReference "Kingfisher" */,
ABE9402B26FF89220085E158 /* XCRemoteSwiftPackageReference "AlertKit" */,
);
productRefGroup = ABC3C7552593696C00E0C11B /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -881,6 +889,7 @@
ABAFFE4026A86E3000EE8661 /* MeasureTool.swift in Sources */,
AB6DE897268822390087C579 /* LogsView.swift in Sources */,
AB7B29F226AC471E00EE1F14 /* MigrationPolicy.swift in Sources */,
ABE9401526FF158D0085E158 /* QuickSearchView.swift in Sources */,
ABF45AF025F3313D00ECB568 /* CommentView.swift in Sources */,
ABF45AE325F3313D00ECB568 /* SlideMenu.swift in Sources */,
ABF45AE225F3313D00ECB568 /* AuthView.swift in Sources */,
Expand Down Expand Up @@ -1361,6 +1370,14 @@
kind = branch;
};
};
ABE9402B26FF89220085E158 /* XCRemoteSwiftPackageReference "AlertKit" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/tatsuz0u/AlertKit.git";
requirement = {
branch = custom;
kind = branch;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
Expand Down Expand Up @@ -1409,17 +1426,23 @@
package = ABE1867D26A18DD000689FDC /* XCRemoteSwiftPackageReference "SwiftyBeaver" */;
productName = SwiftyBeaver;
};
ABE9402C26FF89220085E158 /* AlertKit */ = {
isa = XCSwiftPackageProductDependency;
package = ABE9402B26FF89220085E158 /* XCRemoteSwiftPackageReference "AlertKit" */;
productName = AlertKit;
};
/* End XCSwiftPackageProductDependency section */

/* Begin XCVersionGroup section */
ABC681F126898D46007BBD69 /* Model.xcdatamodeld */ = {
isa = XCVersionGroup;
children = (
ABE9401626FF2E610085E158 /* Model 4.xcdatamodel */,
AB543FF126DB7FD9009344C0 /* Model 3.xcdatamodel */,
AB48BCF626D2539B0021A06C /* Model 2.xcdatamodel */,
ABC681F226898D46007BBD69 /* Model.xcdatamodel */,
);
currentVersion = AB543FF126DB7FD9009344C0 /* Model 3.xcdatamodel */;
currentVersion = ABE9401626FF2E610085E158 /* Model 4.xcdatamodel */;
path = Model.xcdatamodeld;
sourceTree = "<group>";
versionGroupType = wrapper.xcdatamodel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{
"object": {
"pins": [
{
"package": "AlertKit",
"repositoryURL": "https://github.com/tatsuz0u/AlertKit.git",
"state": {
"branch": "custom",
"revision": "fbac9b1c800929b0938e223498e00e73cd71b582",
"version": null
}
},
{
"package": "BetterCodable",
"repositoryURL": "https://github.com/marksands/BetterCodable",
Expand Down
68 changes: 41 additions & 27 deletions EhPanda/App/Defaults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,64 +149,78 @@ struct Defaults {
// MARK: Request
extension Defaults.URL {
// Fetch
static func searchList(keyword: String, filter: Filter) -> String {
merge(urls: [
host, fSearch
+ keyword.urlEncoded()
]
+ applyFilters(filter: filter)
)
static func searchList(keyword: String, filter: Filter, pageNum: Int? = nil) -> String {
var params = [host, fSearch + keyword.urlEncoded()]
if let pageNum = pageNum { params.append(page2 + String(pageNum)) }
return merge(urls: params + applyFilters(filter: filter))
}
static func moreSearchList(
keyword: String,
filter: Filter,
pageNum: String,
pageNum: Int,
lastID: String
) -> String {
merge(
urls: [
host,
fSearch + keyword.urlEncoded(),
page2 + pageNum,
page2 + String(pageNum),
from + lastID
]
+ applyFilters(filter: filter)
)
}
static func frontpageList() -> String {
host
static func frontpageList(pageNum: Int? = nil) -> String {
if let pageNum = pageNum {
return merge(urls: [host, page2 + String(pageNum)])
} else {
return host
}
}
static func moreFrontpageList(pageNum: String, lastID: String) -> String {
merge(urls: [host, page2 + pageNum, from + lastID])
static func moreFrontpageList(pageNum: Int, lastID: String) -> String {
merge(urls: [host, page2 + String(pageNum), from + lastID])
}
static func popularList() -> String {
host + popular
}
static func watchedList() -> String {
host + watched
static func watchedList(pageNum: Int? = nil) -> String {
if let pageNum = pageNum {
return merge(urls: [host + watched, page2 + String(pageNum)])
} else {
return host + watched
}
}
static func moreWatchedList(pageNum: String, lastID: String) -> String {
merge(urls: [host + watched, page2 + pageNum, from + lastID])
static func moreWatchedList(pageNum: Int, lastID: String) -> String {
merge(urls: [host + watched, page2 + String(pageNum), from + lastID])
}
static func favoritesList(favIndex: Int) -> String {
static func favoritesList(favIndex: Int, pageNum: Int? = nil) -> String {
var params = [host + favorites]
if favIndex == -1 {
return host + favorites
if pageNum == nil { return params[0] }
} else {
return merge(urls: [host + favorites, favcat + "\(favIndex)"])
params.append(favcat + "\(favIndex)")
}
if let pageNum = pageNum {
params.append(page2 + String(pageNum))
}
return merge(urls: params)
}
static func moreFavoritesList(favIndex: Int, pageNum: String, lastID: String) -> String {
static func moreFavoritesList(favIndex: Int, pageNum: Int, lastID: String) -> String {
if favIndex == -1 {
return merge(urls: [host + favorites, page2 + pageNum, from + lastID])
return merge(urls: [host + favorites, page2 + String(pageNum), from + lastID])
} else {
return merge(urls: [host + favorites, favcat + "\(favIndex)", page2 + pageNum, from + lastID])
return merge(urls: [host + favorites, favcat + "\(favIndex)", page2 + String(pageNum), from + lastID])
}
}
static func toplistsList(catIndex: Int) -> String {
merge(urls: [ehentai + toplist, topcat + "\(catIndex)"])
static func toplistsList(catIndex: Int, pageNum: Int? = nil) -> String {
if let pageNum = pageNum {
return merge(urls: [ehentai + toplist, topcat + "\(catIndex)", page1 + String(pageNum)])
} else {
return merge(urls: [ehentai + toplist, topcat + "\(catIndex)"])
}
}
static func moreToplistsList(catIndex: Int, pageNum: String) -> String {
merge(urls: [ehentai + toplist, topcat + "\(catIndex)", page1 + pageNum])
static func moreToplistsList(catIndex: Int, pageNum: Int) -> String {
merge(urls: [ehentai + toplist, topcat + "\(catIndex)", page1 + String(pageNum)])
}
static func galleryDetail(url: String) -> String {
merge(urls: [url, showComments])
Expand Down
10 changes: 8 additions & 2 deletions EhPanda/App/Utility.swift
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,15 @@ func setPasteboardChangeCount(with value: Int) {
UserDefaults.standard.set(value, forKey: "PasteboardChangeCount")
}

func postSlideMenuShouldCloseNotification() {
func postShouldShowSlideMenuNotification() {
NotificationCenter.default.post(
name: NSNotification.Name("SlideMenuShouldClose"),
name: NSNotification.Name("ShouldShowSlideMenu"),
object: nil
)
}
func postShouldHideSlideMenuNotification() {
NotificationCenter.default.post(
name: NSNotification.Name("ShouldHideSlideMenu"),
object: nil
)
}
Expand Down
16 changes: 10 additions & 6 deletions EhPanda/App/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// MARK: AlertView
"Loading..." = "Wird geladen...";
"Login" = "Einloggen";
"Your search didn't match any docs." = "Deine Suche hat keine Ergebnisse ergeben";
//"There seems to be nothing here." = "";
"Retry" = "Erneut versuchen";
//"A network error occurred." = "";
//"A parsing error occurred." = "";
Expand All @@ -47,6 +47,8 @@
"BAN_INTERVAL_HOURS" = " hours";
"BAN_INTERVAL_MINUTES" = " minutes";
"BAN_INTERVAL_SECONDS" = " seconds";
//"Jump page" = "";
//"Confirm" = "";

// MARK: DetailView
"Archive" = "Archiv";
Expand Down Expand Up @@ -104,6 +106,7 @@
"Post" = "Senden";

// MARK: ReadingView
//"AutoPlay" = "";
//"Reload" = "";
//"Copy" = "";
//"Save" = "";
Expand Down Expand Up @@ -351,6 +354,9 @@
"GAINCONTENT_AND" = " und ";
"GAINCONTENT_END" = "!";

// MARK: QuickSearchView
//"Quick search" = "";

// MARK: HomeListType
"Search" = "Suche";
"Frontpage" = "Startseite";
Expand Down Expand Up @@ -403,11 +409,9 @@
// MARK: AutoLockPolicy
"Never" = "Nie";
"Instantly" = "Sofort";
"15 seconds" = "Nach 15 Sekunden";
"1 minute" = "Nach 1 Minute";
"5 minutes" = "Nach 5 Minuten";
"10 minutes" = "Nach 10 Minuten";
"30 minutes" = "Nach 30 Minuten";
"%lld seconds" = "Nach %lld Sekunden";
"%lld minute" = "Nach %lld Minute";
"%lld minutes" = "Nach %lld Minuten";

// MARK: Language
"Other" = "Andere";
Expand Down
16 changes: 10 additions & 6 deletions EhPanda/App/ja.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// MARK: AlertView
"Loading..." = "読み込み中...";
"Login" = "ログイン";
"Your search didn't match any docs." = "お探しの情報が見つかりませんでした";
"There seems to be nothing here." = "ここには何もないようです";
"Retry" = "やり直す";
"A network error occurred." = "ネットワーク障害が発生しました";
"A parsing error occurred." = "解析中に問題が発生しました";
Expand All @@ -47,6 +47,8 @@
"BAN_INTERVAL_HOURS" = " 時間";
"BAN_INTERVAL_MINUTES" = " 分";
"BAN_INTERVAL_SECONDS" = " 秒";
"Jump page" = "ページジャンプ";
"Confirm" = "確認";

// MARK: DetailView
"Archive" = "アーカイブ";
Expand Down Expand Up @@ -104,6 +106,7 @@
"Post" = "投稿";

// MARK: ReadingView
"AutoPlay" = "自動再生";
"Reload" = "再読み込み";
"Copy" = "コピー";
"Save" = "保存";
Expand Down Expand Up @@ -351,6 +354,9 @@
"GAINCONTENT_AND" = "と";
"GAINCONTENT_END" = "を手に入れた!";

// MARK: QuickSearchView
"Quick search" = "クイック検索";

// MARK: HomeListType
"Search" = "検索";
"Frontpage" = "ホーム";
Expand Down Expand Up @@ -403,11 +409,9 @@
// MARK: AutoLockPolicy
"Never" = "なし";
"Instantly" = "すぐに";
"15 seconds" = "15 秒";
"1 minute" = "1 分";
"5 minutes" = "5 分";
"10 minutes" = "10 分";
"30 minutes" = "30 分";
"%lld seconds" = "%lld 秒";
"%lld minute" = "%lld 分";
"%lld minutes" = "%lld 分";

// MARK: Language
"Other" = "その他";
Expand Down
16 changes: 10 additions & 6 deletions EhPanda/App/ko.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// MARK: AlertView
"Loading..." = "로딩 중...";
"Login" = "로그인";
"Your search didn't match any docs." = "검색 결과가 없어요.";
//"There seems to be nothing here." = "";
"Retry" = "재시도";
"A network error occurred." = "인터넷 접속 오류가 발생했어요.";
"A parsing error occurred." = "구분 분석 오류가 발생했어요.";
Expand All @@ -47,6 +47,8 @@
"BAN_INTERVAL_HOURS" = " hours";
"BAN_INTERVAL_MINUTES" = " minutes";
"BAN_INTERVAL_SECONDS" = " seconds";
//"Jump page" = "";
//"Confirm" = "";

// MARK: DetailView
"Archive" = "아카이브";
Expand Down Expand Up @@ -104,6 +106,7 @@
"Post" = "등록";

// MARK: ReadingView
//"AutoPlay" = "";
"Reload" = "재시도";
"Copy" = "복사";
"Save" = "저장";
Expand Down Expand Up @@ -351,6 +354,9 @@
"GAINCONTENT_AND" = "과";
"GAINCONTENT_END" = "획득했어요!";

// MARK: QuickSearchView
//"Quick search" = "";

// MARK: HomeListType
"Search" = "검색";
"Frontpage" = "프론트";
Expand Down Expand Up @@ -403,11 +409,9 @@
// MARK: AutoLockPolicy
"Never" = "안 함";
"Instantly" = "즉시";
"15 seconds" = "15초";
"1 minute" = "1분";
"5 minutes" = "5분";
"10 minutes" = "10분";
"30 minutes" = "30분";
"%lld seconds" = "%lld초";
"%lld minute" = "%lld분";
"%lld minutes" = "%lld분";

// MARK: Language
"Other" = "기타";
Expand Down
Loading

0 comments on commit ff790bd

Please sign in to comment.