admin-general.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template lang='pug'>
  2. v-container(fluid, fill-height, grid-list-lg)
  3. v-layout(row wrap)
  4. v-flex(xs12)
  5. .headline.primary--text {{ $t('admin:general.title') }}
  6. .subheading.grey--text {{ $t('admin:general.subtitle') }}
  7. v-form.pt-3
  8. v-layout(row wrap)
  9. v-flex(lg6 xs12)
  10. v-form
  11. v-card
  12. v-toolbar(color='primary', dark, dense, flat)
  13. v-toolbar-title
  14. .subheading {{ $t('admin:general.siteInfo') }}
  15. v-subheader General
  16. .px-3.pb-3
  17. v-text-field(label='Site Title', required, :counter='50', v-model='siteTitle', prepend-icon='public')
  18. v-divider
  19. v-subheader SEO
  20. .px-3.pb-3
  21. v-text-field(label='Site Description', :counter='255', prepend-icon='public')
  22. v-text-field(label='Site Keywords', :counter='255', prepend-icon='public')
  23. v-select(label='Meta Robots', chips, tags, :items='metaRobots', v-model='metaRobotsSelection', prepend-icon='public')
  24. v-divider
  25. v-subheader Analytics
  26. .px-3.pb-3
  27. v-text-field(
  28. label='Google Analytics ID'
  29. :counter='255'
  30. prepend-icon='public'
  31. persistent-hint
  32. hint='Property tracking ID for Google Analytics.'
  33. )
  34. v-divider
  35. v-subheader Footer Copyright
  36. .px-3.pb-3
  37. v-text-field(
  38. label='Company / Organization Name'
  39. v-model='company'
  40. :counter='255'
  41. prepend-icon='public'
  42. persistent-hint
  43. hint='Name to use when displaying copyright notice in the footer. Leave empty to hide.'
  44. )
  45. v-card-chin
  46. v-spacer
  47. v-btn(color='primary', @click='save')
  48. v-icon(left) chevron_right
  49. span Save
  50. v-flex(lg6 xs12)
  51. v-card
  52. v-toolbar(color='primary', dark, dense, flat)
  53. v-toolbar-title
  54. .subheading {{ $t('admin:general.siteBranding') }}
  55. v-card-text
  56. v-layout.pa-3(row, align-center)
  57. v-avatar(size='120', color='grey lighten-3', :tile='useSquareLogo')
  58. .ml-4
  59. v-layout(row, align-center)
  60. v-btn(color='teal', depressed, dark)
  61. v-icon(left) cloud_upload
  62. span Upload Logo
  63. v-btn(color='teal', depressed, disabled)
  64. v-icon(left) clear
  65. span Clear
  66. .caption.grey--text An image of 120x120 pixels is recommended for best results.
  67. .caption.grey--text SVG, PNG or JPG files only.
  68. v-switch(
  69. v-model='useSquareLogo'
  70. label='Use Square Logo Frame'
  71. color='primary'
  72. persistent-hint
  73. hint='Check this option if a round logo frame doesn\'t work with your logo.'
  74. )
  75. v-divider.mt-3
  76. v-switch(
  77. v-model='displayMascot'
  78. label='Display Wiki.js Mascot'
  79. color='primary'
  80. persistent-hint
  81. hint='Uncheck this box if you don\'t want Henry, Wiki.js mascot, to be displayed on client-facing pages.'
  82. )
  83. v-card-chin
  84. v-spacer
  85. v-btn(color='primary', @click='save')
  86. v-icon(left) chevron_right
  87. span Save
  88. v-card.mt-3
  89. v-toolbar(color='primary', dark, dense, flat)
  90. v-toolbar-title
  91. .subheading Features
  92. v-card-text
  93. v-switch(
  94. v-model='featurePageRatings'
  95. label='Page Ratings'
  96. color='primary'
  97. persistent-hint
  98. hint='Allow users to rate pages.'
  99. )
  100. v-divider.mt-3
  101. v-switch(
  102. v-model='featurePersonalWiki'
  103. label='Personal Wikis'
  104. color='primary'
  105. persistent-hint
  106. hint='Allow users to have their own personal wiki.'
  107. )
  108. v-card-chin
  109. v-spacer
  110. v-btn(color='primary', @click='save')
  111. v-icon(left) chevron_right
  112. span Save
  113. </template>
  114. <script>
  115. import { sync } from 'vuex-pathify'
  116. export default {
  117. data() {
  118. return {
  119. metaRobotsSelection: ['Index', 'Follow'],
  120. metaRobots: ['Index', 'Follow', 'No Index', 'No Follow'],
  121. useSquareLogo: false,
  122. displayMascot: true,
  123. featurePageRatings: true,
  124. featurePersonalWiki: true
  125. }
  126. },
  127. computed: {
  128. siteTitle: sync('site/title'),
  129. company: sync('site/company')
  130. },
  131. methods: {
  132. async save () {
  133. this.$store.commit('showNotification', {
  134. message: 'Configuration saved successfully.',
  135. style: 'success',
  136. icon: 'check'
  137. })
  138. }
  139. }
  140. }
  141. </script>
  142. <style lang='scss'>
  143. </style>