1
0

Compare commits

..

52 Commits
2.0.0 ... 2.0.7

Author SHA1 Message Date
fd482777e8 Merge branch 'release/2.0.7' 2023-06-01 10:59:55 +02:00
d4ae0d56d6 Version 2.0.7 2023-06-01 10:59:50 +02:00
63487249b8 New Crowdin updates (#2211) 2023-06-01 10:31:42 +02:00
1bc0f2d214 Add character limit to attendance excuse content (#2222) 2023-06-01 10:30:50 +02:00
41bde45731 Bump androidx.viewpager2:viewpager2 from 1.1.0-beta01 to 1.1.0-beta02 (#2227) 2023-05-31 15:19:25 +00:00
556f42195b Bump com.android.tools.build:gradle from 8.0.1 to 8.0.2 (#2228) 2023-05-31 15:18:55 +00:00
06fd7b0c36 Bump com.google.firebase:firebase-bom from 32.0.0 to 32.1.0 (#2225) 2023-05-31 15:18:30 +00:00
db4e4d8cef Bump com.huawei.hms:hianalytics from 6.10.0.300 to 6.10.0.301 (#2224) 2023-05-31 15:18:07 +00:00
48e4a9fec5 Bump org.sonarsource.scanner.gradle:sonarqube-gradle-plugin (#2223) 2023-05-31 15:17:48 +00:00
70333737cf Bump androidx.activity:activity-ktx from 1.7.1 to 1.7.2 (#2226) 2023-05-31 15:16:42 +00:00
3096fa1538 Bump about_libraries from 10.6.3 to 10.7.0 (#2214) 2023-05-24 21:50:17 +00:00
19ed121466 Bump io.coil-kt:coil from 2.3.0 to 2.4.0 (#2215) 2023-05-24 21:32:28 +00:00
e7733bfa2a Bump com.google.android.gms:play-services-ads from 22.0.0 to 22.1.0 (#2216) 2023-05-24 21:31:38 +00:00
b9b464ea9b Merge branch 'release/2.0.6' into develop 2023-05-23 16:26:43 +02:00
cc46b3b124 Merge branch 'release/2.0.6' 2023-05-23 16:26:36 +02:00
092e86b621 Version 2.0.6 2023-05-23 16:26:31 +02:00
c170614461 Add R8 rule for Wulkanowy SDK (#2220) 2023-05-23 14:09:48 +02:00
6ce8e00ebf Merge branch 'release/2.0.5' into develop 2023-05-23 02:37:55 +02:00
c40cdf88ad Merge branch 'release/2.0.5' 2023-05-23 02:37:43 +02:00
4c1fe233c7 Version 2.0.5 2023-05-23 02:37:38 +02:00
aca88b57e0 Add r8 rules for HMS SDK (#2217) 2023-05-23 02:16:42 +02:00
a603c12625 Merge branch 'release/2.0.4' into develop 2023-05-22 17:10:09 +02:00
5c440010e2 Merge branch 'release/2.0.4' 2023-05-22 17:10:02 +02:00
4920317573 Version 2.0.4 2023-05-22 17:09:57 +02:00
9466482893 Add foojay-resolver and update dependencies (#2212) 2023-05-18 14:14:14 +00:00
48bcf581cf Bump org.jetbrains.kotlinx:kotlinx-serialization-json (#2209) 2023-05-15 18:36:50 +00:00
8a7b7103eb Bump coroutines from 1.7.0 to 1.7.1 (#2207) 2023-05-15 18:36:26 +00:00
ea312c3e12 Bump androidx.core:core-ktx from 1.10.0 to 1.10.1 (#2208) 2023-05-15 17:13:02 +00:00
5b0fe2c006 Bump ru.cian:huawei-publish-gradle-plugin from 1.3.5 to 1.4.0 (#2185) 2023-05-14 19:28:49 +00:00
a06add070e Bump com.android.tools.build:gradle from 7.4.2 to 8.0.1 (#2187) 2023-05-14 18:20:56 +00:00
dce491bffe Bump hilt_version from 2.45 to 2.46.1 (#2205) 2023-05-14 17:28:29 +00:00
adf418cc68 Fix delete user homework button visibility (#2204) 2023-05-13 10:44:09 +02:00
defcfec971 Merge branch 'release/2.0.3' into develop 2023-05-12 22:59:59 +02:00
d08f195968 Merge branch 'release/2.0.3' 2023-05-12 22:59:45 +02:00
1e9a6a5c42 Version 2.0.3 2023-05-12 22:59:40 +02:00
cc752ab0ad New Crowdin updates (#2201) 2023-05-12 22:45:50 +02:00
f2faa7e8b7 Fix button color in high priority admin message (#2202) 2023-05-12 22:45:24 +02:00
030fe8c218 Bump coroutines from 1.6.4 to 1.7.0 (#2186) 2023-05-12 04:45:15 +00:00
c33b309cf0 Bump org.robolectric:robolectric from 4.10 to 4.10.2 (#2188) 2023-05-12 04:34:48 +00:00
a0af55825d Bump about_libraries from 10.6.2 to 10.6.3 (#2189) 2023-05-12 04:34:32 +00:00
cb8303f33d Bump com.google.android.material:material from 1.8.0 to 1.9.0 (#2191) 2023-05-12 04:34:14 +00:00
54fbd56b73 Bump com.google.firebase:firebase-bom from 31.5.0 to 32.0.0 (#2190) 2023-05-12 04:33:56 +00:00
70f50cd51b Merge branch 'release/2.0.2' into develop 2023-05-12 00:46:02 +02:00
88c38c4a8d Merge branch 'release/2.0.2' 2023-05-12 00:45:55 +02:00
b8ac72c247 Version 2.0.2 2023-05-12 00:45:48 +02:00
cbef160ada New Crowdin updates (#2193) 2023-05-12 00:41:53 +02:00
e77894bf3e Merge branch 'release/2.0.1' into develop 2023-05-12 00:21:36 +02:00
9697a39464 Merge branch 'release/2.0.1' 2023-05-12 00:21:28 +02:00
5a2622871f Version 2.0.1 2023-05-12 00:21:24 +02:00
52218e800c Add auth dialog (#2198)
Co-authored-by: Mikołaj Pich <m.pich@outlook.com>
2023-05-11 21:45:20 +00:00
3fdd47c221 Fix ime overlaping message content (#2199) 2023-05-11 16:44:10 +02:00
d8f71f48f3 Merge branch 'release/2.0.0' into develop 2023-05-07 23:40:31 +02:00
53 changed files with 665 additions and 106 deletions

View File

@ -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: |

View File

@ -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: |

View File

@ -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: |

View File

@ -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"

View File

@ -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

View File

@ -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?

View File

@ -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
}

View File

@ -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)
}
} }

View File

@ -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)

View File

@ -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?,

View File

@ -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()
} }

View File

@ -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
} }
} }

View File

@ -8,6 +8,8 @@ interface BaseView {
fun showExpiredDialog() fun showExpiredDialog()
fun showAuthDialog()
fun openClearLoginView() fun openClearLoginView()
fun showErrorDetailsDialog(error: Throwable) fun showErrorDetailsDialog(error: Throwable)

View File

@ -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 = {}
} }
} }

View File

@ -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()
}
}

View File

@ -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])
}
}

View File

@ -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)
}

View File

@ -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)
} }

View File

@ -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
} }

View File

@ -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() {}
} }

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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 }

View File

@ -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

View 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>

View File

@ -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"

View 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>

View File

@ -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>

View File

@ -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"

View File

@ -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 &lt;b&gt;%1$s&lt;/b&gt; 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>

View File

@ -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 &lt;b&gt;%1$s&lt;/b&gt; 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>

View File

@ -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&#160;<b>Uczeń</b> &#160;<b>Dostęp Mobilny</b>&#160;<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&#160;<b>Student </b>&#160;<b>Tost Möbeln</b>&#160;<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 &lt;b&gt;%1$s&lt;/b&gt; 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>

View File

@ -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 &lt;b&gt;%1$s&lt;/b&gt; 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>

View File

@ -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>

View File

@ -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>

View File

@ -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 &lt;b&gt;%1$s&lt;/b&gt; 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>

View File

@ -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 учащегося &lt;b&gt;%1$s&lt;/b&gt; в поле ниже</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>

View File

@ -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 &lt;b&gt;%1$s&lt;/b&gt; 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>

View File

@ -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 &lt;b&gt;%1$s&lt;/b&gt; студента в поле нижче</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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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 &lt;b>%1$s&lt;/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>

View File

@ -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>

View File

@ -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())
} }

View File

@ -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"
} }

View File

@ -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

Binary file not shown.

View File

@ -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
View File

@ -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

View File

@ -1 +1,4 @@
plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0'
}
include ':app' include ':app'