admin-general.vue 5.6 KB

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