Skip to content

Commit

Permalink
Implement mobile list option
Browse files Browse the repository at this point in the history
  • Loading branch information
corrodedHash committed Feb 9, 2023
1 parent f740b49 commit 5b9648a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
17 changes: 16 additions & 1 deletion frontend/components/SettingsDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@
</v-list-item-action>
</v-list-item>

<v-list-item>
<v-list-item-content>
<v-list-item-title>
Mobile Tasklist
</v-list-item-title>
<v-list-item-subtitle>
multiple tasks per line
</v-list-item-subtitle>
</v-list-item-content>
<v-list-item-action>
<v-checkbox v-model="settings.mobilelist" />
</v-list-item-action>
</v-list-item>

<v-list-item>
<v-list-item-content>
<v-list-item-title>
Expand Down Expand Up @@ -106,7 +120,8 @@ export default defineComponent({
const settings = reactive({
dark: store.state.settings.dark,
autoRefresh: store.state.settings.autoRefresh,
autoSync: store.state.settings.autoSync
autoSync: store.state.settings.autoSync,
mobilelist: store.state.settings.mobilelist
});
const reset = () => {
Expand Down
2 changes: 2 additions & 0 deletions frontend/components/TaskList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
v-model="selected"
class="elevation-1"
style="width: 100%"
:mobile-breakpoint="store.state.settings.mobilelist ? undefined : 0"
>
<template v-slot:top>
<v-row class="px-4">
Expand Down Expand Up @@ -390,6 +391,7 @@ export default defineComponent({
};
return {
store,
linkify,
refresh,
headers,
Expand Down
3 changes: 2 additions & 1 deletion frontend/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export const state = () => ({
settings: {
dark: false,
autoRefresh: '5', // in minutes
autoSync: '0' // in minutes
autoSync: '0', // in minutes
mobilelist: true
}
});

Expand Down

0 comments on commit 5b9648a

Please sign in to comment.