add DM tour
- rearrange script includes on feed pages - add DM tour to close
This commit is contained in:
parent
791847d75e
commit
2f2ab5c24a
5 changed files with 101 additions and 10 deletions
81
bookwyrm/templates/guided_tour/direct_messages.html
Normal file
81
bookwyrm/templates/guided_tour/direct_messages.html
Normal file
|
@ -0,0 +1,81 @@
|
|||
{% load i18n %}
|
||||
|
||||
<script>
|
||||
const tour = new Shepherd.Tour({
|
||||
exitOnEsc: true,
|
||||
});
|
||||
|
||||
tour.addSteps([
|
||||
{
|
||||
text: "{% trans 'You can send a Message to other Bookwyrm users. To send a message, use the <strong>@</strong> symbol with their username(s), followed by your message.<br><br>For example: <strong>@mouse Hi Mouse, I love reading books too!</strong>' %}",
|
||||
title: "{% trans 'Direct Messages' %}",
|
||||
attachTo: {
|
||||
element: "#tour-dm-box",
|
||||
on: "left"
|
||||
},
|
||||
highlightClass: 'tour-element-highlight',
|
||||
buttons: [
|
||||
{
|
||||
action() {
|
||||
disableGuidedTour(csrf_token);
|
||||
return this.complete();
|
||||
},
|
||||
secondary: true,
|
||||
text: "{% trans 'End Tour' %}",
|
||||
classes: "is-danger",
|
||||
},
|
||||
{
|
||||
action() {
|
||||
return this.next();
|
||||
},
|
||||
text: "{% trans 'Next' %}",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "{% trans 'If your message is about a book you\'re reading, click here to put a spoiler alert on your message. This will hide your message behind the warning until the recipient wants to see it.' %}",
|
||||
title: "{% trans 'Spoilers' %}",
|
||||
attachTo: {
|
||||
element: "#tour-spoiler-alert",
|
||||
on: "left"
|
||||
},
|
||||
buttons: [
|
||||
{
|
||||
action() {
|
||||
return this.back();
|
||||
},
|
||||
secondary: true,
|
||||
text: "{% trans 'Back' %}",
|
||||
},
|
||||
{
|
||||
action() {
|
||||
return this.next();
|
||||
},
|
||||
text: "{% trans 'Next' %}",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "{% trans 'Thanks for taking the tour. There\'s lots more to explore, but now you are familiar with the basics needed to enjoy Bookwyrm. Happy reading!' %}",
|
||||
title: "{% trans 'You\'re ready!' %}",
|
||||
buttons: [
|
||||
{
|
||||
action() {
|
||||
return this.back();
|
||||
},
|
||||
secondary: true,
|
||||
text: "{% trans 'Back' %}",
|
||||
},
|
||||
{
|
||||
action() {
|
||||
disableGuidedTour(csrf_token);
|
||||
return this.complete();
|
||||
},
|
||||
text: "{% trans 'Finish tour' %}",
|
||||
},
|
||||
],
|
||||
},
|
||||
])
|
||||
|
||||
tour.start()
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue