forked from github/wulkanowy-mirror
Merge branch 'release/2.0.8'
This commit is contained in:
commit
391f38485d
@ -23,8 +23,8 @@ android {
|
|||||||
testApplicationId "io.github.tests.wulkanowy"
|
testApplicationId "io.github.tests.wulkanowy"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 33
|
targetSdkVersion 33
|
||||||
versionCode 129
|
versionCode 130
|
||||||
versionName "2.0.7"
|
versionName "2.0.8"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
resValue "string", "app_name", "Wulkanowy"
|
resValue "string", "app_name", "Wulkanowy"
|
||||||
@ -196,7 +196,7 @@ ext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'io.github.wulkanowy:sdk:2.0.7'
|
implementation 'io.github.wulkanowy:sdk:2.0.8'
|
||||||
|
|
||||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
|
||||||
|
|
||||||
|
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 = 47, to = 48),
|
||||||
AutoMigration(from = 51, to = 52),
|
AutoMigration(from = 51, to = 52),
|
||||||
AutoMigration(from = 54, to = 55, spec = Migration55::class),
|
AutoMigration(from = 54, to = 55, spec = Migration55::class),
|
||||||
|
AutoMigration(from = 55, to = 56),
|
||||||
],
|
],
|
||||||
version = AppDatabase.VERSION_SCHEMA,
|
version = AppDatabase.VERSION_SCHEMA,
|
||||||
exportSchema = true
|
exportSchema = true
|
||||||
@ -57,7 +58,7 @@ import javax.inject.Singleton
|
|||||||
abstract class AppDatabase : RoomDatabase() {
|
abstract class AppDatabase : RoomDatabase() {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val VERSION_SCHEMA = 55
|
const val VERSION_SCHEMA = 56
|
||||||
|
|
||||||
fun getMigrations(sharedPrefProvider: SharedPrefProvider, appInfo: AppInfo) = arrayOf(
|
fun getMigrations(sharedPrefProvider: SharedPrefProvider, appInfo: AppInfo) = arrayOf(
|
||||||
Migration2(),
|
Migration2(),
|
||||||
|
@ -19,6 +19,9 @@ data class Student(
|
|||||||
@ColumnInfo(name = "scrapper_base_url")
|
@ColumnInfo(name = "scrapper_base_url")
|
||||||
val scrapperBaseUrl: String,
|
val scrapperBaseUrl: String,
|
||||||
|
|
||||||
|
@ColumnInfo(name = "scrapper_domain_suffix", defaultValue = "")
|
||||||
|
val scrapperDomainSuffix: String,
|
||||||
|
|
||||||
@ColumnInfo(name = "mobile_base_url")
|
@ColumnInfo(name = "mobile_base_url")
|
||||||
val mobileBaseUrl: String,
|
val mobileBaseUrl: String,
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@ fun SdkRegisterUser.mapToPojo(password: String?) = RegisterUser(
|
|||||||
|
|
||||||
fun RegisterStudent.mapToStudentWithSemesters(
|
fun RegisterStudent.mapToStudentWithSemesters(
|
||||||
user: RegisterUser,
|
user: RegisterUser,
|
||||||
|
scrapperDomainSuffix: String,
|
||||||
symbol: RegisterSymbol,
|
symbol: RegisterSymbol,
|
||||||
unit: RegisterUnit,
|
unit: RegisterUnit,
|
||||||
colors: List<Long>,
|
colors: List<Long>,
|
||||||
@ -76,6 +77,7 @@ fun RegisterStudent.mapToStudentWithSemesters(
|
|||||||
studentName = "$studentName $studentSurname",
|
studentName = "$studentName $studentSurname",
|
||||||
loginMode = user.loginMode.name,
|
loginMode = user.loginMode.name,
|
||||||
scrapperBaseUrl = user.scrapperBaseUrl.orEmpty(),
|
scrapperBaseUrl = user.scrapperBaseUrl.orEmpty(),
|
||||||
|
scrapperDomainSuffix = scrapperDomainSuffix,
|
||||||
mobileBaseUrl = symbol.hebeBaseUrl.orEmpty(),
|
mobileBaseUrl = symbol.hebeBaseUrl.orEmpty(),
|
||||||
certificateKey = symbol.keyId.orEmpty(),
|
certificateKey = symbol.keyId.orEmpty(),
|
||||||
privateKey = symbol.privatePem.orEmpty(),
|
privateKey = symbol.privatePem.orEmpty(),
|
||||||
|
@ -43,22 +43,14 @@ class StudentRepository @Inject constructor(
|
|||||||
.getStudentsFromHebe(token, pin, symbol, "")
|
.getStudentsFromHebe(token, pin, symbol, "")
|
||||||
.mapToPojo(null)
|
.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(
|
suspend fun getUserSubjectsFromScrapper(
|
||||||
email: String,
|
email: String,
|
||||||
password: String,
|
password: String,
|
||||||
scrapperBaseUrl: String,
|
scrapperBaseUrl: String,
|
||||||
|
domainSuffix: String,
|
||||||
symbol: String
|
symbol: String
|
||||||
): RegisterUser = sdk
|
): RegisterUser = sdk
|
||||||
.getUserSubjectsFromScrapper(email, password, scrapperBaseUrl, symbol)
|
.getUserSubjectsFromScrapper(email, password, scrapperBaseUrl, domainSuffix, symbol)
|
||||||
.mapToPojo(password)
|
.mapToPojo(password)
|
||||||
|
|
||||||
suspend fun getStudentsHybrid(
|
suspend fun getStudentsHybrid(
|
||||||
|
@ -6,5 +6,6 @@ data class LoginData(
|
|||||||
val login: String,
|
val login: String,
|
||||||
val password: String,
|
val password: String,
|
||||||
val baseUrl: String,
|
val baseUrl: String,
|
||||||
|
val domainSuffix: String,
|
||||||
val symbol: String?,
|
val symbol: String?,
|
||||||
) : Serializable
|
) : Serializable
|
||||||
|
@ -5,6 +5,7 @@ import android.view.View
|
|||||||
import android.view.View.GONE
|
import android.view.View.GONE
|
||||||
import android.view.View.VISIBLE
|
import android.view.View.VISIBLE
|
||||||
import android.widget.ArrayAdapter
|
import android.widget.ArrayAdapter
|
||||||
|
import androidx.core.view.isVisible
|
||||||
import androidx.core.widget.doOnTextChanged
|
import androidx.core.widget.doOnTextChanged
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
import io.github.wulkanowy.R
|
import io.github.wulkanowy.R
|
||||||
@ -55,6 +56,9 @@ class LoginAdvancedFragment :
|
|||||||
get() = hostValues.getOrNull(hostKeys.indexOf(binding.loginFormHost.text.toString()))
|
get() = hostValues.getOrNull(hostKeys.indexOf(binding.loginFormHost.text.toString()))
|
||||||
.orEmpty()
|
.orEmpty()
|
||||||
|
|
||||||
|
override val formDomainSuffix: String
|
||||||
|
get() = binding.loginFormDomainSuffix.text.toString().trim()
|
||||||
|
|
||||||
override val formHostSymbol: String
|
override val formHostSymbol: String
|
||||||
get() = hostSymbols.getOrNull(hostKeys.indexOf(binding.loginFormHost.text.toString()))
|
get() = hostSymbols.getOrNull(hostKeys.indexOf(binding.loginFormHost.text.toString()))
|
||||||
.orEmpty()
|
.orEmpty()
|
||||||
@ -279,6 +283,7 @@ class LoginAdvancedFragment :
|
|||||||
loginFormUsernameLayout.visibility = VISIBLE
|
loginFormUsernameLayout.visibility = VISIBLE
|
||||||
loginFormPassLayout.visibility = VISIBLE
|
loginFormPassLayout.visibility = VISIBLE
|
||||||
loginFormHostLayout.visibility = VISIBLE
|
loginFormHostLayout.visibility = VISIBLE
|
||||||
|
loginFormDomainSuffixLayout.isVisible = true
|
||||||
loginFormPinLayout.visibility = GONE
|
loginFormPinLayout.visibility = GONE
|
||||||
loginFormSymbolLayout.visibility = VISIBLE
|
loginFormSymbolLayout.visibility = VISIBLE
|
||||||
loginFormTokenLayout.visibility = GONE
|
loginFormTokenLayout.visibility = GONE
|
||||||
@ -290,6 +295,7 @@ class LoginAdvancedFragment :
|
|||||||
loginFormUsernameLayout.visibility = VISIBLE
|
loginFormUsernameLayout.visibility = VISIBLE
|
||||||
loginFormPassLayout.visibility = VISIBLE
|
loginFormPassLayout.visibility = VISIBLE
|
||||||
loginFormHostLayout.visibility = VISIBLE
|
loginFormHostLayout.visibility = VISIBLE
|
||||||
|
loginFormDomainSuffixLayout.isVisible = true
|
||||||
loginFormPinLayout.visibility = GONE
|
loginFormPinLayout.visibility = GONE
|
||||||
loginFormSymbolLayout.visibility = VISIBLE
|
loginFormSymbolLayout.visibility = VISIBLE
|
||||||
loginFormTokenLayout.visibility = GONE
|
loginFormTokenLayout.visibility = GONE
|
||||||
@ -301,6 +307,7 @@ class LoginAdvancedFragment :
|
|||||||
loginFormUsernameLayout.visibility = GONE
|
loginFormUsernameLayout.visibility = GONE
|
||||||
loginFormPassLayout.visibility = GONE
|
loginFormPassLayout.visibility = GONE
|
||||||
loginFormHostLayout.visibility = GONE
|
loginFormHostLayout.visibility = GONE
|
||||||
|
loginFormDomainSuffixLayout.isVisible = false
|
||||||
loginFormPinLayout.visibility = VISIBLE
|
loginFormPinLayout.visibility = VISIBLE
|
||||||
loginFormSymbolLayout.visibility = VISIBLE
|
loginFormSymbolLayout.visibility = VISIBLE
|
||||||
loginFormTokenLayout.visibility = VISIBLE
|
loginFormTokenLayout.visibility = VISIBLE
|
||||||
|
@ -154,6 +154,7 @@ class LoginAdvancedPresenter @Inject constructor(
|
|||||||
login = view?.formUsernameValue.orEmpty().trim(),
|
login = view?.formUsernameValue.orEmpty().trim(),
|
||||||
password = view?.formPassValue.orEmpty().trim(),
|
password = view?.formPassValue.orEmpty().trim(),
|
||||||
baseUrl = view?.formHostValue.orEmpty().trim(),
|
baseUrl = view?.formHostValue.orEmpty().trim(),
|
||||||
|
domainSuffix = view?.formDomainSuffix.orEmpty().trim(),
|
||||||
symbol = view?.formSymbolValue.orEmpty().trim().getNormalizedSymbol(),
|
symbol = view?.formSymbolValue.orEmpty().trim().getNormalizedSymbol(),
|
||||||
)
|
)
|
||||||
when (it.data.symbols.size) {
|
when (it.data.symbols.size) {
|
||||||
@ -186,6 +187,7 @@ class LoginAdvancedPresenter @Inject constructor(
|
|||||||
val email = view?.formUsernameValue.orEmpty()
|
val email = view?.formUsernameValue.orEmpty()
|
||||||
val password = view?.formPassValue.orEmpty()
|
val password = view?.formPassValue.orEmpty()
|
||||||
val endpoint = view?.formHostValue.orEmpty()
|
val endpoint = view?.formHostValue.orEmpty()
|
||||||
|
val domainSuffix = view?.formDomainSuffix.orEmpty()
|
||||||
|
|
||||||
val pin = view?.formPinValue.orEmpty()
|
val pin = view?.formPinValue.orEmpty()
|
||||||
val symbol = view?.formSymbolValue.orEmpty()
|
val symbol = view?.formSymbolValue.orEmpty()
|
||||||
@ -193,8 +195,8 @@ class LoginAdvancedPresenter @Inject constructor(
|
|||||||
|
|
||||||
return when (Sdk.Mode.valueOf(view?.formLoginType.orEmpty())) {
|
return when (Sdk.Mode.valueOf(view?.formLoginType.orEmpty())) {
|
||||||
Sdk.Mode.HEBE -> studentRepository.getStudentsApi(pin, symbol, token)
|
Sdk.Mode.HEBE -> studentRepository.getStudentsApi(pin, symbol, token)
|
||||||
Sdk.Mode.SCRAPPER -> studentRepository.getStudentsScrapper(
|
Sdk.Mode.SCRAPPER -> studentRepository.getUserSubjectsFromScrapper(
|
||||||
email, password, endpoint, symbol
|
email, password, endpoint, domainSuffix, symbol
|
||||||
)
|
)
|
||||||
|
|
||||||
Sdk.Mode.HYBRID -> studentRepository.getStudentsHybrid(
|
Sdk.Mode.HYBRID -> studentRepository.getStudentsHybrid(
|
||||||
|
@ -12,6 +12,8 @@ interface LoginAdvancedView : BaseView {
|
|||||||
|
|
||||||
val formHostValue: String
|
val formHostValue: String
|
||||||
|
|
||||||
|
val formDomainSuffix: String
|
||||||
|
|
||||||
val formHostSymbol: String
|
val formHostSymbol: String
|
||||||
|
|
||||||
val formLoginType: String
|
val formLoginType: String
|
||||||
|
@ -45,6 +45,9 @@ class LoginFormFragment : BaseFragment<FragmentLoginFormBinding>(R.layout.fragme
|
|||||||
get() = hostValues.getOrNull(hostKeys.indexOf(binding.loginFormHost.text.toString()))
|
get() = hostValues.getOrNull(hostKeys.indexOf(binding.loginFormHost.text.toString()))
|
||||||
.orEmpty()
|
.orEmpty()
|
||||||
|
|
||||||
|
override val formDomainSuffix: String
|
||||||
|
get() = binding.loginFormDomainSuffix.text.toString()
|
||||||
|
|
||||||
override val formHostSymbol: String
|
override val formHostSymbol: String
|
||||||
get() = hostSymbols.getOrNull(hostKeys.indexOf(binding.loginFormHost.text.toString()))
|
get() = hostSymbols.getOrNull(hostKeys.indexOf(binding.loginFormHost.text.toString()))
|
||||||
.orEmpty()
|
.orEmpty()
|
||||||
@ -204,6 +207,10 @@ class LoginFormFragment : BaseFragment<FragmentLoginFormBinding>(R.layout.fragme
|
|||||||
binding.loginFormContainer.visibility = if (show) VISIBLE else GONE
|
binding.loginFormContainer.visibility = if (show) VISIBLE else GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun showDomainSuffixInput(show: Boolean) {
|
||||||
|
binding.loginFormDomainSuffixLayout.isVisible = show
|
||||||
|
}
|
||||||
|
|
||||||
override fun showOtherOptionsButton(show: Boolean) {
|
override fun showOtherOptionsButton(show: Boolean) {
|
||||||
binding.loginFormAdvancedButton.isVisible = show
|
binding.loginFormAdvancedButton.isVisible = show
|
||||||
}
|
}
|
||||||
@ -256,6 +263,7 @@ class LoginFormFragment : BaseFragment<FragmentLoginFormBinding>(R.layout.fragme
|
|||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
presenter.updateUsernameLabel()
|
presenter.updateUsernameLabel()
|
||||||
|
presenter.updateCustomDomainSuffixVisibility()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun openEmail(lastError: String) {
|
override fun openEmail(lastError: String) {
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
package io.github.wulkanowy.ui.modules.login.form
|
package io.github.wulkanowy.ui.modules.login.form
|
||||||
|
|
||||||
import androidx.core.net.toUri
|
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.repositories.StudentRepository
|
||||||
|
import io.github.wulkanowy.data.resourceFlow
|
||||||
import io.github.wulkanowy.ui.base.BasePresenter
|
import io.github.wulkanowy.ui.base.BasePresenter
|
||||||
import io.github.wulkanowy.ui.modules.login.LoginData
|
import io.github.wulkanowy.ui.modules.login.LoginData
|
||||||
import io.github.wulkanowy.ui.modules.login.LoginErrorHandler
|
import io.github.wulkanowy.ui.modules.login.LoginErrorHandler
|
||||||
@ -56,10 +61,17 @@ class LoginFormPresenter @Inject constructor(
|
|||||||
} else if (formUsernameValue == "jan@fakelog.cf" && formPassValue == "jan123") {
|
} else if (formUsernameValue == "jan@fakelog.cf" && formPassValue == "jan123") {
|
||||||
setCredentials("", "")
|
setCredentials("", "")
|
||||||
}
|
}
|
||||||
|
updateCustomDomainSuffixVisibility()
|
||||||
updateUsernameLabel()
|
updateUsernameLabel()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun updateCustomDomainSuffixVisibility() {
|
||||||
|
view?.run {
|
||||||
|
showDomainSuffixInput("customSuffix" in formHostValue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun updateUsernameLabel() {
|
fun updateUsernameLabel() {
|
||||||
view?.run {
|
view?.run {
|
||||||
setUsernameLabel(if ("email" !in formHostValue) nicknameLabel else emailLabel)
|
setUsernameLabel(if ("email" !in formHostValue) nicknameLabel else emailLabel)
|
||||||
@ -91,6 +103,7 @@ class LoginFormPresenter @Inject constructor(
|
|||||||
val email = view?.formUsernameValue.orEmpty().trim()
|
val email = view?.formUsernameValue.orEmpty().trim()
|
||||||
val password = view?.formPassValue.orEmpty().trim()
|
val password = view?.formPassValue.orEmpty().trim()
|
||||||
val host = view?.formHostValue.orEmpty().trim()
|
val host = view?.formHostValue.orEmpty().trim()
|
||||||
|
val domainSuffix = view?.formDomainSuffix.orEmpty().trim()
|
||||||
val symbol = view?.formHostSymbol.orEmpty().trim()
|
val symbol = view?.formHostSymbol.orEmpty().trim()
|
||||||
|
|
||||||
if (!validateCredentials(email, password, host)) return
|
if (!validateCredentials(email, password, host)) return
|
||||||
@ -100,6 +113,7 @@ class LoginFormPresenter @Inject constructor(
|
|||||||
email = email,
|
email = email,
|
||||||
password = password,
|
password = password,
|
||||||
scrapperBaseUrl = host,
|
scrapperBaseUrl = host,
|
||||||
|
domainSuffix = domainSuffix,
|
||||||
symbol = symbol
|
symbol = symbol
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -112,7 +126,7 @@ class LoginFormPresenter @Inject constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.onResourceSuccess {
|
.onResourceSuccess {
|
||||||
val loginData = LoginData(email, password, host, symbol)
|
val loginData = LoginData(email, password, host, domainSuffix, symbol)
|
||||||
when (it.symbols.size) {
|
when (it.symbols.size) {
|
||||||
0 -> view?.navigateToSymbol(loginData)
|
0 -> view?.navigateToSymbol(loginData)
|
||||||
else -> view?.navigateToStudentSelect(loginData, it)
|
else -> view?.navigateToStudentSelect(loginData, it)
|
||||||
|
@ -14,6 +14,8 @@ interface LoginFormView : BaseView {
|
|||||||
|
|
||||||
val formHostValue: String
|
val formHostValue: String
|
||||||
|
|
||||||
|
val formDomainSuffix: String
|
||||||
|
|
||||||
val formHostSymbol: String
|
val formHostSymbol: String
|
||||||
|
|
||||||
val nicknameLabel: String
|
val nicknameLabel: String
|
||||||
@ -56,6 +58,8 @@ interface LoginFormView : BaseView {
|
|||||||
|
|
||||||
fun showContent(show: Boolean)
|
fun showContent(show: Boolean)
|
||||||
|
|
||||||
|
fun showDomainSuffixInput(show: Boolean)
|
||||||
|
|
||||||
fun showOtherOptionsButton(show: Boolean)
|
fun showOtherOptionsButton(show: Boolean)
|
||||||
|
|
||||||
fun showVersion()
|
fun showVersion()
|
||||||
|
@ -241,6 +241,7 @@ class LoginStudentSelectPresenter @Inject constructor(
|
|||||||
item.student.mapToStudentWithSemesters(
|
item.student.mapToStudentWithSemesters(
|
||||||
user = registerUser,
|
user = registerUser,
|
||||||
symbol = item.symbol,
|
symbol = item.symbol,
|
||||||
|
scrapperDomainSuffix = loginData.domainSuffix,
|
||||||
unit = item.unit,
|
unit = item.unit,
|
||||||
colors = appInfo.defaultColorsForAvatar,
|
colors = appInfo.defaultColorsForAvatar,
|
||||||
)
|
)
|
||||||
|
@ -62,6 +62,7 @@ class LoginSymbolPresenter @Inject constructor(
|
|||||||
email = loginData.login,
|
email = loginData.login,
|
||||||
password = loginData.password,
|
password = loginData.password,
|
||||||
scrapperBaseUrl = loginData.baseUrl,
|
scrapperBaseUrl = loginData.baseUrl,
|
||||||
|
domainSuffix = loginData.domainSuffix,
|
||||||
symbol = loginData.symbol.orEmpty(),
|
symbol = loginData.symbol.orEmpty(),
|
||||||
)
|
)
|
||||||
}.onEach { user ->
|
}.onEach { user ->
|
||||||
|
@ -16,6 +16,7 @@ fun Sdk.init(student: Student): Sdk {
|
|||||||
mobileBaseUrl = student.mobileBaseUrl
|
mobileBaseUrl = student.mobileBaseUrl
|
||||||
} else {
|
} else {
|
||||||
scrapperBaseUrl = student.scrapperBaseUrl
|
scrapperBaseUrl = student.scrapperBaseUrl
|
||||||
|
domainSuffix = student.scrapperDomainSuffix
|
||||||
loginType = Sdk.ScrapperLoginType.valueOf(student.loginType)
|
loginType = Sdk.ScrapperLoginType.valueOf(student.loginType)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Wersja 2.0.7
|
Wersja 2.0.8
|
||||||
|
|
||||||
— poprawiliśmy wyświetlanie kilku rodzajów zmian w planie lekcji
|
— poprawiliśmy wyświetlanie kilku rodzajów zmian w planie lekcji
|
||||||
— dodaliśmy limit znaków w okienku usprawiedliwiania
|
— dodaliśmy limit znaków w okienku usprawiedliwiania
|
||||||
|
@ -172,7 +172,7 @@
|
|||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:hint="@string/login_host_hint"
|
android:hint="@string/login_host_hint"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/loginFormTokenLayout"
|
app:layout_constraintBottom_toTopOf="@+id/loginFormDomainSuffixLayout"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/loginFormPassLayout">
|
app:layout_constraintTop_toBottomOf="@+id/loginFormPassLayout">
|
||||||
@ -185,6 +185,31 @@
|
|||||||
tools:ignore="Deprecated,LabelFor" />
|
tools:ignore="Deprecated,LabelFor" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</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
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/loginFormTokenLayout"
|
android:id="@+id/loginFormTokenLayout"
|
||||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
|
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
|
||||||
@ -200,7 +225,7 @@
|
|||||||
app:layout_constraintBottom_toTopOf="@+id/loginFormSymbolLayout"
|
app:layout_constraintBottom_toTopOf="@+id/loginFormSymbolLayout"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/loginFormHostLayout">
|
app:layout_constraintTop_toBottomOf="@+id/loginFormDomainSuffixLayout">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/loginFormToken"
|
android:id="@+id/loginFormToken"
|
||||||
|
@ -239,6 +239,32 @@
|
|||||||
tools:ignore="Deprecated,LabelFor" />
|
tools:ignore="Deprecated,LabelFor" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</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
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/loginFormAdvancedButton"
|
android:id="@+id/loginFormAdvancedButton"
|
||||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||||
@ -264,7 +290,7 @@
|
|||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="@string/login_sign_in"
|
android:text="@string/login_sign_in"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/loginFormHostLayout" />
|
app:layout_constraintTop_toBottomOf="@+id/loginFormDomainSuffixLayout" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/loginFormPrivacyLink"
|
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_login_pesel_email_hint">Přihlášení, číslo PESEL nebo e-mail</string>
|
||||||
<string name="login_password_hint">Heslo</string>
|
<string name="login_password_hint">Heslo</string>
|
||||||
<string name="login_host_hint">Variace deníku UONET+</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_api">Mobile API</string>
|
||||||
<string name="login_type_scrapper">Scraper</string>
|
<string name="login_type_scrapper">Scraper</string>
|
||||||
<string name="login_type_hybrid">Hybridní</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_login_pesel_email_hint">Login, PESEL or e-mail</string>
|
||||||
<string name="login_password_hint">Password</string>
|
<string name="login_password_hint">Password</string>
|
||||||
<string name="login_host_hint">UONET+ register variant</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_api">Mobile API</string>
|
||||||
<string name="login_type_scrapper">Scraper</string>
|
<string name="login_type_scrapper">Scraper</string>
|
||||||
<string name="login_type_hybrid">Hybrid</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_login_pesel_email_hint">Anmeldung, PESEL oder e-mail</string>
|
||||||
<string name="login_password_hint">Passwort</string>
|
<string name="login_password_hint">Passwort</string>
|
||||||
<string name="login_host_hint">UONET+ Registervariante</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_api">Mobile API</string>
|
||||||
<string name="login_type_scrapper">Scraper</string>
|
<string name="login_type_scrapper">Scraper</string>
|
||||||
<string name="login_type_hybrid">Hybride</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_login_pesel_email_hint">Login, PESEL or e-mail</string>
|
||||||
<string name="login_password_hint">Password</string>
|
<string name="login_password_hint">Password</string>
|
||||||
<string name="login_host_hint">UONET+ register variant</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_api">Mobile API</string>
|
||||||
<string name="login_type_scrapper">Scraper</string>
|
<string name="login_type_scrapper">Scraper</string>
|
||||||
<string name="login_type_hybrid">Hybrid</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_login_pesel_email_hint">Login, PESEL lub adres e-mail</string>
|
||||||
<string name="login_password_hint">Hasło</string>
|
<string name="login_password_hint">Hasło</string>
|
||||||
<string name="login_host_hint">Odmiana dziennika UONET+</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_api">Mobilne API</string>
|
||||||
<string name="login_type_scrapper">Scraper</string>
|
<string name="login_type_scrapper">Scraper</string>
|
||||||
<string name="login_type_hybrid">Hybrydowe</string>
|
<string name="login_type_hybrid">Hybrydowe</string>
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
<string name="login_login_pesel_email_hint">Логин, PESEL или электронная почта</string>
|
<string name="login_login_pesel_email_hint">Логин, PESEL или электронная почта</string>
|
||||||
<string name="login_password_hint">Пароль</string>
|
<string name="login_password_hint">Пароль</string>
|
||||||
<string name="login_host_hint">Тип дневника UONET+</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_api">Мобильный API</string>
|
||||||
<string name="login_type_scrapper">Scraper</string>
|
<string name="login_type_scrapper">Scraper</string>
|
||||||
<string name="login_type_hybrid">Hybrid</string>
|
<string name="login_type_hybrid">Hybrid</string>
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
<string name="login_login_pesel_email_hint">Prihlásenie, číslo PESEL alebo e-mail</string>
|
<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_password_hint">Heslo</string>
|
||||||
<string name="login_host_hint">Variácia denníka UONET+</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_api">Mobile API</string>
|
||||||
<string name="login_type_scrapper">Scraper</string>
|
<string name="login_type_scrapper">Scraper</string>
|
||||||
<string name="login_type_hybrid">Hybridné</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_login_pesel_email_hint">Логін, PESEL або e-mail</string>
|
||||||
<string name="login_password_hint">Пароль</string>
|
<string name="login_password_hint">Пароль</string>
|
||||||
<string name="login_host_hint">Тип щоденника UONET+</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_api">Мobile API</string>
|
||||||
<string name="login_type_scrapper">Scraper</string>
|
<string name="login_type_scrapper">Scraper</string>
|
||||||
<string name="login_type_hybrid">Hybrid</string>
|
<string name="login_type_hybrid">Hybrid</string>
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
<item>Gmina Ulan-Majorat - Platforma oświatowa</item>
|
<item>Gmina Ulan-Majorat - Platforma oświatowa</item>
|
||||||
<item>Gmina Ozorków - Platforma edukacyjna</item>
|
<item>Gmina Ozorków - Platforma edukacyjna</item>
|
||||||
<item>Gmina Łopiennik Górny - Platforma oświatowa</item>
|
<item>Gmina Łopiennik Górny - Platforma oświatowa</item>
|
||||||
|
<item>@string/login_domain_suffix_hint</item>
|
||||||
<item>Fakelog</item>
|
<item>Fakelog</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<string-array name="hosts_values">
|
<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/?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>
|
<item>https://fakelog.cf/?email</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<string-array name="hosts_symbols">
|
<string-array name="hosts_symbols">
|
||||||
@ -64,6 +66,7 @@
|
|||||||
<item>gminaulanmajorat</item>
|
<item>gminaulanmajorat</item>
|
||||||
<item>gminaozorkow</item>
|
<item>gminaozorkow</item>
|
||||||
<item>gminalopiennikgorny</item>
|
<item>gminalopiennikgorny</item>
|
||||||
|
<item>Default</item>
|
||||||
<item>powiatwulkanowy</item>
|
<item>powiatwulkanowy</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
<string name="login_login_pesel_email_hint">Login, PESEL or e-mail</string>
|
<string name="login_login_pesel_email_hint">Login, PESEL or e-mail</string>
|
||||||
<string name="login_password_hint">Password</string>
|
<string name="login_password_hint">Password</string>
|
||||||
<string name="login_host_hint">UONET+ register variant</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_api">Mobile API</string>
|
||||||
<string name="login_type_scrapper">Scraper</string>
|
<string name="login_type_scrapper">Scraper</string>
|
||||||
<string name="login_type_hybrid">Hybrid</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(
|
fun getStudentEntity(mode: Sdk.Mode = Sdk.Mode.HEBE) = Student(
|
||||||
scrapperBaseUrl = "http://fakelog.cf",
|
scrapperBaseUrl = "http://fakelog.cf",
|
||||||
|
scrapperDomainSuffix = "",
|
||||||
email = "jan@fakelog.cf",
|
email = "jan@fakelog.cf",
|
||||||
certificateKey = "",
|
certificateKey = "",
|
||||||
classId = 0,
|
classId = 0,
|
||||||
|
@ -296,6 +296,7 @@ class GradeRepositoryTest {
|
|||||||
private fun createGrades(grades: List<SdkGrade>): Grades = Grades(
|
private fun createGrades(grades: List<SdkGrade>): Grades = Grades(
|
||||||
details = grades,
|
details = grades,
|
||||||
summary = listOf(),
|
summary = listOf(),
|
||||||
|
descriptive = emptyList(),
|
||||||
isAverage = false,
|
isAverage = false,
|
||||||
isPoints = false,
|
isPoints = false,
|
||||||
isForAdults = false,
|
isForAdults = false,
|
||||||
|
@ -201,6 +201,7 @@ class GetMailboxByStudentUseCaseTest {
|
|||||||
schoolShortName: String = "test",
|
schoolShortName: String = "test",
|
||||||
) = Student(
|
) = Student(
|
||||||
scrapperBaseUrl = "http://fakelog.cf",
|
scrapperBaseUrl = "http://fakelog.cf",
|
||||||
|
scrapperDomainSuffix = "",
|
||||||
email = "jan@fakelog.cf",
|
email = "jan@fakelog.cf",
|
||||||
certificateKey = "",
|
certificateKey = "",
|
||||||
classId = 0,
|
classId = 0,
|
||||||
|
@ -47,6 +47,7 @@ class GradeAverageProviderTest {
|
|||||||
|
|
||||||
private val student = Student(
|
private val student = Student(
|
||||||
scrapperBaseUrl = "",
|
scrapperBaseUrl = "",
|
||||||
|
scrapperDomainSuffix = "",
|
||||||
mobileBaseUrl = "",
|
mobileBaseUrl = "",
|
||||||
loginType = "",
|
loginType = "",
|
||||||
loginMode = "SCRAPPER",
|
loginMode = "SCRAPPER",
|
||||||
|
@ -130,7 +130,7 @@ class LoginFormPresenterTest {
|
|||||||
@Test
|
@Test
|
||||||
fun loginTest() {
|
fun loginTest() {
|
||||||
coEvery {
|
coEvery {
|
||||||
repository.getUserSubjectsFromScrapper(any(), any(), any(), any())
|
repository.getUserSubjectsFromScrapper(any(), any(), any(), any(), any())
|
||||||
} returns registerUser
|
} returns registerUser
|
||||||
|
|
||||||
every { loginFormView.formUsernameValue } returns "@"
|
every { loginFormView.formUsernameValue } returns "@"
|
||||||
@ -149,7 +149,7 @@ class LoginFormPresenterTest {
|
|||||||
@Test
|
@Test
|
||||||
fun loginEmptyTest() {
|
fun loginEmptyTest() {
|
||||||
coEvery {
|
coEvery {
|
||||||
repository.getUserSubjectsFromScrapper(any(), any(), any(), any())
|
repository.getUserSubjectsFromScrapper(any(), any(), any(), any(), any())
|
||||||
} returns registerUser
|
} returns registerUser
|
||||||
every { loginFormView.formUsernameValue } returns "@"
|
every { loginFormView.formUsernameValue } returns "@"
|
||||||
every { loginFormView.formPassValue } returns "123456"
|
every { loginFormView.formPassValue } returns "123456"
|
||||||
@ -167,7 +167,7 @@ class LoginFormPresenterTest {
|
|||||||
@Test
|
@Test
|
||||||
fun loginEmptyTwiceTest() {
|
fun loginEmptyTwiceTest() {
|
||||||
coEvery {
|
coEvery {
|
||||||
repository.getUserSubjectsFromScrapper(any(), any(), any(), any())
|
repository.getUserSubjectsFromScrapper(any(), any(), any(), any(), any())
|
||||||
} returns registerUser
|
} returns registerUser
|
||||||
every { loginFormView.formUsernameValue } returns "@"
|
every { loginFormView.formUsernameValue } returns "@"
|
||||||
every { loginFormView.formPassValue } returns "123456"
|
every { loginFormView.formPassValue } returns "123456"
|
||||||
@ -187,12 +187,7 @@ class LoginFormPresenterTest {
|
|||||||
fun loginErrorTest() {
|
fun loginErrorTest() {
|
||||||
val testException = IOException("test")
|
val testException = IOException("test")
|
||||||
coEvery {
|
coEvery {
|
||||||
repository.getUserSubjectsFromScrapper(
|
repository.getUserSubjectsFromScrapper(any(), any(), any(), any(), any())
|
||||||
any(),
|
|
||||||
any(),
|
|
||||||
any(),
|
|
||||||
any()
|
|
||||||
)
|
|
||||||
} throws testException
|
} throws testException
|
||||||
every { loginFormView.formUsernameValue } returns "@"
|
every { loginFormView.formUsernameValue } returns "@"
|
||||||
every { loginFormView.formPassValue } returns "123456"
|
every { loginFormView.formPassValue } returns "123456"
|
||||||
|
@ -55,6 +55,7 @@ class LoginStudentSelectPresenterTest {
|
|||||||
password = "",
|
password = "",
|
||||||
baseUrl = "",
|
baseUrl = "",
|
||||||
symbol = null,
|
symbol = null,
|
||||||
|
domainSuffix = "",
|
||||||
)
|
)
|
||||||
|
|
||||||
private val subject = RegisterStudent(
|
private val subject = RegisterStudent(
|
||||||
|
Loading…
Reference in New Issue
Block a user