2019-05-06 15:58:18 +00:00
|
|
|
<template>
|
2019-05-21 10:13:21 +00:00
|
|
|
<div class="mb-2 border-solid border-gray-300 rounded border shadow-sm">
|
2019-05-06 15:58:18 +00:00
|
|
|
<div v-if="remoterepos.length > 0">
|
2019-05-21 10:13:21 +00:00
|
|
|
<label
|
|
|
|
|
class="block px-4 py-2 border-b"
|
|
|
|
|
v-for="(repo, index) in remoterepos"
|
|
|
|
|
v-bind:key="repo.id"
|
|
|
|
|
@click="select(index)"
|
|
|
|
|
>
|
2022-02-23 15:13:44 +00:00
|
|
|
<input type="radio" :checked="selectedrepo == index" />
|
|
|
|
|
{{ repo.path }}
|
2019-05-21 10:13:21 +00:00
|
|
|
</label>
|
2019-05-06 15:58:18 +00:00
|
|
|
</div>
|
2019-05-21 10:13:21 +00:00
|
|
|
<div v-else class="block px-4 py-2 border-b">No remote repositories</div>
|
2019-05-06 15:58:18 +00:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
components: {},
|
2022-02-23 15:13:44 +00:00
|
|
|
name: 'remoterepos',
|
2019-05-06 15:58:18 +00:00
|
|
|
props: {
|
2022-02-23 15:13:44 +00:00
|
|
|
remoterepos: Array,
|
2019-05-06 15:58:18 +00:00
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2022-02-23 15:13:44 +00:00
|
|
|
selectedrepo: null,
|
2019-05-06 15:58:18 +00:00
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
select(index) {
|
|
|
|
|
this.selectedrepo = index;
|
2022-02-23 15:13:44 +00:00
|
|
|
this.$emit('reposelected', this.remoterepos[index].path);
|
|
|
|
|
},
|
|
|
|
|
},
|
2019-05-06 15:58:18 +00:00
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
2022-02-23 15:13:44 +00:00
|
|
|
<style scoped lang="scss"></style>
|