Skip to content

Commit

Permalink
Display an unsaved changes pop up
Browse files Browse the repository at this point in the history
  • Loading branch information
dtinth committed Apr 4, 2020
1 parent 57eaebc commit a215e36
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions options.html
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,17 @@ <h2 class="text-2xl text-d7fc70 mt-6 mb-4">

<save-button :store="store"></save-button>
</div>
<div class="h-24"></div>
<div
class="fixed inset-x-0 bottom-0 px-8 bg-090807"
v-show="store.changed"
>
<div class="max-w-xl pt-4">
<save-button :store="store">
<div class="text-yellow-300 font-bold">Unsaved changes</div>
</save-button>
</div>
</div>
</template>
</div>

Expand Down
2 changes: 1 addition & 1 deletion options.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Vue.config.devtools = false
props: ['store'],
template: html`
<div class="flex items-center mb-4">
<div class="w-1/3"></div>
<div class="w-1/3"><slot></slot></div>
<div>
<button
@click="store.save"
Expand Down

0 comments on commit a215e36

Please sign in to comment.