mirror of
https://github.com/DCsunset/taskwarrior-webui.git
synced 2025-08-19 06:53:06 +02:00
feat(frontend): add basic UI
This commit is contained in:
parent
4cf86cdc72
commit
e4b5a58518
3 changed files with 292 additions and 10 deletions
|
@ -1,14 +1,41 @@
|
|||
<template>
|
||||
<v-layout
|
||||
column
|
||||
justify-center
|
||||
align-center
|
||||
>
|
||||
Hello
|
||||
</v-layout>
|
||||
<div class="px-md-6 px-lg-12">
|
||||
<v-row class="px-4 pt-4">
|
||||
<div class="headline d-flex align-center">{{ mode }}</div>
|
||||
<v-spacer />
|
||||
<v-select
|
||||
class="mb-2"
|
||||
:items="allModes"
|
||||
label="Display Mode"
|
||||
v-model="mode"
|
||||
style="max-width: 120px"
|
||||
hide-details
|
||||
/>
|
||||
</v-row>
|
||||
|
||||
<TaskList :tasks="tasks" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
};
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, computed } from '@vue/composition-api';
|
||||
import TaskList from '../components/TaskList.vue';
|
||||
|
||||
export default defineComponent({
|
||||
setup(_props, context) {
|
||||
context.root.$store.dispatch('fetchTasks');
|
||||
|
||||
const mode = ref('Tasks');
|
||||
const allModes = ['Tasks', 'Projects'];
|
||||
|
||||
const tasks = computed(() => context.root.$store.state.tasks);
|
||||
|
||||
return {
|
||||
mode,
|
||||
allModes,
|
||||
TaskList,
|
||||
tasks
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue