@@ -60,6 +60,29 @@ import me.knighthat.component.import.ImportMigration
6060import me.knighthat.component.import.ImportSettings
6161import me.knighthat.utils.Toaster
6262import me.knighthat.coil.ImageCacheFactory
63+ // First, make sure you have these imports at the top of your DataSettings.kt file:
64+ import androidx.compose.ui.graphics.Color
65+ import androidx.compose.runtime.*
66+ import androidx.compose.ui.unit.dp
67+ import androidx.compose.foundation.shape.RoundedCornerShape
68+ import androidx.compose.material3.CardDefaults
69+ import androidx.compose.material3.Card
70+ import androidx.compose.foundation.clickable
71+ import androidx.compose.foundation.layout.*
72+ import androidx.compose.ui.Alignment
73+ import it.fast4x.rimusic.typography
74+
75+ import androidx.compose.foundation.rememberScrollState
76+ import androidx.compose.foundation.verticalScroll
77+ import androidx.compose.material3.Icon
78+ import androidx.compose.ui.res.painterResource
79+ import androidx.compose.foundation.text.BasicText
80+ import androidx.compose.ui.text.style.TextOverflow
81+ import androidx.compose.animation.*
82+ import androidx.compose.animation.core.tween
83+ import androidx.compose.ui.window.Dialog
84+
85+
6386
6487@SuppressLint(" SuspiciousIndentation" )
6588@OptIn(ExperimentalCoilApi ::class )
@@ -97,7 +120,7 @@ fun DataSettings() {
97120 var coilCustomDiskCache by rememberPreference(
98121 coilCustomDiskCacheKey,32
99122 )
100-
123+ var showKreateDisclaimer by remember { mutableStateOf( false ) }
101124 var pauseSearchHistory by rememberPreference(pauseSearchHistoryKey, false )
102125 var pauseListenHistory by rememberPreference(pauseListenHistoryKey, false )
103126
@@ -421,6 +444,280 @@ fun DataSettings() {
421444 }
422445
423446 Spacer (modifier = Modifier .height(16 .dp))
447+ // Kreate Backup Warning - Simple & Clear Version
448+ AnimatedVisibility (
449+ visible = true ,
450+ enter = fadeIn(animationSpec = tween(750 )) + scaleIn(
451+ animationSpec = tween(750 ),
452+ initialScale = 0.9f
453+ )
454+ ) {
455+ Card (
456+ modifier = Modifier
457+ .fillMaxWidth()
458+ .padding(horizontal = 4 .dp)
459+ .clickable { showKreateDisclaimer = true },
460+ colors = CardDefaults .cardColors(
461+ containerColor = Color (0xFFFF9800 )
462+ ),
463+ shape = RoundedCornerShape (12 .dp),
464+ elevation = CardDefaults .cardElevation(defaultElevation = 4 .dp)
465+ ) {
466+ Column (
467+ modifier = Modifier
468+ .fillMaxWidth()
469+ .padding(vertical = 16 .dp, horizontal = 20 .dp)
470+ ) {
471+ // Header row
472+ Row (
473+ verticalAlignment = Alignment .CenterVertically ,
474+ modifier = Modifier .fillMaxWidth()
475+ ) {
476+ Icon (
477+ painter = painterResource(R .drawable.alert),
478+ contentDescription = null ,
479+ tint = Color .White ,
480+ modifier = Modifier .size(28 .dp)
481+ )
482+
483+ Spacer (modifier = Modifier .width(12 .dp))
484+
485+ BasicText (
486+ text = " ⚠️ IMPORTANT NOTICE" ,
487+ style = typography().m.copy(color = Color .White )
488+ )
489+
490+ Spacer (modifier = Modifier .weight(1f ))
491+
492+ // Click indicator
493+ Row (
494+ verticalAlignment = Alignment .CenterVertically
495+ ) {
496+ BasicText (
497+ text = " Tap" ,
498+ style = typography().xs.copy(color = Color .White .copy(alpha = 0.8f ))
499+ )
500+ Spacer (modifier = Modifier .width(4 .dp))
501+ Icon (
502+ painter = painterResource(R .drawable.information),
503+ contentDescription = " Show details" ,
504+ tint = Color .White ,
505+ modifier = Modifier .size(16 .dp)
506+ )
507+ }
508+ }
509+
510+ Spacer (modifier = Modifier .height(12 .dp))
511+
512+ // Warning message
513+ BasicText (
514+ text = " 🚨Attention Kreate Users Experiencing Import Issues" ,
515+ style = typography().s.copy(color = Color .White ),
516+ modifier = Modifier .fillMaxWidth()
517+ )
518+
519+ Spacer (modifier = Modifier .height(8 .dp))
520+
521+ // Click instruction
522+ Row (
523+ verticalAlignment = Alignment .CenterVertically ,
524+ modifier = Modifier .fillMaxWidth()
525+ ) {
526+ Icon (
527+ painter = painterResource(R .drawable.moon),
528+ contentDescription = null ,
529+ tint = Color .White .copy(alpha = 0.8f ),
530+ modifier = Modifier .size(14 .dp)
531+ )
532+
533+ Spacer (modifier = Modifier .width(6 .dp))
534+
535+ BasicText (
536+ text = " Tap this card for detailed information and workarounds" ,
537+ style = typography().xs.copy(color = Color .White .copy(alpha = 0.9f ))
538+ )
539+ }
540+ }
541+ }
542+ }
543+
544+ // Kreate Disclaimer Dialog (Popup)
545+ if (showKreateDisclaimer) {
546+ Dialog (
547+ onDismissRequest = { showKreateDisclaimer = false }
548+ ) {
549+ Card (
550+ modifier = Modifier .fillMaxWidth(),
551+ colors = CardDefaults .cardColors(
552+ containerColor = colorPalette().background1
553+ ),
554+ shape = RoundedCornerShape (16 .dp),
555+ elevation = CardDefaults .cardElevation(defaultElevation = 8 .dp)
556+ ) {
557+ Column (
558+ modifier = Modifier
559+ .fillMaxWidth()
560+ .verticalScroll(rememberScrollState())
561+ .padding(24 .dp)
562+ ) {
563+ // Header
564+ Row (
565+ verticalAlignment = Alignment .CenterVertically ,
566+ modifier = Modifier .fillMaxWidth()
567+ ) {
568+ Icon (
569+ painter = painterResource(R .drawable.alert),
570+ contentDescription = null ,
571+ tint = colorPalette().accent,
572+ modifier = Modifier .size(28 .dp)
573+ )
574+
575+ Spacer (modifier = Modifier .width(12 .dp))
576+
577+ BasicText (
578+ text = " 🚨 Kreate Backup Import Issue" ,
579+ style = typography().m.copy(color = colorPalette().accent)
580+ )
581+ }
582+
583+ Spacer (modifier = Modifier .height(20 .dp))
584+
585+ // Important Notice
586+ Card (
587+ modifier = Modifier .fillMaxWidth(),
588+ colors = CardDefaults .cardColors(
589+ containerColor = Color (0x1AFF9800 ) // 10% opacity orange
590+ ),
591+ shape = RoundedCornerShape (8 .dp)
592+ ) {
593+ Box (
594+ modifier = Modifier
595+ .fillMaxWidth()
596+ .padding(12 .dp),
597+ contentAlignment = Alignment .Center
598+ ) {
599+ BasicText (
600+ text = " ⚠️ DISCLAIMER: This is a Kreate app issue (fix not soon)" ,
601+ style = typography().s.copy(color = colorPalette().text)
602+ )
603+ }
604+ }
605+
606+ Spacer (modifier = Modifier .height(16 .dp))
607+
608+ // Content
609+ Column (
610+ modifier = Modifier .fillMaxWidth()
611+ ) {
612+ BasicText (
613+ text = " The inability to import Kreate backups is NOT exclusive to Cubic Music. Even RiPlay & RiMusic (the app Kreate was forked from) cannot import Kreate's database format successfully." ,
614+ style = typography().xs.copy(color = colorPalette().text)
615+ )
616+
617+ Spacer (modifier = Modifier .height(10 .dp))
618+
619+ BasicText (
620+ text = " Why This Happens:" ,
621+ style = typography().xs.copy(color = colorPalette().accent)
622+ )
623+
624+ Spacer (modifier = Modifier .height(4 .dp))
625+
626+ BasicText (
627+ text = " 🔴 Kreate's export system has inherent bugs in its CSV generation\n " +
628+ " 🔴 The backup files contain malformed data that breaks standard CSV parsing\n " +
629+ " 🔴 Even the original app (RiPlay) fails when trying to read Kreate exports" ,
630+ style = typography().xxs.copy(color = colorPalette().text)
631+ )
632+
633+ Spacer (modifier = Modifier .height(10 .dp))
634+
635+ BasicText (
636+ text = " What This Means:" ,
637+ style = typography().xs.copy(color = colorPalette().accent)
638+ )
639+
640+ Spacer (modifier = Modifier .height(4 .dp))
641+
642+ BasicText (
643+ text = " ✅ Cubic Music is working correctly with standard CSV imports\n " +
644+ " ✅ The problem originates in Kreate's export logic\n " +
645+ " ✅ No music app can reliably import Kreate backups until Kreate fixes its export system" ,
646+ style = typography().xxs.copy(color = colorPalette().text)
647+ )
648+
649+ Spacer (modifier = Modifier .height(10 .dp))
650+
651+ BasicText (
652+ text = " Current Status: Work in Progress 🔧" ,
653+ style = typography().xs.copy(color = colorPalette().accent)
654+ )
655+
656+ Spacer (modifier = Modifier .height(4 .dp))
657+
658+ BasicText (
659+ text = " We're investigating Kreate's export format and building a compatibility layer that will:\n\n " +
660+ " 🧹 Detect and fix Kreate's malformed CSV entries\n " +
661+ " 🛠️ Clean corrupted data before import\n " +
662+ " 📊 Provide error reports showing what couldn't be imported" ,
663+ style = typography().xxs.copy(color = colorPalette().text)
664+ )
665+
666+ Spacer (modifier = Modifier .height(8 .dp))
667+
668+ // Bottom line in emphasized card
669+ Card (
670+ modifier = Modifier .fillMaxWidth(),
671+ colors = CardDefaults .cardColors(
672+ containerColor = colorPalette().background4
673+ ),
674+ shape = RoundedCornerShape (8 .dp)
675+ ) {
676+ Box (
677+ modifier = Modifier
678+ .fillMaxWidth()
679+ .padding(12 .dp),
680+ contentAlignment = Alignment .Center
681+ ) {
682+ BasicText (
683+ text = " Bottom Line: This isn't about Cubic Music vs. Kreate—it's about Kreate generating broken backup files that no app can read properly." ,
684+ style = typography().xxs.copy(color = colorPalette().text),
685+ modifier = Modifier .fillMaxWidth()
686+ )
687+ }
688+ }
689+ }
690+
691+ Spacer (modifier = Modifier .height(24 .dp))
692+
693+ // Close button
694+ Card (
695+ modifier = Modifier
696+ .fillMaxWidth()
697+ .clickable { showKreateDisclaimer = false },
698+ colors = CardDefaults .cardColors(
699+ containerColor = colorPalette().accent
700+ ),
701+ shape = RoundedCornerShape (12 .dp)
702+ ) {
703+ Box (
704+ modifier = Modifier
705+ .fillMaxWidth()
706+ .padding(vertical = 14 .dp),
707+ contentAlignment = Alignment .Center
708+ ) {
709+ BasicText (
710+ text = " Close" ,
711+ style = typography().s.copy(color = Color .White )
712+ )
713+ }
714+ }
715+ }
716+ }
717+ }
718+ }
719+
720+ Spacer (modifier = Modifier .height(16 .dp))
424721
425722 // Backup and Restore Section
426723 AnimatedVisibility (
0 commit comments