You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
2.4 KiB

  1. <template lang='pug'>
  2. v-bottom-sheet(v-model='isShown', inset, persistent)
  3. v-toolbar(color='orange', flat)
  4. v-icon(color='white') vpn_lock
  5. v-toolbar-title.white--text Page Access
  6. v-spacer
  7. v-btn(icon, dark, @click.native='close')
  8. v-icon close
  9. v-card.pa-3(tile)
  10. v-form
  11. v-container(fluid)
  12. v-layout(row, wrap)
  13. v-flex(xs12)
  14. v-switch(label='Published', v-model='isPublished', color='primary')
  15. v-flex(xs6)
  16. v-menu(ref='menuPublishStart', lazy='', :close-on-content-click='false', v-model='isPublishStartShown', transition='scale-transition', offset-y='', full-width='', :nudge-right='40', min-width='290px', :return-value.sync='publishStartDate')
  17. v-text-field(slot='activator', label='Publish starting on...', v-model='publishStartDate', prepend-icon='event', readonly)
  18. v-date-picker(v-model='publishStartDate', :min='(new Date()).toISOString().substring(0, 10)', reactive)
  19. v-spacer
  20. v-btn(flat='', color='primary', @click='isPublishStartShown = false') Cancel
  21. v-btn(flat='', color='primary', @click='$refs.menuPublishStart.save(date)') OK
  22. v-flex(xs6)
  23. v-menu(ref='menuPublishEnd', lazy='', :close-on-content-click='false', v-model='isPublishEndShown', transition='scale-transition', offset-y='', full-width='', :nudge-right='40', min-width='290px', :return-value.sync='publishEndDate')
  24. v-text-field(slot='activator', label='Publish ending on...', v-model='publishEndDate', prepend-icon='event', readonly)
  25. v-date-picker(v-model='publishEndDate', :min='(new Date()).toISOString().substring(0, 10)', reactive)
  26. v-spacer
  27. v-btn(flat='', color='primary', @click='isPublishEndShown = false') Cancel
  28. v-btn(flat='', color='primary', @click='$refs.menuPublishEnd.save(date)') OK
  29. v-card-actions
  30. v-btn(color='green', dark) Save
  31. v-btn(@click.native='close') Cancel
  32. </template>
  33. <script>
  34. export default {
  35. data() {
  36. return {
  37. isShown: false,
  38. isPublished: true,
  39. isPublishStartShown: false,
  40. isPublishEndShown: false,
  41. publishStartDate: '',
  42. publishEndDate: ''
  43. }
  44. },
  45. mounted() {
  46. this.isShown = true
  47. },
  48. methods: {
  49. close() {
  50. this.isShown = false
  51. this.$parent.closeModal()
  52. }
  53. }
  54. }
  55. </script>
  56. <style lang='scss'>
  57. </style>