From e08e72dd1057804f6d285c73558f0d2450561b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= <root@acid-chicken.com> Date: Wed, 6 Mar 2019 12:31:58 +0900 Subject: [PATCH] Use meta url instead of constant url --- .../app/common/views/components/forkit.vue | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/client/app/common/views/components/forkit.vue b/src/client/app/common/views/components/forkit.vue index ea6b86b66..7acb1cf94 100644 --- a/src/client/app/common/views/components/forkit.vue +++ b/src/client/app/common/views/components/forkit.vue @@ -1,5 +1,5 @@ <template> -<a class="a" href="https://github.com/syuilo/misskey" target="_blank" title="View source on GitHub"> +<a class="a" :href="repo" target="_blank" title="View source on GitHub"> <svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="aria-hidden"> <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path> <path class="octo-arm" d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor"></path> @@ -8,9 +8,25 @@ </a> </template> +<script lang="ts"> +import Vue from 'vue' +export default Vue.extend({ + data() { + return { + repositoryUrl: 'https://github.com/syuilo/misskey' + }; + }, + created() { + this.$root.getMeta().then(meta => { + if (meta.maintainer) + this.repositoryUrl = meta.maintainer.repository_url; + }); + } +}); +</script> + + <style lang="stylus" scoped> - - .a display block