mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-01 23:40:25 +00:00
Added the tourSteps in content.coffee
This commit is contained in:
parent
69c4c257d9
commit
c849ceddf1
2 changed files with 49 additions and 33 deletions
|
|
@ -70,4 +70,47 @@ module.exports = {
|
|||
{type: 'reward', text: '9gag', notes: '', value: 5 }
|
||||
{type: 'reward', text: 'Coffee', notes: '', value: 5 }
|
||||
]
|
||||
|
||||
tourSteps: [
|
||||
{
|
||||
element: "#avatar"
|
||||
title: "Welcome to HabitRPG"
|
||||
content: "Welcome to HabitRPG, a habit-tracker which treats your goals like a Role Playing Game."
|
||||
}
|
||||
{
|
||||
element: "#bars"
|
||||
title: "Acheive goals and level up"
|
||||
content: "As you accomplish goals, you level up. If you fail your goals, you lose hit points. Lose all your HP and you die."
|
||||
}
|
||||
{
|
||||
element: "ul.habits"
|
||||
title: "Habits"
|
||||
content: "Habits are goals that you constantly track."
|
||||
placement: "bottom"
|
||||
}
|
||||
{
|
||||
element: "ul.dailys"
|
||||
title: "Dailies"
|
||||
content: "Dailies are goals that you want to complete once a day."
|
||||
placement: "bottom"
|
||||
}
|
||||
{
|
||||
element: "ul.todos"
|
||||
title: "Todos"
|
||||
content: "Todos are one-off goals which need to be completed eventually."
|
||||
placement: "bottom"
|
||||
}
|
||||
{
|
||||
element: "ul.rewards"
|
||||
title: "Rewards"
|
||||
content: "As you complete goals, you earn gold to buy rewards. Buy them liberally - rewards are integral in forming good habits."
|
||||
placement: "bottom"
|
||||
}
|
||||
{
|
||||
element: "ul.habits li:first-child"
|
||||
title: "Hover over comments"
|
||||
content: "Different task-types have special properties. Hover over each task's comment for more information. When you're ready to get started, delete the existing tasks and add your own."
|
||||
placement: "right"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -165,39 +165,12 @@ ready (model) ->
|
|||
setupSortable(type) for type in ['habit', 'daily', 'todo', 'reward']
|
||||
|
||||
tour = new Tour()
|
||||
tour.addStep
|
||||
element: "#avatar"
|
||||
title: "Welcome to HabitRPG"
|
||||
content: "Welcome to HabitRPG, a habit-tracker which treats your goals like a Role Playing Game."
|
||||
tour.addStep
|
||||
element: "#bars"
|
||||
title: "Acheive goals and level up"
|
||||
content: "As you accomplish goals, you level up. If you fail your goals, you lose hit points. Lose all your HP and you die."
|
||||
tour.addStep
|
||||
element: "ul.habits"
|
||||
title: "Habits"
|
||||
content: "Habits are goals that you constantly track."
|
||||
placement: "bottom"
|
||||
tour.addStep
|
||||
element: "ul.dailys"
|
||||
title: "Dailies"
|
||||
content: "Dailies are goals that you want to complete once a day."
|
||||
placement: "bottom"
|
||||
tour.addStep
|
||||
element: "ul.todos"
|
||||
title: "Todos"
|
||||
content: "Todos are one-off goals which need to be completed eventually."
|
||||
placement: "bottom"
|
||||
tour.addStep
|
||||
element: "ul.rewards"
|
||||
title: "Rewards"
|
||||
content: "As you complete goals, you earn gold to buy rewards. Buy them liberally - rewards are integral in forming good habits."
|
||||
placement: "bottom"
|
||||
tour.addStep
|
||||
element: "ul.habits li:first-child"
|
||||
title: "Hover over comments"
|
||||
content: "Different task-types have special properties. Hover over each task's comment for more information. When you're ready to get started, delete the existing tasks and add your own."
|
||||
placement: "right"
|
||||
for step in content.tourSteps
|
||||
tour.addStep
|
||||
element: step.element
|
||||
title: step.title
|
||||
content: step.content
|
||||
placement: step.placement
|
||||
tour.start()
|
||||
|
||||
#TODO: implement this for completed tab
|
||||
|
|
|
|||
Loading…
Reference in a new issue