Show the progress on library grid cards

This commit is contained in:
Jackson Harper 2023-08-01 20:39:49 +08:00
parent 3d6d421e84
commit ef840bd2a7
10 changed files with 50 additions and 37 deletions

View file

@ -58,8 +58,8 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility kotlin_version
targetCompatibility kotlin_version
}
kotlinOptions {
jvmTarget = '1.8'
@ -76,39 +76,40 @@ android {
}
}
namespace 'app.omnivore.omnivore'
kapt {
generateStubs = true
}
}
dependencies {
def nav_version = "2.5.3"
def nav_version = '2.6.0'
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.core:core-ktx:1.10.1'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation "androidx.compose.material:material-icons-extended:$compose_version"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
implementation 'androidx.activity:activity-compose:1.6.1'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.gms:play-services-base:18.1.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
implementation 'androidx.activity:activity-compose:1.7.2'
// implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.gms:play-services-base:18.2.0'
implementation "androidx.navigation:navigation-compose:$nav_version"
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version"
// Jetpack Lifecycle deps
// ViewModel
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version")
// ViewModel utilities for Compose
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle_version")
// LiveData
implementation("androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version")
implementation("androidx.compose.runtime:runtime-livedata:1.3.2")
implementation('androidx.compose.runtime:runtime-livedata:1.4.3')
// Saved state module for ViewModel
implementation("androidx.lifecycle:lifecycle-viewmodel-savedstate:$lifecycle_version")
@ -120,8 +121,8 @@ dependencies {
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
// coroutines
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3'
implementation "androidx.security:security-crypto:1.0.0"
implementation "androidx.datastore:datastore-preferences:1.0.0"
@ -132,20 +133,20 @@ dependencies {
implementation 'com.apollographql.apollo3:apollo-runtime:3.7.2'
implementation 'androidx.compose.material3:material3:1.1.0-alpha03'
implementation 'androidx.compose.material3:material3-window-size-class:1.1.0-alpha03'
implementation 'androidx.compose.material3:material3:1.2.0-alpha04'
implementation 'androidx.compose.material3:material3-window-size-class:1.2.0-alpha04'
implementation 'com.google.android.gms:play-services-auth:20.4.0'
implementation 'com.google.android.gms:play-services-auth:20.6.0'
implementation "com.google.accompanist:accompanist-systemuicontroller:0.25.1"
implementation "com.google.accompanist:accompanist-flowlayout:0.25.1"
implementation 'io.coil-kt:coil-compose:2.2.0'
implementation 'io.coil-kt:coil-compose:2.4.0'
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'com.pspdfkit:pspdfkit:8.4.1'
implementation 'com.segment.analytics.kotlin:android:1.10.0'
implementation 'io.intercom.android:intercom-sdk:15.1.0'
implementation 'com.segment.analytics.kotlin:android:1.13.0'
implementation 'io.intercom.android:intercom-sdk:15.1.4'
// Room Deps
implementation "androidx.room:room-runtime:$room_version"
@ -154,7 +155,7 @@ dependencies {
kapt "androidx.room:room-compiler:$room_version"
implementation 'com.github.jeziellago:compose-markdown:0.3.3'
implementation "io.github.dokar3:chiptextfield:0.4.7"
implementation 'io.github.dokar3:chiptextfield:0.4.8'
}
apollo {

View file

@ -178,7 +178,7 @@ interface SavedItemDao {
"GROUP BY SavedItem.savedItemId "
)
suspend fun getById(savedItemId: String): SavedItemWithLabelsAndHighlights?
fun getById(savedItemId: String): SavedItemWithLabelsAndHighlights?
@Transaction
@Query(

View file

@ -1,11 +1,14 @@
buildscript {
ext {
compose_version = '1.3.1'
lifecycle_version = '2.5.1'
hilt_version = '2.44.2'
gradle_plugin_version = '7.4.2'
room_version = '2.4.3'
compose_version = '1.5.1'
lifecycle_version = '2.6.1'
hilt_version = '2.47'
gradle_plugin_version = '8.0.2'
room_version = '2.5.2'
kotlin_version = '1.9.0'
compileSdkVersion = 32
targetSdkVersion = 32
}
dependencies {

View file

@ -21,3 +21,5 @@ kotlin.code.style=official
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.defaults.buildfeatures.buildconfig=true
android.nonFinalResIds=false

View file

@ -1,6 +1,6 @@
#Wed Aug 10 17:39:47 PDT 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

View file

@ -1400,7 +1400,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 1.28.0;
MARKETING_VERSION = 1.29.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = app.omnivore.app;
@ -1435,7 +1435,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 1.28.0;
MARKETING_VERSION = 1.29.0;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = app.omnivore.app;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -1490,7 +1490,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.28.0;
MARKETING_VERSION = 1.29.0;
PRODUCT_BUNDLE_IDENTIFIER = app.omnivore.app;
PRODUCT_NAME = Omnivore;
PROVISIONING_PROFILE_SPECIFIER = "";
@ -1831,7 +1831,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.28.0;
MARKETING_VERSION = 1.29.0;
PRODUCT_BUNDLE_IDENTIFIER = app.omnivore.app;
PRODUCT_NAME = Omnivore;
PROVISIONING_PROFILE_SPECIFIER = "";

View file

@ -275,6 +275,14 @@ struct WebReaderContainerView: View {
Spacer()
#endif
Button(
action: { showLabelsModal = true },
label: {
Image.label
}
)
.padding(.trailing, 4)
Button(
action: { showNotebookView = true },
label: {

View file

@ -101,7 +101,7 @@ public extension Color {
static var isDarkMode: Bool {
#if os(iOS)
UITraitCollection.current.userInterfaceStyle == .dark
ThemeManager.currentTheme.isDark || UITraitCollection.current.userInterfaceStyle == .dark
#else
NSApp.effectiveAppearance.name == NSAppearance.Name.darkAqua
#endif

View file

@ -7,7 +7,6 @@
import Foundation
import SwiftUI
import Utils
public enum Theme: String, CaseIterable {
case system = "System"

View file

@ -268,7 +268,7 @@ const LibraryGridCardContent = (props: LinkedItemCardProps): JSX.Element => {
}}
distribution="start"
>
<LibraryItemMetadata item={props.item} />
<LibraryItemMetadata item={props.item} showProgress={true} />
</HStack>
<VStack