12 Commits
Author SHA1 Message Date
Odweta ebfc3c1c23 still trying to fix it 2024-11-09 10:04:50 +01:00
Odweta 07716e1ae6 fix build error (perhaps) again 2024-11-09 09:57:19 +01:00
Odweta 1049401429 fix build error (perhaps) 2024-11-09 09:50:58 +01:00
Odweta 83a825f4b7 naming output files based on versionName 2024-11-08 23:48:38 +01:00
Odweta 66dc2338fb added fastlane folders 2024-11-08 23:34:36 +01:00
Odweta 7c585709ed versioncode bump thing 2024-11-08 22:54:46 +01:00
Odweta f448420e03 update TODO.md 2024-11-08 19:07:52 +01:00
Odweta ec989d6ae0 add TODO.md 2024-11-08 19:07:18 +01:00
Odweta db91df4d22 bump version to 2.0.2 2024-11-08 19:04:10 +01:00
Odweta e020ae5f17 made the sign in layout responsive to the keyboard 2024-11-08 18:59:25 +01:00
Odweta d3197111c3 quality of life fixes
made the toolbar font size adaptively large relative to the user's name length, shrunk down the height of subjects and marks and made back gestures work properly - not close the app but show the previous screen
2024-11-08 18:09:55 +01:00
Odweta 8a4956e6c6 hotfix app crash, bump to 2.0.1 2024-10-25 16:44:05 +02:00
30 changed files with 678 additions and 191 deletions
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetSelector">
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
</selectionStates>
</component>
</project>
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MaterialThemeProjectNewConfig">
<option name="metadata">
<MTProjectMetadataState>
<option name="userId" value="35ed75a3:192c279f3e0:-7ffa" />
</MTProjectMetadataState>
</option>
</component>
</project>
+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" />
<option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" />
<option value="com.intellij.execution.junit.PatternConfigurationProducer" />
<option value="com.intellij.execution.junit.TestInClassConfigurationProducer" />
<option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" />
<option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" />
<option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" />
<option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" />
</set>
</option>
</component>
</project>
Generated
-2
View File
@@ -2,7 +2,5 @@
<project version="4"> <project version="4">
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" /> <mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/help" vcs="Git" />
<mapping directory="$PROJECT_DIR$/mobile/help" vcs="Git" />
</component> </component>
</project> </project>
+1 -1
View File
@@ -1,3 +1,3 @@
![solon-logo](./solon_logo.png) ![solon-logo](./solon_logo.png)
# Zorientujte se rychleji v této odlehčené verzi Školy OnLine # Zorientujte se rychleji v této odlehčené verzi Školy OnLine
# Odkaz na stažení aplikace pro Android [zde](https://gitlab.com/Odweta/solon/-/raw/master/release/solon.apk?ref_type=heads&inline=false) (verze 2.0) # Odkaz na stažení aplikace pro Android [zde](https://gitlab.com/Odweta/solon/-/raw/master/release/solon.apk?ref_type=heads&inline=false) (verze 2.0.2)
+4
View File
@@ -0,0 +1,4 @@
- add settings
- color schemes
- modes
- new logo
@@ -0,0 +1 @@
Optimalizovana a zbavena nesmyslu verze skolniho online systemu SkolaOnLine
@@ -0,0 +1 @@
Odlehcena verze aplikace SkolaOnLine
+1
View File
@@ -0,0 +1 @@
Solon
@@ -0,0 +1 @@
A more optimized and debloated version of the SkolaOnLine online school system
@@ -0,0 +1 @@
A light-weight Android frontend to SkolaOnLine
@@ -0,0 +1 @@
Solon
+329
View File
@@ -0,0 +1,329 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DeviceStreaming">
<option name="deviceSelectionList">
<list>
<PersistentDeviceSelectionData>
<option name="api" value="27" />
<option name="brand" value="DOCOMO" />
<option name="codename" value="F01L" />
<option name="id" value="F01L" />
<option name="manufacturer" value="FUJITSU" />
<option name="name" value="F-01L" />
<option name="screenDensity" value="360" />
<option name="screenX" value="720" />
<option name="screenY" value="1280" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="28" />
<option name="brand" value="DOCOMO" />
<option name="codename" value="SH-01L" />
<option name="id" value="SH-01L" />
<option name="manufacturer" value="SHARP" />
<option name="name" value="AQUOS sense2 SH-01L" />
<option name="screenDensity" value="480" />
<option name="screenX" value="1080" />
<option name="screenY" value="2160" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="Lenovo" />
<option name="codename" value="TB370FU" />
<option name="id" value="TB370FU" />
<option name="manufacturer" value="Lenovo" />
<option name="name" value="Tab P12" />
<option name="screenDensity" value="340" />
<option name="screenX" value="1840" />
<option name="screenY" value="2944" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="31" />
<option name="brand" value="samsung" />
<option name="codename" value="a51" />
<option name="id" value="a51" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy A51" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="akita" />
<option name="id" value="akita" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 8a" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="samsung" />
<option name="codename" value="b0q" />
<option name="id" value="b0q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S22 Ultra" />
<option name="screenDensity" value="600" />
<option name="screenX" value="1440" />
<option name="screenY" value="3088" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="32" />
<option name="brand" value="google" />
<option name="codename" value="bluejay" />
<option name="id" value="bluejay" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 6a" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="caiman" />
<option name="id" value="caiman" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9 Pro" />
<option name="screenDensity" value="360" />
<option name="screenX" value="960" />
<option name="screenY" value="2142" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="comet" />
<option name="id" value="comet" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9 Pro Fold" />
<option name="screenDensity" value="390" />
<option name="screenX" value="2076" />
<option name="screenY" value="2152" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="29" />
<option name="brand" value="samsung" />
<option name="codename" value="crownqlteue" />
<option name="id" value="crownqlteue" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy Note9" />
<option name="screenDensity" value="420" />
<option name="screenX" value="2220" />
<option name="screenY" value="1080" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="dm3q" />
<option name="id" value="dm3q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S23 Ultra" />
<option name="screenDensity" value="600" />
<option name="screenX" value="1440" />
<option name="screenY" value="3088" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="e1q" />
<option name="id" value="e1q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S24" />
<option name="screenDensity" value="480" />
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="felix" />
<option name="id" value="felix" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Fold" />
<option name="screenDensity" value="420" />
<option name="screenX" value="2208" />
<option name="screenY" value="1840" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="felix" />
<option name="id" value="felix" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Fold" />
<option name="screenDensity" value="420" />
<option name="screenX" value="2208" />
<option name="screenY" value="1840" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="felix_camera" />
<option name="id" value="felix_camera" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Fold (Camera-enabled)" />
<option name="screenDensity" value="420" />
<option name="screenX" value="2208" />
<option name="screenY" value="1840" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="samsung" />
<option name="codename" value="gts8uwifi" />
<option name="id" value="gts8uwifi" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy Tab S8 Ultra" />
<option name="screenDensity" value="320" />
<option name="screenX" value="1848" />
<option name="screenY" value="2960" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="husky" />
<option name="id" value="husky" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 8 Pro" />
<option name="screenDensity" value="390" />
<option name="screenX" value="1008" />
<option name="screenY" value="2244" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="30" />
<option name="brand" value="motorola" />
<option name="codename" value="java" />
<option name="id" value="java" />
<option name="manufacturer" value="Motorola" />
<option name="name" value="G20" />
<option name="screenDensity" value="280" />
<option name="screenX" value="720" />
<option name="screenY" value="1600" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="komodo" />
<option name="id" value="komodo" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9 Pro XL" />
<option name="screenDensity" value="360" />
<option name="screenX" value="1008" />
<option name="screenY" value="2244" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="lynx" />
<option name="id" value="lynx" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 7a" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="31" />
<option name="brand" value="google" />
<option name="codename" value="oriole" />
<option name="id" value="oriole" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 6" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="panther" />
<option name="id" value="panther" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 7" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="q5q" />
<option name="id" value="q5q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy Z Fold5" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1812" />
<option name="screenY" value="2176" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="q6q" />
<option name="id" value="q6q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="SM-F956B" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1856" />
<option name="screenY" value="2160" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="30" />
<option name="brand" value="google" />
<option name="codename" value="r11" />
<option name="id" value="r11" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Watch" />
<option name="screenDensity" value="320" />
<option name="screenX" value="384" />
<option name="screenY" value="384" />
<option name="type" value="WEAR_OS" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="30" />
<option name="brand" value="google" />
<option name="codename" value="redfin" />
<option name="id" value="redfin" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 5" />
<option name="screenDensity" value="440" />
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="shiba" />
<option name="id" value="shiba" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 8" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="tangorpro" />
<option name="id" value="tangorpro" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Tablet" />
<option name="screenDensity" value="320" />
<option name="screenX" value="1600" />
<option name="screenY" value="2560" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="tokay" />
<option name="id" value="tokay" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2424" />
</PersistentDeviceSelectionData>
</list>
</option>
</component>
</project>
+3
View File
@@ -16,6 +16,9 @@
<SelectionState runConfigName="DefaultPreview"> <SelectionState runConfigName="DefaultPreview">
<option name="selectionMode" value="DROPDOWN" /> <option name="selectionMode" value="DROPDOWN" />
</SelectionState> </SelectionState>
<SelectionState runConfigName="Preview">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
</selectionStates> </selectionStates>
</component> </component>
</project> </project>
+10
View File
@@ -3,15 +3,19 @@
<option name="myName" value="Project Default" /> <option name="myName" value="Project Default" />
<inspection_tool class="ComposePreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true"> <inspection_tool class="ComposePreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
<option name="composableFile" value="true" /> <option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool> </inspection_tool>
<inspection_tool class="ComposePreviewMustBeTopLevelFunction" enabled="true" level="ERROR" enabled_by_default="true"> <inspection_tool class="ComposePreviewMustBeTopLevelFunction" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" /> <option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool> </inspection_tool>
<inspection_tool class="ComposePreviewNeedsComposableAnnotation" enabled="true" level="ERROR" enabled_by_default="true"> <inspection_tool class="ComposePreviewNeedsComposableAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" /> <option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool> </inspection_tool>
<inspection_tool class="ComposePreviewNotSupportedInUnitTestFiles" enabled="true" level="ERROR" enabled_by_default="true"> <inspection_tool class="ComposePreviewNotSupportedInUnitTestFiles" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" /> <option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool> </inspection_tool>
<inspection_tool class="GlancePreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true"> <inspection_tool class="GlancePreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
<option name="composableFile" value="true" /> <option name="composableFile" value="true" />
@@ -27,21 +31,27 @@
</inspection_tool> </inspection_tool>
<inspection_tool class="PreviewAnnotationInFunctionWithParameters" enabled="true" level="ERROR" enabled_by_default="true"> <inspection_tool class="PreviewAnnotationInFunctionWithParameters" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" /> <option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool> </inspection_tool>
<inspection_tool class="PreviewApiLevelMustBeValid" enabled="true" level="ERROR" enabled_by_default="true"> <inspection_tool class="PreviewApiLevelMustBeValid" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" /> <option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool> </inspection_tool>
<inspection_tool class="PreviewDeviceShouldUseNewSpec" enabled="true" level="WEAK WARNING" enabled_by_default="true"> <inspection_tool class="PreviewDeviceShouldUseNewSpec" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="composableFile" value="true" /> <option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool> </inspection_tool>
<inspection_tool class="PreviewFontScaleMustBeGreaterThanZero" enabled="true" level="ERROR" enabled_by_default="true"> <inspection_tool class="PreviewFontScaleMustBeGreaterThanZero" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" /> <option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool> </inspection_tool>
<inspection_tool class="PreviewMultipleParameterProviders" enabled="true" level="ERROR" enabled_by_default="true"> <inspection_tool class="PreviewMultipleParameterProviders" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" /> <option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool> </inspection_tool>
<inspection_tool class="PreviewPickerAnnotation" enabled="true" level="ERROR" enabled_by_default="true"> <inspection_tool class="PreviewPickerAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" /> <option name="composableFile" value="true" />
<option name="previewFile" value="true" />
</inspection_tool> </inspection_tool>
</profile> </profile>
</component> </component>
+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" /> <mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/help" vcs="Git" />
</component> </component>
</project> </project>
+11 -2
View File
@@ -12,12 +12,21 @@ android {
applicationId = "com.odweta.solon" applicationId = "com.odweta.solon"
minSdk = 28 minSdk = 28
targetSdk = 34 targetSdk = 34
versionCode = 1 versionCode = 202
versionName = "2.0" versionName = "2.0.2"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
} }
applicationVariants.all {
this.outputs
.map { it as com.android.build.gradle.internal.api.ApkVariantOutputImpl }
.forEach { output ->
var apkName = "com.odweta.solon_" + this.versionName + ".apk"
output.outputFileName = apkName
}
}
buildTypes { buildTypes {
release { release {
isMinifyEnabled = false isMinifyEnabled = false
+2 -1
View File
@@ -20,7 +20,8 @@
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true" android:exported="true"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/Theme.Solon"> android:theme="@style/Theme.Solon"
android:windowSoftInputMode="adjustResize">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@@ -1,5 +1,6 @@
package com.odweta.solon package com.odweta.solon
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.Image import androidx.compose.foundation.Image
import androidx.compose.foundation.border import androidx.compose.foundation.border
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
@@ -36,6 +37,11 @@ import java.time.format.TextStyle
@Composable @Composable
fun AboutScreen(modifier: Modifier = Modifier) { fun AboutScreen(modifier: Modifier = Modifier) {
// handle the back gesture (back swipe form side or back button on bottom android navbar)
BackHandler {
isShowing.value = IsShowing.Menu
}
Column( Column(
modifier = Modifier modifier = Modifier
.fillMaxSize(), .fillMaxSize(),
@@ -60,13 +66,13 @@ fun AboutScreen(modifier: Modifier = Modifier) {
shape = RoundedCornerShape(roundedCornerDimen), shape = RoundedCornerShape(roundedCornerDimen),
color = PastelYellow color = PastelYellow
) )
.width(100.dp) .width(70.dp)
.height(100.dp) .height(70.dp)
) { ) {
Icon( Icon(
imageVector = Icons.Default.ArrowBackIosNew, // Replace with your desired icon imageVector = Icons.Default.ArrowBackIosNew,
contentDescription = "Back icon", contentDescription = "Back icon",
modifier = Modifier.size(35.dp) // Adjust size if needed modifier = Modifier.size(40.dp)
) )
} }
} }
@@ -119,6 +119,7 @@ fun launchPhase0(ctx: Context, coscope: CoroutineScope) {
} }
private suspend fun launchPhase1(ctx: Context) { private suspend fun launchPhase1(ctx: Context) {
// TODO: CONVERT TO SNACKBARS
val toast: Toast = Toast.makeText( val toast: Toast = Toast.makeText(
ctx, ctx,
"Nelze načíst data, zkuste se připojit k internetu.", "Nelze načíst data, zkuste se připojit k internetu.",
@@ -15,6 +15,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalContext
import androidx.core.view.WindowCompat
import com.odweta.solon.ui.theme.SolonTheme import com.odweta.solon.ui.theme.SolonTheme
import kotlin.math.sign import kotlin.math.sign
@@ -1,5 +1,6 @@
package com.odweta.solon package com.odweta.solon
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.border import androidx.compose.foundation.border
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
@@ -37,6 +38,8 @@ import androidx.compose.ui.unit.sp
import com.odweta.solon.ui.theme.PastelGreen import com.odweta.solon.ui.theme.PastelGreen
import com.odweta.solon.ui.theme.PastelGreenTransparent import com.odweta.solon.ui.theme.PastelGreenTransparent
import com.odweta.solon.ui.theme.PastelOrange import com.odweta.solon.ui.theme.PastelOrange
import com.odweta.solon.ui.theme.PastelOrangeDark
import com.odweta.solon.ui.theme.PastelOrangeDarkTransparent
import com.odweta.solon.ui.theme.PastelOrangeTransparent import com.odweta.solon.ui.theme.PastelOrangeTransparent
import com.odweta.solon.ui.theme.PastelRed import com.odweta.solon.ui.theme.PastelRed
import com.odweta.solon.ui.theme.PastelRedTransparent import com.odweta.solon.ui.theme.PastelRedTransparent
@@ -63,25 +66,31 @@ fun MarksScreen() {
} }
private fun getAvgColor(avg: String, isBorder: Boolean = false): Color { private fun getAvgColor(avg: String, isBorder: Boolean = false): Color {
val aux = avg.replace(",", ".").toFloat().toInt() val aux = avg.replace(",", ".").toFloat()
return if (aux in 1..<2) { return if (aux in 1f..<1.5f) {
if (isBorder) { if (isBorder) {
PastelGreen PastelGreen
} else { } else {
PastelGreenTransparent PastelGreenTransparent
} }
} else if (aux in 2..<3) { } else if (aux in 1.5f..<2.5f) {
if (isBorder) { if (isBorder) {
PastelYellow PastelYellow
} else { } else {
PastelYellowTransparent PastelYellowTransparent
} }
} else if (aux in 3..<4) { } else if (aux in 2.5f..<3.5f) {
if (isBorder) { if (isBorder) {
PastelOrange PastelOrange
} else { } else {
PastelOrangeTransparent PastelOrangeTransparent
} }
} else if (aux in 3.5f..<4.5f) {
if (isBorder) {
PastelOrangeDark
} else {
PastelOrangeDarkTransparent
}
} else { } else {
if (isBorder) { if (isBorder) {
PastelRed PastelRed
@@ -119,7 +128,7 @@ fun MarksAll() {
Row( Row(
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.height(100.dp) .height(70.dp)
.background( .background(
color = getAvgColor(Util.avg(markList)), // decide on the color (transparent) color = getAvgColor(Util.avg(markList)), // decide on the color (transparent)
shape = RoundedCornerShape(roundedCornerDimen) shape = RoundedCornerShape(roundedCornerDimen)
@@ -131,7 +140,7 @@ fun MarksAll() {
) { ) {
Row( Row(
modifier = Modifier modifier = Modifier
.width(210.dp) .width(150.dp)
.fillMaxHeight() .fillMaxHeight()
.background( .background(
color = getAvgColor(Util.avg(markList)), // decide on the color (not transparent) color = getAvgColor(Util.avg(markList)), // decide on the color (not transparent)
@@ -142,12 +151,12 @@ fun MarksAll() {
) { ) {
Text( Text(
text = subject.uppercase(), text = subject.uppercase(),
fontSize = 35.sp, fontSize = 30.sp,
color = Color.White, color = Color.White,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier modifier = Modifier
.width(100.dp) .width(70.dp)
) )
Box( Box(
@@ -159,18 +168,19 @@ fun MarksAll() {
Text( Text(
text = Util.avg(markList).replace(".", ","), text = Util.avg(markList).replace(".", ","),
fontSize = 30.sp, fontSize = 28.sp,
color = Color.White, color = Color.White,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier modifier = Modifier
.width(100.dp) .width(70.dp)
) )
} }
Box( Box(
modifier = Modifier modifier = Modifier
.weight(1f) .weight(1f)
.fillMaxHeight(), .fillMaxHeight()
.padding(horizontal = 10.dp),
contentAlignment = Alignment.Center contentAlignment = Alignment.Center
) { ) {
Text( Text(
@@ -186,6 +196,11 @@ fun MarksAll() {
@Composable @Composable
fun MarksSubject() { fun MarksSubject() {
// handle the back gesture (back swipe form side or back button on bottom android navbar)
BackHandler {
marksShow.value = MarksShow.All
}
val scrollState = rememberScrollState() val scrollState = rememberScrollState()
Column( Column(
@@ -194,6 +209,9 @@ fun MarksSubject() {
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.padding(horizontal = 5.dp) .padding(horizontal = 5.dp)
) {
Row(
modifier = Modifier.fillMaxWidth()
) { ) {
Button( Button(
onClick = { onClick = {
@@ -209,19 +227,50 @@ fun MarksSubject() {
shape = RoundedCornerShape(roundedCornerDimen), shape = RoundedCornerShape(roundedCornerDimen),
color = PastelYellow color = PastelYellow
) )
.width(100.dp) .width(70.dp)
.height(100.dp) .height(70.dp)
) { ) {
Icon( Icon(
imageVector = Icons.Default.ArrowBackIosNew, // Replace with your desired icon imageVector = Icons.Default.ArrowBackIosNew,
contentDescription = "Back icon", contentDescription = "Back icon",
modifier = Modifier.size(35.dp) // Adjust size if needed modifier = Modifier.size(40.dp)
) )
} }
Box(modifier = Modifier.weight(1f))
Box(
modifier = Modifier
.width(70.dp)
.height(70.dp)
.border(
width = 5.dp,
color = getAvgColor(
Util.avg(marks[subjectToShow]!!),
true
),
shape = RoundedCornerShape(roundedCornerDimen)
)
.background(
getAvgColor(
Util.avg(marks[subjectToShow]!!)
)
)
.padding(vertical = 15.dp),
contentAlignment = Alignment.Center
) {
Text(
text = Util.avg(marks[subjectToShow]!!).replace(".", ","),
color = Color.White,
textAlign = TextAlign.Center,
fontSize = 25.sp
) // average
}
}
Spacer(modifier = Modifier.height(20.dp)) Spacer(modifier = Modifier.height(20.dp))
Box(modifier = Modifier.height(100.dp)) { //Box(modifier = Modifier.height(100.dp)) {
Text( Text(
text = subjectNameMap[subjectToShow]!!, text = subjectNameMap[subjectToShow]!!,
color = Color.White, color = Color.White,
@@ -237,36 +286,7 @@ fun MarksSubject() {
.background(PastelYellowTransparent) .background(PastelYellowTransparent)
.padding(vertical = 20.dp) .padding(vertical = 20.dp)
) // subject ) // subject
} //}
Box(
modifier = Modifier.fillMaxWidth(),
contentAlignment = Alignment.Center
) {
Text(
text = Util.avg(marks[subjectToShow]!!).replace(".", ","),
color = Color.White,
textAlign = TextAlign.Center,
fontSize = 30.sp,
modifier = Modifier
.width(100.dp)
.height(100.dp)
.border(
width = 5.dp,
color = getAvgColor(
Util.avg(marks[subjectToShow]!!),
true
),
shape = RoundedCornerShape(roundedCornerDimen)
)
.background(
getAvgColor(
Util.avg(marks[subjectToShow]!!)
)
)
.padding(vertical = 32.5.dp)
) // average
}
Spacer(modifier = Modifier.height(20.dp)) Spacer(modifier = Modifier.height(20.dp))
@@ -284,7 +304,7 @@ fun MarksSubject() {
color = getAvgColor(mark.grade), color = getAvgColor(mark.grade),
shape = RoundedCornerShape(roundedCornerDimen) shape = RoundedCornerShape(roundedCornerDimen)
) )
.padding(vertical = 20.dp) .padding(vertical = 10.dp)
.clickable { .clickable {
markToShow = mark markToShow = mark
marksShow.value = MarksShow.Detail marksShow.value = MarksShow.Detail
@@ -292,7 +312,7 @@ fun MarksSubject() {
) { ) {
Box( Box(
modifier = Modifier modifier = Modifier
.width(100.dp) .width(70.dp)
.align(Alignment.CenterVertically), .align(Alignment.CenterVertically),
contentAlignment = Alignment.Center contentAlignment = Alignment.Center
) { ) {
@@ -312,7 +332,7 @@ fun MarksSubject() {
Text( Text(
text = mark.theme, text = mark.theme,
color = Color.White, color = Color.White,
fontSize = 23.sp fontSize = 20.sp
) // theme ) // theme
} }
} }
@@ -323,6 +343,11 @@ fun MarksSubject() {
@Composable @Composable
fun MarksDetail() { fun MarksDetail() {
// handle the back gesture (back swipe form side or back button on bottom android navbar)
BackHandler {
marksShow.value = MarksShow.Subject
}
val scrollState = rememberScrollState() val scrollState = rememberScrollState()
Column( Column(
@@ -332,6 +357,9 @@ fun MarksDetail() {
.fillMaxWidth() .fillMaxWidth()
.padding(horizontal = 5.dp) .padding(horizontal = 5.dp)
.verticalScroll(scrollState) .verticalScroll(scrollState)
) {
Row(
modifier = Modifier.fillMaxWidth()
) { ) {
Button( Button(
onClick = { onClick = {
@@ -347,20 +375,51 @@ fun MarksDetail() {
shape = RoundedCornerShape(roundedCornerDimen), shape = RoundedCornerShape(roundedCornerDimen),
color = PastelYellow color = PastelYellow
) )
.width(100.dp) .width(70.dp)
.height(100.dp) .height(70.dp)
) { ) {
Icon( Icon(
imageVector = Icons.Default.ArrowBackIosNew, // Replace with your desired icon imageVector = Icons.Default.ArrowBackIosNew,
contentDescription = "Back icon", contentDescription = "Back icon",
modifier = Modifier.size(35.dp) // Adjust size if needed modifier = Modifier.size(40.dp)
) )
} }
Box(modifier = Modifier.weight(1f))
Box(
modifier = Modifier
.width(70.dp)
.height(70.dp)
.border(
width = 5.dp,
color = getAvgColor(
Util.avg(marks[subjectToShow]!!),
true
),
shape = RoundedCornerShape(roundedCornerDimen)
)
.background(
getAvgColor(
Util.avg(marks[subjectToShow]!!)
)
)
.padding(vertical = 15.dp),
contentAlignment = Alignment.Center
) {
Text(
text = markToShow.grade,
color = Color.White,
textAlign = TextAlign.Center,
fontSize = 25.sp
) // average
}
}
Spacer(modifier = Modifier.height(20.dp)) Spacer(modifier = Modifier.height(20.dp))
Row { Row {
Box(modifier = Modifier.height(100.dp)) { //Box(modifier = Modifier.height(70.dp)) {
Text( Text(
text = markToShow.theme, text = markToShow.theme,
color = Color.White, color = Color.White,
@@ -376,40 +435,9 @@ fun MarksDetail() {
.background(PastelYellowTransparent) .background(PastelYellowTransparent)
.padding(vertical = 20.dp) .padding(vertical = 20.dp)
) // description ) // description
} //}
} // description } // description
Row {
Box(
modifier = Modifier.fillMaxWidth(),
contentAlignment = Alignment.Center
) {
Text(
text = markToShow.grade,
color = Color.White,
textAlign = TextAlign.Center,
fontSize = 35.sp,
modifier = Modifier
.width(100.dp)
.height(100.dp)
.border(
width = 5.dp,
color = getAvgColor(
Util.avg(mutableListOf(markToShow)),
true
),
shape = RoundedCornerShape(roundedCornerDimen)
)
.background(
getAvgColor(
Util.avg(mutableListOf(markToShow))
)
)
.padding(vertical = 32.5.dp)
) // average
}
} // grade
Spacer(modifier = Modifier.height(20.dp)) Spacer(modifier = Modifier.height(20.dp))
Row( Row(
@@ -431,7 +459,7 @@ fun MarksDetail() {
Text( Text(
text = "Váha:", text = "Váha:",
color = Color.White, color = Color.White,
fontSize = 30.sp fontSize = 20.sp
) )
} }
@@ -444,7 +472,7 @@ fun MarksDetail() {
Text( Text(
text = markToShow.weight.replace(".", ","), text = markToShow.weight.replace(".", ","),
color = Color.White, color = Color.White,
fontSize = 23.sp fontSize = 20.sp
) )
} }
} // weight } // weight
@@ -470,7 +498,7 @@ fun MarksDetail() {
Text( Text(
text = "Datum:", text = "Datum:",
color = Color.White, color = Color.White,
fontSize = 30.sp fontSize = 20.sp
) )
} }
@@ -489,7 +517,7 @@ fun MarksDetail() {
Text( Text(
text = date, text = date,
color = Color.White, color = Color.White,
fontSize = 23.sp fontSize = 20.sp
) )
} }
} // date } // date
@@ -112,7 +112,7 @@ fun MenuScreen(modifier: Modifier = Modifier) {
Text("Ne") Text("Ne")
} }
} }
) // TODO: THEME DIALOG )
} }
Button(onClick = { Button(onClick = {
@@ -2,20 +2,18 @@ package com.odweta.solon
import android.content.Context import android.content.Context
import android.widget.Toast import android.widget.Toast
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.Image import androidx.compose.foundation.Image
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.border import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.width
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Visibility import androidx.compose.material.icons.filled.Visibility
import androidx.compose.material.icons.filled.VisibilityOff import androidx.compose.material.icons.filled.VisibilityOff
@@ -27,8 +25,6 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.Alignment
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.painterResource
@@ -40,6 +36,15 @@ import com.odweta.solon.ui.theme.PastelYellow
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.delay import kotlinx.coroutines.delay
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import androidx.compose.foundation.layout.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.animation.core.animateDpAsState
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.ime
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.tooling.preview.Preview
private var buttonText: MutableState<String> = mutableStateOf("Přihlásit se") private var buttonText: MutableState<String> = mutableStateOf("Přihlásit se")
@@ -106,41 +111,48 @@ fun signInButtonCallback(ctx: Context, coscope: CoroutineScope, buttonText: Stri
} }
} }
@OptIn(ExperimentalMaterial3Api::class)
@Composable @Composable
fun SignInScreen() { fun SignInScreen() {
// handle the back gesture (back swipe form side or back button on bottom android navbar)
BackHandler {
screenToShow.value = Screen.Main
}
var usernameText by remember { mutableStateOf("") } var usernameText by remember { mutableStateOf("") }
var passwordText by remember { mutableStateOf("") } var passwordText by remember { mutableStateOf("") }
val ctx = LocalContext.current val ctx = LocalContext.current
val coscope = rememberCoroutineScope() val coscope = rememberCoroutineScope()
var isPasswordVisible by remember { mutableStateOf(false) } // State for visibility toggle var isPasswordVisible by remember { mutableStateOf(false) } // State for visibility toggle
val visualTransformation = if (isPasswordVisible) VisualTransformation.None else PasswordVisualTransformation() val visualTransformation = if (isPasswordVisible) VisualTransformation.None else PasswordVisualTransformation()
val scrollState = rememberScrollState()
Box(
modifier = Modifier.fillMaxSize(),
contentAlignment = Alignment.Center
) {
Column( Column(
modifier = Modifier modifier = Modifier
.fillMaxSize() .fillMaxSize()
.background(Color.Black) .background(Color.Black)
.verticalScroll(scrollState), .imePadding(),
horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center,
verticalArrangement = Arrangement.Center horizontalAlignment = Alignment.CenterHorizontally
) {
Column(
modifier = Modifier
.wrapContentSize(),
horizontalAlignment = Alignment.CenterHorizontally
) { ) {
Image( Image(
painter = painterResource(R.drawable.solon_just_yellow), painter = painterResource(R.drawable.solon_just_yellow),
contentDescription = "Solon logo", contentDescription = "Solon logo",
modifier = Modifier.size(230.dp) modifier = Modifier.size(200.dp)
) )
TextField( TextField(
value = usernameText, value = usernameText,
onValueChange = { input -> usernameText = input }, onValueChange = { input -> usernameText = input },
modifier = Modifier modifier = Modifier
.border(width = 5.dp, color = PastelYellow, shape = RoundedCornerShape( .border(
roundedCornerDimen)) width = 5.dp, color = PastelYellow, shape = RoundedCornerShape(
roundedCornerDimen
)
)
.width(230.dp), .width(230.dp),
colors = TextFieldDefaults.colors( colors = TextFieldDefaults.colors(
focusedTextColor = Color.White, // White text focusedTextColor = Color.White, // White text
@@ -29,6 +29,7 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.font.FontStyle import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import com.odweta.solon.ui.theme.PastelGreen import com.odweta.solon.ui.theme.PastelGreen
@@ -85,9 +86,19 @@ fun isTimeBetween(givenTime: LocalTime, startTime: LocalTime, endTime: LocalTime
@SuppressLint("ModifierFactoryExtensionFunction") @SuppressLint("ModifierFactoryExtensionFunction")
@Composable @Composable
fun subjectModifier(d: Day, s: Subject, lectureNumber: Int): Modifier { fun subjectModifier(d: Day, s: Subject, lectureNumber: Int): Modifier {
var day = d.date.split(".")[0].replace(" ", "")
var month = d.date.split(".")[1].replace(" ", "")
if (day.length < 2) {
day = "0$day"
}
if (month.length < 2) {
month = "0$month"
}
val dayFormatter = DateTimeFormatter.ofPattern("dd. MM. yyyy") val dayFormatter = DateTimeFormatter.ofPattern("dd. MM. yyyy")
val hourFormatter = DateTimeFormatter.ofPattern("HH:mm:ss") val hourFormatter = DateTimeFormatter.ofPattern("HH:mm:ss")
val dateParsed = LocalDate.parse(d.date + " " + LocalDate.now().year, dayFormatter) val dateParsed = LocalDate.parse("$day. $month." + " " + LocalDate.now().year, dayFormatter)
val startTimeParsed = LocalTime.parse(s.start + ":00", hourFormatter) val startTimeParsed = LocalTime.parse(s.start + ":00", hourFormatter)
val endTimeParsed = LocalTime.parse(s.end + ":00", hourFormatter) val endTimeParsed = LocalTime.parse(s.end + ":00", hourFormatter)
@@ -98,27 +109,22 @@ fun subjectModifier(d: Day, s: Subject, lectureNumber: Int): Modifier {
currentLectureNumber = lectureNumber currentLectureNumber = lectureNumber
} }
return if (lectureNumber == currentLectureNumber && dateParsed == todayDate) { val m = Modifier
Modifier
.fillMaxWidth() .fillMaxWidth()
.height(100.dp) .height(70.dp)
.background( .background(
color = getSubjectColor(s, true), // decide on the color (transparent) color = getSubjectColor(s, true), // decide on the color (transparent)
shape = RoundedCornerShape(roundedCornerDimen) shape = RoundedCornerShape(roundedCornerDimen)
) )
.border(
return if (lectureNumber == currentLectureNumber && dateParsed == todayDate) {
m.border(
width = 5.dp, width = 5.dp,
color = getSubjectColor(s, false), color = getSubjectColor(s, false),
shape = RoundedCornerShape(roundedCornerDimen) shape = RoundedCornerShape(roundedCornerDimen)
) )
} else { } else {
Modifier m
.fillMaxWidth()
.height(100.dp)
.background(
color = getSubjectColor(s, true), // decide on the color (transparent)
shape = RoundedCornerShape(roundedCornerDimen)
)
} }
} }
@@ -138,7 +144,7 @@ private fun DayScreen(day: Day) {
Text( Text(
text = "${day.name} ${day.date}", text = "${day.name} ${day.date}",
color = Color.White, color = Color.White,
fontSize = 30.sp, fontSize = 26.sp,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
fontStyle = FontStyle.Italic fontStyle = FontStyle.Italic
) )
@@ -237,7 +243,8 @@ private fun DayScreen(day: Day) {
.padding(vertical = 5.dp), .padding(vertical = 5.dp),
contentAlignment = Alignment.Center contentAlignment = Alignment.Center
) { ) {
if (!Parsing.userIsParent()) { // add this to the 'Svoboda' mode maybe later; for now, it is left out
/*if (!Parsing.userIsParent()) {
if ( if (
subject.teacher == "Jindřich Svoboda" && subject.teacher == "Jindřich Svoboda" &&
studentClass == "5. G" studentClass == "5. G"
@@ -248,7 +255,7 @@ private fun DayScreen(day: Day) {
modifier = Modifier.fillMaxSize() modifier = Modifier.fillMaxSize()
) )
} }
} }*/
} }
if (subject.substitute != "2") { if (subject.substitute != "2") {
@@ -266,6 +273,9 @@ private fun DayScreen(day: Day) {
) )
if (!subject.free) { if (!subject.free) {
Box (
contentAlignment = Alignment.BottomEnd
) {
Text( Text(
text = subject.teacher, text = subject.teacher,
color = Color.White, color = Color.White,
@@ -278,4 +288,5 @@ private fun DayScreen(day: Day) {
} }
} }
} }
}
} }
@@ -1,15 +1,44 @@
package com.odweta.solon package com.odweta.solon
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.setValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
@Composable @Composable
fun ToolbarScreen() { fun ToolbarScreen() {
// make the font size adaptive relative to the length of the user's name
var toolbarTextSizeAdaptive by remember { mutableStateOf(25.sp) }
if (toolbarText.value.length > 28) {
toolbarTextSizeAdaptive = 20.sp
}
if (toolbarText.value.length > 32) {
toolbarTextSizeAdaptive = 16.sp
}
if (toolbarText.value.length > 40) {
toolbarTextSizeAdaptive = 12.sp
}
if (toolbarText.value.length > 45) {
toolbarTextSizeAdaptive = 10.sp
}
Box(modifier = Modifier.padding(10.dp)) {
Text( Text(
text = toolbarText.value, text = toolbarText.value,
fontSize = 25.sp, fontSize = toolbarTextSizeAdaptive,
color = Color.White color = Color.White
) )
}
} }
@@ -19,11 +19,13 @@ val White = Color(0xFFFFFFFF)
val Transparent = Color(0x00000000) val Transparent = Color(0x00000000)
val PastelRed = Color(0xFFFF6666) val PastelRed = Color(0xFFFF6666)
val PastelOrangeDark = Color(0xFFDC6421)
val PastelGreen = Color(0xFF00CC99) val PastelGreen = Color(0xFF00CC99)
val PastelOrange = Color(0xFFFF9933) val PastelOrange = Color(0xFFFF9933)
val PastelYellow = Color(0xFFFFCC33) val PastelYellow = Color(0xFFFFCC33)
val PastelRedTransparent = Color(0x50FF6666) val PastelRedTransparent = Color(0x50FF6666)
val PastelOrangeDarkTransparent = Color(0x50DC6421)
val PastelGreenTransparent = Color(0x5000CC99) val PastelGreenTransparent = Color(0x5000CC99)
val PastelOrangeTransparent = Color(0x50FF9933) val PastelOrangeTransparent = Color(0x50FF9933)
val PastelYellowTransparent = Color(0x50FFCC33) val PastelYellowTransparent = Color(0x50FFCC33)
@@ -5,7 +5,7 @@
--> -->
<data-extraction-rules> <data-extraction-rules>
<cloud-backup> <cloud-backup>
<!-- TODO: Use <include> and <exclude> to control what is backed up. <!-- xTODO: Use <include> and <exclude> to control what is backed up.
<include .../> <include .../>
<exclude .../> <exclude .../>
--> -->
+1 -1
View File
@@ -1,6 +1,6 @@
[versions] [versions]
accompanistCoil = "0.30.1" accompanistCoil = "0.30.1"
agp = "8.7.1" agp = "8.7.2"
coilCompose = "2.4.0" coilCompose = "2.4.0"
glide = "4.16.0" glide = "4.16.0"
kotlin = "2.0.0" kotlin = "2.0.0"
BIN
View File
Binary file not shown.