feat: update Font Awesome to 7.1.0
All checks were successful
actionlint check / actionlint check (pull_request) Successful in 39s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 8s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 10s
GitLeaks check / GitLeaks check (pull_request) Successful in 46s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 48s
hadolint check / hadolint check (pull_request) Successful in 51s
checkov check / checkov check (pull_request) Successful in 2m37s
htmlhint check / htmlhint check (pull_request) Successful in 1m9s
markdownlint check / markdownlint check (pull_request) Successful in 50s
Prettier check / Prettier check (pull_request) Successful in 30s
ShellCheck check / ShellCheck check (pull_request) Successful in 55s
Stylelint check / Stylelint check (pull_request) Successful in 54s
yamllint check / yamllint check (pull_request) Successful in 1m6s
Rust check / Rust check (pull_request) Successful in 24m52s
All checks were successful
actionlint check / actionlint check (pull_request) Successful in 39s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 8s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 10s
GitLeaks check / GitLeaks check (pull_request) Successful in 46s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 48s
hadolint check / hadolint check (pull_request) Successful in 51s
checkov check / checkov check (pull_request) Successful in 2m37s
htmlhint check / htmlhint check (pull_request) Successful in 1m9s
markdownlint check / markdownlint check (pull_request) Successful in 50s
Prettier check / Prettier check (pull_request) Successful in 30s
ShellCheck check / ShellCheck check (pull_request) Successful in 55s
Stylelint check / Stylelint check (pull_request) Successful in 54s
yamllint check / yamllint check (pull_request) Successful in 1m6s
Rust check / Rust check (pull_request) Successful in 24m52s
This commit is contained in:
@@ -5,6 +5,9 @@ use crate::server::tasks::complete_task;
|
||||
use dioxus::core_macro::rsx;
|
||||
use dioxus::dioxus_core::Element;
|
||||
use dioxus::prelude::*;
|
||||
use dioxus_free_icons::Icon;
|
||||
use dioxus_free_icons::icons::fa_regular_icons::FaSquare;
|
||||
use dioxus_free_icons::icons::fa_solid_icons::FaSquareCheck;
|
||||
|
||||
#[component]
|
||||
pub(crate) fn TaskList(tasks: Vec<TaskWithSubtasks>, class: Option<&'static str>) -> Element {
|
||||
@@ -16,17 +19,17 @@ pub(crate) fn TaskList(tasks: Vec<TaskWithSubtasks>, class: Option<&'static str>
|
||||
div {
|
||||
key: "{task.task.id}",
|
||||
class: format!(
|
||||
"px-8 pt-4 {} flex flex-row gap-4 select-none {}",
|
||||
"px-7 pt-4.25 {} flex flex-row items-start gap-4 select-none {}",
|
||||
if task.task.deadline.is_some() || !task.subtasks.is_empty() {
|
||||
"pb-0.5"
|
||||
"pb-0.25"
|
||||
} else if let Category::Calendar { time, .. } = &task.task.category {
|
||||
if time.is_some() {
|
||||
"pb-0.5"
|
||||
"pb-0.25"
|
||||
} else {
|
||||
"pb-4"
|
||||
"pb-4.25"
|
||||
}
|
||||
} else {
|
||||
"pb-4"
|
||||
"pb-4.25"
|
||||
},
|
||||
if task_being_edited().is_some_and(|t| t.id == task.task.id) {
|
||||
"bg-zinc-700"
|
||||
@@ -36,15 +39,8 @@ pub(crate) fn TaskList(tasks: Vec<TaskWithSubtasks>, class: Option<&'static str>
|
||||
let task = task.clone();
|
||||
move |_| task_being_edited.set(Some(task.task.clone()))
|
||||
},
|
||||
i {
|
||||
class: format!(
|
||||
"{} text-3xl align-middle h-9 text-zinc-500",
|
||||
if let Category::Done = task.task.category {
|
||||
"fa solid fa-square-check"
|
||||
} else {
|
||||
"fa-regular fa-square cursor-pointer"
|
||||
}
|
||||
),
|
||||
button {
|
||||
class: "text-zinc-500",
|
||||
onclick: {
|
||||
move |event: Event<MouseData>| {
|
||||
// To prevent editing the task.
|
||||
@@ -53,6 +49,20 @@ pub(crate) fn TaskList(tasks: Vec<TaskWithSubtasks>, class: Option<&'static str>
|
||||
let _ = complete_task(task.task.id).await;
|
||||
}
|
||||
}
|
||||
},
|
||||
if let Category::Done = task.task.category {
|
||||
Icon {
|
||||
icon: FaSquareCheck,
|
||||
height: 30,
|
||||
width: 30
|
||||
}
|
||||
} else {
|
||||
Icon {
|
||||
class: "cursor-pointer",
|
||||
icon: FaSquare,
|
||||
height: 30,
|
||||
width: 30
|
||||
}
|
||||
}
|
||||
},
|
||||
TaskListItem {
|
||||
|
||||
Reference in New Issue
Block a user