Skip to content

Open-source Android PDF and document toolkit with PDF tools, Office viewing, XLSX editing, scanning, and image editing. Built with Kotlin and Jetpack Compose.

Today works: name, picture and to-dos; beta.11 changelog

chethan6162645c9322f68
diff --git a/android/app/src/main/java/com/chethan616/clearpdf/ui/home/DeskPages.kt b/android/app/src/main/java/com/chethan616/clearpdf/ui/home/DeskPages.kt
index 197921b..8f0ffa5 100644
--- a/android/app/src/main/java/com/chethan616/clearpdf/ui/home/DeskPages.kt
+++ b/android/app/src/main/java/com/chethan616/clearpdf/ui/home/DeskPages.kt
@@ -603,6 +603,12 @@ fun TodayScreen(vm: AppViewModel) {
},
)
val name = vm.ownerName
+ var naming by remember { mutableStateOf(false) }
+ // the open to-dos across the lists, the longest-waiting list's first
+ val todos = remember(notes) {
+ notes.filter { it.kind == com.chethan616.clearpdf.notes.NoteKind.List }.sortedBy { it.updated }
+ .flatMap { n -> n.items.filter { !it.done && it.text.isNotBlank() } }
+ }
Box(Modifier.fillMaxSize().verticalScroll(rememberScrollState())) {
Box(Modifier.fillMaxWidth().height(m(1068, k))) {
// the desk's own header: its mark (a tap goes back to the desk) and its menu button
@@ -626,11 +632,14 @@ fun TodayScreen(vm: AppViewModel) {
) { FourDots(Color.Unspecified) }
},
)
- // the name: Outfit 300 at 15, its baseline at 178 px
- if (name.isNotBlank()) Text(
- name.uppercase(), style = outfit(300, s(15f, k), 0.01f).copy(color = Color.White, textAlign = TextAlign.Center),
- modifier = Modifier.fillMaxWidth().baselineAt(null, m(178, k)),
- )
+ // the name: Outfit 300 at 15, its baseline at 178 px; a tap names it (faint "Your name" until then)
+ Box(Modifier.fillMaxWidth().baselineAt(null, m(178, k)), contentAlignment = Alignment.Center) {
+ Text(
+ name.ifBlank { stringResource(R.string.settings_your_name) }.uppercase(),
+ style = outfit(300, s(15f, k), 0.01f).copy(color = Color.White.copy(alpha = if (name.isBlank()) 0.55f else 1f), textAlign = TextAlign.Center),
+ modifier = Modifier.pressable({ naming = true }, pressedScale = 0.94f).padding(horizontal = 12.dp, vertical = 4.dp),
+ )
+ }
// the greeting: Outfit 500 at 73, baselines 264 and 354 px, white at 62 %, fading into blur
FadeIntoBlur(0.55f, m(2.6f, k), Modifier.fillMaxWidth().baselineAt(null, m(264, k)).graphicsLayer { alpha = 0.62f }) {
Text(
@@ -661,7 +670,14 @@ fun TodayScreen(vm: AppViewModel) {
Modifier.offset(m(343 - 111, k), m(605 - 136, k)).size(m(222, k), m(272, k))
.graphicsLayer { rotationZ = 2f; shadowElevation = 4.dp.toPx(); shape = RoundedRectangle(m(28, k)); clip = true }
.background(Color(0xFF9CCDE4))
- .pressable({ vm.deskPages.clear(); vm.deskShelf = DeskFilter.Images }, pressedScale = 0.96f),
+ // the picture's own note, or the scan itself; with neither, the desk's pictures
+ .pressable({
+ when {
+ pic != null -> vm.openNote = pic.note.id
+ scan != null -> scan.open()
+ else -> { vm.deskPages.clear(); vm.deskShelf = DeskFilter.Images }
+ }
+ }, pressedScale = 0.96f),
) {
if (pic != null) NoteImage(pic.name, Modifier.matchParentSize(), maxPx = 900)
else if (scan != null) PageFill(vm, scan.thumbPath)
@@ -677,15 +693,37 @@ fun TodayScreen(vm: AppViewModel) {
Modifier.offset(m(55, k), m(700, k)).size(m(220, k), m(202, k))
.graphicsLayer { shadowElevation = 3.dp.toPx(); shape = RoundedRectangle(m(30, k)); clip = true; ambientShadowColor = Color(0x22000000); spotShadowColor = Color(0x22000000) }
.background(Color(0xFFF4F8FF).copy(alpha = 0.78f))
- .pressable({ vm.closeDeskPage() }, pressedScale = 0.96f),
+ // the day's to-dos: their lists on the desk (or the desk itself, all done)
+ .pressable({ vm.deskPages.clear(); if (todos.isNotEmpty()) vm.deskShelf = DeskFilter.Todo }, pressedScale = 0.96f),
) {
Text(java.text.SimpleDateFormat("EEEE", java.util.Locale.getDefault()).format(now), style = outfit(700, s(37.6f, k), -0.035f).copy(color = Color.Black), maxLines = 1, modifier = Modifier.baselineAt(m(22, k), m(52, k)))
Text(
java.text.SimpleDateFormat(android.text.format.DateFormat.getBestDateTimePattern(java.util.Locale.getDefault(), "MMMd"), java.util.Locale.getDefault()).format(now),
style = outfit(300, s(32f, k)).copy(color = Color(0xFF737D87)), maxLines = 1, modifier = Modifier.baselineAt(m(22, k), m(96, k)),
)
+ // the overview: how many to-dos are left, and the next one
+ Text(
+ if (todos.isEmpty()) stringResource(R.string.today_all_done)
+ else androidx.compose.ui.res.pluralStringResource(R.plurals.today_todos_left, todos.size, todos.size),
+ style = outfit(500, s(13.4f, k), -0.01f).copy(color = Color(0xFF3B6593)), maxLines = 1, overflow = TextOverflow.Ellipsis,
+ modifier = Modifier.padding(end = m(16, k)).baselineAt(m(22, k), m(133, k)),
+ )
+ todos.firstOrNull()?.let { next ->
+ Text(
+ next.text, style = outfit(400, s(11.1f, k)).copy(color = Color(0xFF1E1515)), maxLines = 1, overflow = TextOverflow.Ellipsis,
+ modifier = Modifier.padding(end = m(16, k)).baselineAt(m(22, k), m(153, k)),
+ )
+ }
Text(stringResource(R.string.today_overview), style = outfit(400, s(11.1f, k)).copy(color = Color(0xFF84909C)), modifier = Modifier.baselineAt(m(22, k), m(177, k)))
}
}
}
+ if (naming) {
+ var typed by remember { mutableStateOf(vm.ownerName) }
+ com.chethan616.clearpdf.ui.glass.GlassDialog(
+ onDismiss = { naming = false }, title = stringResource(R.string.settings_your_name), icon = LucideIcons.UserRound, accent = com.chethan616.clearpdf.ui.theme.Candy.Tangerine,
+ confirm = stringResource(R.string.common_done), onConfirm = { vm.updateOwnerName(typed); naming = false },
+ dismiss = stringResource(R.string.common_cancel),
+ ) { com.chethan616.clearpdf.ui.glass.GlassTextField(typed, { typed = it }, stringResource(R.string.settings_your_name_hint)) }
+ }
}
diff --git a/android/app/src/main/res/values-ar/strings.xml b/android/app/src/main/res/values-ar/strings.xml
index d7f9735..185a7c9 100644
--- a/android/app/src/main/res/values-ar/strings.xml
+++ b/android/app/src/main/res/values-ar/strings.xml
@@ -1262,6 +1262,15 @@
<string name="today_evening">مساء الخير</string>
<string name="today_night">تصبح على خير</string>
<string name="today_overview">نظرة على اليوم</string>
+ <string name="today_all_done">لا شيء متبقٍ للقيام به</string>
+ <plurals name="today_todos_left">
+ <item quantity="zero">لا مهام متبقية</item>
+ <item quantity="one">مهمة واحدة متبقية</item>
+ <item quantity="two">مهمتان متبقيتان</item>
+ <item quantity="few">%d مهام متبقية</item>
+ <item quantity="many">%d مهمة متبقية</item>
+ <item quantity="other">%d مهمة متبقية</item>
+ </plurals>
<plurals name="today_left">
<item quantity="one">%d مهمة متبقية</item>
<item quantity="other">%d مهام متبقية</item>
diff --git a/android/app/src/main/res/values-de/strings.xml b/android/app/src/main/res/values-de/strings.xml
index f91a6de..d7ad008 100644
--- a/android/app/src/main/res/values-de/strings.xml
+++ b/android/app/src/main/res/values-de/strings.xml
@@ -1608,6 +1608,11 @@
<string name="today_evening">Guten Abend</string>
<string name="today_night">Gute Nacht</string>
<string name="today_overview">Tagesüberblick</string>
+ <string name="today_all_done">Alles erledigt</string>
+ <plurals name="today_todos_left">
+ <item quantity="one">%d Aufgabe offen</item>
+ <item quantity="other">%d Aufgaben offen</item>
+ </plurals>
<plurals name="today_left">
<item quantity="one">%d Aufgabe offen</item>
<item quantity="other">%d Aufgaben offen</item>
diff --git a/android/app/src/main/res/values-es/strings.xml b/android/app/src/main/res/values-es/strings.xml
index b8684cd..e520c87 100644
--- a/android/app/src/main/res/values-es/strings.xml
+++ b/android/app/src/main/res/values-es/strings.xml
@@ -1616,6 +1616,12 @@
<string name="today_evening">Buenas noches</string>
<string name="today_night">Buenas noches</string>
<string name="today_overview">Resumen del día</string>
+ <string name="today_all_done">No queda nada por hacer</string>
+ <plurals name="today_todos_left">
+ <item quantity="one">Queda %d tarea</item>
+ <item quantity="many">Quedan %d tareas</item>
+ <item quantity="other">Quedan %d tareas</item>
+ </plurals>
<plurals name="today_left">
<item quantity="one">%d tarea pendiente</item>
<item quantity="other">%d tareas pendientes</item>
diff --git a/android/app/src/main/res/values-fr/strings.xml b/android/app/src/main/res/values-fr/strings.xml
index a8dc2f5..bb019e2 100644
--- a/android/app/src/main/res/values-fr/strings.xml
+++ b/android/app/src/main/res/values-fr/strings.xml
@@ -1488,6 +1488,12 @@
<string name="today_evening">Bonsoir</string>
<string name="today_night">Bonne nuit</string>
<string name="today_overview">Aperçu du jour</string>
+ <string name="today_all_done">Plus rien à faire</string>
+ <plurals name="today_todos_left">
+ <item quantity="one">%d tâche restante</item>
+ <item quantity="many">%d tâches restantes</item>
+ <item quantity="other">%d tâches restantes</item>
+ </plurals>
<plurals name="today_left">
<item quantity="one">%d tâche restante</item>
<item quantity="other">%d tâches restantes</item>
diff --git a/android/app/src/main/res/values-it/strings.xml b/android/app/src/main/res/values-it/strings.xml
index 018046b..65d4173 100644
--- a/android/app/src/main/res/values-it/strings.xml
+++ b/android/app/src/main/res/values-it/strings.xml
@@ -1598,6 +1598,12 @@
<string name="today_evening">Buonasera</string>
<string name="today_night">Buonanotte</string>
<string name="today_overview">Panoramica del giorno</string>
+ <string name="today_all_done">Niente da fare</string>
+ <plurals name="today_todos_left">
+ <item quantity="one">%d attività rimasta</item>
+ <item quantity="many">%d attività rimaste</item>
+ <item quantity="other">%d attività rimaste</item>
+ </plurals>
<plurals name="today_left">
<item quantity="one">%d attività da fare</item>
<item quantity="other">%d attività da fare</item>
diff --git a/android/app/src/main/res/values-pt-rBR/strings.xml b/android/app/src/main/res/values-pt-rBR/strings.xml
index 961738e..7261998 100644
--- a/android/app/src/main/res/values-pt-rBR/strings.xml
+++ b/android/app/src/main/res/values-pt-rBR/strings.xml
@@ -1193,6 +1193,12 @@
<string name="today_evening">Boa noite</string>
<string name="today_night">Boa noite</string>
<string name="today_overview">Resumo do dia</string>
+ <string name="today_all_done">Nada para fazer</string>
+ <plurals name="today_todos_left">
+ <item quantity="one">Falta %d tarefa</item>
+ <item quantity="many">Faltam %d tarefas</item>
+ <item quantity="other">Faltam %d tarefas</item>
+ </plurals>
<plurals name="today_left">
<item quantity="one">%d tarefa pendente</item>
<item quantity="other">%d tarefas pendentes</item>
diff --git a/android/app/src/main/res/values-pt/strings.xml b/android/app/src/main/res/values-pt/strings.xml
index 0056ea8..4e3b23e 100644
--- a/android/app/src/main/res/values-pt/strings.xml
+++ b/android/app/src/main/res/values-pt/strings.xml
@@ -1193,6 +1193,12 @@
<string name="today_evening">Boa noite</string>
<string name="today_night">Boa noite</string>
<string name="today_overview">Resumo do dia</string>
+ <string name="today_all_done">Nada por fazer</string>
+ <plurals name="today_todos_left">
+ <item quantity="one">Falta %d tarefa</item>
+ <item quantity="many">Faltam %d tarefas</item>
+ <item quantity="other">Faltam %d tarefas</item>
+ </plurals>
<plurals name="today_left">
<item quantity="one">%d tarefa por fazer</item>
<item quantity="other">%d tarefas por fazer</item>
diff --git a/android/app/src/main/res/values-ru/strings.xml b/android/app/src/main/res/values-ru/strings.xml
index 6eea0b1..1b34975 100644
--- a/android/app/src/main/res/values-ru/strings.xml
+++ b/android/app/src/main/res/values-ru/strings.xml
@@ -1225,6 +1225,13 @@
<string name="today_evening">Добрый вечер</string>
<string name="today_night">Доброй ночи</string>
<string name="today_overview">Обзор дня</string>
+ <string name="today_all_done">Все дела сделаны</string>
+ <plurals name="today_todos_left">
+ <item quantity="one">Осталась %d задача</item>
+ <item quantity="few">Осталось %d задачи</item>
+ <item quantity="many">Осталось %d задач</item>
+ <item quantity="other">Осталось %d задачи</item>
+ </plurals>
<plurals name="today_left">
<item quantity="one">%d дело осталось</item>
<item quantity="other">Осталось дел: %d</item>
diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml
index 8d313ed..caa5be3 100644
--- a/android/app/src/main/res/values/strings.xml
+++ b/android/app/src/main/res/values/strings.xml
@@ -1667,6 +1667,11 @@
<string name="today_evening">Good Evening</string>
<string name="today_night">Good Night</string>
<string name="today_overview">Daily Overview</string>
+ <string name="today_all_done">Nothing left to do</string>
+ <plurals name="today_todos_left">
+ <item quantity="one">%d to-do left</item>
+ <item quantity="other">%d to-dos left</item>
+ </plurals>
<plurals name="today_left">
<item quantity="one">%d to-do left</item>
<item quantity="other">%d to-dos left</item>
diff --git a/fastlane/metadata/android/en-US/changelogs/30000110.txt b/fastlane/metadata/android/en-US/changelogs/30000110.txt
index a96664e..26a75d2 100644
--- a/fastlane/metadata/android/en-US/changelogs/30000110.txt
+++ b/fastlane/metadata/android/en-US/changelogs/30000110.txt
@@ -1,10 +1,11 @@
Widgets, a deck of thoughts, cards you arrange
-* To-Do widget: the real glass card, ticks land at once; turn to the next list
+* To-Do widget: real glass card, instant ticks, next list
* Starred widget; widget taps open Files
-* Star any file from its row; a new file menu
+* Star files from their row; a new file menu
* Drag desk cards where you want them
* Bold or italic only the selected words
* Thought of the day and Today pages
-* New typeface; menus bounce with your Motion setting
+* Fill & Sign: tap a found field to fill it
* Scan filters preview before saving
-* A new document info sheet
+* Text edits keep headings on their own line
+* Fixes: comment bar, search keyboard, quick look icons
diff --git a/fastlane/metadata/android/en-US/changelogs/30000111.txt b/fastlane/metadata/android/en-US/changelogs/30000111.txt
index a96664e..26a75d2 100644
--- a/fastlane/metadata/android/en-US/changelogs/30000111.txt
+++ b/fastlane/metadata/android/en-US/changelogs/30000111.txt
@@ -1,10 +1,11 @@
Widgets, a deck of thoughts, cards you arrange
-* To-Do widget: the real glass card, ticks land at once; turn to the next list
+* To-Do widget: real glass card, instant ticks, next list
* Starred widget; widget taps open Files
-* Star any file from its row; a new file menu
+* Star files from their row; a new file menu
* Drag desk cards where you want them
* Bold or italic only the selected words
* Thought of the day and Today pages
-* New typeface; menus bounce with your Motion setting
+* Fill & Sign: tap a found field to fill it
* Scan filters preview before saving
-* A new document info sheet
+* Text edits keep headings on their own line
+* Fixes: comment bar, search keyboard, quick look icons
diff --git a/fastlane/metadata/android/en-US/changelogs/30000112.txt b/fastlane/metadata/android/en-US/changelogs/30000112.txt
index a96664e..26a75d2 100644
--- a/fastlane/metadata/android/en-US/changelogs/30000112.txt
+++ b/fastlane/metadata/android/en-US/changelogs/30000112.txt
@@ -1,10 +1,11 @@
Widgets, a deck of thoughts, cards you arrange
-* To-Do widget: the real glass card, ticks land at once; turn to the next list
+* To-Do widget: real glass card, instant ticks, next list
* Starred widget; widget taps open Files
-* Star any file from its row; a new file menu
+* Star files from their row; a new file menu
* Drag desk cards where you want them
* Bold or italic only the selected words
* Thought of the day and Today pages
-* New typeface; menus bounce with your Motion setting
+* Fill & Sign: tap a found field to fill it
* Scan filters preview before saving
-* A new document info sheet
+* Text edits keep headings on their own line
+* Fixes: comment bar, search keyboard, quick look icons
diff --git a/fastlane/metadata/android/en-US/changelogs/30000113.txt b/fastlane/metadata/android/en-US/changelogs/30000113.txt
index a96664e..26a75d2 100644
--- a/fastlane/metadata/android/en-US/changelogs/30000113.txt
+++ b/fastlane/metadata/android/en-US/changelogs/30000113.txt
@@ -1,10 +1,11 @@
Widgets, a deck of thoughts, cards you arrange
-* To-Do widget: the real glass card, ticks land at once; turn to the next list
+* To-Do widget: real glass card, instant ticks, next list
* Starred widget; widget taps open Files
-* Star any file from its row; a new file menu
+* Star files from their row; a new file menu
* Drag desk cards where you want them
* Bold or italic only the selected words
* Thought of the day and Today pages
-* New typeface; menus bounce with your Motion setting
+* Fill & Sign: tap a found field to fill it
* Scan filters preview before saving
-* A new document info sheet
+* Text edits keep headings on their own line
+* Fixes: comment bar, search keyboard, quick look icons
diff --git a/fastlane/metadata/android/en-US/changelogs/30000114.txt b/fastlane/metadata/android/en-US/changelogs/30000114.txt
index a96664e..26a75d2 100644
--- a/fastlane/metadata/android/en-US/changelogs/30000114.txt
+++ b/fastlane/metadata/android/en-US/changelogs/30000114.txt
@@ -1,10 +1,11 @@
Widgets, a deck of thoughts, cards you arrange
-* To-Do widget: the real glass card, ticks land at once; turn to the next list
+* To-Do widget: real glass card, instant ticks, next list
* Starred widget; widget taps open Files
-* Star any file from its row; a new file menu
+* Star files from their row; a new file menu
* Drag desk cards where you want them
* Bold or italic only the selected words
* Thought of the day and Today pages
-* New typeface; menus bounce with your Motion setting
+* Fill & Sign: tap a found field to fill it
* Scan filters preview before saving
-* A new document info sheet
+* Text edits keep headings on their own line
+* Fixes: comment bar, search keyboard, quick look icons