refactor: rename cookies
This commit is contained in:
@@ -20,17 +20,19 @@ const taskInput = ref<string>("");
|
|||||||
const tasks = ref<Task[]>([]);
|
const tasks = ref<Task[]>([]);
|
||||||
|
|
||||||
const sortType = enumCookieRef<SortType>(
|
const sortType = enumCookieRef<SortType>(
|
||||||
"toutDouxSortType",
|
"sSortType",
|
||||||
SortType.CREATED_AT,
|
SortType.CREATED_AT,
|
||||||
);
|
);
|
||||||
const sortReverse = booleanCookieRef("toutDouxSortReverse", false);
|
const sortReverse = booleanCookieRef("sortReverse", false);
|
||||||
const showLastChecked = booleanCookieRef("toutDouxShowLastChecked", false);
|
const showLastChecked = booleanCookieRef("showLastChecked", false);
|
||||||
const showNextReset = booleanCookieRef("toutDouxShowNextReset", false);
|
const showNextReset = booleanCookieRef("showNextReset", false);
|
||||||
const separateCompleted = booleanCookieRef("toutDouxSeparateCompleted", false);
|
const separateCompleted = booleanCookieRef("separateCompleted", true);
|
||||||
|
|
||||||
const hasCompleted = computed<boolean>(() => tasks.value.some(taskCompleted));
|
const completedCount = computed<number>(() => tasks.value.filter(taskCompleted).length);
|
||||||
const empty = computed<boolean>(() => tasks.value.length === 0);
|
const taskCount = computed<number>(() => tasks.value.length);
|
||||||
const allCompleted = computed<boolean>(() => tasks.value.every(taskCompleted));
|
const hasCompleted = computed<boolean>(() => completedCount.value > 0);
|
||||||
|
const empty = computed<boolean>(() => taskCount.value === 0);
|
||||||
|
const allCompleted = computed<boolean>(() => taskCount.value === completedCount.value);
|
||||||
|
|
||||||
const i18n = useI18n();
|
const i18n = useI18n();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user