Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
hqy2000 committed Nov 14, 2017
1 parent c50633c commit 558496b
Show file tree
Hide file tree
Showing 10 changed files with 186 additions and 226 deletions.
2 changes: 1 addition & 1 deletion ContentExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>1.2.5</string>
<key>CFBundleVersion</key>
<string>3</string>
<string>7</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
Expand Down
284 changes: 136 additions & 148 deletions General/Base.lproj/Main.storyboard

Large diffs are not rendered by default.

42 changes: 1 addition & 41 deletions General/InAppSettings.bundle/Root.plist
Original file line number Diff line number Diff line change
Expand Up @@ -32,51 +32,11 @@
<key>Key</key>
<string>settings.night.auto</string>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Values</key>
<array>
<string>green</string>
<string>orange</string>
<string>blue</string>
<string>pink</string>
<string>purple</string>
<string>blueGreen</string>
<string>mintGreen</string>
<string>grass</string>
<string>fogBlue</string>
<string>black</string>
<string>kill</string>
<string>customize</string>
</array>
<key>Titles</key>
<array>
<string>原谅绿</string>
<string>南外橙</string>
<string>校服蓝</string>
<string>少女粉</string>
<string>香芋紫</string>
<string>蓝绿色</string>
<string>薄荷绿</string>
<string>青草绿</string>
<string>雾霾蓝</string>
<string>夜间黑</string>
<string>瞎眼睛</string>
<string>自定义</string>
</array>
<key>Key</key>
<string>settings.theme</string>
<key>Title</key>
<string>主题</string>
<key>DefaultValue</key>
<string>pink</string>
</dict>
<dict>
<key>Type</key>
<string>IASKButtonSpecifier</string>
<key>Title</key>
<string>自定义主题</string>
<string>主题</string>
<key>Key</key>
<string>settings.theme.pick</string>
</dict>
Expand Down
6 changes: 3 additions & 3 deletions General/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>1.2.5</string>
<key>CFBundleVersion</key>
<string>3</string>
<string>7</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
Expand Down Expand Up @@ -51,10 +51,10 @@
</dict>
<key>NSCameraUsageDescription</key>
<string>请允许访问您的相机以拍摄照片并上传</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>请允许访问您的相册以上传你选择的照片</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>请允许我们将照片保存到您的相册</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>请允许访问您的相册以上传你选择的照片</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
Expand Down
14 changes: 12 additions & 2 deletions General/NewsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ class NewsViewController:UITableViewController,FrostedSidebarDelegate{
}

