SettingsAbout.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <div class="max-w-lg">
  3. <div class="p-3 mb-2 bg-box-transparent rounded-full inline-block">
  4. <img src="@/assets/svg/logo.svg" class="w-14" />
  5. </div>
  6. <p class="text-2xl font-semibold">Automa</p>
  7. <p class="mb-2 mt-1">Version: {{ extensionVersion }}</p>
  8. <p class="text-gray-600 dark:text-gray-200">
  9. Automa is a chrome extension for browser automation. From auto-fill forms,
  10. doing a repetitive task, taking a screenshot, to scraping data of the
  11. website, it's up to you what you want to do with this extension.
  12. </p>
  13. <div class="mt-4 space-x-2">
  14. <a
  15. v-for="link in links"
  16. :key="link.name"
  17. v-tooltip.group="link.name"
  18. :href="link.url"
  19. target="_blank"
  20. class="inline-block p-2 rounded-lg transition hoverable"
  21. >
  22. <v-remixicon :name="link.icon" />
  23. </a>
  24. </div>
  25. <div class="border-b dark:border-gray-700 my-8"></div>
  26. <h2 class="text-xl font-semibold">Contributors</h2>
  27. <p class="mt-1 text-gray-600 dark:text-gray-200">
  28. Thanks to everyone who has submitted issues, made suggestions, and
  29. generally helped make this a better project.
  30. </p>
  31. <div class="mt-4 gap-2 mb-12 grid grid-cols-7">
  32. <a
  33. v-for="contributor in store.state.contributors"
  34. :key="contributor.username"
  35. v-tooltip.group="contributor.username"
  36. :href="contributor.url"
  37. target="_blank"
  38. rel="noopener"
  39. >
  40. <img
  41. :src="contributor.avatar"
  42. :alt="`${contributor.username} avatar`"
  43. class="w-16 rounded-lg"
  44. />
  45. </a>
  46. </div>
  47. <h3>Translators</h3>
  48. </div>
  49. </template>
  50. <script setup>
  51. /* eslint-disable camelcase */
  52. import { onMounted } from 'vue';
  53. import { useStore } from 'vuex';
  54. import browser from 'webextension-polyfill';
  55. import { useGroupTooltip } from '@/composable/groupTooltip';
  56. import { communities } from '@/utils/shared';
  57. useGroupTooltip();
  58. const store = useStore();
  59. const extensionVersion = browser.runtime.getManifest().version;
  60. const links = [
  61. ...communities,
  62. { name: 'Website', icon: 'riGlobalLine', url: 'https://www.automa.site' },
  63. {
  64. name: 'Documentation',
  65. icon: 'riBook3Line',
  66. url: 'https://docs.automa.site',
  67. },
  68. {
  69. name: 'Donate',
  70. icon: 'riHandHeartLine',
  71. url: 'https://paypal.me/akholid060',
  72. },
  73. ];
  74. onMounted(async () => {
  75. if (store.contributors) return;
  76. try {
  77. const response = await fetch(
  78. 'https://api.github.com/repos/Kholid060/automa/contributors'
  79. );
  80. const contributors = (await response.json()).reduce(
  81. (acc, { type, avatar_url, login, html_url }) => {
  82. if (type !== 'Bot') {
  83. acc.push({
  84. username: login,
  85. url: html_url,
  86. avatar: avatar_url,
  87. });
  88. }
  89. return acc;
  90. },
  91. []
  92. );
  93. store.commit('updateState', {
  94. key: 'contributors',
  95. value: contributors,
  96. });
  97. } catch (error) {
  98. console.error(error);
  99. }
  100. });
  101. </script>