Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 114 additions & 0 deletions lucide-icons/src/commonMain/kotlin/CopyPlus.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
/*
* Lucide License
* ISC License
*
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT).
* All other copyright (c) for Lucide are held by Lucide Contributors 2022.
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with or without
* fee is hereby granted, provided that the above copyright notice and this permission notice
* appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
* USE OR PERFORMANCE OF THIS SOFTWARE.
*/

import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.PathFillType
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.StrokeCap
import androidx.compose.ui.graphics.StrokeJoin
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.graphics.vector.path
import androidx.compose.ui.unit.dp

public val LucideIcons.CopyPlus: ImageVector
get() {
if (_CopyPlus != null) {
return _CopyPlus!!
}
_CopyPlus = ImageVector.Builder(
name = "CopyPlus",
defaultWidth = 24.dp,
defaultHeight = 24.dp,
viewportWidth = 24f,
viewportHeight = 24f
).apply {
path(
fill = null,
fillAlpha = 1.0f,
stroke = SolidColor(Color(0xFF000000)),
strokeAlpha = 1.0f,
strokeLineWidth = 1f,
strokeLineCap = StrokeCap.Round,
strokeLineJoin = StrokeJoin.Round,
strokeLineMiter = 1.0f,
pathFillType = PathFillType.NonZero
) {
moveTo(15f, 12f)
lineTo(15f, 18f)
}
path(
fill = null,
fillAlpha = 1.0f,
stroke = SolidColor(Color(0xFF000000)),
strokeAlpha = 1.0f,
strokeLineWidth = 1f,
strokeLineCap = StrokeCap.Round,
strokeLineJoin = StrokeJoin.Round,
strokeLineMiter = 1.0f,
pathFillType = PathFillType.NonZero
) {
moveTo(12f, 15f)
lineTo(18f, 15f)
}
path(
fill = null,
fillAlpha = 1.0f,
stroke = SolidColor(Color(0xFF000000)),
strokeAlpha = 1.0f,
strokeLineWidth = 1f,
strokeLineCap = StrokeCap.Round,
strokeLineJoin = StrokeJoin.Round,
strokeLineMiter = 1.0f,
pathFillType = PathFillType.NonZero
) {
moveTo(10f, 8f)
horizontalLineTo(20f)
arcTo(2f, 2f, 0f, isMoreThanHalf = false, isPositiveArc = true, 22f, 10f)
verticalLineTo(20f)
arcTo(2f, 2f, 0f, isMoreThanHalf = false, isPositiveArc = true, 20f, 22f)
horizontalLineTo(10f)
arcTo(2f, 2f, 0f, isMoreThanHalf = false, isPositiveArc = true, 8f, 20f)
verticalLineTo(10f)
arcTo(2f, 2f, 0f, isMoreThanHalf = false, isPositiveArc = true, 10f, 8f)
close()
}
path(
fill = null,
fillAlpha = 1.0f,
stroke = SolidColor(Color(0xFF000000)),
strokeAlpha = 1.0f,
strokeLineWidth = 1f,
strokeLineCap = StrokeCap.Round,
strokeLineJoin = StrokeJoin.Round,
strokeLineMiter = 1.0f,
pathFillType = PathFillType.NonZero
) {
moveTo(4f, 16f)
curveToRelative(-1.1f, 0f, -2f, -0.9f, -2f, -2f)
verticalLineTo(4f)
curveToRelative(0f, -1.1f, 0.9f, -2f, 2f, -2f)
horizontalLineToRelative(10f)
curveToRelative(1.1f, 0f, 2f, 0.9f, 2f, 2f)
}
}.build()
return _CopyPlus!!
}

private var _CopyPlus: ImageVector? = null
155 changes: 155 additions & 0 deletions lucide-icons/src/commonMain/kotlin/Replace.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
/*
* Lucide License
* ISC License
*
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT).
* All other copyright (c) for Lucide are held by Lucide Contributors 2022.
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with or without
* fee is hereby granted, provided that the above copyright notice and this permission notice
* appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
* USE OR PERFORMANCE OF THIS SOFTWARE.
*/

import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.PathFillType
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.StrokeCap
import androidx.compose.ui.graphics.StrokeJoin
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.graphics.vector.path
import androidx.compose.ui.unit.dp

