Add haptic feedback, rich task completion, and Google Sign-In preparation

- Add platform haptic feedback abstraction (HapticFeedback.kt) with
  implementations for Android, iOS, JVM, JS, and WASM
- Enhance CompleteTaskDialog with interactive 5-star rating, image
  thumbnails, and haptic feedback
- Add ImageBitmap platform abstraction for displaying selected images
- Localize TaskTemplatesBrowserSheet with string resources
- Add Android widgets infrastructure (small, medium, large sizes)
- Add Google Sign-In button components and auth flow preparation
- Update strings.xml with new localization keys for completions,
  templates, and document features
- Integrate haptic feedback into ThemePickerDialog

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-12-13 00:51:17 -06:00
parent a3e1c338d2
commit 311a30ed2d
61 changed files with 3200 additions and 290 deletions

View File

@@ -0,0 +1,18 @@
package com.example.casera.platform
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
/**
* JVM/Desktop implementation - no-op since desktop doesn't have haptic feedback.
*/
class JvmHapticFeedbackPerformer : HapticFeedbackPerformer {
override fun perform(type: HapticFeedbackType) {
// Desktop doesn't support haptic feedback
}
}
@Composable
actual fun rememberHapticFeedback(): HapticFeedbackPerformer {
return remember { JvmHapticFeedbackPerformer() }
}

View File

@@ -0,0 +1,19 @@
package com.example.casera.platform
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.graphics.ImageBitmap
import androidx.compose.ui.graphics.toComposeImageBitmap
import org.jetbrains.skia.Image
@Composable
actual fun rememberImageBitmap(imageData: ImageData): ImageBitmap? {
return remember(imageData) {
try {
val skiaImage = Image.makeFromEncoded(imageData.bytes)
skiaImage.toComposeImageBitmap()
} catch (e: Exception) {
null
}
}
}

View File

@@ -0,0 +1,16 @@
package com.example.casera.ui.components.auth
import androidx.compose.runtime.Composable
/**
* JVM/Desktop stub - Google Sign In not implemented for desktop
*/
@Composable
actual fun GoogleSignInButton(
onSignInStarted: () -> Unit,
onSignInSuccess: (idToken: String) -> Unit,
onSignInError: (message: String) -> Unit,
enabled: Boolean
) {
// No-op on JVM/Desktop
}