feat: add paste hint on homescreen
Inform users they can paste a list of items to create a new task.
This commit is contained in:
@@ -27,7 +27,10 @@ const handlePaste = (event: ClipboardEvent) => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
router.push({ name: 'new-task', state: { initialSteps: JSON.stringify(steps) } })
|
router.push({
|
||||||
|
name: 'new-task',
|
||||||
|
state: { initialSteps: JSON.stringify(steps) }
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@@ -42,13 +45,20 @@ onUnmounted(() => {
|
|||||||
<template>
|
<template>
|
||||||
<main>
|
<main>
|
||||||
<div class="content-tasks columns is-centered is-vcentered">
|
<div class="content-tasks columns is-centered is-vcentered">
|
||||||
<div class="new-task-container column buttons">
|
<div class="new-task-container column">
|
||||||
<router-link :to="{ name: 'new-task' }" class="button is-primary">
|
<div class="buttons">
|
||||||
new task
|
<router-link :to="{ name: 'new-task' }" class="button is-primary">
|
||||||
</router-link>
|
new task
|
||||||
<button v-if="hasTask" class="button is-danger" @click="resetTasks">
|
</router-link>
|
||||||
clear the list
|
<button v-if="hasTask" class="button is-danger" @click="resetTasks">
|
||||||
</button>
|
clear the list
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<section class="message is-info paste-hint">
|
||||||
|
<div class="message-body">
|
||||||
|
Paste a list of items to directly create a new task
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<task-list class="column task-list" />
|
<task-list class="column task-list" />
|
||||||
</div>
|
</div>
|
||||||
@@ -87,6 +97,11 @@ main {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.paste-hint {
|
||||||
|
margin: 1rem;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
.task-list {
|
.task-list {
|
||||||
max-height: 60vh;
|
max-height: 60vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|||||||
Reference in New Issue
Block a user