public val LucideIcons.Replace: ImageVector
get() {
if (_Replace != null) {
return _Replace!!
}
_Replace = ImageVector.Builder(
name = "Replace",
defaultWidth = 24.dp,
defaultHeight = 24.dp,
viewportWidth = 24f,
viewportHeight = 24f
).apply {
path(
fill = null,
fillAlpha = 1.0f,
stroke = SolidColor(Color(0xFF000000)),
strokeAlpha = 1.0f,
strokeLineWidth = 1f,
strokeLineCap = StrokeCap.Round,
strokeLineJoin = StrokeJoin.Round,
strokeLineMiter = 1.0f,
pathFillType = PathFillType.NonZero
) {
moveTo(14f, 4f)
arcToRelative(2f, 2f, 0f, isMoreThanHalf = false, isPositiveArc = true, 2f, -2f)
}
path(
fill = null,
fillAlpha = 1.0f,
stroke = SolidColor(Color(0xFF000000)),
strokeAlpha = 1.0f,
strokeLineWidth = 1f,
strokeLineCap = StrokeCap.Round,
strokeLineJoin = StrokeJoin.Round,
strokeLineMiter = 1.0f,
pathFillType = PathFillType.NonZero
) {
moveTo(16f, 10f)
arcToRelative(2f, 2f, 0f, isMoreThanHalf = false, isPositiveArc = true, -2f, -2f)
}
path(
fill = null,
fillAlpha = 1.0f,
stroke = SolidColor(Color(0xFF000000)),
strokeAlpha = 1.0f,
strokeLineWidth = 1f,
strokeLineCap = StrokeCap.Round,
strokeLineJoin = StrokeJoin.Round,
strokeLineMiter = 1.0f,
pathFillType = PathFillType.NonZero
) {
moveTo(20f, 2f)
arcToRelative(2f, 2f, 0f, isMoreThanHalf = false, isPositiveArc = true, 2f, 2f)
}
path(
fill = null,
fillAlpha = 1.0f,
stroke = SolidColor(Color(0xFF000000)),
strokeAlpha = 1.0f,
strokeLineWidth = 1f,
strokeLineCap = StrokeCap.Round,
strokeLineJoin = StrokeJoin.Round,
strokeLineMiter = 1.0f,
pathFillType = PathFillType.NonZero
) {
moveTo(22f, 8f)
arcToRelative(2f, 2f, 0f, isMoreThanHalf = false, isPositiveArc = true, -2f, 2f)
}
path(
fill = null,
fillAlpha = 1.0f,
stroke = SolidColor(Color(0xFF000000)),
strokeAlpha = 1.0f,
strokeLineWidth = 1f,
strokeLineCap = StrokeCap.Round,
strokeLineJoin = StrokeJoin.Round,
strokeLineMiter = 1.0f,
pathFillType = PathFillType.NonZero
) {
moveTo(3f, 7f)
lineToRelative(3f, 3f)
lineToRelative(3f, -3f)
}
path(
fill = null,
fillAlpha = 1.0f,
stroke = SolidColor(Color(0xFF000000)),
strokeAlpha = 1.0f,
strokeLineWidth = 1f,
strokeLineCap = StrokeCap.Round,
strokeLineJoin = StrokeJoin.Round,
strokeLineMiter = 1.0f,
pathFillType = PathFillType.NonZero
) {
moveTo(6f, 10f)
verticalLineTo(5f)
arcToRelative(3f, 3f, 0f, isMoreThanHalf = false, isPositiveArc = true, 3f, -3f)
horizontalLineToRelative(1f)
}
path(
fill = null,
fillAlpha = 1.0f,
stroke = SolidColor(Color(0xFF000000)),
strokeAlpha = 1.0f,
strokeLineWidth = 1f,
strokeLineCap = StrokeCap.Round,
strokeLineJoin = StrokeJoin.Round,
strokeLineMiter = 1.0f,
pathFillType = PathFillType.NonZero
) {
moveTo(4f, 14f)
horizontalLineTo(8f)
arcTo(2f, 2f, 0f, isMoreThanHalf = false, isPositiveArc = true, 10f, 16f)
verticalLineTo(20f)
arcTo(2f, 2f, 0f, isMoreThanHalf = false, isPositiveArc = true, 8f, 22f)
horizontalLineTo(4f)
arcTo(2f, 2f, 0f, isMoreThanHalf = false, isPositiveArc = true, 2f, 20f)
verticalLineTo(16f)
arcTo(2f, 2f, 0f, isMoreThanHalf = false, isPositiveArc = true, 4f, 14f)
close()
}
}.build()
return _Replace!!
}