override func viewWillAppear(_ animated: Bool) {

if #available(iOS 11.0, *) {
//self.navigationController?.prefersLargeTitles = true
self.navigationController?.navigationBar.prefersLargeTitles = true
}
tableView.setContentOffset(CGPoint.zero, animated: true)
super.viewWillAppear(animated)
}
Expand All @@ -163,17 +168,20 @@ class NewsViewController:UITableViewController,FrostedSidebarDelegate{
disabled.message = "您没有开启推送权限,我们无法给您发送最新的活动通知"
disabled.settings = "设置"
disabled.cancel = "取消"
permision.presentDeniedAlert = true

permision.presentPrePermissionAlert = true
if var time = (UserDefaults.standard.object(forKey: "date.last") as? Date){
time.addTimeInterval(60*60*24*7)
if(time > Date()){
permision.presentDisabledAlert = false
permision.presentDeniedAlert = false
}else{
permision.presentDisabledAlert = true
permision.presentDeniedAlert = true
}
}else{
permision.presentDisabledAlert = true
permision.presentDeniedAlert = true
}


Expand Down Expand Up @@ -410,7 +418,7 @@ class NewsViewController:UITableViewController,FrostedSidebarDelegate{
checkStatus()
return
}else if (url == "realname"){
realnameAuth(withStep: .identity)
getAuthStatus(checkIC: true)
return
}
if(url.contains("nfls.io")){
Expand Down Expand Up @@ -704,6 +712,8 @@ class NewsViewController:UITableViewController,FrostedSidebarDelegate{
}else{
if let name = segueName {
self.performSegue(withIdentifier: name, sender: self)
}else if checkIC{
self.realnameAuth(withStep: .identity)
}
}
default:
Expand Down
22 changes: 22 additions & 0 deletions General/PickerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import Foundation
import UIKit
import ChromaColorPicker
import SCLAlertView

class PickerViewController:UIViewController,ChromaColorPickerDelegate{
func colorPickerDidChooseColor(_ colorPicker: ChromaColorPicker, color: UIColor) {
Expand All @@ -18,6 +19,7 @@ class PickerViewController:UIViewController,ChromaColorPickerDelegate{

@IBOutlet weak var container: UIView!
override func viewDidLoad() {
navigationItem.rightBarButtonItem = UIBarButtonItem(title: "预设", style: .plain, target: self, action: #selector(selectColor))
view.backgroundColor = UIColor.gray
container.backgroundColor = UIColor.gray
let picker = ChromaColorPicker(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
Expand All @@ -29,6 +31,26 @@ class PickerViewController:UIViewController,ChromaColorPickerDelegate{
}
//picker.addButton.isHidden = true
container.addSubview(picker)
SCLAlertView().showInfo("说明", subTitle: "您可在此选择内置或自定义您的App主题。如果您希望选择预设主题,请点按右上角预设按钮;如果您希望自定义主题,请使用下方的调色盘选择您喜爱的颜色,并按+号确认。", closeButtonTitle: "我知道了" )
}

@objc func selectColor(){
let dialog = SCLAlertView()
let color:[String:String] = [
"少女粉":"pink",
"香芋紫":"purple",
"蓝绿色":"blueGreen",
"薄荷绿":"mintGreen",
"青草绿":"grass",
"雾霾蓝":"fogBlue",
"瞎眼睛":"kill"
]
for(key,value)in color{
dialog.addButton(key, action: {
UserDefaults.standard.set(value, forKey: "settings.theme")
})
}
dialog.showInfo("预设主题", subTitle: "您可在此选择内置的预设主题", closeButtonTitle: "取消")
}


Expand Down
35 changes: 10 additions & 25 deletions General/ResourcesFiltringView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class ResourcesFiltringViewController:UIViewController, UITableViewDataSource, U
var isFolder = [Bool]()
var isDownloaded = [Bool]()
var images = [String?]()
var appHref = [String]()
var currentFolder = ""
var reactWithClick = true
var onlineMode = true
Expand Down Expand Up @@ -82,14 +83,9 @@ class ResourcesFiltringViewController:UIViewController, UITableViewDataSource, U
}
@objc func setting() {
var mutipleSelectAction = UIAlertAction()
let alertController = UIAlertController(title: "选项", message: "小提示,文件夹可以在多选模式批量下载哦!多选模式也可以一次预览多个文件,卷子与答案一起预览,左右滑动切换!", preferredStyle: UIAlertControllerStyle.actionSheet)
let alertController = UIAlertController(title: "选项", message: "您也可在电脑上访问https://dl.nfls.io", preferredStyle: UIAlertControllerStyle.actionSheet)
let cancelAction = UIAlertAction(title: "取消", style: UIAlertActionStyle.cancel, handler: nil)
if(reactWithClick){
let showTipsAction = UIAlertAction(title: "Tips", style: UIAlertActionStyle.default, handler: {
(alert: UIAlertAction!) in
self.showTips()
})
alertController.addAction(showTipsAction)
mutipleSelectAction = UIAlertAction(title: "多选模式", style: UIAlertActionStyle.default, handler: {
(alert: UIAlertAction!) in
self.reactWithClick = !self.reactWithClick
Expand Down Expand Up @@ -218,6 +214,7 @@ class ResourcesFiltringViewController:UIViewController, UITableViewDataSource, U
self.filenames.append(name)
self.times.append(Int(truncating: (file as! [String:Any])["time"] as! NSNumber))
self.sizes.append(Int(truncating: (file as! [String:Any])["size"] as! NSNumber))
self.appHref.append((file as! [String:Any])["appHref"] as! String)
if((file as! [String:Any])["managed"] == nil){
self.isFolder.append(false)
self.isDownloaded.append(self.isFileExists(filename: name, path: self.currentFolder))
Expand All @@ -238,6 +235,7 @@ class ResourcesFiltringViewController:UIViewController, UITableViewDataSource, U
self.filenames.append(name)
self.times.append(Int(truncating: (file as! [String:Any])["time"] as! NSNumber))
self.sizes.append(Int(truncating: (file as! [String:Any])["size"] as! NSNumber))
self.appHref.append((file as! [String:Any])["appHref"] as! String)
if((file as! [String:Any])["managed"] == nil){
self.isFolder.append(false)
self.isDownloaded.append(self.isFileExists(filename: name, path: self.currentFolder))
Expand Down Expand Up @@ -502,7 +500,12 @@ class ResourcesFiltringViewController:UIViewController, UITableViewDataSource, U
let destination: DownloadRequest.DownloadFileDestination = { _, _ in
return (fileURL, [.removePreviousFile, .createIntermediateDirectories])
}
request = Alamofire.download(url,to: destination).downloadProgress(queue: utilityQueue) { progress in
var myUrl = url
if(appHref[0].contains("https://nflsio.oss-cn-shanghai.aliyuncs.com")){
myUrl = url.replacingOccurrences(of: "https://dl.nfls.io", with: "https://nflsio.oss-cn-shanghai.aliyuncs.com")
}
//print(myUrl)
request = Alamofire.download(myUrl,to: destination).downloadProgress(queue: utilityQueue) { progress in
DispatchQueue.main.async {
if(progress.fractionCompleted != 1.0){
responder.setSubTitle("您正在下载以下文件:" + filename + ",进度:" + String(format: "%.2f", progress.fractionCompleted * 100) + "%")
Expand Down Expand Up @@ -594,24 +597,6 @@ class ResourcesFiltringViewController:UIViewController, UITableViewDataSource, U
listRequest()
}

func showTips(force: Bool = false){
if(true){
let tips = "1.向左滑动行可执行更多操作,具体可自行探索\n" +
"2.如想下载整个文件夹,请使用多选模式,然后选中单个或多个文件夹下载即可\n" +
"3.打开文件时默认会将文件缓存至本地,如果您的手机空间捉急,可选择“临时下载”\n" +
"4.当然,如果您觉得您的手机存储空间足够大,可以缓存所有文件\n" +
"5.使用多选模式可以将多个文件同时预览,左右滑动切换(比如可以将试卷与答案同时预览)\n" +
"6.其他功能就请自行探索吧(闷声大发财,那是最吼的)"
let tipsController = UIAlertController(title: "Tips", message: tips, preferredStyle: .alert)
(tipsController.view.subviews[0].subviews[0].subviews[0].subviews[0].subviews[0].subviews[1] as! UILabel).textAlignment = .left
let doneAction = UIAlertAction(title: "我知道了", style: .default, handler: {
(action: UIAlertAction) in
})
tipsController.addAction(doneAction)
self.present(tipsController, animated: true, completion: nil)
}
}

func showHeaderFooter(force: Bool = false){
let parameters: Parameters = [
"action": "get",
Expand Down
Binary file removed General/未标题-1.png
Binary file not shown.
5 changes: 0 additions & 5 deletions NFLSers-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
6585ADB81F8B7AA200ECCBB9 /* resources.png in Resources */ = {isa = PBXBuildFile; fileRef = 6585ADB21F8B79BC00ECCBB9 /* resources.png */; };
6585ADB91F8B7AA600ECCBB9 /* weather.png in Resources */ = {isa = PBXBuildFile; fileRef = 6585ADB31F8B79BC00ECCBB9 /* weather.png */; };
6585ADBA1F8B7AAC00ECCBB9 /* wiki.png in Resources */ = {isa = PBXBuildFile; fileRef = 6585ADB41F8B79BC00ECCBB9 /* wiki.png */; };
658C1ED71FA9E446001A3F73 /* 未标题-1.png in Resources */ = {isa = PBXBuildFile; fileRef = 658C1ED61FA9E446001A3F73 /* 未标题-1.png */; };
6595BA9E1F00844100BA1CE1 /* NotificationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6595BA9D1F00844100BA1CE1 /* NotificationView.swift */; };
65AD5EC91F8D9681008EE0F8 /* InAppSettings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 65AD5EC81F8D9681008EE0F8 /* InAppSettings.bundle */; };
65AD5ECB1F8D9ADE008EE0F8 /* ThemeManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AD5ECA1F8D9ADE008EE0F8 /* ThemeManager.swift */; };
Expand Down Expand Up @@ -150,7 +149,6 @@
6585ADB21F8B79BC00ECCBB9 /* resources.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = resources.png; sourceTree = "<group>"; };
6585ADB31F8B79BC00ECCBB9 /* weather.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = weather.png; sourceTree = "<group>"; };
6585ADB41F8B79BC00ECCBB9 /* wiki.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = wiki.png; sourceTree = "<group>"; };
658C1ED61FA9E446001A3F73 /* 未标题-1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "未标题-1.png"; sourceTree = "<group>"; };
6595BA9D1F00844100BA1CE1 /* NotificationView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NotificationView.swift; sourceTree = "<group>"; };
65AD5EC81F8D9681008EE0F8 /* InAppSettings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = InAppSettings.bundle; sourceTree = "<group>"; };
65AD5ECA1F8D9ADE008EE0F8 /* ThemeManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemeManager.swift; sourceTree = "<group>"; wrapsLines = 0; };
Expand Down Expand Up @@ -343,7 +341,6 @@
653CE9CE1F8FB73100A56B57 /* game.png */,
6585ADB21F8B79BC00ECCBB9 /* resources.png */,
6585ADB31F8B79BC00ECCBB9 /* weather.png */,
658C1ED61FA9E446001A3F73 /* 未标题-1.png */,
653CE9CC1F8FA75900A56B57 /* ic.png */,
6585ADB41F8B79BC00ECCBB9 /* wiki.png */,
65784C7D1F09762400BDC60A /* icons8-Documents-50.png */,
Expand Down Expand Up @@ -525,7 +522,6 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = D6AE17351E44D51600E66B4B;
Expand Down Expand Up @@ -575,7 +571,6 @@
65784C7C1F09746800BDC60A /* icons8-Folder-50.png in Resources */,
6546E68C1EF84A29008CBBCA /* Main.storyboard in Resources */,
65784C841F0A59CE00BDC60A /* icons8-Back-50.png in Resources */,
658C1ED71FA9E446001A3F73 /* 未标题-1.png in Resources */,
6585ADB71F8B7A9E00ECCBB9 /* media.png in Resources */,
6585ADBA1F8B7AAC00ECCBB9 /* wiki.png in Resources */,
);
Expand Down
2 changes: 1 addition & 1 deletion pushNotification/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>1.2.5</string>
<key>CFBundleVersion</key>
<string>3</string>
<string>7</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down

0 comments on commit 558496b

Please sign in to comment.