Compare commits
27 Commits
Author | SHA1 | Date | |
---|---|---|---|
391f38485d | |||
fecd5c707d | |||
fa44295d59 | |||
5306044173 | |||
c1b86674c2 | |||
fd482777e8 | |||
d4ae0d56d6 | |||
63487249b8 | |||
1bc0f2d214 | |||
41bde45731 | |||
556f42195b | |||
06fd7b0c36 | |||
db4e4d8cef | |||
48e4a9fec5 | |||
70333737cf | |||
3096fa1538 | |||
19ed121466 | |||
e7733bfa2a | |||
b9b464ea9b | |||
cc46b3b124 | |||
092e86b621 | |||
c170614461 | |||
6ce8e00ebf | |||
c40cdf88ad | |||
4c1fe233c7 | |||
aca88b57e0 | |||
a603c12625 |
@ -23,8 +23,8 @@ android {
|
||||
testApplicationId "io.github.tests.wulkanowy"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 33
|
||||
versionCode 126
|
||||
versionName "2.0.4"
|
||||
versionCode 130
|
||||
versionName "2.0.8"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
resValue "string", "app_name", "Wulkanowy"
|
||||
@ -165,7 +165,7 @@ play {
|
||||
defaultToAppBundles = false
|
||||
track = 'production'
|
||||
releaseStatus = com.github.triplet.gradle.androidpublisher.ReleaseStatus.IN_PROGRESS
|
||||
userFraction = 0.50d
|
||||
userFraction = 0.25d
|
||||
updatePriority = 1
|
||||
enabled.set(false)
|
||||
}
|
||||
@ -196,7 +196,7 @@ ext {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'io.github.wulkanowy:sdk:2.0.4'
|
||||
implementation 'io.github.wulkanowy:sdk:2.0.8'
|
||||
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
|
||||
|
||||
@ -205,14 +205,14 @@ dependencies {
|
||||
|
||||
implementation "androidx.core:core-ktx:1.10.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.fragment:fragment-ktx:1.5.7"
|
||||
implementation "androidx.annotation:annotation:1.6.0"
|
||||
|
||||
implementation "androidx.preference:preference-ktx:1.2.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.constraintlayout:constraintlayout:2.1.4"
|
||||
implementation "androidx.coordinatorlayout:coordinatorlayout:1.2.0"
|
||||
@ -246,22 +246,22 @@ dependencies {
|
||||
implementation "at.favre.lib:slf4j-timber:1.0.1"
|
||||
implementation 'com.github.bastienpaulfr:Treessence:1.0.5'
|
||||
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 'me.xdrop:fuzzywuzzy:1.4.0'
|
||||
implementation 'com.fredporciuncula:flow-preferences:1.9.1'
|
||||
implementation 'org.apache.commons:commons-text:1.10.0'
|
||||
|
||||
playImplementation platform('com.google.firebase:firebase-bom:32.0.0')
|
||||
playImplementation platform('com.google.firebase:firebase-bom:32.1.0')
|
||||
playImplementation 'com.google.firebase:firebase-analytics-ktx'
|
||||
playImplementation 'com.google.firebase:firebase-messaging:'
|
||||
playImplementation 'com.google.firebase:firebase-crashlytics:'
|
||||
playImplementation 'com.google.firebase:firebase-config-ktx'
|
||||
playImplementation 'com.google.android.play:core:1.10.3'
|
||||
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.10.0.300'
|
||||
hmsImplementation 'com.huawei.hms:hianalytics:6.10.0.301'
|
||||
hmsImplementation 'com.huawei.agconnect:agconnect-crash:1.9.0.300'
|
||||
|
||||
releaseImplementation "com.github.ChuckerTeam.Chucker:library-no-op:$chucker"
|
||||
|
16
app/proguard-rules.pro
vendored
16
app/proguard-rules.pro
vendored
@ -1,5 +1,6 @@
|
||||
# General
|
||||
-dontobfuscate
|
||||
-ignorewarnings
|
||||
|
||||
|
||||
#Config for wulkanowy
|
||||
@ -24,3 +25,18 @@
|
||||
|
||||
#Config for Material Components
|
||||
-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
|
||||
|
2442
app/schemas/io.github.wulkanowy.data.db.AppDatabase/56.json
Normal file
2442
app/schemas/io.github.wulkanowy.data.db.AppDatabase/56.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -49,6 +49,7 @@ import javax.inject.Singleton
|
||||
AutoMigration(from = 47, to = 48),
|
||||
AutoMigration(from = 51, to = 52),
|
||||
AutoMigration(from = 54, to = 55, spec = Migration55::class),
|
||||
AutoMigration(from = 55, to = 56),
|
||||
],
|
||||
version = AppDatabase.VERSION_SCHEMA,
|
||||
exportSchema = true
|
||||
@ -57,7 +58,7 @@ import javax.inject.Singleton
|
||||
abstract class AppDatabase : RoomDatabase() {
|
||||
|
||||
companion object {
|
||||
const val VERSION_SCHEMA = 55
|
||||
const val VERSION_SCHEMA = 56
|
||||
|
||||
fun getMigrations(sharedPrefProvider: SharedPrefProvider, appInfo: AppInfo) = arrayOf(
|
||||
Migration2(),
|
||||
|
@ -19,6 +19,9 @@ data class Student(
|
||||
@ColumnInfo(name = "scrapper_base_url")
|
||||
val scrapperBaseUrl: String,
|
||||
|
||||
@ColumnInfo(name = "scrapper_domain_suffix", defaultValue = "")
|
||||
val scrapperDomainSuffix: String,
|
||||
|
||||
@ColumnInfo(name = "mobile_base_url")
|
||||
val mobileBaseUrl: String,
|
||||
|
||||
|
@ -55,6 +55,7 @@ fun SdkRegisterUser.mapToPojo(password: String?) = RegisterUser(
|
||||
|
||||
fun RegisterStudent.mapToStudentWithSemesters(
|
||||
user: RegisterUser,
|
||||
scrapperDomainSuffix: String,
|
||||
symbol: RegisterSymbol,
|
||||
unit: RegisterUnit,
|
||||
colors: List<Long>,
|
||||
@ -76,6 +77,7 @@ fun RegisterStudent.mapToStudentWithSemesters(
|
||||
studentName = "$studentName $studentSurname",
|
||||
loginMode = user.loginMode.name,
|
||||
scrapperBaseUrl = user.scrapperBaseUrl.orEmpty(),
|
||||
scrapperDomainSuffix = scrapperDomainSuffix,
|
||||
mobileBaseUrl = symbol.hebeBaseUrl.orEmpty(),
|
||||
certificateKey = symbol.keyId.orEmpty(),
|
||||
privateKey = symbol.privatePem.orEmpty(),
|
||||
|
@ -43,22 +43,14 @@ class StudentRepository @Inject constructor(
|
||||
.getStudentsFromHebe(token, pin, symbol, "")
|
||||
.mapToPojo(null)
|
||||
|
||||
suspend fun getStudentsScrapper(
|
||||
email: String,
|
||||
password: String,
|
||||
scrapperBaseUrl: String,
|
||||
symbol: String
|
||||
): RegisterUser = sdk
|
||||
.getUserSubjectsFromScrapper(email, password, scrapperBaseUrl, symbol)
|
||||
.mapToPojo(password)
|
||||
|
||||
suspend fun getUserSubjectsFromScrapper(
|
||||
email: String,
|
||||
password: String,
|
||||
scrapperBaseUrl: String,
|
||||
domainSuffix: String,
|
||||
symbol: String
|
||||
): RegisterUser = sdk
|
||||
.getUserSubjectsFromScrapper(email, password, scrapperBaseUrl, symbol)
|
||||
.getUserSubjectsFromScrapper(email, password, scrapperBaseUrl, domainSuffix, symbol)
|
||||
.mapToPojo(password)
|
||||
|
||||
suspend fun getStudentsHybrid(
|
||||
|
@ -6,5 +6,6 @@ data class LoginData(
|
||||
val login: String,
|
||||
val password: String,
|
||||
val baseUrl: String,
|
||||
val domainSuffix: String,
|
||||
val symbol: String?,
|
||||
) : Serializable
|
||||
|
@ -5,6 +5,7 @@ import android.view.View
|
||||
import android.view.View.GONE
|
||||
import android.view.View.VISIBLE
|
||||
import android.widget.ArrayAdapter
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.core.widget.doOnTextChanged
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import io.github.wulkanowy.R
|
||||
@ -55,6 +56,9 @@ class LoginAdvancedFragment :
|
||||
get() = hostValues.getOrNull(hostKeys.indexOf(binding.loginFormHost.text.toString()))
|
||||
.orEmpty()
|
||||
|
||||
override val formDomainSuffix: String
|
||||
get() = binding.loginFormDomainSuffix.text.toString().trim()
|
||||
|
||||
override val formHostSymbol: String
|
||||
get() = hostSymbols.getOrNull(hostKeys.indexOf(binding.loginFormHost.text.toString()))
|
||||
.orEmpty()
|
||||
@ -279,6 +283,7 @@ class LoginAdvancedFragment :
|
||||
loginFormUsernameLayout.visibility = VISIBLE
|
||||
loginFormPassLayout.visibility = VISIBLE
|
||||
loginFormHostLayout.visibility = VISIBLE
|
||||
loginFormDomainSuffixLayout.isVisible = true
|
||||
loginFormPinLayout.visibility = GONE
|
||||
loginFormSymbolLayout.visibility = VISIBLE
|
||||
loginFormTokenLayout.visibility = GONE
|
||||
@ -290,6 +295,7 @@ class LoginAdvancedFragment :
|
||||
loginFormUsernameLayout.visibility = VISIBLE
|
||||
loginFormPassLayout.visibility = VISIBLE
|
||||
loginFormHostLayout.visibility = VISIBLE
|
||||
loginFormDomainSuffixLayout.isVisible = true
|
||||
loginFormPinLayout.visibility = GONE
|
||||
loginFormSymbolLayout.visibility = VISIBLE
|
||||
loginFormTokenLayout.visibility = GONE
|
||||
@ -301,6 +307,7 @@ class LoginAdvancedFragment :
|
||||
loginFormUsernameLayout.visibility = GONE
|
||||
loginFormPassLayout.visibility = GONE
|
||||
loginFormHostLayout.visibility = GONE
|
||||
loginFormDomainSuffixLayout.isVisible = false
|
||||
loginFormPinLayout.visibility = VISIBLE
|
||||
loginFormSymbolLayout.visibility = VISIBLE
|
||||
loginFormTokenLayout.visibility = VISIBLE
|
||||
|
@ -154,6 +154,7 @@ class LoginAdvancedPresenter @Inject constructor(
|
||||
login = view?.formUsernameValue.orEmpty().trim(),
|
||||
password = view?.formPassValue.orEmpty().trim(),
|
||||
baseUrl = view?.formHostValue.orEmpty().trim(),
|
||||
domainSuffix = view?.formDomainSuffix.orEmpty().trim(),
|
||||
symbol = view?.formSymbolValue.orEmpty().trim().getNormalizedSymbol(),
|
||||
)
|
||||
when (it.data.symbols.size) {
|
||||
@ -186,6 +187,7 @@ class LoginAdvancedPresenter @Inject constructor(
|
||||
val email = view?.formUsernameValue.orEmpty()
|
||||
val password = view?.formPassValue.orEmpty()
|
||||
val endpoint = view?.formHostValue.orEmpty()
|
||||
val domainSuffix = view?.formDomainSuffix.orEmpty()
|
||||
|
||||
val pin = view?.formPinValue.orEmpty()
|
||||
val symbol = view?.formSymbolValue.orEmpty()
|
||||
@ -193,8 +195,8 @@ class LoginAdvancedPresenter @Inject constructor(
|
||||
|
||||
return when (Sdk.Mode.valueOf(view?.formLoginType.orEmpty())) {
|
||||
Sdk.Mode.HEBE -> studentRepository.getStudentsApi(pin, symbol, token)
|
||||
Sdk.Mode.SCRAPPER -> studentRepository.getStudentsScrapper(
|
||||
email, password, endpoint, symbol
|
||||
Sdk.Mode.SCRAPPER -> studentRepository.getUserSubjectsFromScrapper(
|
||||
email, password, endpoint, domainSuffix, symbol
|
||||
)
|
||||
|
||||
Sdk.Mode.HYBRID -> studentRepository.getStudentsHybrid(
|
||||
|
@ -12,6 +12,8 @@ interface LoginAdvancedView : BaseView {
|
||||
|
||||
val formHostValue: String
|
||||
|
||||
val formDomainSuffix: String
|
||||
|
||||
val formHostSymbol: String
|
||||
|
||||
val formLoginType: String
|
||||
|
@ -45,6 +45,9 @@ class LoginFormFragment : BaseFragment<FragmentLoginFormBinding>(R.layout.fragme
|
||||
get() = hostValues.getOrNull(hostKeys.indexOf(binding.loginFormHost.text.toString()))
|
||||
.orEmpty()
|
||||
|
||||
override val formDomainSuffix: String
|
||||
get() = binding.loginFormDomainSuffix.text.toString()
|
||||
|
||||
override val formHostSymbol: String
|
||||
get() = hostSymbols.getOrNull(hostKeys.indexOf(binding.loginFormHost.text.toString()))
|
||||
.orEmpty()
|
||||
@ -204,6 +207,10 @@ class LoginFormFragment : BaseFragment<FragmentLoginFormBinding>(R.layout.fragme
|
||||
binding.loginFormContainer.visibility = if (show) VISIBLE else GONE
|
||||
}
|
||||
|
||||
override fun showDomainSuffixInput(show: Boolean) {
|
||||
binding.loginFormDomainSuffixLayout.isVisible = show
|
||||
}
|
||||
|
||||
override fun showOtherOptionsButton(show: Boolean) {
|
||||
binding.loginFormAdvancedButton.isVisible = show
|
||||
}
|
||||
@ -256,6 +263,7 @@ class LoginFormFragment : BaseFragment<FragmentLoginFormBinding>(R.layout.fragme
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
presenter.updateUsernameLabel()
|
||||
presenter.updateCustomDomainSuffixVisibility()
|
||||
}
|
||||
|
||||
override fun openEmail(lastError: String) {
|
||||
|
@ -1,8 +1,13 @@
|
||||
package io.github.wulkanowy.ui.modules.login.form
|
||||
|
||||
import androidx.core.net.toUri
|
||||
import io.github.wulkanowy.data.*
|
||||
import io.github.wulkanowy.data.logResourceStatus
|
||||
import io.github.wulkanowy.data.onResourceError
|
||||
import io.github.wulkanowy.data.onResourceLoading
|
||||
import io.github.wulkanowy.data.onResourceNotLoading
|
||||
import io.github.wulkanowy.data.onResourceSuccess
|
||||
import io.github.wulkanowy.data.repositories.StudentRepository
|
||||
import io.github.wulkanowy.data.resourceFlow
|
||||
import io.github.wulkanowy.ui.base.BasePresenter
|
||||
import io.github.wulkanowy.ui.modules.login.LoginData
|
||||
import io.github.wulkanowy.ui.modules.login.LoginErrorHandler
|
||||
@ -56,10 +61,17 @@ class LoginFormPresenter @Inject constructor(
|
||||
} else if (formUsernameValue == "jan@fakelog.cf" && formPassValue == "jan123") {
|
||||
setCredentials("", "")
|
||||
}
|
||||
updateCustomDomainSuffixVisibility()
|
||||
updateUsernameLabel()
|
||||
}
|
||||
}
|
||||
|
||||
fun updateCustomDomainSuffixVisibility() {
|
||||
view?.run {
|
||||
showDomainSuffixInput("customSuffix" in formHostValue)
|
||||
}
|
||||
}
|
||||
|
||||
fun updateUsernameLabel() {
|
||||
view?.run {
|
||||
setUsernameLabel(if ("email" !in formHostValue) nicknameLabel else emailLabel)
|
||||
@ -91,6 +103,7 @@ class LoginFormPresenter @Inject constructor(
|
||||
val email = view?.formUsernameValue.orEmpty().trim()
|
||||
val password = view?.formPassValue.orEmpty().trim()
|
||||
val host = view?.formHostValue.orEmpty().trim()
|
||||
val domainSuffix = view?.formDomainSuffix.orEmpty().trim()
|
||||
val symbol = view?.formHostSymbol.orEmpty().trim()
|
||||
|
||||
if (!validateCredentials(email, password, host)) return
|
||||
@ -100,6 +113,7 @@ class LoginFormPresenter @Inject constructor(
|
||||
email = email,
|
||||
password = password,
|
||||
scrapperBaseUrl = host,
|
||||
domainSuffix = domainSuffix,
|
||||
symbol = symbol
|
||||
)
|
||||
}
|
||||
@ -112,7 +126,7 @@ class LoginFormPresenter @Inject constructor(
|
||||
}
|
||||
}
|
||||
.onResourceSuccess {
|
||||
val loginData = LoginData(email, password, host, symbol)
|
||||
val loginData = LoginData(email, password, host, domainSuffix, symbol)
|
||||
when (it.symbols.size) {
|
||||
0 -> view?.navigateToSymbol(loginData)
|
||||
else -> view?.navigateToStudentSelect(loginData, it)
|
||||
|
@ -14,6 +14,8 @@ interface LoginFormView : BaseView {
|
||||
|
||||
val formHostValue: String
|
||||
|
||||
val formDomainSuffix: String
|
||||
|
||||
val formHostSymbol: String
|
||||
|
||||
val nicknameLabel: String
|
||||
@ -56,6 +58,8 @@ interface LoginFormView : BaseView {
|
||||
|
||||
fun showContent(show: Boolean)
|
||||
|
||||
fun showDomainSuffixInput(show: Boolean)
|
||||
|
||||
fun showOtherOptionsButton(show: Boolean)
|
||||
|
||||
fun showVersion()
|
||||
|
@ -241,6 +241,7 @@ class LoginStudentSelectPresenter @Inject constructor(
|
||||
item.student.mapToStudentWithSemesters(
|
||||
user = registerUser,
|
||||
symbol = item.symbol,
|
||||
scrapperDomainSuffix = loginData.domainSuffix,
|
||||
unit = item.unit,
|
||||
colors = appInfo.defaultColorsForAvatar,
|
||||
)
|
||||
|
@ -62,6 +62,7 @@ class LoginSymbolPresenter @Inject constructor(
|
||||
email = loginData.login,
|
||||
password = loginData.password,
|
||||
scrapperBaseUrl = loginData.baseUrl,
|
||||
domainSuffix = loginData.domainSuffix,
|
||||
symbol = loginData.symbol.orEmpty(),
|
||||
)
|
||||
}.onEach { user ->
|
||||
|
@ -16,6 +16,7 @@ fun Sdk.init(student: Student): Sdk {
|
||||
mobileBaseUrl = student.mobileBaseUrl
|
||||
} else {
|
||||
scrapperBaseUrl = student.scrapperBaseUrl
|
||||
domainSuffix = student.scrapperDomainSuffix
|
||||
loginType = Sdk.ScrapperLoginType.valueOf(student.loginType)
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,7 @@
|
||||
Wersja 2.0.4
|
||||
Wersja 2.0.8
|
||||
|
||||
— zaktualizowaliśmy wygląd aplikacji na (częściowo) zgodny z wytycznymi Material 3
|
||||
— dodaliśmy możliwość zmiany kolejności pozycji w menu dolnym
|
||||
— poprawiliśmy sposób wyświetlania błędu o nieprawidłowym haśle na ekranie logowania
|
||||
— od teraz zmiana ustawień liczenia średniej automatycznie odświeży listę ocen
|
||||
— dodaliśmy okienko na wpisanie numeru PESEL, gdy dziennik wymaga dodatkowej autoryzacji dostępu
|
||||
— poprawiliśmy wyświetlanie kilku rodzajów zmian w planie lekcji
|
||||
— dodaliśmy limit znaków w okienku usprawiedliwiania
|
||||
— naprawiliśmy wyświetlanie frekwencji w szkołach, gdzie działa już system eduOne (ciągle jednak brak opcji usprawiedliwiania)
|
||||
|
||||
Pełna lista zmian: https://github.com/wulkanowy/wulkanowy/releases
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
@ -8,13 +9,18 @@
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
|
||||
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
|
||||
android:id="@+id/excuseReason"
|
||||
style="@style/Widget.Material3.TextInputEditText.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
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 />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
@ -172,7 +172,7 @@
|
||||
android:layout_marginBottom="16dp"
|
||||
android:hint="@string/login_host_hint"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toTopOf="@+id/loginFormTokenLayout"
|
||||
app:layout_constraintBottom_toTopOf="@+id/loginFormDomainSuffixLayout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/loginFormPassLayout">
|
||||
@ -185,6 +185,31 @@
|
||||
tools:ignore="Deprecated,LabelFor" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/loginFormDomainSuffixLayout"
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:hint="@string/login_domain_suffix_hint"
|
||||
app:errorEnabled="true"
|
||||
app:layout_constraintBottom_toTopOf="@+id/loginFormSymbolLayout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/loginFormHostLayout">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/loginFormDomainSuffix"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textShortMessage"
|
||||
android:maxLines="1" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/loginFormTokenLayout"
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
|
||||
@ -200,7 +225,7 @@
|
||||
app:layout_constraintBottom_toTopOf="@+id/loginFormSymbolLayout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/loginFormHostLayout">
|
||||
app:layout_constraintTop_toBottomOf="@+id/loginFormDomainSuffixLayout">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/loginFormToken"
|
||||
|
@ -239,6 +239,32 @@
|
||||
tools:ignore="Deprecated,LabelFor" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/loginFormDomainSuffixLayout"
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:hint="@string/login_domain_suffix_hint"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/loginFormHostLayout"
|
||||
tools:ignore="HardcodedText">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/loginFormDomainSuffix"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
tools:targetApi="o" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/loginFormAdvancedButton"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
@ -264,7 +290,7 @@
|
||||
android:layout_marginEnd="24dp"
|
||||
android:text="@string/login_sign_in"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/loginFormHostLayout" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/loginFormDomainSuffixLayout" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/loginFormPrivacyLink"
|
||||
|
@ -37,6 +37,7 @@
|
||||
<string name="login_login_pesel_email_hint">Přihlášení, číslo PESEL nebo e-mail</string>
|
||||
<string name="login_password_hint">Heslo</string>
|
||||
<string name="login_host_hint">Variace deníku UONET+</string>
|
||||
<string name="login_domain_suffix_hint">Custom domain suffix</string>
|
||||
<string name="login_type_api">Mobile API</string>
|
||||
<string name="login_type_scrapper">Scraper</string>
|
||||
<string name="login_type_hybrid">Hybridní</string>
|
||||
|
@ -37,6 +37,7 @@
|
||||
<string name="login_login_pesel_email_hint">Login, PESEL or e-mail</string>
|
||||
<string name="login_password_hint">Password</string>
|
||||
<string name="login_host_hint">UONET+ register variant</string>
|
||||
<string name="login_domain_suffix_hint">Custom domain suffix</string>
|
||||
<string name="login_type_api">Mobile API</string>
|
||||
<string name="login_type_scrapper">Scraper</string>
|
||||
<string name="login_type_hybrid">Hybrid</string>
|
||||
|
@ -37,6 +37,7 @@
|
||||
<string name="login_login_pesel_email_hint">Anmeldung, PESEL oder e-mail</string>
|
||||
<string name="login_password_hint">Passwort</string>
|
||||
<string name="login_host_hint">UONET+ Registervariante</string>
|
||||
<string name="login_domain_suffix_hint">Custom domain suffix</string>
|
||||
<string name="login_type_api">Mobile API</string>
|
||||
<string name="login_type_scrapper">Scraper</string>
|
||||
<string name="login_type_hybrid">Hybride</string>
|
||||
|
@ -37,6 +37,7 @@
|
||||
<string name="login_login_pesel_email_hint">Login, PESEL or e-mail</string>
|
||||
<string name="login_password_hint">Password</string>
|
||||
<string name="login_host_hint">UONET+ register variant</string>
|
||||
<string name="login_domain_suffix_hint">Custom domain suffix</string>
|
||||
<string name="login_type_api">Mobile API</string>
|
||||
<string name="login_type_scrapper">Scraper</string>
|
||||
<string name="login_type_hybrid">Hybrid</string>
|
||||
|
@ -37,6 +37,7 @@
|
||||
<string name="login_login_pesel_email_hint">Login, PESEL lub adres e-mail</string>
|
||||
<string name="login_password_hint">Hasło</string>
|
||||
<string name="login_host_hint">Odmiana dziennika UONET+</string>
|
||||
<string name="login_domain_suffix_hint">Niestandardowy sufiks domeny</string>
|
||||
<string name="login_type_api">Mobilne API</string>
|
||||
<string name="login_type_scrapper">Scraper</string>
|
||||
<string name="login_type_hybrid">Hybrydowe</string>
|
||||
|
@ -37,6 +37,7 @@
|
||||
<string name="login_login_pesel_email_hint">Логин, PESEL или электронная почта</string>
|
||||
<string name="login_password_hint">Пароль</string>
|
||||
<string name="login_host_hint">Тип дневника UONET+</string>
|
||||
<string name="login_domain_suffix_hint">Custom domain suffix</string>
|
||||
<string name="login_type_api">Мобильный API</string>
|
||||
<string name="login_type_scrapper">Scraper</string>
|
||||
<string name="login_type_hybrid">Hybrid</string>
|
||||
@ -682,7 +683,7 @@
|
||||
<string name="all_cancel">Отменить</string>
|
||||
<!--Timetable Widget-->
|
||||
<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_light">Светлая</string>
|
||||
<string name="widget_timetable_theme_dark">Тёмная</string>
|
||||
@ -778,7 +779,7 @@
|
||||
<string name="pref_advanced_category_summary">Значения плюса и минуса, расчёт средней оценки</string>
|
||||
<string name="pref_advanced_category">Расширенные</string>
|
||||
<string name="pref_about_category_summary">Версия приложения, разработчики, соц. сети</string>
|
||||
<string name="pref_ads_category_summary">Displaying advertisements, project support</string>
|
||||
<string name="pref_ads_category_summary">Посмотреть рекламу, чтобы поддержать проект</string>
|
||||
<!--Notification Channels-->
|
||||
<string name="channel_new_grades">Новые оценки</string>
|
||||
<string name="channel_new_homework">Новое домашнее задание</string>
|
||||
@ -810,14 +811,14 @@
|
||||
<string name="menu_order_confirm_content">Для сохранения изменений необходимо перезапустить приложение</string>
|
||||
<string name="menu_order_confirm_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_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">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>
|
||||
<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-->
|
||||
<string name="error_no_internet">Интернет-соединение отсутствует</string>
|
||||
<string name="error_invalid_device_datetime">Произошла ошибка. Проверьте время на вашем устройстве</string>
|
||||
|
@ -37,6 +37,7 @@
|
||||
<string name="login_login_pesel_email_hint">Prihlásenie, číslo PESEL alebo e-mail</string>
|
||||
<string name="login_password_hint">Heslo</string>
|
||||
<string name="login_host_hint">Variácia denníka UONET+</string>
|
||||
<string name="login_domain_suffix_hint">Custom domain suffix</string>
|
||||
<string name="login_type_api">Mobile API</string>
|
||||
<string name="login_type_scrapper">Scraper</string>
|
||||
<string name="login_type_hybrid">Hybridné</string>
|
||||
|
@ -37,6 +37,7 @@
|
||||
<string name="login_login_pesel_email_hint">Логін, PESEL або e-mail</string>
|
||||
<string name="login_password_hint">Пароль</string>
|
||||
<string name="login_host_hint">Тип щоденника UONET+</string>
|
||||
<string name="login_domain_suffix_hint">Custom domain suffix</string>
|
||||
<string name="login_type_api">Мobile API</string>
|
||||
<string name="login_type_scrapper">Scraper</string>
|
||||
<string name="login_type_hybrid">Hybrid</string>
|
||||
@ -682,7 +683,7 @@
|
||||
<string name="all_cancel">Скасувати</string>
|
||||
<!--Timetable Widget-->
|
||||
<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_light">Яскрава</string>
|
||||
<string name="widget_timetable_theme_dark">Темна</string>
|
||||
@ -810,14 +811,14 @@
|
||||
<string name="menu_order_confirm_content">Додаток потрібно перезавантажити для збереження змін</string>
|
||||
<string name="menu_order_confirm_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_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">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>
|
||||
<string name="auth_title">Авторизувати</string>
|
||||
<string name="auth_description">Для роботи програми нам потрібно підтвердити вашу особу. Будь ласка, введіть число PESEL <b>%1$s</b> студента в поле нижче</string>
|
||||
<string name="auth_button_skip">Поки що пропустити</string>
|
||||
<!--Errors-->
|
||||
<string name="error_no_internet">Немає з\'єднання з інтернетом</string>
|
||||
<string name="error_invalid_device_datetime">Сталася помилка. Перевірте годинник пристрою</string>
|
||||
|
@ -20,6 +20,7 @@
|
||||
<item>Gmina Ulan-Majorat - Platforma oświatowa</item>
|
||||
<item>Gmina Ozorków - Platforma edukacyjna</item>
|
||||
<item>Gmina Łopiennik Górny - Platforma oświatowa</item>
|
||||
<item>@string/login_domain_suffix_hint</item>
|
||||
<item>Fakelog</item>
|
||||
</string-array>
|
||||
<string-array name="hosts_values">
|
||||
@ -42,6 +43,7 @@
|
||||
<item>https://vulcan.net.pl/?login</item>
|
||||
<item>https://vulcan.net.pl/?login</item>
|
||||
<item>https://vulcan.net.pl/?login</item>
|
||||
<item>https://vulcan.net.pl/?email&customSuffix</item>
|
||||
<item>https://fakelog.cf/?email</item>
|
||||
</string-array>
|
||||
<string-array name="hosts_symbols">
|
||||
@ -64,6 +66,7 @@
|
||||
<item>gminaulanmajorat</item>
|
||||
<item>gminaozorkow</item>
|
||||
<item>gminalopiennikgorny</item>
|
||||
<item>Default</item>
|
||||
<item>powiatwulkanowy</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
@ -42,6 +42,7 @@
|
||||
<string name="login_login_pesel_email_hint">Login, PESEL or e-mail</string>
|
||||
<string name="login_password_hint">Password</string>
|
||||
<string name="login_host_hint">UONET+ register variant</string>
|
||||
<string name="login_domain_suffix_hint">Custom domain suffix</string>
|
||||
<string name="login_type_api">Mobile API</string>
|
||||
<string name="login_type_scrapper">Scraper</string>
|
||||
<string name="login_type_hybrid">Hybrid</string>
|
||||
|
@ -50,6 +50,7 @@ fun getSemesterPojo(diaryId: Int, semesterId: Int, start: LocalDate, end: LocalD
|
||||
|
||||
fun getStudentEntity(mode: Sdk.Mode = Sdk.Mode.HEBE) = Student(
|
||||
scrapperBaseUrl = "http://fakelog.cf",
|
||||
scrapperDomainSuffix = "",
|
||||
email = "jan@fakelog.cf",
|
||||
certificateKey = "",
|
||||
classId = 0,
|
||||
|
@ -296,6 +296,7 @@ class GradeRepositoryTest {
|
||||
private fun createGrades(grades: List<SdkGrade>): Grades = Grades(
|
||||
details = grades,
|
||||
summary = listOf(),
|
||||
descriptive = emptyList(),
|
||||
isAverage = false,
|
||||
isPoints = false,
|
||||
isForAdults = false,
|
||||
|
@ -201,6 +201,7 @@ class GetMailboxByStudentUseCaseTest {
|
||||
schoolShortName: String = "test",
|
||||
) = Student(
|
||||
scrapperBaseUrl = "http://fakelog.cf",
|
||||
scrapperDomainSuffix = "",
|
||||
email = "jan@fakelog.cf",
|
||||
certificateKey = "",
|
||||
classId = 0,
|
||||
|
@ -47,6 +47,7 @@ class GradeAverageProviderTest {
|
||||
|
||||
private val student = Student(
|
||||
scrapperBaseUrl = "",
|
||||
scrapperDomainSuffix = "",
|
||||
mobileBaseUrl = "",
|
||||
loginType = "",
|
||||
loginMode = "SCRAPPER",
|
||||
|
@ -130,7 +130,7 @@ class LoginFormPresenterTest {
|
||||
@Test
|
||||
fun loginTest() {
|
||||
coEvery {
|
||||
repository.getUserSubjectsFromScrapper(any(), any(), any(), any())
|
||||
repository.getUserSubjectsFromScrapper(any(), any(), any(), any(), any())
|
||||
} returns registerUser
|
||||
|
||||
every { loginFormView.formUsernameValue } returns "@"
|
||||
@ -149,7 +149,7 @@ class LoginFormPresenterTest {
|
||||
@Test
|
||||
fun loginEmptyTest() {
|
||||
coEvery {
|
||||
repository.getUserSubjectsFromScrapper(any(), any(), any(), any())
|
||||
repository.getUserSubjectsFromScrapper(any(), any(), any(), any(), any())
|
||||
} returns registerUser
|
||||
every { loginFormView.formUsernameValue } returns "@"
|
||||
every { loginFormView.formPassValue } returns "123456"
|
||||
@ -167,7 +167,7 @@ class LoginFormPresenterTest {
|
||||
@Test
|
||||
fun loginEmptyTwiceTest() {
|
||||
coEvery {
|
||||
repository.getUserSubjectsFromScrapper(any(), any(), any(), any())
|
||||
repository.getUserSubjectsFromScrapper(any(), any(), any(), any(), any())
|
||||
} returns registerUser
|
||||
every { loginFormView.formUsernameValue } returns "@"
|
||||
every { loginFormView.formPassValue } returns "123456"
|
||||
@ -187,12 +187,7 @@ class LoginFormPresenterTest {
|
||||
fun loginErrorTest() {
|
||||
val testException = IOException("test")
|
||||
coEvery {
|
||||
repository.getUserSubjectsFromScrapper(
|
||||
any(),
|
||||
any(),
|
||||
any(),
|
||||
any()
|
||||
)
|
||||
repository.getUserSubjectsFromScrapper(any(), any(), any(), any(), any())
|
||||
} throws testException
|
||||
every { loginFormView.formUsernameValue } returns "@"
|
||||
every { loginFormView.formPassValue } returns "123456"
|
||||
|
@ -55,6 +55,7 @@ class LoginStudentSelectPresenterTest {
|
||||
password = "",
|
||||
baseUrl = "",
|
||||
symbol = null,
|
||||
domainSuffix = "",
|
||||
)
|
||||
|
||||
private val subject = RegisterStudent(
|
||||
|
@ -1,7 +1,7 @@
|
||||
buildscript {
|
||||
ext {
|
||||
kotlin_version = '1.8.21'
|
||||
about_libraries = '10.6.3'
|
||||
about_libraries = '10.7.0'
|
||||
hilt_version = "2.46.1"
|
||||
}
|
||||
repositories {
|
||||
@ -13,14 +13,14 @@ buildscript {
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
|
||||
classpath 'com.android.tools.build:gradle:8.0.1'
|
||||
classpath 'com.android.tools.build:gradle:8.0.2'
|
||||
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
|
||||
classpath 'com.google.gms:google-services:4.3.15'
|
||||
classpath 'com.huawei.agconnect:agcp:1.9.0.300'
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.5'
|
||||
classpath "com.github.triplet.gradle:play-publisher:3.6.0"
|
||||
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 "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:$about_libraries"
|
||||
}
|
||||
|
@ -1,28 +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
|
||||
#
|
||||
android.enableJetifier=true
|
||||
android.useAndroidX=true
|
||||
android.defaults.buildfeatures.buildconfig=true
|
||||
android.nonTransitiveRClass=false
|
||||
android.nonFinalResIds=false
|
||||
#
|
||||
kotlin.code.style=official
|
||||
kapt.use.worker.api=true
|
||||
kapt.include.compile.classpath=false
|
||||
kotlin.code.style=official
|
||||
#
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
android.nonTransitiveRClass=false
|
||||
android.defaults.buildfeatures.buildconfig=true
|
||||
#
|
||||
# https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-common-faq-0000001063210244#section17273113244910
|
||||
apmsInstrumentationEnabled=false
|
||||
#
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
# org.gradle.parallel=true
|
||||
|
||||
|
Reference in New Issue
Block a user