private var _Replace: ImageVector? = null
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,16 @@ private fun NoTaskListSelectedEmptyStatePreview() {

@PreviewLightDark
@Composable
private fun NoTaskListEmptyStatePreview(
) {
private fun NoTaskListEmptyStatePreview() {
TaskfolioThemedPreview {
NoTaskListEmptyState {}
}
}

@PreviewLightDark
@Composable
private fun BrokenListIndentationEmptyStatePreview() {
TaskfolioThemedPreview {
BrokenListIndentationEmptyState({}, {})
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
<string name="task_lists_screen_default_task_list_title">Mes tâches</string>
<string name="task_lists_screen_empty_state_no_selection_title">Aucune liste de tâches sélectionnée</string>
<string name="task_lists_screen_empty_state_no_selection_desc">Sélectionnez une liste de tâches pour afficher son contenu</string>
<string name="task_lists_screen_empty_state_broken_list_indent_title">Mettre à jour cette liste</string>
<string name="task_lists_screen_empty_state_broken_list_indent_desc">Cette liste a plusieurs niveaux de sous-tâches, ce qui n'est pas pris en charge. Mettez à jour cette liste pour l'utiliser.</string>
<string name="task_lists_screen_empty_state_broken_list_indent_delete_cta">Supprimer la liste</string>
<string name="task_lists_screen_empty_state_broken_list_indent_repair_cta">Mettre à jour la liste</string>
<string name="task_lists_screen_empty_state_title">Aucune liste de tâches</string>
<string name="task_lists_screen_empty_state_desc">Créez une nouvelle liste de tâches pour commencer</string>
<string name="task_lists_screen_empty_state_cta">Nouvelle liste de tâches</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
<string name="task_lists_screen_default_task_list_title">My tasks</string>
<string name="task_lists_screen_empty_state_no_selection_title">No task list selected</string>
<string name="task_lists_screen_empty_state_no_selection_desc">Select a task list to see its tasks</string>
<string name="task_lists_screen_empty_state_broken_list_indent_title">Update this list</string>
<string name="task_lists_screen_empty_state_broken_list_indent_desc">This list has multiple levels of subtasks, which aren't supported. Update this list to use it.</string>
<string name="task_lists_screen_empty_state_broken_list_indent_delete_cta">Delete list</string>
<string name="task_lists_screen_empty_state_broken_list_indent_repair_cta">Update list</string>
<string name="task_lists_screen_empty_state_title">No task lists</string>
<string name="task_lists_screen_empty_state_desc">Create a new task list to get started</string>
<string name="task_lists_screen_empty_state_cta">New task list</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ class TaskListsViewModel(
}
}

fun repairTaskList(taskListId: TaskListId) {
// TODO
}

fun renameTaskList(taskListId: TaskListId, newTitle: String) {
viewModelScope.launch {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ package net.opatry.tasks.app.ui.component

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
Expand All @@ -32,6 +33,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp


Expand All @@ -43,7 +45,7 @@ fun EmptyState(
description: String? = null,
) {
Column(
modifier = modifier,
modifier = modifier.padding(24.dp),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.spacedBy(8.dp, Alignment.CenterVertically)
) {
Expand All @@ -55,7 +57,11 @@ fun EmptyState(
)
Text(title, style = MaterialTheme.typography.titleMedium)
if (description != null) {
Text(description, style = MaterialTheme.typography.bodyMedium)
Text(
description,
style = MaterialTheme.typography.bodyMedium,
textAlign = TextAlign.Center,
)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
package net.opatry.tasks.app.ui.component

import Check
import CopyPlus
import ListPlus
import LucideIcons
import SquareStack
Expand Down Expand Up @@ -108,7 +109,7 @@ fun TaskMenu(
if (task.canCreateSubTask) {
DropdownMenuItem(
text = {
RowWithIcon(stringResource(Res.string.task_menu_add_subtask), LucideIcons.SquareStack)
RowWithIcon(stringResource(Res.string.task_menu_add_subtask), LucideIcons.CopyPlus)
},
onClick = { onAction(TaskAction.AddSubTask) },
modifier = Modifier.testTag(ADD_SUBTASK),
Expand Down
Loading