-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Removed unused StreaksView files * widget in sections * fixed header size * Created deadline mode selection dialog * fixed mode selection controller * fixed layout for mode buttons * Added StorageRecord model * Added StorageRecordsAPI class * Added deadline counting & updated core data model * displaying deadlines now & they work correctly now * Added notification scheduling * Added notification scheduling * Added PersonalDeadlineManager with manager operations & some refactoring * multiple fixes for sync to work * Added sync for enrolled courses * Added deadline deletion & started change UI * pbxproj fix * fixes * Added deadline editing * fixed iPad crash * saving state for deadline widget * Added localizations * Added iOS analytics * Added error handling in DeadlineCounter * time intervals to constants * added minor comment * Analytics fixes * removed default realizations * refactored mode selection layout * minor fixes & new blue color * Localizations and notifications fix
- Loading branch information
Showing
47 changed files
with
2,210 additions
and
369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// DeadlineMode.swift | ||
// Stepic | ||
// | ||
// Created by Ostrenkiy on 15.05.2018. | ||
// Copyright © 2018 Alex Karpov. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
struct DeadlineModeInfo { | ||
var title: String | ||
var weeklyLoadHours: Int | ||
var image: UIImage | ||
|
||
init(title: String, weeklyLoadHours: Int, image: UIImage) { | ||
self.title = title | ||
self.weeklyLoadHours = weeklyLoadHours | ||
self.image = image | ||
} | ||
|
||
var dailyLoadSeconds: Int { | ||
return weeklyLoadHours * 60 * 60 / 7 | ||
} | ||
} | ||
|
||
enum DeadlineMode { | ||
case hobby, standard, extreme | ||
|
||
func getModeInfo() -> DeadlineModeInfo { | ||
switch self { | ||
case .hobby: | ||
return DeadlineModeInfo(title: NSLocalizedString("HobbyDeadlineMode", comment: ""), weeklyLoadHours: 3, image: #imageLiteral(resourceName: "25-science-growth-sprout")) | ||
case .standard: | ||
return DeadlineModeInfo(title: NSLocalizedString("StandardDeadlineMode", comment: ""), weeklyLoadHours: 7, image: #imageLiteral(resourceName: "27-science-study-learn-graduate")) | ||
case .extreme: | ||
return DeadlineModeInfo(title: NSLocalizedString("ExtremeDeadlineMode", comment: ""), weeklyLoadHours: 15, image: #imageLiteral(resourceName: "1-science-rocket-spaceship-rocket-launch")) | ||
} | ||
} | ||
} |
Binary file added
BIN
+14.6 KB
...t-spaceship-rocket-launch.imageset/1-science-rocket-spaceship-rocket-launch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
...s.xcassets/Deadline Modes/1-science-rocket-spaceship-rocket-launch.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "1-science-rocket-spaceship-rocket-launch.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+9.82 KB
...s/Deadline Modes/25-science-growth-sprout.imageset/25-science-growth-sprout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
Stepic/Images.xcassets/Deadline Modes/25-science-growth-sprout.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "25-science-growth-sprout.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+10.8 KB
...es/27-science-study-learn-graduate.imageset/27-science-study-learn-graduate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
Stepic/Images.xcassets/Deadline Modes/27-science-study-learn-graduate.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "27-science-study-learn-graduate.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.