about.vue 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <template>
  2. <div class="flex flex-col justify-between items-center h-full py-2">
  3. <div />
  4. <div class="flex flex-col gap-4">
  5. <p class="text-center text-2xl text-semibold">Создано выпускниками колледжа</p>
  6. <div class="flex gap-4">
  7. <PersonCard
  8. name="Вадим Морозов"
  9. nickname="@horanchikk"
  10. avatar="vadim.png"
  11. github="https://github.com/horanchikk"
  12. vk="https://vk.com/kohima"
  13. tg="https://t.me/horanchikk"
  14. />
  15. <PersonCard
  16. name="Никита Фомин"
  17. nickname="@ethosa"
  18. avatar="nikita.png"
  19. github="https://github.com/ethosa"
  20. vk="https://vk.com/akihayase"
  21. tg="https://t.me/ethosa"
  22. />
  23. </div>
  24. <p class="text-center text-2xl text-semibold">с 💖</p>
  25. </div>
  26. <div class="flex flex-col justify-center gap-1">
  27. <p class="opacity-50 text-center" v-text="`Версия приложения - ${APP_VERSION}`" />
  28. <button
  29. @click="checkUpdates"
  30. :class="[
  31. 'h-[42px] w-[262px] flex items-center justify-center gap-2 px-4 py-2 rounded-lg border border-foreground hover:bg-foreground hover:text-black transition-colors',
  32. { 'loading': isLoading }
  33. ]"
  34. :disabled="isLoading"
  35. >
  36. <svg v-if="!isLoading" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  37. <path d="M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/>
  38. <path d="M3 3v5h5"/>
  39. <path d="M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16"/>
  40. <path d="M16 21h5v-5"/>
  41. </svg>
  42. {{ isLoading ? '' : 'Проверить обновления' }}
  43. </button>
  44. </div>
  45. </div>
  46. </template>
  47. <script setup lang="ts">
  48. import { useOTAStore } from '~/store/useOTAStore'
  49. import { ref } from 'vue'
  50. const { $config: { public: { APP_VERSION } } } = useNuxtApp()
  51. const otaStore = useOTAStore()
  52. const isLoading = ref(false)
  53. async function checkUpdates() {
  54. isLoading.value = true
  55. await otaStore.checkForUpdates()
  56. isLoading.value = false
  57. }
  58. definePageMeta({
  59. name: 'О приложении',
  60. middleware: ['user-only'],
  61. })
  62. </script>
  63. <style scoped>
  64. .loading {
  65. cursor: wait;
  66. opacity: 0.7;
  67. }
  68. </style>