Compare commits
52 Commits
Author | SHA1 | Date | |
---|---|---|---|
fd482777e8 | |||
d4ae0d56d6 | |||
63487249b8 | |||
1bc0f2d214 | |||
41bde45731 | |||
556f42195b | |||
06fd7b0c36 | |||
db4e4d8cef | |||
48e4a9fec5 | |||
70333737cf | |||
3096fa1538 | |||
19ed121466 | |||
e7733bfa2a | |||
b9b464ea9b | |||
cc46b3b124 | |||
092e86b621 | |||
c170614461 | |||
6ce8e00ebf | |||
c40cdf88ad | |||
4c1fe233c7 | |||
aca88b57e0 | |||
a603c12625 | |||
5c440010e2 | |||
4920317573 | |||
9466482893 | |||
48bcf581cf | |||
8a7b7103eb | |||
ea312c3e12 | |||
5b0fe2c006 | |||
a06add070e | |||
dce491bffe | |||
adf418cc68 | |||
defcfec971 | |||
d08f195968 | |||
1e9a6a5c42 | |||
cc752ab0ad | |||
f2faa7e8b7 | |||
030fe8c218 | |||
c33b309cf0 | |||
a0af55825d | |||
cb8303f33d | |||
54fbd56b73 | |||
70f50cd51b | |||
88c38c4a8d | |||
b8ac72c247 | |||
cbef160ada | |||
e77894bf3e | |||
9697a39464 | |||
5a2622871f | |||
52218e800c | |||
3fdd47c221 | |||
d8f71f48f3 |
4
.github/workflows/deploy-store.yml
vendored
4
.github/workflows/deploy-store.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
|||||||
- uses: actions/setup-java@v2
|
- uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: 11
|
java-version: 17
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
@ -52,7 +52,7 @@ jobs:
|
|||||||
- uses: actions/setup-java@v2
|
- uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: 11
|
java-version: 17
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
|
4
.github/workflows/deploy-test.yml
vendored
4
.github/workflows/deploy-test.yml
vendored
@ -22,7 +22,7 @@ jobs:
|
|||||||
- uses: actions/setup-java@v2
|
- uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: 11
|
java-version: 17
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
@ -92,7 +92,7 @@ jobs:
|
|||||||
- uses: actions/setup-java@v2
|
- uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: 11
|
java-version: 17
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
|
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
@ -22,7 +22,7 @@ jobs:
|
|||||||
- uses: actions/setup-java@v2
|
- uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: 11
|
java-version: 17
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
@ -48,7 +48,7 @@ jobs:
|
|||||||
- uses: actions/setup-java@v2
|
- uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: 11
|
java-version: 17
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
@ -74,7 +74,7 @@ jobs:
|
|||||||
- uses: actions/setup-java@v2
|
- uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: 11
|
java-version: 17
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
|
@ -23,8 +23,8 @@ android {
|
|||||||
testApplicationId "io.github.tests.wulkanowy"
|
testApplicationId "io.github.tests.wulkanowy"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 33
|
targetSdkVersion 33
|
||||||
versionCode 122
|
versionCode 129
|
||||||
versionName "2.0.0"
|
versionName "2.0.7"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
resValue "string", "app_name", "Wulkanowy"
|
resValue "string", "app_name", "Wulkanowy"
|
||||||
@ -157,12 +157,16 @@ kapt {
|
|||||||
correctErrorTypes true
|
correctErrorTypes true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
jvmToolchain(11)
|
||||||
|
}
|
||||||
|
|
||||||
play {
|
play {
|
||||||
defaultToAppBundles = false
|
defaultToAppBundles = false
|
||||||
track = 'production'
|
track = 'production'
|
||||||
releaseStatus = com.github.triplet.gradle.androidpublisher.ReleaseStatus.IN_PROGRESS
|
releaseStatus = com.github.triplet.gradle.androidpublisher.ReleaseStatus.IN_PROGRESS
|
||||||
userFraction = 0.50d
|
userFraction = 0.25d
|
||||||
updatePriority = 2
|
updatePriority = 1
|
||||||
enabled.set(false)
|
enabled.set(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,7 +175,13 @@ huaweiPublish {
|
|||||||
hmsRelease {
|
hmsRelease {
|
||||||
credentialsPath = "$rootDir/app/src/release/agconnect-credentials.json"
|
credentialsPath = "$rootDir/app/src/release/agconnect-credentials.json"
|
||||||
buildFormat = "aab"
|
buildFormat = "aab"
|
||||||
deployType = "draft"
|
deployType = "publish"
|
||||||
|
releaseNotes = [
|
||||||
|
new ru.cian.huawei.publish.ReleaseNote(
|
||||||
|
"pl-PL",
|
||||||
|
"$projectDir/src/main/play/release-notes/pl-PL/default.txt"
|
||||||
|
)
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -182,31 +192,31 @@ ext {
|
|||||||
room = "2.5.1"
|
room = "2.5.1"
|
||||||
chucker = "3.5.2"
|
chucker = "3.5.2"
|
||||||
mockk = "1.13.5"
|
mockk = "1.13.5"
|
||||||
coroutines = "1.6.4"
|
coroutines = "1.7.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "io.github.wulkanowy:sdk:2.0.0"
|
implementation 'io.github.wulkanowy:sdk:2.0.7'
|
||||||
|
|
||||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
|
||||||
|
|
||||||
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0"
|
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1"
|
||||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines"
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines"
|
||||||
|
|
||||||
implementation "androidx.core:core-ktx:1.10.0"
|
implementation "androidx.core:core-ktx:1.10.1"
|
||||||
implementation 'androidx.core:core-splashscreen:1.0.1'
|
implementation 'androidx.core:core-splashscreen:1.0.1'
|
||||||
implementation "androidx.activity:activity-ktx:1.7.1"
|
implementation "androidx.activity:activity-ktx:1.7.2"
|
||||||
implementation "androidx.appcompat:appcompat:1.6.1"
|
implementation "androidx.appcompat:appcompat:1.6.1"
|
||||||
implementation "androidx.fragment:fragment-ktx:1.5.7"
|
implementation "androidx.fragment:fragment-ktx:1.5.7"
|
||||||
implementation "androidx.annotation:annotation:1.6.0"
|
implementation "androidx.annotation:annotation:1.6.0"
|
||||||
|
|
||||||
implementation "androidx.preference:preference-ktx:1.2.0"
|
implementation "androidx.preference:preference-ktx:1.2.0"
|
||||||
implementation "androidx.recyclerview:recyclerview:1.3.0"
|
implementation "androidx.recyclerview:recyclerview:1.3.0"
|
||||||
implementation "androidx.viewpager2:viewpager2:1.1.0-beta01"
|
implementation "androidx.viewpager2:viewpager2:1.1.0-beta02"
|
||||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
|
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
|
||||||
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
|
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
|
||||||
implementation "androidx.coordinatorlayout:coordinatorlayout:1.2.0"
|
implementation "androidx.coordinatorlayout:coordinatorlayout:1.2.0"
|
||||||
implementation "com.google.android.material:material:1.8.0"
|
implementation "com.google.android.material:material:1.9.0"
|
||||||
implementation "com.github.wulkanowy:material-chips-input:2.3.1"
|
implementation "com.github.wulkanowy:material-chips-input:2.3.1"
|
||||||
implementation "com.github.PhilJay:MPAndroidChart:v3.1.0"
|
implementation "com.github.PhilJay:MPAndroidChart:v3.1.0"
|
||||||
implementation 'com.github.lopspower:CircularImageView:4.3.0'
|
implementation 'com.github.lopspower:CircularImageView:4.3.0'
|
||||||
@ -236,22 +246,22 @@ dependencies {
|
|||||||
implementation "at.favre.lib:slf4j-timber:1.0.1"
|
implementation "at.favre.lib:slf4j-timber:1.0.1"
|
||||||
implementation 'com.github.bastienpaulfr:Treessence:1.0.5'
|
implementation 'com.github.bastienpaulfr:Treessence:1.0.5'
|
||||||
implementation "com.mikepenz:aboutlibraries-core:$about_libraries"
|
implementation "com.mikepenz:aboutlibraries-core:$about_libraries"
|
||||||
implementation "io.coil-kt:coil:2.3.0"
|
implementation "io.coil-kt:coil:2.4.0"
|
||||||
implementation "io.github.wulkanowy:AppKillerManager:3.0.1"
|
implementation "io.github.wulkanowy:AppKillerManager:3.0.1"
|
||||||
implementation 'me.xdrop:fuzzywuzzy:1.4.0'
|
implementation 'me.xdrop:fuzzywuzzy:1.4.0'
|
||||||
implementation 'com.fredporciuncula:flow-preferences:1.9.1'
|
implementation 'com.fredporciuncula:flow-preferences:1.9.1'
|
||||||
implementation 'org.apache.commons:commons-text:1.10.0'
|
implementation 'org.apache.commons:commons-text:1.10.0'
|
||||||
|
|
||||||
playImplementation platform('com.google.firebase:firebase-bom:31.5.0')
|
playImplementation platform('com.google.firebase:firebase-bom:32.1.0')
|
||||||
playImplementation 'com.google.firebase:firebase-analytics-ktx'
|
playImplementation 'com.google.firebase:firebase-analytics-ktx'
|
||||||
playImplementation 'com.google.firebase:firebase-messaging:'
|
playImplementation 'com.google.firebase:firebase-messaging:'
|
||||||
playImplementation 'com.google.firebase:firebase-crashlytics:'
|
playImplementation 'com.google.firebase:firebase-crashlytics:'
|
||||||
playImplementation 'com.google.firebase:firebase-config-ktx'
|
playImplementation 'com.google.firebase:firebase-config-ktx'
|
||||||
playImplementation 'com.google.android.play:core:1.10.3'
|
playImplementation 'com.google.android.play:core:1.10.3'
|
||||||
playImplementation 'com.google.android.play:core-ktx:1.8.1'
|
playImplementation 'com.google.android.play:core-ktx:1.8.1'
|
||||||
playImplementation 'com.google.android.gms:play-services-ads:22.0.0'
|
playImplementation 'com.google.android.gms:play-services-ads:22.1.0'
|
||||||
|
|
||||||
hmsImplementation 'com.huawei.hms:hianalytics:6.9.1.200'
|
hmsImplementation 'com.huawei.hms:hianalytics:6.10.0.301'
|
||||||
hmsImplementation 'com.huawei.agconnect:agconnect-crash:1.9.0.300'
|
hmsImplementation 'com.huawei.agconnect:agconnect-crash:1.9.0.300'
|
||||||
|
|
||||||
releaseImplementation "com.github.ChuckerTeam.Chucker:library-no-op:$chucker"
|
releaseImplementation "com.github.ChuckerTeam.Chucker:library-no-op:$chucker"
|
||||||
@ -265,7 +275,7 @@ dependencies {
|
|||||||
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines"
|
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines"
|
||||||
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
|
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
|
||||||
|
|
||||||
testImplementation 'org.robolectric:robolectric:4.10'
|
testImplementation 'org.robolectric:robolectric:4.10.3'
|
||||||
testImplementation "androidx.test:runner:1.5.2"
|
testImplementation "androidx.test:runner:1.5.2"
|
||||||
testImplementation "androidx.test.ext:junit:1.1.5"
|
testImplementation "androidx.test.ext:junit:1.1.5"
|
||||||
testImplementation "androidx.test:core:1.5.0"
|
testImplementation "androidx.test:core:1.5.0"
|
||||||
|
16
app/proguard-rules.pro
vendored
16
app/proguard-rules.pro
vendored
@ -1,5 +1,6 @@
|
|||||||
# General
|
# General
|
||||||
-dontobfuscate
|
-dontobfuscate
|
||||||
|
-ignorewarnings
|
||||||
|
|
||||||
|
|
||||||
#Config for wulkanowy
|
#Config for wulkanowy
|
||||||
@ -24,3 +25,18 @@
|
|||||||
|
|
||||||
#Config for Material Components
|
#Config for Material Components
|
||||||
-keep class com.google.android.material.tabs.** { *; }
|
-keep class com.google.android.material.tabs.** { *; }
|
||||||
|
|
||||||
|
|
||||||
|
#Config for HMS SDK
|
||||||
|
-keepattributes *Annotation*
|
||||||
|
-keepattributes Exceptions
|
||||||
|
-keepattributes InnerClasses
|
||||||
|
-keepattributes Signature
|
||||||
|
-keep class com.huawei.agconnect.**{*;}
|
||||||
|
-keep class com.huawei.hianalytics.**{*;}
|
||||||
|
-keep class com.huawei.updatesdk.**{*;}
|
||||||
|
-keep class com.huawei.hms.**{*;}
|
||||||
|
|
||||||
|
|
||||||
|
#Config for Wulkanowy SDK
|
||||||
|
-keep,allowobfuscation,allowshrinking class retrofit2.Response
|
||||||
|
@ -2,6 +2,7 @@ package io.github.wulkanowy.data.db.dao
|
|||||||
|
|
||||||
import androidx.room.*
|
import androidx.room.*
|
||||||
import io.github.wulkanowy.data.db.entities.Student
|
import io.github.wulkanowy.data.db.entities.Student
|
||||||
|
import io.github.wulkanowy.data.db.entities.StudentName
|
||||||
import io.github.wulkanowy.data.db.entities.StudentNickAndAvatar
|
import io.github.wulkanowy.data.db.entities.StudentNickAndAvatar
|
||||||
import io.github.wulkanowy.data.db.entities.StudentWithSemesters
|
import io.github.wulkanowy.data.db.entities.StudentWithSemesters
|
||||||
import javax.inject.Singleton
|
import javax.inject.Singleton
|
||||||
@ -19,6 +20,9 @@ abstract class StudentDao {
|
|||||||
@Update(entity = Student::class)
|
@Update(entity = Student::class)
|
||||||
abstract suspend fun update(studentNickAndAvatar: StudentNickAndAvatar)
|
abstract suspend fun update(studentNickAndAvatar: StudentNickAndAvatar)
|
||||||
|
|
||||||
|
@Update(entity = Student::class)
|
||||||
|
abstract suspend fun update(studentName: StudentName)
|
||||||
|
|
||||||
@Query("SELECT * FROM Students WHERE is_current = 1")
|
@Query("SELECT * FROM Students WHERE is_current = 1")
|
||||||
abstract suspend fun loadCurrent(): Student?
|
abstract suspend fun loadCurrent(): Student?
|
||||||
|
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
package io.github.wulkanowy.data.db.entities
|
||||||
|
|
||||||
|
import androidx.room.ColumnInfo
|
||||||
|
import androidx.room.Entity
|
||||||
|
import androidx.room.PrimaryKey
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
data class StudentName(
|
||||||
|
|
||||||
|
@ColumnInfo(name = "student_name")
|
||||||
|
val studentName: String
|
||||||
|
|
||||||
|
) : Serializable {
|
||||||
|
|
||||||
|
@PrimaryKey
|
||||||
|
var id: Long = 0
|
||||||
|
}
|
@ -6,7 +6,9 @@ import dagger.hilt.android.qualifiers.ApplicationContext
|
|||||||
import io.github.wulkanowy.data.db.AppDatabase
|
import io.github.wulkanowy.data.db.AppDatabase
|
||||||
import io.github.wulkanowy.data.db.dao.SemesterDao
|
import io.github.wulkanowy.data.db.dao.SemesterDao
|
||||||
import io.github.wulkanowy.data.db.dao.StudentDao
|
import io.github.wulkanowy.data.db.dao.StudentDao
|
||||||
|
import io.github.wulkanowy.data.db.entities.Semester
|
||||||
import io.github.wulkanowy.data.db.entities.Student
|
import io.github.wulkanowy.data.db.entities.Student
|
||||||
|
import io.github.wulkanowy.data.db.entities.StudentName
|
||||||
import io.github.wulkanowy.data.db.entities.StudentNickAndAvatar
|
import io.github.wulkanowy.data.db.entities.StudentNickAndAvatar
|
||||||
import io.github.wulkanowy.data.db.entities.StudentWithSemesters
|
import io.github.wulkanowy.data.db.entities.StudentWithSemesters
|
||||||
import io.github.wulkanowy.data.exceptions.NoCurrentStudentException
|
import io.github.wulkanowy.data.exceptions.NoCurrentStudentException
|
||||||
@ -14,6 +16,7 @@ import io.github.wulkanowy.data.mappers.mapToPojo
|
|||||||
import io.github.wulkanowy.data.pojos.RegisterUser
|
import io.github.wulkanowy.data.pojos.RegisterUser
|
||||||
import io.github.wulkanowy.sdk.Sdk
|
import io.github.wulkanowy.sdk.Sdk
|
||||||
import io.github.wulkanowy.utils.DispatchersProvider
|
import io.github.wulkanowy.utils.DispatchersProvider
|
||||||
|
import io.github.wulkanowy.utils.init
|
||||||
import io.github.wulkanowy.utils.security.decrypt
|
import io.github.wulkanowy.utils.security.decrypt
|
||||||
import io.github.wulkanowy.utils.security.encrypt
|
import io.github.wulkanowy.utils.security.encrypt
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
@ -146,4 +149,21 @@ class StudentRepository @Inject constructor(
|
|||||||
|
|
||||||
suspend fun isOneUniqueStudent() = getSavedStudents(false)
|
suspend fun isOneUniqueStudent() = getSavedStudents(false)
|
||||||
.distinctBy { it.student.studentName }.size == 1
|
.distinctBy { it.student.studentName }.size == 1
|
||||||
|
|
||||||
|
suspend fun authorizePermission(student: Student, semester: Semester, pesel: String) =
|
||||||
|
sdk.init(student)
|
||||||
|
.switchDiary(semester.diaryId, semester.kindergartenDiaryId, semester.schoolYear)
|
||||||
|
.authorizePermission(pesel)
|
||||||
|
|
||||||
|
suspend fun refreshStudentName(student: Student, semester: Semester) {
|
||||||
|
val newCurrentApiStudent = sdk.init(student)
|
||||||
|
.switchDiary(semester.diaryId, semester.kindergartenDiaryId, semester.schoolYear)
|
||||||
|
.getCurrentStudent() ?: return
|
||||||
|
|
||||||
|
val studentName = StudentName(
|
||||||
|
studentName = "${newCurrentApiStudent.studentName} ${newCurrentApiStudent.studentSurname}"
|
||||||
|
).apply { id = student.id }
|
||||||
|
|
||||||
|
studentDb.update(studentName)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
|||||||
import com.google.android.material.snackbar.Snackbar
|
import com.google.android.material.snackbar.Snackbar
|
||||||
import com.google.android.material.snackbar.Snackbar.LENGTH_LONG
|
import com.google.android.material.snackbar.Snackbar.LENGTH_LONG
|
||||||
import io.github.wulkanowy.R
|
import io.github.wulkanowy.R
|
||||||
|
import io.github.wulkanowy.ui.modules.auth.AuthDialog
|
||||||
import io.github.wulkanowy.ui.modules.login.LoginActivity
|
import io.github.wulkanowy.ui.modules.login.LoginActivity
|
||||||
import io.github.wulkanowy.utils.FragmentLifecycleLogger
|
import io.github.wulkanowy.utils.FragmentLifecycleLogger
|
||||||
import io.github.wulkanowy.utils.getThemeAttrColor
|
import io.github.wulkanowy.utils.getThemeAttrColor
|
||||||
@ -76,6 +77,10 @@ abstract class BaseActivity<T : BasePresenter<out BaseView>, VB : ViewBinding> :
|
|||||||
.show()
|
.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun showAuthDialog() {
|
||||||
|
AuthDialog.newInstance().show(supportFragmentManager, "auth_dialog")
|
||||||
|
}
|
||||||
|
|
||||||
override fun showChangePasswordSnackbar(redirectUrl: String) {
|
override fun showChangePasswordSnackbar(redirectUrl: String) {
|
||||||
messageContainer?.let {
|
messageContainer?.let {
|
||||||
Snackbar.make(it, R.string.error_password_change_required, LENGTH_LONG)
|
Snackbar.make(it, R.string.error_password_change_required, LENGTH_LONG)
|
||||||
|
@ -5,10 +5,10 @@ import android.view.LayoutInflater
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.annotation.CallSuper
|
|
||||||
import androidx.fragment.app.DialogFragment
|
import androidx.fragment.app.DialogFragment
|
||||||
import androidx.viewbinding.ViewBinding
|
import androidx.viewbinding.ViewBinding
|
||||||
import com.google.android.material.elevation.SurfaceColors
|
import com.google.android.material.elevation.SurfaceColors
|
||||||
|
import io.github.wulkanowy.ui.modules.auth.AuthDialog
|
||||||
import io.github.wulkanowy.utils.AnalyticsHelper
|
import io.github.wulkanowy.utils.AnalyticsHelper
|
||||||
import io.github.wulkanowy.utils.lifecycleAwareVariable
|
import io.github.wulkanowy.utils.lifecycleAwareVariable
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
@ -40,17 +40,19 @@ abstract class BaseDialogFragment<VB : ViewBinding> : DialogFragment(), BaseView
|
|||||||
(activity as? BaseActivity<*, *>)?.showChangePasswordSnackbar(redirectUrl)
|
(activity as? BaseActivity<*, *>)?.showChangePasswordSnackbar(redirectUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun showAuthDialog() {
|
||||||
|
AuthDialog.newInstance().show(childFragmentManager, "auth_dialog")
|
||||||
|
}
|
||||||
|
|
||||||
override fun showErrorDetailsDialog(error: Throwable) {
|
override fun showErrorDetailsDialog(error: Throwable) {
|
||||||
ErrorDialog.newInstance(error).show(childFragmentManager, error.toString())
|
ErrorDialog.newInstance(error).show(childFragmentManager, error.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
@CallSuper
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
view.setBackgroundColor(SurfaceColors.SURFACE_3.getColor(requireContext()))
|
view.setBackgroundColor(SurfaceColors.SURFACE_3.getColor(requireContext()))
|
||||||
}
|
}
|
||||||
|
|
||||||
@CallSuper
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater,
|
inflater: LayoutInflater,
|
||||||
container: ViewGroup?,
|
container: ViewGroup?,
|
||||||
|
@ -7,6 +7,7 @@ import androidx.viewbinding.ViewBinding
|
|||||||
import com.google.android.material.snackbar.Snackbar
|
import com.google.android.material.snackbar.Snackbar
|
||||||
import com.google.android.material.snackbar.Snackbar.LENGTH_LONG
|
import com.google.android.material.snackbar.Snackbar.LENGTH_LONG
|
||||||
import io.github.wulkanowy.R
|
import io.github.wulkanowy.R
|
||||||
|
import io.github.wulkanowy.ui.modules.auth.AuthDialog
|
||||||
import io.github.wulkanowy.utils.lifecycleAwareVariable
|
import io.github.wulkanowy.utils.lifecycleAwareVariable
|
||||||
|
|
||||||
abstract class BaseFragment<VB : ViewBinding>(@LayoutRes layoutId: Int) : Fragment(layoutId),
|
abstract class BaseFragment<VB : ViewBinding>(@LayoutRes layoutId: Int) : Fragment(layoutId),
|
||||||
@ -42,6 +43,10 @@ abstract class BaseFragment<VB : ViewBinding>(@LayoutRes layoutId: Int) : Fragme
|
|||||||
(activity as? BaseActivity<*, *>)?.showExpiredDialog()
|
(activity as? BaseActivity<*, *>)?.showExpiredDialog()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun showAuthDialog() {
|
||||||
|
AuthDialog.newInstance().show(childFragmentManager, "auth_dialog")
|
||||||
|
}
|
||||||
|
|
||||||
override fun openClearLoginView() {
|
override fun openClearLoginView() {
|
||||||
(activity as? BaseActivity<*, *>)?.openClearLoginView()
|
(activity as? BaseActivity<*, *>)?.openClearLoginView()
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
package io.github.wulkanowy.ui.base
|
package io.github.wulkanowy.ui.base
|
||||||
|
|
||||||
import io.github.wulkanowy.data.repositories.StudentRepository
|
import io.github.wulkanowy.data.repositories.StudentRepository
|
||||||
import kotlinx.coroutines.*
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
import kotlinx.coroutines.Job
|
||||||
|
import kotlinx.coroutines.SupervisorJob
|
||||||
|
import kotlinx.coroutines.cancelChildren
|
||||||
import kotlinx.coroutines.flow.Flow
|
import kotlinx.coroutines.flow.Flow
|
||||||
import kotlinx.coroutines.flow.catch
|
import kotlinx.coroutines.flow.catch
|
||||||
import kotlinx.coroutines.flow.launchIn
|
import kotlinx.coroutines.flow.launchIn
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
|
|
||||||
open class BasePresenter<T : BaseView>(
|
open class BasePresenter<T : BaseView>(
|
||||||
@ -26,6 +31,7 @@ open class BasePresenter<T : BaseView>(
|
|||||||
onSessionExpired = view::showExpiredDialog
|
onSessionExpired = view::showExpiredDialog
|
||||||
onNoCurrentStudent = view::openClearLoginView
|
onNoCurrentStudent = view::openClearLoginView
|
||||||
onPasswordChangeRequired = view::showChangePasswordSnackbar
|
onPasswordChangeRequired = view::showChangePasswordSnackbar
|
||||||
|
onAuthorizationRequired = view::showAuthDialog
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,6 +8,8 @@ interface BaseView {
|
|||||||
|
|
||||||
fun showExpiredDialog()
|
fun showExpiredDialog()
|
||||||
|
|
||||||
|
fun showAuthDialog()
|
||||||
|
|
||||||
fun openClearLoginView()
|
fun openClearLoginView()
|
||||||
|
|
||||||
fun showErrorDetailsDialog(error: Throwable)
|
fun showErrorDetailsDialog(error: Throwable)
|
||||||
|
@ -3,6 +3,7 @@ package io.github.wulkanowy.ui.base
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||||
import io.github.wulkanowy.data.exceptions.NoCurrentStudentException
|
import io.github.wulkanowy.data.exceptions.NoCurrentStudentException
|
||||||
|
import io.github.wulkanowy.sdk.scrapper.exception.AuthorizationRequiredException
|
||||||
import io.github.wulkanowy.sdk.scrapper.login.BadCredentialsException
|
import io.github.wulkanowy.sdk.scrapper.login.BadCredentialsException
|
||||||
import io.github.wulkanowy.sdk.scrapper.login.PasswordChangeRequiredException
|
import io.github.wulkanowy.sdk.scrapper.login.PasswordChangeRequiredException
|
||||||
import io.github.wulkanowy.utils.getErrorString
|
import io.github.wulkanowy.utils.getErrorString
|
||||||
@ -20,6 +21,8 @@ open class ErrorHandler @Inject constructor(@ApplicationContext protected val co
|
|||||||
|
|
||||||
var onPasswordChangeRequired: (String) -> Unit = {}
|
var onPasswordChangeRequired: (String) -> Unit = {}
|
||||||
|
|
||||||
|
var onAuthorizationRequired: () -> Unit = {}
|
||||||
|
|
||||||
fun dispatch(error: Throwable) {
|
fun dispatch(error: Throwable) {
|
||||||
Timber.e(error, "An exception occurred while the Wulkanowy was running")
|
Timber.e(error, "An exception occurred while the Wulkanowy was running")
|
||||||
proceed(error)
|
proceed(error)
|
||||||
@ -31,6 +34,7 @@ open class ErrorHandler @Inject constructor(@ApplicationContext protected val co
|
|||||||
is PasswordChangeRequiredException -> onPasswordChangeRequired(error.redirectUrl)
|
is PasswordChangeRequiredException -> onPasswordChangeRequired(error.redirectUrl)
|
||||||
is ScramblerException, is BadCredentialsException -> onSessionExpired()
|
is ScramblerException, is BadCredentialsException -> onSessionExpired()
|
||||||
is NoCurrentStudentException -> onNoCurrentStudent()
|
is NoCurrentStudentException -> onNoCurrentStudent()
|
||||||
|
is AuthorizationRequiredException -> onAuthorizationRequired()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,5 +43,6 @@ open class ErrorHandler @Inject constructor(@ApplicationContext protected val co
|
|||||||
onSessionExpired = {}
|
onSessionExpired = {}
|
||||||
onNoCurrentStudent = {}
|
onNoCurrentStudent = {}
|
||||||
onPasswordChangeRequired = {}
|
onPasswordChangeRequired = {}
|
||||||
|
onAuthorizationRequired = {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,81 @@
|
|||||||
|
package io.github.wulkanowy.ui.modules.auth
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.core.text.parseAsHtml
|
||||||
|
import androidx.core.view.isVisible
|
||||||
|
import androidx.core.widget.doOnTextChanged
|
||||||
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
|
import io.github.wulkanowy.R
|
||||||
|
import io.github.wulkanowy.databinding.DialogAuthBinding
|
||||||
|
import io.github.wulkanowy.ui.base.BaseDialogFragment
|
||||||
|
import javax.inject.Inject
|
||||||
|
|
||||||
|
@AndroidEntryPoint
|
||||||
|
class AuthDialog : BaseDialogFragment<DialogAuthBinding>(), AuthView {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
lateinit var presenter: AuthPresenter
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun newInstance() = AuthDialog()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
setStyle(STYLE_NO_TITLE, R.style.FullScreenDialogStyle)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater,
|
||||||
|
container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View {
|
||||||
|
return DialogAuthBinding.inflate(inflater).apply { binding = this }.root
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
presenter.onAttachView(this)
|
||||||
|
|
||||||
|
binding.authInput.doOnTextChanged { text, _, _, _ ->
|
||||||
|
presenter.onPeselChange(text?.toString())
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.authButton.setOnClickListener { presenter.authorize() }
|
||||||
|
binding.authSuccessButton.setOnClickListener {
|
||||||
|
activity?.recreate()
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
binding.authButtonSkip.setOnClickListener { dismiss() }
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun enableAuthButton(isEnabled: Boolean) {
|
||||||
|
binding.authButton.isEnabled = isEnabled
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun showProgress(show: Boolean) {
|
||||||
|
binding.authProgress.isVisible = show
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun showPeselError(show: Boolean) {
|
||||||
|
binding.authInputLayout.error = getString(R.string.auth_api_error).takeIf { show }
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun showInvalidPeselError(show: Boolean) {
|
||||||
|
binding.authInputLayout.error = getString(R.string.auth_invalid_error).takeIf { show }
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun showSuccess(show: Boolean) {
|
||||||
|
binding.authSuccess.isVisible = show
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun showContent(show: Boolean) {
|
||||||
|
binding.authForm.isVisible = show
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun showDescriptionWithName(name: String) {
|
||||||
|
binding.authDescription.text = getString(R.string.auth_description, name).parseAsHtml()
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,100 @@
|
|||||||
|
package io.github.wulkanowy.ui.modules.auth
|
||||||
|
|
||||||
|
import io.github.wulkanowy.data.repositories.SemesterRepository
|
||||||
|
import io.github.wulkanowy.data.repositories.StudentRepository
|
||||||
|
import io.github.wulkanowy.ui.base.BasePresenter
|
||||||
|
import io.github.wulkanowy.ui.base.ErrorHandler
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
import javax.inject.Inject
|
||||||
|
|
||||||
|
class AuthPresenter @Inject constructor(
|
||||||
|
private val semesterRepository: SemesterRepository,
|
||||||
|
errorHandler: ErrorHandler,
|
||||||
|
studentRepository: StudentRepository
|
||||||
|
) : BasePresenter<AuthView>(errorHandler, studentRepository) {
|
||||||
|
|
||||||
|
private var pesel: String = ""
|
||||||
|
|
||||||
|
override fun onAttachView(view: AuthView) {
|
||||||
|
super.onAttachView(view)
|
||||||
|
view.enableAuthButton(pesel.length == 11)
|
||||||
|
view.showSuccess(false)
|
||||||
|
view.showProgress(false)
|
||||||
|
|
||||||
|
loadName()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun loadName() {
|
||||||
|
presenterScope.launch {
|
||||||
|
runCatching { studentRepository.getCurrentStudent(false) }
|
||||||
|
.onSuccess { view?.showDescriptionWithName(it.studentName) }
|
||||||
|
.onFailure { errorHandler.dispatch(it) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun onPeselChange(newPesel: String?) {
|
||||||
|
pesel = newPesel.orEmpty()
|
||||||
|
|
||||||
|
view?.enableAuthButton(pesel.length == 11)
|
||||||
|
view?.showPeselError(false)
|
||||||
|
view?.showInvalidPeselError(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun authorize() {
|
||||||
|
presenterScope.launch {
|
||||||
|
view?.showProgress(true)
|
||||||
|
view?.showContent(false)
|
||||||
|
|
||||||
|
if (!isValidPESEL(pesel)) {
|
||||||
|
view?.showInvalidPeselError(true)
|
||||||
|
view?.showProgress(false)
|
||||||
|
view?.showContent(true)
|
||||||
|
return@launch
|
||||||
|
}
|
||||||
|
|
||||||
|
runCatching {
|
||||||
|
val student = studentRepository.getCurrentStudent()
|
||||||
|
val semester = semesterRepository.getCurrentSemester(student)
|
||||||
|
|
||||||
|
val isSuccess = studentRepository.authorizePermission(student, semester, pesel)
|
||||||
|
if (isSuccess) {
|
||||||
|
studentRepository.refreshStudentName(student, semester)
|
||||||
|
}
|
||||||
|
isSuccess
|
||||||
|
}
|
||||||
|
.onFailure { errorHandler.dispatch(it) }
|
||||||
|
.onSuccess {
|
||||||
|
if (it) {
|
||||||
|
view?.showSuccess(true)
|
||||||
|
view?.showContent(false)
|
||||||
|
view?.showPeselError(false)
|
||||||
|
} else {
|
||||||
|
view?.showSuccess(false)
|
||||||
|
view?.showContent(true)
|
||||||
|
view?.showPeselError(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
view?.showProgress(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun isValidPESEL(peselString: String): Boolean {
|
||||||
|
if (peselString.length != 11) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
val weights = intArrayOf(1, 3, 7, 9, 1, 3, 7, 9, 1, 3)
|
||||||
|
var sum = 0
|
||||||
|
|
||||||
|
for (i in 0 until 10) {
|
||||||
|
sum += weights[i] * Character.getNumericValue(peselString[i])
|
||||||
|
}
|
||||||
|
|
||||||
|
sum %= 10
|
||||||
|
sum = 10 - sum
|
||||||
|
sum %= 10
|
||||||
|
|
||||||
|
return sum == Character.getNumericValue(peselString[10])
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package io.github.wulkanowy.ui.modules.auth
|
||||||
|
|
||||||
|
import io.github.wulkanowy.ui.base.BaseView
|
||||||
|
|
||||||
|
interface AuthView : BaseView {
|
||||||
|
|
||||||
|
fun enableAuthButton(isEnabled: Boolean)
|
||||||
|
|
||||||
|
fun showProgress(show: Boolean)
|
||||||
|
|
||||||
|
fun showPeselError(show: Boolean)
|
||||||
|
|
||||||
|
fun showInvalidPeselError(show: Boolean)
|
||||||
|
|
||||||
|
fun showSuccess(show: Boolean)
|
||||||
|
|
||||||
|
fun showContent(show: Boolean)
|
||||||
|
|
||||||
|
fun showDescriptionWithName(name: String)
|
||||||
|
}
|
@ -738,8 +738,8 @@ class DashboardAdapter @Inject constructor() : RecyclerView.Adapter<RecyclerView
|
|||||||
val context = adminMessageViewHolder.binding.root.context
|
val context = adminMessageViewHolder.binding.root.context
|
||||||
val (backgroundColor, textColor) = when (item.priority) {
|
val (backgroundColor, textColor) = when (item.priority) {
|
||||||
"HIGH" -> {
|
"HIGH" -> {
|
||||||
context.getThemeAttrColor(R.attr.colorPrimary) to
|
context.getThemeAttrColor(R.attr.colorMessageHigh) to
|
||||||
context.getThemeAttrColor(R.attr.colorOnPrimary)
|
context.getThemeAttrColor(R.attr.colorOnMessageHigh)
|
||||||
}
|
}
|
||||||
"MEDIUM" -> {
|
"MEDIUM" -> {
|
||||||
context.getThemeAttrColor(R.attr.colorMessageMedium) to Color.BLACK
|
context.getThemeAttrColor(R.attr.colorMessageMedium) to Color.BLACK
|
||||||
@ -754,6 +754,7 @@ class DashboardAdapter @Inject constructor() : RecyclerView.Adapter<RecyclerView
|
|||||||
dashboardAdminMessageItemDescription.setTextColor(textColor)
|
dashboardAdminMessageItemDescription.setTextColor(textColor)
|
||||||
dashboardAdminMessageItemIcon.setColorFilter(textColor)
|
dashboardAdminMessageItemIcon.setColorFilter(textColor)
|
||||||
dashboardAdminMessageItemDismiss.isVisible = item.isDismissible
|
dashboardAdminMessageItemDismiss.isVisible = item.isDismissible
|
||||||
|
dashboardAdminMessageItemDismiss.setTextColor(textColor)
|
||||||
dashboardAdminMessageItemDismiss.setOnClickListener {
|
dashboardAdminMessageItemDismiss.setOnClickListener {
|
||||||
onAdminMessageDismissClickListener(item)
|
onAdminMessageDismissClickListener(item)
|
||||||
}
|
}
|
||||||
|
@ -142,10 +142,15 @@ class SendMessageActivity : BaseActivity<SendMessagePresenter, ActivitySendMessa
|
|||||||
|
|
||||||
private fun initializeMessageContainer() {
|
private fun initializeMessageContainer() {
|
||||||
ViewCompat.setOnApplyWindowInsetsListener(binding.sendMessageScroll) { view, insets ->
|
ViewCompat.setOnApplyWindowInsetsListener(binding.sendMessageScroll) { view, insets ->
|
||||||
val bottomInsets = insets.getInsets(WindowInsetsCompat.Type.navigationBars())
|
val navigationBarInsets = insets.getInsets(WindowInsetsCompat.Type.navigationBars())
|
||||||
|
val imeInsets = insets.getInsets(WindowInsetsCompat.Type.ime())
|
||||||
|
|
||||||
view.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
view.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||||
bottomMargin = bottomInsets.bottom
|
bottomMargin = if (imeInsets.bottom > navigationBarInsets.bottom) {
|
||||||
|
imeInsets.bottom
|
||||||
|
} else {
|
||||||
|
navigationBarInsets.bottom
|
||||||
|
}
|
||||||
}
|
}
|
||||||
WindowInsetsCompat.CONSUMED
|
WindowInsetsCompat.CONSUMED
|
||||||
}
|
}
|
||||||
|
@ -31,4 +31,6 @@ class SettingsFragment : PreferenceFragmentCompat(), MainView.TitledView, Settin
|
|||||||
override fun showErrorDetailsDialog(error: Throwable) {}
|
override fun showErrorDetailsDialog(error: Throwable) {}
|
||||||
|
|
||||||
override fun showChangePasswordSnackbar(redirectUrl: String) {}
|
override fun showChangePasswordSnackbar(redirectUrl: String) {}
|
||||||
|
|
||||||
|
override fun showAuthDialog() {}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import dagger.hilt.android.AndroidEntryPoint
|
|||||||
import io.github.wulkanowy.R
|
import io.github.wulkanowy.R
|
||||||
import io.github.wulkanowy.ui.base.BaseActivity
|
import io.github.wulkanowy.ui.base.BaseActivity
|
||||||
import io.github.wulkanowy.ui.base.ErrorDialog
|
import io.github.wulkanowy.ui.base.ErrorDialog
|
||||||
|
import io.github.wulkanowy.ui.modules.auth.AuthDialog
|
||||||
import io.github.wulkanowy.ui.modules.main.MainView
|
import io.github.wulkanowy.ui.modules.main.MainView
|
||||||
import io.github.wulkanowy.utils.AppInfo
|
import io.github.wulkanowy.utils.AppInfo
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
@ -62,6 +63,10 @@ class AdvancedFragment : PreferenceFragmentCompat(),
|
|||||||
ErrorDialog.newInstance(error).show(childFragmentManager, error.toString())
|
ErrorDialog.newInstance(error).show(childFragmentManager, error.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun showAuthDialog() {
|
||||||
|
AuthDialog.newInstance().show(childFragmentManager, "auth_dialog")
|
||||||
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
preferenceScreen.sharedPreferences?.registerOnSharedPreferenceChangeListener(this)
|
preferenceScreen.sharedPreferences?.registerOnSharedPreferenceChangeListener(this)
|
||||||
|
@ -9,6 +9,7 @@ import dagger.hilt.android.AndroidEntryPoint
|
|||||||
import io.github.wulkanowy.R
|
import io.github.wulkanowy.R
|
||||||
import io.github.wulkanowy.ui.base.BaseActivity
|
import io.github.wulkanowy.ui.base.BaseActivity
|
||||||
import io.github.wulkanowy.ui.base.ErrorDialog
|
import io.github.wulkanowy.ui.base.ErrorDialog
|
||||||
|
import io.github.wulkanowy.ui.modules.auth.AuthDialog
|
||||||
import io.github.wulkanowy.ui.modules.main.MainView
|
import io.github.wulkanowy.ui.modules.main.MainView
|
||||||
import io.github.wulkanowy.utils.AppInfo
|
import io.github.wulkanowy.utils.AppInfo
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
@ -78,6 +79,10 @@ class AppearanceFragment : PreferenceFragmentCompat(),
|
|||||||
ErrorDialog.newInstance(error).show(childFragmentManager, error.toString())
|
ErrorDialog.newInstance(error).show(childFragmentManager, error.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun showAuthDialog() {
|
||||||
|
AuthDialog.newInstance().show(childFragmentManager, "auth_dialog")
|
||||||
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
preferenceScreen.sharedPreferences?.registerOnSharedPreferenceChangeListener(this)
|
preferenceScreen.sharedPreferences?.registerOnSharedPreferenceChangeListener(this)
|
||||||
|
@ -21,6 +21,7 @@ import dagger.hilt.android.AndroidEntryPoint
|
|||||||
import io.github.wulkanowy.R
|
import io.github.wulkanowy.R
|
||||||
import io.github.wulkanowy.ui.base.BaseActivity
|
import io.github.wulkanowy.ui.base.BaseActivity
|
||||||
import io.github.wulkanowy.ui.base.ErrorDialog
|
import io.github.wulkanowy.ui.base.ErrorDialog
|
||||||
|
import io.github.wulkanowy.ui.modules.auth.AuthDialog
|
||||||
import io.github.wulkanowy.ui.modules.main.MainView
|
import io.github.wulkanowy.ui.modules.main.MainView
|
||||||
import io.github.wulkanowy.utils.AppInfo
|
import io.github.wulkanowy.utils.AppInfo
|
||||||
import io.github.wulkanowy.utils.openInternetBrowser
|
import io.github.wulkanowy.utils.openInternetBrowser
|
||||||
@ -148,6 +149,10 @@ class NotificationsFragment : PreferenceFragmentCompat(),
|
|||||||
ErrorDialog.newInstance(error).show(childFragmentManager, error.toString())
|
ErrorDialog.newInstance(error).show(childFragmentManager, error.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun showAuthDialog() {
|
||||||
|
AuthDialog.newInstance().show(childFragmentManager, "auth_dialog")
|
||||||
|
}
|
||||||
|
|
||||||
override fun showFixSyncDialog() {
|
override fun showFixSyncDialog() {
|
||||||
MaterialAlertDialogBuilder(requireContext())
|
MaterialAlertDialogBuilder(requireContext())
|
||||||
.setTitle(R.string.pref_notify_fix_sync_issues)
|
.setTitle(R.string.pref_notify_fix_sync_issues)
|
||||||
|
@ -10,6 +10,7 @@ import dagger.hilt.android.AndroidEntryPoint
|
|||||||
import io.github.wulkanowy.R
|
import io.github.wulkanowy.R
|
||||||
import io.github.wulkanowy.ui.base.BaseActivity
|
import io.github.wulkanowy.ui.base.BaseActivity
|
||||||
import io.github.wulkanowy.ui.base.ErrorDialog
|
import io.github.wulkanowy.ui.base.ErrorDialog
|
||||||
|
import io.github.wulkanowy.ui.modules.auth.AuthDialog
|
||||||
import io.github.wulkanowy.ui.modules.main.MainView
|
import io.github.wulkanowy.ui.modules.main.MainView
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
@ -99,6 +100,10 @@ class SyncFragment : PreferenceFragmentCompat(),
|
|||||||
ErrorDialog.newInstance(error).show(childFragmentManager, "error_details")
|
ErrorDialog.newInstance(error).show(childFragmentManager, "error_details")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun showAuthDialog() {
|
||||||
|
AuthDialog.newInstance().show(childFragmentManager, "auth_dialog")
|
||||||
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
preferenceScreen.sharedPreferences?.registerOnSharedPreferenceChangeListener(this)
|
preferenceScreen.sharedPreferences?.registerOnSharedPreferenceChangeListener(this)
|
||||||
|
@ -2,4 +2,4 @@ package io.github.wulkanowy.utils
|
|||||||
|
|
||||||
import io.github.wulkanowy.data.db.entities.Student
|
import io.github.wulkanowy.data.db.entities.Student
|
||||||
|
|
||||||
inline val Student.nickOrName get() = if (nick.isBlank()) studentName else nick
|
inline val Student.nickOrName get() = nick.ifBlank { studentName }
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
Wersja 2.0.0
|
Wersja 2.0.7
|
||||||
|
|
||||||
— zaktualizowaliśmy wygląd aplikacji na (częściowo) zgodny z wytycznymi Material 3
|
— poprawiliśmy wyświetlanie kilku rodzajów zmian w planie lekcji
|
||||||
— dodaliśmy możliwość zmiany kolejności pozycji w menu dolnym
|
— dodaliśmy limit znaków w okienku usprawiedliwiania
|
||||||
— poprawiliśmy sposób wyświetlania błędu o nieprawidłowym haśle na ekranie logowania
|
— naprawiliśmy wyświetlanie frekwencji w szkołach, gdzie działa już system eduOne (ciągle jednak brak opcji usprawiedliwiania)
|
||||||
— od teraz zmiana ustawień liczenia średniej automatycznie odświeży listę ocen
|
|
||||||
|
|
||||||
Pełna lista zmian: https://github.com/wulkanowy/wulkanowy/releases
|
Pełna lista zmian: https://github.com/wulkanowy/wulkanowy/releases
|
||||||
|
10
app/src/main/res/drawable/ic_auth_success.xml
Normal file
10
app/src/main/res/drawable/ic_auth_success.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<vector android:height="24dp"
|
||||||
|
android:tint="#000000"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:width="24dp"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM16.59,7.58L10,14.17l-2.59,-2.58L6,13l4,4 8,-8z" />
|
||||||
|
</vector>
|
@ -22,17 +22,15 @@
|
|||||||
|
|
||||||
<io.github.wulkanowy.materialchipsinput.ConsumedNestedScrollView
|
<io.github.wulkanowy.materialchipsinput.ConsumedNestedScrollView
|
||||||
android:id="@+id/sendMessageScroll"
|
android:id="@+id/sendMessageScroll"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:fillViewport="true"
|
android:fillViewport="true"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/send_app_bar">
|
app:layout_constraintTop_toBottomOf="@id/send_app_bar">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/sendMessageContent"
|
android:id="@+id/sendMessageContent"
|
||||||
|
128
app/src/main/res/layout/dialog_auth.xml
Normal file
128
app/src/main/res/layout/dialog_auth.xml
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:fillViewport="true">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/auth_form"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/auth_title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="24dp"
|
||||||
|
android:layout_marginTop="32dp"
|
||||||
|
android:text="@string/auth_title"
|
||||||
|
android:textSize="24sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/auth_description"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="24dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/auth_title"
|
||||||
|
app:lineHeight="24sp"
|
||||||
|
tools:text="@string/auth_description" />
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/auth_input_layout"
|
||||||
|
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="24dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:hint="@string/auth_pesel"
|
||||||
|
app:errorEnabled="true"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/auth_description">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/auth_input"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="numberDecimal"
|
||||||
|
android:maxLength="11" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/auth_button"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="24dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:text="@string/auth_button"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/auth_button_skip"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/auth_input_layout"
|
||||||
|
app:layout_constraintVertical_bias="1" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/auth_button_skip"
|
||||||
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="24dp"
|
||||||
|
android:text="@string/auth_button_skip"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/auth_success"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/auth_success_icon"
|
||||||
|
android:layout_width="62dp"
|
||||||
|
android:layout_height="62dp"
|
||||||
|
android:layout_marginTop="220dp"
|
||||||
|
android:importantForAccessibility="no"
|
||||||
|
android:src="@drawable/ic_auth_success"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:tint="?colorOnBackground" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/auth_success_description"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="24dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/auth_success"
|
||||||
|
android:textSize="24sp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/auth_success_icon"
|
||||||
|
app:lineHeight="32sp" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/auth_success_button"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="24dp"
|
||||||
|
android:text="@android:string/ok"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/auth_success_description"
|
||||||
|
app:layout_constraintVertical_bias="1" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/auth_progress"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center" />
|
||||||
|
</FrameLayout>
|
||||||
|
</ScrollView>
|
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
@ -8,13 +9,18 @@
|
|||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
|
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
app:counterEnabled="true"
|
||||||
|
app:counterMaxLength="256">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/excuseReason"
|
android:id="@+id/excuseReason"
|
||||||
|
style="@style/Widget.Material3.TextInputEditText.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/attendance_excuse_dialog_reason" />
|
android:layout_weight="1"
|
||||||
|
android:hint="@string/attendance_excuse_dialog_reason"
|
||||||
|
android:maxLength="256" />
|
||||||
|
|
||||||
<requestFocus />
|
<requestFocus />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
@ -14,16 +14,13 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/homework_dialog_header"
|
android:id="@+id/homework_dialog_header"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:text="@string/all_details"
|
android:text="@string/all_details"
|
||||||
android:textAppearance="?attr/textAppearanceHeadlineSmall"
|
android:textAppearance="?attr/textAppearanceHeadlineSmall"
|
||||||
android:textColor="?attr/colorOnSurface"
|
android:textColor="?attr/colorOnSurface" />
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/homework_dialog_delete"
|
android:id="@+id/homework_dialog_delete"
|
||||||
|
@ -809,6 +809,15 @@
|
|||||||
<string name="menu_order_confirm_title">Restartování aplikace</string>
|
<string name="menu_order_confirm_title">Restartování aplikace</string>
|
||||||
<string name="menu_order_confirm_content">Pro uložení změn je nutné aplikaci restartovat</string>
|
<string name="menu_order_confirm_content">Pro uložení změn je nutné aplikaci restartovat</string>
|
||||||
<string name="menu_order_confirm_restart">Restartovat</string>
|
<string name="menu_order_confirm_restart">Restartovat</string>
|
||||||
|
<!--Auth-->
|
||||||
|
<string name="auth_api_error">Autorizace byla zamítnuta. Uvedené údaje se neshodují se záznamy v kanceláři tajemníka.</string>
|
||||||
|
<string name="auth_invalid_error">Neplatný PESEL</string>
|
||||||
|
<string name="auth_pesel">PESEL</string>
|
||||||
|
<string name="auth_button">Autorizovat</string>
|
||||||
|
<string name="auth_success">Autorizace byla úspěšně dokončena</string>
|
||||||
|
<string name="auth_title">Autorizace</string>
|
||||||
|
<string name="auth_description">Pro provoz aplikace potřebujeme potvrdit vaši identitu. Zadejte PESEL žáka <b>%1$s</b> v níže uvedeném poli</string>
|
||||||
|
<string name="auth_button_skip">Zatím přeskočit</string>
|
||||||
<!--Errors-->
|
<!--Errors-->
|
||||||
<string name="error_no_internet">Žádné internetové připojení</string>
|
<string name="error_no_internet">Žádné internetové připojení</string>
|
||||||
<string name="error_invalid_device_datetime">Vyskytla se chyba. Zkontrolujte hodiny svého zařízení</string>
|
<string name="error_invalid_device_datetime">Vyskytla se chyba. Zkontrolujte hodiny svého zařízení</string>
|
||||||
|
@ -721,6 +721,15 @@
|
|||||||
<string name="menu_order_confirm_title">Application restart</string>
|
<string name="menu_order_confirm_title">Application restart</string>
|
||||||
<string name="menu_order_confirm_content">The application must restart for the changes to be saved</string>
|
<string name="menu_order_confirm_content">The application must restart for the changes to be saved</string>
|
||||||
<string name="menu_order_confirm_restart">Restart</string>
|
<string name="menu_order_confirm_restart">Restart</string>
|
||||||
|
<!--Auth-->
|
||||||
|
<string name="auth_api_error">Authorization has been rejected. The data provided does not match the records in the secretary\'s office.</string>
|
||||||
|
<string name="auth_invalid_error">Invalid PESEL</string>
|
||||||
|
<string name="auth_pesel">PESEL</string>
|
||||||
|
<string name="auth_button">Authorize</string>
|
||||||
|
<string name="auth_success">Authorization completed successfully</string>
|
||||||
|
<string name="auth_title">Authorization</string>
|
||||||
|
<string name="auth_description">To operate the application, we need to confirm your identity. Please enter the student\'s PESEL <b>%1$s</b> in the field below</string>
|
||||||
|
<string name="auth_button_skip">Skip for now</string>
|
||||||
<!--Errors-->
|
<!--Errors-->
|
||||||
<string name="error_no_internet">No internet connection</string>
|
<string name="error_no_internet">No internet connection</string>
|
||||||
<string name="error_invalid_device_datetime">An error occurred. Check your device clock</string>
|
<string name="error_invalid_device_datetime">An error occurred. Check your device clock</string>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<string name="student_info_title">Schülerinfo</string>
|
<string name="student_info_title">Schülerinfo</string>
|
||||||
<string name="dashboard_title">Übersicht</string>
|
<string name="dashboard_title">Übersicht</string>
|
||||||
<string name="notifications_center_title">Benachrichtigungszentrum</string>
|
<string name="notifications_center_title">Benachrichtigungszentrum</string>
|
||||||
<string name="menu_order_title">Menu configuartion</string>
|
<string name="menu_order_title">Menü Konfiguration</string>
|
||||||
<!--Subtitles-->
|
<!--Subtitles-->
|
||||||
<string name="grade_subtitle">Semester %1$d, %2$d/%3$d</string>
|
<string name="grade_subtitle">Semester %1$d, %2$d/%3$d</string>
|
||||||
<!--Login-->
|
<!--Login-->
|
||||||
@ -56,7 +56,7 @@
|
|||||||
<string name="login_invalid_symbol">Ungültige symbol</string>
|
<string name="login_invalid_symbol">Ungültige symbol</string>
|
||||||
<string name="login_incorrect_symbol">Schüler nicht gefunden. Überprüfen Sie das Symbol und die gewählte Variation des UONET+ Registers</string>
|
<string name="login_incorrect_symbol">Schüler nicht gefunden. Überprüfen Sie das Symbol und die gewählte Variation des UONET+ Registers</string>
|
||||||
<string name="login_duplicate_student">Ausgewählter Student ist bereits angemeldet.</string>
|
<string name="login_duplicate_student">Ausgewählter Student ist bereits angemeldet.</string>
|
||||||
<string name="login_symbol_helper">The symbol can be found on the register page in <b>Uczeń</b> → <b>Dostęp Mobilny</b> → <b>Wygeneruj kod dostępu</b>.\n\nMake sure that you have set the appropriate register variant in the <b>UONET+ register variant</b> field on the first login screen</string>
|
<string name="login_symbol_helper">Das Symbol kann auf der Registerseite in <b>Student </b>→ <b>Tost Möbeln</b> → <b>Registrieren Sie Ihr Mobilgerät</b>gefunden werden.\n\nStellen Sie sicher, dass Sie die entsprechende Registervariante im Feld <b>UONET+ Registervariante</b> auf dem vorherigen Bildschirm festgelegt haben</string>
|
||||||
<string name="login_select_student">Wählen Sie die Studenten aus, die sich bei der Anwendung anmelden sollen</string>
|
<string name="login_select_student">Wählen Sie die Studenten aus, die sich bei der Anwendung anmelden sollen</string>
|
||||||
<string name="login_advanced">Andere Optionen</string>
|
<string name="login_advanced">Andere Optionen</string>
|
||||||
<string name="login_advanced_warning_mobile_api">In diesem Modus funktioniert eine Glücknummer, eine Klassenstatistik, eine Zusammenfassung der Anwesenheit, eine Entschuldigung für die Abwesenheit, abgeschlossene Lektionen, Schulinformationen und eine Vorschau der Liste der registrierten Geräte nicht</string>
|
<string name="login_advanced_warning_mobile_api">In diesem Modus funktioniert eine Glücknummer, eine Klassenstatistik, eine Zusammenfassung der Anwesenheit, eine Entschuldigung für die Abwesenheit, abgeschlossene Lektionen, Schulinformationen und eine Vorschau der Liste der registrierten Geräte nicht</string>
|
||||||
@ -73,14 +73,14 @@
|
|||||||
<string name="login_recover">Wiederherstellen</string>
|
<string name="login_recover">Wiederherstellen</string>
|
||||||
<string name="login_signed_in">Student ist bereits angemeldet</string>
|
<string name="login_signed_in">Student ist bereits angemeldet</string>
|
||||||
<string name="login_host_standard">Standard</string>
|
<string name="login_host_standard">Standard</string>
|
||||||
<string name="login_other_search_locations">Other search locations</string>
|
<string name="login_other_search_locations">Andere Suchorte</string>
|
||||||
<string name="login_no_active_student">No active students found</string>
|
<string name="login_no_active_student">Keine aktiven Schüler gefunden</string>
|
||||||
<string name="login_symbol_enter">Enter a different symbol</string>
|
<string name="login_symbol_enter">Geben Sie ein anderes Symbol ein</string>
|
||||||
<!--Notifications-->
|
<!--Notifications-->
|
||||||
<string name="notifications_header_title">Enable notifications</string>
|
<string name="notifications_header_title">Benachrichtigungen aktivieren</string>
|
||||||
<string name="notifications_header_description">Enable notifications so you don\'t miss message from teacher or new grade</string>
|
<string name="notifications_header_description">Aktivieren Sie Benachrichtigungen, damit Sie keine Nachricht vom Lehrer oder eine neue Klasse verpassen</string>
|
||||||
<string name="notifications_skip">Skip</string>
|
<string name="notifications_skip">Überspringen</string>
|
||||||
<string name="notifications_enable">Enable</string>
|
<string name="notifications_enable">Ermöglichen</string>
|
||||||
<!--Main-->
|
<!--Main-->
|
||||||
<string name="main_account_picker">Kundenbetreuer</string>
|
<string name="main_account_picker">Kundenbetreuer</string>
|
||||||
<string name="main_log_in">Anmelden</string>
|
<string name="main_log_in">Anmelden</string>
|
||||||
@ -288,7 +288,7 @@
|
|||||||
<string name="message_chip_only_unread">Nur ungelesen</string>
|
<string name="message_chip_only_unread">Nur ungelesen</string>
|
||||||
<string name="message_chip_only_with_attachments">Nur mit Anhängen</string>
|
<string name="message_chip_only_with_attachments">Nur mit Anhängen</string>
|
||||||
<string name="message_read">Lesen: %s</string>
|
<string name="message_read">Lesen: %s</string>
|
||||||
<string name="message_read_by">Read by: %1$d of %2$d people</string>
|
<string name="message_read_by">Lesen von: %1$d von %2$d Personen</string>
|
||||||
<plurals name="message_number_item">
|
<plurals name="message_number_item">
|
||||||
<item quantity="one">%1$d Nachricht</item>
|
<item quantity="one">%1$d Nachricht</item>
|
||||||
<item quantity="other">%1$d Nachrichten</item>
|
<item quantity="other">%1$d Nachrichten</item>
|
||||||
@ -422,8 +422,8 @@
|
|||||||
</plurals>
|
</plurals>
|
||||||
<string name="conferences_present">Teilnahme an einem Meeting</string>
|
<string name="conferences_present">Teilnahme an einem Meeting</string>
|
||||||
<string name="conference_agenda">Agenda</string>
|
<string name="conference_agenda">Agenda</string>
|
||||||
<string name="conference_place">Place</string>
|
<string name="conference_place">Ort</string>
|
||||||
<string name="conference_topic">Topic</string>
|
<string name="conference_topic">Thema</string>
|
||||||
<!--Director information-->
|
<!--Director information-->
|
||||||
<string name="school_announcement_title">Schulankündigungen</string>
|
<string name="school_announcement_title">Schulankündigungen</string>
|
||||||
<string name="school_announcement_no_items">Keine schulankündigungen</string>
|
<string name="school_announcement_no_items">Keine schulankündigungen</string>
|
||||||
@ -591,10 +591,10 @@
|
|||||||
<string name="all_undo">lösen</string>
|
<string name="all_undo">lösen</string>
|
||||||
<string name="all_change">Ändern</string>
|
<string name="all_change">Ändern</string>
|
||||||
<string name="all_add_to_calendar">Zum Kalender hinzufügen</string>
|
<string name="all_add_to_calendar">Zum Kalender hinzufügen</string>
|
||||||
<string name="all_cancel">Cancel</string>
|
<string name="all_cancel">Stornieren</string>
|
||||||
<!--Timetable Widget-->
|
<!--Timetable Widget-->
|
||||||
<string name="widget_timetable_no_items">Keine Lektionen</string>
|
<string name="widget_timetable_no_items">Keine Lektionen</string>
|
||||||
<string name="widget_timetable_last_synchronization">Synchronized on %1$s at %2$s</string>
|
<string name="widget_timetable_last_synchronization">Synchronisiert am %1$s am %2$s</string>
|
||||||
<string name="widget_timetable_theme_title">Thema wählen</string>
|
<string name="widget_timetable_theme_title">Thema wählen</string>
|
||||||
<string name="widget_timetable_theme_light">Licht</string>
|
<string name="widget_timetable_theme_light">Licht</string>
|
||||||
<string name="widget_timetable_theme_dark">Dunkel</string>
|
<string name="widget_timetable_theme_dark">Dunkel</string>
|
||||||
@ -614,8 +614,8 @@
|
|||||||
<string name="pref_view_grade_color_scheme">Farbschema der Noten</string>
|
<string name="pref_view_grade_color_scheme">Farbschema der Noten</string>
|
||||||
<string name="pref_view_grade_sorting_mode">Schulfachen sortieren</string>
|
<string name="pref_view_grade_sorting_mode">Schulfachen sortieren</string>
|
||||||
<string name="pref_view_app_language">Sprache</string>
|
<string name="pref_view_app_language">Sprache</string>
|
||||||
<string name="pref_view_menu_order_title">Menu configuration</string>
|
<string name="pref_view_menu_order_title">Menü Konfiguration</string>
|
||||||
<string name="pref_view_menu_order_summary">Set the order of functions in the menu</string>
|
<string name="pref_view_menu_order_summary">Legen Sie die Reihenfolge der Funktionen im Menü fest</string>
|
||||||
<string name="pref_notify_header">Benachrichtigungen</string>
|
<string name="pref_notify_header">Benachrichtigungen</string>
|
||||||
<string name="pref_notify_header_other">Sonstiges</string>
|
<string name="pref_notify_header_other">Sonstiges</string>
|
||||||
<string name="pref_notify_switch">Benachrichtigungen anzeigen</string>
|
<string name="pref_notify_switch">Benachrichtigungen anzeigen</string>
|
||||||
@ -718,9 +718,18 @@
|
|||||||
<string name="update_download_success_button">Neustart</string>
|
<string name="update_download_success_button">Neustart</string>
|
||||||
<string name="update_failed">Update fehlgeschlagen! Wulkanowy funktioniert möglicherweise nicht richtig. Überlegen Sie die Aktualisierung</string>
|
<string name="update_failed">Update fehlgeschlagen! Wulkanowy funktioniert möglicherweise nicht richtig. Überlegen Sie die Aktualisierung</string>
|
||||||
<!--Menu order-->
|
<!--Menu order-->
|
||||||
<string name="menu_order_confirm_title">Application restart</string>
|
<string name="menu_order_confirm_title">Neustart der Anwendung</string>
|
||||||
<string name="menu_order_confirm_content">The application must restart for the changes to be saved</string>
|
<string name="menu_order_confirm_content">Die Anwendung muss neu gestartet werden, damit die Änderungen gespeichert werden</string>
|
||||||
<string name="menu_order_confirm_restart">Restart</string>
|
<string name="menu_order_confirm_restart">Restart</string>
|
||||||
|
<!--Auth-->
|
||||||
|
<string name="auth_api_error">Authorization has been rejected. The data provided does not match the records in the secretary\'s office.</string>
|
||||||
|
<string name="auth_invalid_error">Invalid PESEL</string>
|
||||||
|
<string name="auth_pesel">PESEL</string>
|
||||||
|
<string name="auth_button">Authorize</string>
|
||||||
|
<string name="auth_success">Authorization completed successfully</string>
|
||||||
|
<string name="auth_title">Authorization</string>
|
||||||
|
<string name="auth_description">To operate the application, we need to confirm your identity. Please enter the student\'s PESEL <b>%1$s</b> in the field below</string>
|
||||||
|
<string name="auth_button_skip">Skip for now</string>
|
||||||
<!--Errors-->
|
<!--Errors-->
|
||||||
<string name="error_no_internet">Keine Internetverbindung</string>
|
<string name="error_no_internet">Keine Internetverbindung</string>
|
||||||
<string name="error_invalid_device_datetime">Es ist ein Fehler aufgetreten. Überprüfen Sie Ihre Geräteuhr</string>
|
<string name="error_invalid_device_datetime">Es ist ein Fehler aufgetreten. Überprüfen Sie Ihre Geräteuhr</string>
|
||||||
|
@ -721,6 +721,15 @@
|
|||||||
<string name="menu_order_confirm_title">Application restart</string>
|
<string name="menu_order_confirm_title">Application restart</string>
|
||||||
<string name="menu_order_confirm_content">The application must restart for the changes to be saved</string>
|
<string name="menu_order_confirm_content">The application must restart for the changes to be saved</string>
|
||||||
<string name="menu_order_confirm_restart">Restart</string>
|
<string name="menu_order_confirm_restart">Restart</string>
|
||||||
|
<!--Auth-->
|
||||||
|
<string name="auth_api_error">Authorization has been rejected. The data provided does not match the records in the secretary\'s office.</string>
|
||||||
|
<string name="auth_invalid_error">Invalid PESEL</string>
|
||||||
|
<string name="auth_pesel">PESEL</string>
|
||||||
|
<string name="auth_button">Authorize</string>
|
||||||
|
<string name="auth_success">Authorization completed successfully</string>
|
||||||
|
<string name="auth_title">Authorization</string>
|
||||||
|
<string name="auth_description">To operate the application, we need to confirm your identity. Please enter the student\'s PESEL <b>%1$s</b> in the field below</string>
|
||||||
|
<string name="auth_button_skip">Skip for now</string>
|
||||||
<!--Errors-->
|
<!--Errors-->
|
||||||
<string name="error_no_internet">No internet connection</string>
|
<string name="error_no_internet">No internet connection</string>
|
||||||
<string name="error_invalid_device_datetime">An error occurred. Check your device clock</string>
|
<string name="error_invalid_device_datetime">An error occurred. Check your device clock</string>
|
||||||
|
@ -35,7 +35,9 @@
|
|||||||
<item name="colorError">@color/colorErrorLight</item>
|
<item name="colorError">@color/colorErrorLight</item>
|
||||||
<item name="colorDivider">@color/colorDividerInverse</item>
|
<item name="colorDivider">@color/colorDividerInverse</item>
|
||||||
<item name="colorSwipeRefresh">@color/material_dynamic_secondary20</item>
|
<item name="colorSwipeRefresh">@color/material_dynamic_secondary20</item>
|
||||||
<item name="colorMessageMedium">@color/dashboard_message_medium_light</item>
|
<item name="colorMessageMedium">@color/dashboard_message_medium_dark</item>
|
||||||
|
<item name="colorMessageHigh">@color/dashboard_message_high_dark</item>
|
||||||
|
<item name="colorOnMessageHigh">@android:color/black</item>
|
||||||
<item name="android:windowBackground">?colorSurface</item>
|
<item name="android:windowBackground">?colorSurface</item>
|
||||||
<item name="android:textColor">@color/material_dynamic_neutral90</item>
|
<item name="android:textColor">@color/material_dynamic_neutral90</item>
|
||||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||||
|
@ -24,7 +24,9 @@
|
|||||||
<item name="colorError">@color/colorErrorLight</item>
|
<item name="colorError">@color/colorErrorLight</item>
|
||||||
<item name="colorDivider">@color/colorDividerInverse</item>
|
<item name="colorDivider">@color/colorDividerInverse</item>
|
||||||
<item name="colorSwipeRefresh">@color/colorSwipeRefreshDark</item>
|
<item name="colorSwipeRefresh">@color/colorSwipeRefreshDark</item>
|
||||||
<item name="colorMessageMedium">@color/dashboard_message_medium_light</item>
|
<item name="colorMessageMedium">@color/dashboard_message_medium_dark</item>
|
||||||
|
<item name="colorMessageHigh">@color/dashboard_message_high_dark</item>
|
||||||
|
<item name="colorOnMessageHigh">@android:color/black</item>
|
||||||
<item name="android:windowBackground">?colorSurface</item>
|
<item name="android:windowBackground">?colorSurface</item>
|
||||||
<item name="android:textColor">?android:textColorPrimary</item>
|
<item name="android:textColor">?android:textColorPrimary</item>
|
||||||
<item name="android:navigationBarColor">@color/colorNavigationBarDark</item>
|
<item name="android:navigationBarColor">@color/colorNavigationBarDark</item>
|
||||||
|
@ -809,6 +809,15 @@
|
|||||||
<string name="menu_order_confirm_title">Ponowne uruchomienie aplikacji</string>
|
<string name="menu_order_confirm_title">Ponowne uruchomienie aplikacji</string>
|
||||||
<string name="menu_order_confirm_content">W celu zapisania zmian aplikacja musi zostać ponownie uruchomiona</string>
|
<string name="menu_order_confirm_content">W celu zapisania zmian aplikacja musi zostać ponownie uruchomiona</string>
|
||||||
<string name="menu_order_confirm_restart">Uruchom ponownie</string>
|
<string name="menu_order_confirm_restart">Uruchom ponownie</string>
|
||||||
|
<!--Auth-->
|
||||||
|
<string name="auth_api_error">Autoryzacja została odrzucona. Podano dane niezgodne z danymi w sekretariacie.</string>
|
||||||
|
<string name="auth_invalid_error">Nieprawidłowy PESEL</string>
|
||||||
|
<string name="auth_pesel">PESEL</string>
|
||||||
|
<string name="auth_button">Potwierdź</string>
|
||||||
|
<string name="auth_success">Autoryzacja zakończona pomyślnie</string>
|
||||||
|
<string name="auth_title">Autoryzacja</string>
|
||||||
|
<string name="auth_description">Rodzicu, musimy mieć pewność, że Twój adres e-mail został powiązany z prawidłowym kontem ucznia. W celu autoryzacji konta podaj numer PESEL ucznia <b>%1$s</b> w polu poniżej</string>
|
||||||
|
<string name="auth_button_skip">Na razie pomiń</string>
|
||||||
<!--Errors-->
|
<!--Errors-->
|
||||||
<string name="error_no_internet">Brak połączenia z internetem</string>
|
<string name="error_no_internet">Brak połączenia z internetem</string>
|
||||||
<string name="error_invalid_device_datetime">Wystąpił błąd. Sprawdź poprawność daty w urządzeniu</string>
|
<string name="error_invalid_device_datetime">Wystąpił błąd. Sprawdź poprawność daty w urządzeniu</string>
|
||||||
|
@ -682,7 +682,7 @@
|
|||||||
<string name="all_cancel">Отменить</string>
|
<string name="all_cancel">Отменить</string>
|
||||||
<!--Timetable Widget-->
|
<!--Timetable Widget-->
|
||||||
<string name="widget_timetable_no_items">Нет уроков</string>
|
<string name="widget_timetable_no_items">Нет уроков</string>
|
||||||
<string name="widget_timetable_last_synchronization">Synchronized on %1$s at %2$s</string>
|
<string name="widget_timetable_last_synchronization">Синхронизировано %1$s в %2$s</string>
|
||||||
<string name="widget_timetable_theme_title">Выбрать тему</string>
|
<string name="widget_timetable_theme_title">Выбрать тему</string>
|
||||||
<string name="widget_timetable_theme_light">Светлая</string>
|
<string name="widget_timetable_theme_light">Светлая</string>
|
||||||
<string name="widget_timetable_theme_dark">Тёмная</string>
|
<string name="widget_timetable_theme_dark">Тёмная</string>
|
||||||
@ -778,7 +778,7 @@
|
|||||||
<string name="pref_advanced_category_summary">Значения плюса и минуса, расчёт средней оценки</string>
|
<string name="pref_advanced_category_summary">Значения плюса и минуса, расчёт средней оценки</string>
|
||||||
<string name="pref_advanced_category">Расширенные</string>
|
<string name="pref_advanced_category">Расширенные</string>
|
||||||
<string name="pref_about_category_summary">Версия приложения, разработчики, соц. сети</string>
|
<string name="pref_about_category_summary">Версия приложения, разработчики, соц. сети</string>
|
||||||
<string name="pref_ads_category_summary">Посмотреть рекламу, чтобы поддержать преокт</string>
|
<string name="pref_ads_category_summary">Посмотреть рекламу, чтобы поддержать проект</string>
|
||||||
<!--Notification Channels-->
|
<!--Notification Channels-->
|
||||||
<string name="channel_new_grades">Новые оценки</string>
|
<string name="channel_new_grades">Новые оценки</string>
|
||||||
<string name="channel_new_homework">Новое домашнее задание</string>
|
<string name="channel_new_homework">Новое домашнее задание</string>
|
||||||
@ -809,6 +809,15 @@
|
|||||||
<string name="menu_order_confirm_title">Перезапуск приложение</string>
|
<string name="menu_order_confirm_title">Перезапуск приложение</string>
|
||||||
<string name="menu_order_confirm_content">Для сохранения изменений необходимо перезапустить приложение</string>
|
<string name="menu_order_confirm_content">Для сохранения изменений необходимо перезапустить приложение</string>
|
||||||
<string name="menu_order_confirm_restart">Перезапустить</string>
|
<string name="menu_order_confirm_restart">Перезапустить</string>
|
||||||
|
<!--Auth-->
|
||||||
|
<string name="auth_api_error">Авторизация отклонена. Предоставленные данные не соответствуют записям в кабинете секретаря.</string>
|
||||||
|
<string name="auth_invalid_error">Неправильный номер PESEL</string>
|
||||||
|
<string name="auth_pesel">Номер PESEL</string>
|
||||||
|
<string name="auth_button">Authorize</string>
|
||||||
|
<string name="auth_success">Авторизация прошла успешно</string>
|
||||||
|
<string name="auth_title">Авторизация</string>
|
||||||
|
<string name="auth_description">Для работы приложения нам необходимо подтвердить вашу личность. Введите PESEL учащегося <b>%1$s</b> в поле ниже</string>
|
||||||
|
<string name="auth_button_skip">Пропустить сейчас</string>
|
||||||
<!--Errors-->
|
<!--Errors-->
|
||||||
<string name="error_no_internet">Интернет-соединение отсутствует</string>
|
<string name="error_no_internet">Интернет-соединение отсутствует</string>
|
||||||
<string name="error_invalid_device_datetime">Произошла ошибка. Проверьте время на вашем устройстве</string>
|
<string name="error_invalid_device_datetime">Произошла ошибка. Проверьте время на вашем устройстве</string>
|
||||||
|
@ -809,6 +809,15 @@
|
|||||||
<string name="menu_order_confirm_title">Reštartovanie aplikácie</string>
|
<string name="menu_order_confirm_title">Reštartovanie aplikácie</string>
|
||||||
<string name="menu_order_confirm_content">Pre uloženie zmien je nutné aplikáciu reštartovať</string>
|
<string name="menu_order_confirm_content">Pre uloženie zmien je nutné aplikáciu reštartovať</string>
|
||||||
<string name="menu_order_confirm_restart">Reštartovať</string>
|
<string name="menu_order_confirm_restart">Reštartovať</string>
|
||||||
|
<!--Auth-->
|
||||||
|
<string name="auth_api_error">Autorizácia bola zamietnutá. Uvedené údaje sa nezhodujú so záznamami v kancelárii tajomníka.</string>
|
||||||
|
<string name="auth_invalid_error">Neplatný PESEL</string>
|
||||||
|
<string name="auth_pesel">PESEL</string>
|
||||||
|
<string name="auth_button">Autorizovať</string>
|
||||||
|
<string name="auth_success">Autorizácia bola úspešne dokončená</string>
|
||||||
|
<string name="auth_title">Autorizácia</string>
|
||||||
|
<string name="auth_description">Na prevádzku aplikácie potrebujeme potvrdiť vašu identitu. Zadajte PESEL žiaka <b>%1$s</b> v nižšie uvedenom poli</string>
|
||||||
|
<string name="auth_button_skip">Zatiaľ preskočiť</string>
|
||||||
<!--Errors-->
|
<!--Errors-->
|
||||||
<string name="error_no_internet">Žiadne internetové pripojenie</string>
|
<string name="error_no_internet">Žiadne internetové pripojenie</string>
|
||||||
<string name="error_invalid_device_datetime">Vyskytla sa chyba. Skontrolujte hodiny svojho zariadenia</string>
|
<string name="error_invalid_device_datetime">Vyskytla sa chyba. Skontrolujte hodiny svojho zariadenia</string>
|
||||||
|
@ -682,7 +682,7 @@
|
|||||||
<string name="all_cancel">Скасувати</string>
|
<string name="all_cancel">Скасувати</string>
|
||||||
<!--Timetable Widget-->
|
<!--Timetable Widget-->
|
||||||
<string name="widget_timetable_no_items">Немаэ уроків</string>
|
<string name="widget_timetable_no_items">Немаэ уроків</string>
|
||||||
<string name="widget_timetable_last_synchronization">Synchronized on %1$s at %2$s</string>
|
<string name="widget_timetable_last_synchronization">Синхронізовано %1$s в %2$s</string>
|
||||||
<string name="widget_timetable_theme_title">Увібрати тему</string>
|
<string name="widget_timetable_theme_title">Увібрати тему</string>
|
||||||
<string name="widget_timetable_theme_light">Яскрава</string>
|
<string name="widget_timetable_theme_light">Яскрава</string>
|
||||||
<string name="widget_timetable_theme_dark">Темна</string>
|
<string name="widget_timetable_theme_dark">Темна</string>
|
||||||
@ -809,6 +809,15 @@
|
|||||||
<string name="menu_order_confirm_title">Перезавантаження додатку</string>
|
<string name="menu_order_confirm_title">Перезавантаження додатку</string>
|
||||||
<string name="menu_order_confirm_content">Додаток потрібно перезавантажити для збереження змін</string>
|
<string name="menu_order_confirm_content">Додаток потрібно перезавантажити для збереження змін</string>
|
||||||
<string name="menu_order_confirm_restart">Перезавантажити</string>
|
<string name="menu_order_confirm_restart">Перезавантажити</string>
|
||||||
|
<!--Auth-->
|
||||||
|
<string name="auth_api_error">Авторизацію відхилено. Надані дані не збігаються із записами в кабінеті секретаря.</string>
|
||||||
|
<string name="auth_invalid_error">Неправильний PESEL</string>
|
||||||
|
<string name="auth_pesel">Число PESEL</string>
|
||||||
|
<string name="auth_button">Authorize</string>
|
||||||
|
<string name="auth_success">Authorization completed successfully</string>
|
||||||
|
<string name="auth_title">Авторизувати</string>
|
||||||
|
<string name="auth_description">Для роботи програми нам потрібно підтвердити вашу особу. Будь ласка, введіть число PESEL <b>%1$s</b> студента в поле нижче</string>
|
||||||
|
<string name="auth_button_skip">Поки що пропустити</string>
|
||||||
<!--Errors-->
|
<!--Errors-->
|
||||||
<string name="error_no_internet">Немає з\'єднання з інтернетом</string>
|
<string name="error_no_internet">Немає з\'єднання з інтернетом</string>
|
||||||
<string name="error_invalid_device_datetime">Сталася помилка. Перевірте годинник пристрою</string>
|
<string name="error_invalid_device_datetime">Сталася помилка. Перевірте годинник пристрою</string>
|
||||||
|
@ -37,7 +37,9 @@
|
|||||||
<item name="colorError">@color/colorError</item>
|
<item name="colorError">@color/colorError</item>
|
||||||
<item name="colorDivider">@color/colorDivider</item>
|
<item name="colorDivider">@color/colorDivider</item>
|
||||||
<item name="colorSwipeRefresh">@color/material_dynamic_secondary90</item>
|
<item name="colorSwipeRefresh">@color/material_dynamic_secondary90</item>
|
||||||
<item name="colorMessageMedium">@color/dashboard_message_medium_dark</item>
|
<item name="colorMessageMedium">@color/dashboard_message_medium_light</item>
|
||||||
|
<item name="colorMessageHigh">@color/dashboard_message_high_light</item>
|
||||||
|
<item name="colorOnMessageHigh">@android:color/white</item>
|
||||||
<item name="android:textColor">@color/material_dynamic_neutral10</item>
|
<item name="android:textColor">@color/material_dynamic_neutral10</item>
|
||||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
|
@ -5,4 +5,6 @@
|
|||||||
<attr name="colorTimetableCanceled" format="color" />
|
<attr name="colorTimetableCanceled" format="color" />
|
||||||
<attr name="colorTimetableChange" format="color" />
|
<attr name="colorTimetableChange" format="color" />
|
||||||
<attr name="colorMessageMedium" format="color" />
|
<attr name="colorMessageMedium" format="color" />
|
||||||
|
<attr name="colorMessageHigh" format="color" />
|
||||||
|
<attr name="colorOnMessageHigh" format="color" />
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -39,8 +39,10 @@
|
|||||||
<color name="colorStatusBarDark">#342826</color>
|
<color name="colorStatusBarDark">#342826</color>
|
||||||
<color name="colorStatusBarBlack">#181010</color>
|
<color name="colorStatusBarBlack">#181010</color>
|
||||||
|
|
||||||
<color name="dashboard_message_medium_light">#FFD980</color>
|
<color name="dashboard_message_medium_light">#ffd54f</color>
|
||||||
<color name="dashboard_message_medium_dark">#ffd54f</color>
|
<color name="dashboard_message_medium_dark">#FFD980</color>
|
||||||
|
<color name="dashboard_message_high_light">#B91B21</color>
|
||||||
|
<color name="dashboard_message_high_dark">#e57373</color>
|
||||||
|
|
||||||
<color name="timetable_canceled_light">#d32f2f</color>
|
<color name="timetable_canceled_light">#d32f2f</color>
|
||||||
<color name="timetable_canceled_dark">#e57373</color>
|
<color name="timetable_canceled_dark">#e57373</color>
|
||||||
|
@ -808,6 +808,17 @@
|
|||||||
<string name="menu_order_confirm_restart">Restart</string>
|
<string name="menu_order_confirm_restart">Restart</string>
|
||||||
|
|
||||||
|
|
||||||
|
<!--Auth-->
|
||||||
|
<string name="auth_api_error">Authorization has been rejected. The data provided does not match the records in the secretary\'s office.</string>
|
||||||
|
<string name="auth_invalid_error">Invalid PESEL</string>
|
||||||
|
<string name="auth_pesel">PESEL</string>
|
||||||
|
<string name="auth_button">Authorize</string>
|
||||||
|
<string name="auth_success">Authorization completed successfully</string>
|
||||||
|
<string name="auth_title">Authorization</string>
|
||||||
|
<string name="auth_description">To operate the application, we need to confirm your identity. Please enter the student\'s PESEL <b>%1$s</b> in the field below</string>
|
||||||
|
<string name="auth_button_skip">Skip for now</string>
|
||||||
|
|
||||||
|
|
||||||
<!--Errors-->
|
<!--Errors-->
|
||||||
<string name="error_no_internet">No internet connection</string>
|
<string name="error_no_internet">No internet connection</string>
|
||||||
<string name="error_invalid_device_datetime">An error occurred. Check your device clock</string>
|
<string name="error_invalid_device_datetime">An error occurred. Check your device clock</string>
|
||||||
|
@ -22,7 +22,9 @@
|
|||||||
<item name="colorError">@color/colorError</item>
|
<item name="colorError">@color/colorError</item>
|
||||||
<item name="colorDivider">@color/colorDivider</item>
|
<item name="colorDivider">@color/colorDivider</item>
|
||||||
<item name="colorSwipeRefresh">@color/colorSwipeRefresh</item>
|
<item name="colorSwipeRefresh">@color/colorSwipeRefresh</item>
|
||||||
<item name="colorMessageMedium">@color/dashboard_message_medium_dark</item>
|
<item name="colorMessageMedium">@color/dashboard_message_medium_light</item>
|
||||||
|
<item name="colorMessageHigh">@color/dashboard_message_high_light</item>
|
||||||
|
<item name="colorOnMessageHigh">@android:color/white</item>
|
||||||
<item name="android:textColor">?android:textColorPrimary</item>
|
<item name="android:textColor">?android:textColorPrimary</item>
|
||||||
<item name="android:statusBarColor">@android:color/black</item>
|
<item name="android:statusBarColor">@android:color/black</item>
|
||||||
<item name="android:preferenceStyle">@style/PreferenceThemeOverlay</item>
|
<item name="android:preferenceStyle">@style/PreferenceThemeOverlay</item>
|
||||||
@ -78,4 +80,9 @@
|
|||||||
<item name="android:background">@drawable/background_material_alert_dialog</item>
|
<item name="android:background">@drawable/background_material_alert_dialog</item>
|
||||||
<item name="android:layout" tools:ignore="PrivateResource">@layout/m3_alert_dialog</item>
|
<item name="android:layout" tools:ignore="PrivateResource">@layout/m3_alert_dialog</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="FullScreenDialogStyle" parent="WulkanowyTheme">
|
||||||
|
<item name="android:windowFullscreen">true</item>
|
||||||
|
<item name="android:windowIsFloating">false</item>
|
||||||
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -13,6 +13,7 @@ import io.github.wulkanowy.R
|
|||||||
import io.github.wulkanowy.databinding.DialogAdsConsentBinding
|
import io.github.wulkanowy.databinding.DialogAdsConsentBinding
|
||||||
import io.github.wulkanowy.ui.base.BaseActivity
|
import io.github.wulkanowy.ui.base.BaseActivity
|
||||||
import io.github.wulkanowy.ui.base.ErrorDialog
|
import io.github.wulkanowy.ui.base.ErrorDialog
|
||||||
|
import io.github.wulkanowy.ui.modules.auth.AuthDialog
|
||||||
import io.github.wulkanowy.ui.modules.main.MainView
|
import io.github.wulkanowy.ui.modules.main.MainView
|
||||||
import io.github.wulkanowy.utils.openInternetBrowser
|
import io.github.wulkanowy.utils.openInternetBrowser
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
@ -146,6 +147,10 @@ class AdsFragment : PreferenceFragmentCompat(), MainView.TitledView, AdsView {
|
|||||||
(activity as? BaseActivity<*, *>)?.openClearLoginView()
|
(activity as? BaseActivity<*, *>)?.openClearLoginView()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun showAuthDialog() {
|
||||||
|
AuthDialog.newInstance().show(childFragmentManager, "auth_dialog")
|
||||||
|
}
|
||||||
|
|
||||||
override fun showErrorDetailsDialog(error: Throwable) {
|
override fun showErrorDetailsDialog(error: Throwable) {
|
||||||
ErrorDialog.newInstance(error).show(childFragmentManager, error.toString())
|
ErrorDialog.newInstance(error).show(childFragmentManager, error.toString())
|
||||||
}
|
}
|
||||||
|
10
build.gradle
10
build.gradle
@ -1,8 +1,8 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
ext {
|
ext {
|
||||||
kotlin_version = '1.8.21'
|
kotlin_version = '1.8.21'
|
||||||
about_libraries = '10.6.2'
|
about_libraries = '10.7.0'
|
||||||
hilt_version = "2.45"
|
hilt_version = "2.46.1"
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@ -13,14 +13,14 @@ buildscript {
|
|||||||
dependencies {
|
dependencies {
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
|
||||||
classpath 'com.android.tools.build:gradle:7.4.2'
|
classpath 'com.android.tools.build:gradle:8.0.2'
|
||||||
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
|
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
|
||||||
classpath 'com.google.gms:google-services:4.3.15'
|
classpath 'com.google.gms:google-services:4.3.15'
|
||||||
classpath 'com.huawei.agconnect:agcp:1.9.0.300'
|
classpath 'com.huawei.agconnect:agcp:1.9.0.300'
|
||||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.5'
|
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.5'
|
||||||
classpath "com.github.triplet.gradle:play-publisher:3.6.0"
|
classpath "com.github.triplet.gradle:play-publisher:3.6.0"
|
||||||
classpath "ru.cian:huawei-publish-gradle-plugin:1.3.5"
|
classpath "ru.cian:huawei-publish-gradle-plugin:1.4.0"
|
||||||
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.0.0.2929"
|
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.1.0.3113"
|
||||||
classpath "gradle.plugin.com.star-zero.gradle:githook:1.2.0"
|
classpath "gradle.plugin.com.star-zero.gradle:githook:1.2.0"
|
||||||
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:$about_libraries"
|
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:$about_libraries"
|
||||||
}
|
}
|
||||||
|
@ -1,23 +1,13 @@
|
|||||||
# Project-wide Gradle settings.
|
|
||||||
# IDE (e.g. Android Studio) users:
|
|
||||||
# Gradle settings configured through the IDE *will override*
|
|
||||||
# any settings specified in this file.
|
|
||||||
# For more details on how to configure your build environment visit
|
|
||||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
|
||||||
#
|
|
||||||
# Specifies the JVM arguments used for the daemon process.
|
|
||||||
# The setting is particularly useful for tweaking memory settings.
|
|
||||||
org.gradle.jvmargs=-Xmx1536m
|
org.gradle.jvmargs=-Xmx1536m
|
||||||
#
|
#
|
||||||
android.enableJetifier=true
|
kapt.include.compile.classpath=false
|
||||||
android.useAndroidX=true
|
|
||||||
#
|
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
#
|
#
|
||||||
kapt.use.worker.api=true
|
android.useAndroidX=true
|
||||||
kapt.include.compile.classpath=false
|
android.enableJetifier=true
|
||||||
|
android.nonTransitiveRClass=false
|
||||||
|
android.defaults.buildfeatures.buildconfig=true
|
||||||
#
|
#
|
||||||
# When configured, Gradle will run in incubating parallel mode.
|
# https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-common-faq-0000001063210244#section17273113244910
|
||||||
# This option should only be used with decoupled projects. More details, visit
|
apmsInstrumentationEnabled=false
|
||||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
|
||||||
# org.gradle.parallel=true
|
|
||||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
11
gradlew
vendored
11
gradlew
vendored
@ -85,9 +85,6 @@ done
|
|||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
|
|
||||||
@ -144,7 +141,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
max*)
|
max*)
|
||||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
# shellcheck disable=SC3045
|
# shellcheck disable=SC3045
|
||||||
MAX_FD=$( ulimit -H -n ) ||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
warn "Could not query maximum file descriptor limit"
|
warn "Could not query maximum file descriptor limit"
|
||||||
esac
|
esac
|
||||||
@ -152,7 +149,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|||||||
'' | soft) :;; #(
|
'' | soft) :;; #(
|
||||||
*)
|
*)
|
||||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
# shellcheck disable=SC3045
|
# shellcheck disable=SC3045
|
||||||
ulimit -n "$MAX_FD" ||
|
ulimit -n "$MAX_FD" ||
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
esac
|
esac
|
||||||
@ -197,6 +194,10 @@ if "$cygwin" || "$msys" ; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command;
|
# Collect all arguments for the java command;
|
||||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||||
# shell script including quotes and variable substitutions, so put them in
|
# shell script including quotes and variable substitutions, so put them in
|
||||||
|
@ -1 +1,4 @@
|
|||||||
|
plugins {
|
||||||
|
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0'
|
||||||
|
}
|
||||||
include ':app'
|
include ':app'
|
||||||
|
Reference in New Issue
Block a user