admin-general.vue 5.9 KB

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