-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add caching for home page
- Loading branch information
Showing
64 changed files
with
1,071 additions
and
682 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
6 changes: 3 additions & 3 deletions
6
core/common/src/main/java/com/jacob/wakatimeapp/core/common/Utils.kt
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
package com.jacob.wakatimeapp.core.common | ||
package com.jacob.wakatimeapp.core.common // ktlint-disable filename | ||
|
||
import java.time.LocalDate | ||
import java.time.format.TextStyle.SHORT | ||
import java.util.* | ||
import java.util.Locale | ||
import kotlinx.datetime.LocalDate | ||
|
||
fun LocalDate.getDisplayNameForDay(): String = | ||
dayOfWeek.getDisplayName(SHORT, Locale.getDefault()) |
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
17 changes: 17 additions & 0 deletions
17
core/common/src/main/java/com/jacob/wakatimeapp/core/common/data/dtos/CategoryDTO.kt
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,17 @@ | ||
package com.jacob.wakatimeapp.core.common.data.dtos | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class CategoryDTO( | ||
val decimal: String, | ||
val digital: String, | ||
val hours: Int, | ||
val minutes: Int, | ||
val name: String, | ||
val percent: Double, | ||
val seconds: Int, | ||
val text: String, | ||
@SerialName("total_seconds") val totalSeconds: Double, | ||
) |
11 changes: 11 additions & 0 deletions
11
core/common/src/main/java/com/jacob/wakatimeapp/core/common/data/dtos/CumulativeTotalDTO.kt
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,11 @@ | ||
package com.jacob.wakatimeapp.core.common.data.dtos | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class CumulativeTotalDTO( | ||
val decimal: String, | ||
val digital: String, | ||
val seconds: Double, | ||
val text: String, | ||
) |
6 changes: 6 additions & 0 deletions
6
core/common/src/main/java/com/jacob/wakatimeapp/core/common/data/dtos/DependencyDTO.kt
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 @@ | ||
package com.jacob.wakatimeapp.core.common.data.dtos | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
class DependencyDTO |
17 changes: 17 additions & 0 deletions
17
core/common/src/main/java/com/jacob/wakatimeapp/core/common/data/dtos/EditorDTO.kt
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,17 @@ | ||
package com.jacob.wakatimeapp.core.common.data.dtos | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class EditorDTO( | ||
val decimal: String, | ||
val digital: String, | ||
val hours: Int, | ||
val minutes: Int, | ||
val name: String, | ||
val percent: Double, | ||
val seconds: Int, | ||
val text: String, | ||
@SerialName("total_seconds") val totalSeconds: Double, | ||
) |
14 changes: 14 additions & 0 deletions
14
core/common/src/main/java/com/jacob/wakatimeapp/core/common/data/dtos/GrandTotalDTO.kt
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,14 @@ | ||
package com.jacob.wakatimeapp.core.common.data.dtos | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class GrandTotalDTO( | ||
val decimal: String, | ||
val digital: String, | ||
val hours: Int, | ||
val minutes: Int, | ||
val text: String, | ||
@SerialName("total_seconds") val totalSeconds: Double, | ||
) |
17 changes: 17 additions & 0 deletions
17
core/common/src/main/java/com/jacob/wakatimeapp/core/common/data/dtos/LanguageDTO.kt
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,17 @@ | ||
package com.jacob.wakatimeapp.core.common.data.dtos | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class LanguageDTO( | ||
val decimal: String, | ||
val digital: String, | ||
val hours: Int, | ||
val minutes: Int, | ||
val name: String, | ||
val percent: Double, | ||
val seconds: Int, | ||
val text: String, | ||
@SerialName("total_seconds") val totalSeconds: Double, | ||
) |
18 changes: 18 additions & 0 deletions
18
core/common/src/main/java/com/jacob/wakatimeapp/core/common/data/dtos/MachineDTO.kt
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,18 @@ | ||
package com.jacob.wakatimeapp.core.common.data.dtos | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class MachineDTO( | ||
val decimal: String, | ||
val digital: String, | ||
val hours: Int, | ||
val minutes: Int, | ||
val name: String, | ||
val percent: Double, | ||
val seconds: Int, | ||
val text: String, | ||
@SerialName("machine_name_id") val machineNameId: String, | ||
@SerialName("total_seconds") val totalSeconds: Double, | ||
) |
17 changes: 17 additions & 0 deletions
17
core/common/src/main/java/com/jacob/wakatimeapp/core/common/data/dtos/OperatingSystemDTO.kt
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,17 @@ | ||
package com.jacob.wakatimeapp.core.common.data.dtos | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class OperatingSystemDTO( | ||
val decimal: String, | ||
val digital: String, | ||
val hours: Int, | ||
val minutes: Int, | ||
val name: String, | ||
val percent: Double, | ||
val seconds: Int, | ||
val text: String, | ||
@SerialName("total_seconds") val totalSeconds: Double, | ||
) |
21 changes: 21 additions & 0 deletions
21
core/common/src/main/java/com/jacob/wakatimeapp/core/common/data/dtos/ProjectDTO.kt
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 @@ | ||
package com.jacob.wakatimeapp.core.common.data.dtos | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class ProjectDTO( | ||
val decimal: String, | ||
val digital: String, | ||
val hours: Int, | ||
val minutes: Int, | ||
val name: String, | ||
val percent: Double, | ||
val seconds: Int, | ||
val text: String, | ||
@SerialName("total_seconds") val totalSeconds: Double, | ||
) { | ||
|
||
fun isUnknownProject() = | ||
name == "Unknown Project" | ||
} |
12 changes: 12 additions & 0 deletions
12
core/common/src/main/java/com/jacob/wakatimeapp/core/common/data/dtos/RangeDTO.kt
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,12 @@ | ||
package com.jacob.wakatimeapp.core.common.data.dtos | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class RangeDTO( | ||
val date: String, | ||
val end: String, | ||
val start: String, | ||
val text: String, | ||
val timezone: String, | ||
) |
15 changes: 15 additions & 0 deletions
15
core/common/src/main/java/com/jacob/wakatimeapp/core/common/data/mappers/ProjectDtoMapper.kt
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,15 @@ | ||
package com.jacob.wakatimeapp.core.common.data.mappers // ktlint-disable filename | ||
|
||
import com.jacob.wakatimeapp.core.common.data.dtos.ProjectDTO | ||
import com.jacob.wakatimeapp.core.models.Project | ||
import com.jacob.wakatimeapp.core.models.Time | ||
|
||
fun ProjectDTO.toModel() = Project( | ||
time = Time( | ||
hours = hours, | ||
minutes = minutes, | ||
decimal = decimal.toFloat() | ||
), | ||
name = name, | ||
percent = percent | ||
) |
2 changes: 1 addition & 1 deletion
2
core/models/src/main/java/com/jacob/wakatimeapp/core/models/DailyStats.kt
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
3 changes: 3 additions & 0 deletions
3
core/models/src/main/java/com/jacob/wakatimeapp/core/models/Project.kt
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.