/livewallpaper-client-ui/components/layout/Footer.vue

https://github.com/giant-app/LiveWallpaper · Vue · 132 lines · 127 code · 5 blank · 0 comment · 0 complexity · b7ac849942c77e3b7e2df39293d18f4d MD5 · raw file

  1. <template>
  2. <footer class="footer">
  3. <div class="container">
  4. <div class="content">
  5. <div class="columns">
  6. <div class="column">
  7. <p>
  8. <a
  9. class="navbar-item"
  10. href="https://www.giantapp.cn"
  11. target="_blank"
  12. >
  13. {{
  14. $t('common.copyright', { studio: $t('common.studioName') })
  15. }}
  16. </a>
  17. </p>
  18. <b-field>
  19. <p class="control">
  20. <a
  21. class="button"
  22. href="https://github.com/giant-app"
  23. target="_blank"
  24. >
  25. <b-icon pack="fab" icon="github" />
  26. <span>GitHub</span>
  27. </a>
  28. </p>
  29. </b-field>
  30. <small class="navbar-item">{{ $t('common.poweredBy') }} </small>
  31. <small>
  32. <a class="navbar-item" href="mailto:mscoder@hotmail.com">
  33. {{ $t('common.disclaimer') }}
  34. </a>
  35. </small>
  36. <p v-if="beian">
  37. <small>
  38. <a
  39. class="navbar-item"
  40. v-if="$i18n.locale == 'zh'"
  41. href="https://beian.miit.gov.cn/"
  42. target="_blank"
  43. >
  44. ICP证蜀ICP备19028275号-1
  45. </a>
  46. </small>
  47. </p>
  48. </div>
  49. <div class="column">
  50. <nuxt-link
  51. :to="localePath('/')"
  52. class="navbar-item has-text-weight-semibold"
  53. >
  54. {{ $t('common.home') }}
  55. </nuxt-link>
  56. <b-dropdown position="is-top-left" style="z-index: 30">
  57. <button
  58. class="button is-light"
  59. slot="trigger"
  60. slot-scope="{ active }"
  61. >
  62. <b-icon pack="fas" icon="globe"></b-icon>
  63. <span> {{ currentLocale.name }}</span>
  64. <b-icon
  65. pack="fas"
  66. :icon="!active ? 'caret-up' : 'caret-down'"
  67. ></b-icon>
  68. </button>
  69. <b-dropdown-item has-link aria-role="menuitem">
  70. <a
  71. class="navbar-item"
  72. href="https://github.com/giant-app/livewallpaper_i18n"
  73. target="_blank"
  74. >
  75. {{ $t('common.lanContribute') }}
  76. </a>
  77. </b-dropdown-item>
  78. <hr class="navbar-divider" />
  79. <b-dropdown-item
  80. has-link
  81. v-for="locale in availableLocales"
  82. :key="locale.code"
  83. >
  84. <nuxt-link :to="switchLocalePath(locale.code)">
  85. {{ locale.name }}
  86. </nuxt-link>
  87. </b-dropdown-item>
  88. </b-dropdown>
  89. <small>
  90. <a
  91. target="_blank"
  92. href="https://giantapp.cn/post/other/contact"
  93. class="navbar-item"
  94. >
  95. {{ $t('common.contact') }}
  96. </a>
  97. </small>
  98. <small>
  99. <a
  100. target="_blank"
  101. href="https://support.qq.com/products/315103"
  102. class="navbar-item"
  103. >
  104. {{ $t('common.feedback') }}
  105. </a>
  106. </small>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. </footer>
  112. </template>
  113. <script>
  114. export default {
  115. props: ['copyright', 'github', 'beian'],
  116. computed: {
  117. availableLocales() {
  118. return this.$i18n.locales.filter((i) => i.code !== this.$i18n.locale)
  119. },
  120. currentLocale() {
  121. return this.$i18n.locales.find((i) => i.code === this.$i18n.locale)
  122. },
  123. },
  124. mounted() {},
  125. }
  126. </script>
  127. <style scoped></style>