Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task list improvements on mobile devices #53

Merged
merged 2 commits into from
Jul 5, 2023
Merged
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
14 changes: 10 additions & 4 deletions front/src/components/Task/TaskList.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<template>
<div>
<div class="row q-mb-md q-gutter-md items-center">
<div class="col col-3">
<div class="col col-md-3 col-sm-6 col-xs-11">
<q-input v-model="filter" label="search">
<template #append>
<q-icon name="search" />
</template>
</q-input>
</div>
<div class="col col-3 col-grow">
<div class="col col-md-3 col-sm-5 col-xs-11 col-grow">
<q-select
v-model="tagFilter"
:options="tags"
Expand All @@ -31,7 +31,7 @@
<q-checkbox v-model="myTasks" label="Show my tasks" />
</div>
<q-space />
<div class="col col-1">
<div class="col">
<q-select
v-model="displayMode"
label="Display"
Expand Down Expand Up @@ -114,6 +114,7 @@ import TaskCards from './TaskCards.vue';
import TaskTable from './TaskTable.vue';
import keys from '../../injectionKeys';
import { tagsSortFn } from 'src/ctfnote/tags';
import { Platform } from 'quasar';

const displayOptions = ['classic', 'dense', 'ultradense', 'table'] as const;

Expand Down Expand Up @@ -166,8 +167,13 @@ export default defineComponent({
}
});

const chooseDisplayMode = () => (Platform.is.mobile ? 'classic' : 'table');

return {
displayMode: makePersistant('task-display-mode', ref('classic')),
displayMode: makePersistant(
'task-display-mode',
ref(chooseDisplayMode())
),
hideSolved,
myTasks,
filter,
Expand Down