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