Rebrand from MyCrib to Casera
- Rename Kotlin package from com.example.mycrib to com.example.casera - Update Android app name, namespace, and application ID - Update iOS bundle identifiers and project settings - Rename iOS directories (MyCribTests -> CaseraTests, etc.) - Update deep link schemes from mycrib:// to casera:// - Update app group identifiers - Update subscription product IDs - Update all UI strings and branding 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
package com.example.casera
|
||||
|
||||
class WasmPlatform: Platform {
|
||||
override val name: String = "Web with Kotlin/Wasm"
|
||||
}
|
||||
|
||||
actual fun getPlatform(): Platform = WasmPlatform()
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.casera.shared.network
|
||||
|
||||
import io.ktor.client.*
|
||||
import io.ktor.client.engine.js.*
|
||||
import io.ktor.client.plugins.contentnegotiation.*
|
||||
import io.ktor.client.plugins.logging.*
|
||||
import io.ktor.serialization.kotlinx.json.*
|
||||
import kotlinx.serialization.json.Json
|
||||
|
||||
actual fun getLocalhostAddress(): String = "127.0.0.1"
|
||||
|
||||
actual fun createHttpClient(): HttpClient {
|
||||
return HttpClient(Js) {
|
||||
install(ContentNegotiation) {
|
||||
json(Json {
|
||||
ignoreUnknownKeys = true
|
||||
isLenient = true
|
||||
prettyPrint = true
|
||||
})
|
||||
}
|
||||
|
||||
install(Logging) {
|
||||
logger = Logger.DEFAULT
|
||||
level = LogLevel.ALL
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.casera.platform
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
|
||||
@Composable
|
||||
actual fun rememberImagePicker(
|
||||
onImagesPicked: (List<ImageData>) -> Unit
|
||||
): () -> Unit {
|
||||
// WASM image picker would require HTML5 file input
|
||||
// This is a placeholder implementation
|
||||
return {
|
||||
// TODO: Implement WASM file input
|
||||
println("Image picker not yet implemented for WASM")
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
actual fun rememberCameraPicker(
|
||||
onImageCaptured: (ImageData) -> Unit
|
||||
): () -> Unit {
|
||||
// WASM camera picker would require HTML5 media capture
|
||||
// This is a placeholder implementation
|
||||
return {
|
||||
// TODO: Implement WASM camera capture
|
||||
println("Camera picker not yet implemented for WASM")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.casera.storage
|
||||
|
||||
import kotlinx.browser.localStorage
|
||||
|
||||
/**
|
||||
* WASM implementation of TaskCacheManager using browser's localStorage.
|
||||
*/
|
||||
actual class TaskCacheManager {
|
||||
actual fun saveTasks(tasksJson: String) {
|
||||
localStorage.setItem(KEY_TASKS, tasksJson)
|
||||
}
|
||||
|
||||
actual fun getTasks(): String? {
|
||||
return localStorage.getItem(KEY_TASKS)
|
||||
}
|
||||
|
||||
actual fun clearTasks() {
|
||||
localStorage.removeItem(KEY_TASKS)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val KEY_TASKS = "cached_tasks"
|
||||
|
||||
private var instance: TaskCacheManager? = null
|
||||
|
||||
fun getInstance(): TaskCacheManager {
|
||||
if (instance == null) {
|
||||
instance = TaskCacheManager()
|
||||
}
|
||||
return instance!!
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.casera.storage
|
||||
|
||||
internal actual fun getPlatformTaskCacheManager(): TaskCacheManager? {
|
||||
return TaskCacheManager.getInstance()
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.casera.storage
|
||||
|
||||
import kotlinx.browser.localStorage
|
||||
|
||||
/**
|
||||
* WASM implementation of TokenManager using browser's localStorage.
|
||||
*/
|
||||
actual class TokenManager {
|
||||
actual fun saveToken(token: String) {
|
||||
localStorage.setItem(KEY_TOKEN, token)
|
||||
}
|
||||
|
||||
actual fun getToken(): String? {
|
||||
return localStorage.getItem(KEY_TOKEN)
|
||||
}
|
||||
|
||||
actual fun clearToken() {
|
||||
localStorage.removeItem(KEY_TOKEN)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val KEY_TOKEN = "auth_token"
|
||||
|
||||
private var instance: TokenManager? = null
|
||||
|
||||
fun getInstance(): TokenManager {
|
||||
if (instance == null) {
|
||||
instance = TokenManager()
|
||||
}
|
||||
return instance!!
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.casera.storage
|
||||
|
||||
internal actual fun getPlatformTokenManager(): TokenManager? {
|
||||
return TokenManager.getInstance()
|
||||
}
|
||||
Reference in New Issue
Block a user