This repository has been archived on 2025-01-07. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
rebuilding-acquia/src/components/ApplicationCard.vue

71 lines
2.6 KiB
Vue
Raw Normal View History

2018-12-23 13:17:39 +00:00
<template>
2018-12-23 22:42:45 +00:00
<div>
<div v-if="display == 'grid'" class="bg-white p-4 border-grey rounded border flex-1">
2018-12-23 22:42:45 +00:00
<div class="flex flex-col h-full justify-between">
2018-12-24 08:46:33 +00:00
<div class="flex mb-12" :class="[display == 'grid' ? 'justify-between' : '']">
2018-12-23 13:17:39 +00:00
<div>
2018-12-23 22:42:45 +00:00
<div>
<router-link :to="{name: 'environments', params: {id: id}}" class="text-blue-dark no-underline hover:underline focus:underline"><h2 class="mb-1">{{ application.name }}</h2></router-link>
</div>
<div>
<a href="#0" class="text-blue-dark no-underline hover:underline focus:underline">{{ application.environments['prod'].url }}</a>
</div>
2018-12-23 13:17:39 +00:00
</div>
2018-12-23 22:42:45 +00:00
2018-12-24 15:10:35 +00:00
<div class="ml-2">
<button type="button" @click="starred = !starred" class="focus:outline-none">
<svg class="h-6 w-6 text-orange fill-current" role="presentation"><use :xlink:href="`/img/icons.symbol.svg#state__${starred ? 'starred' : 'unstarred'}`"></use></svg>
2018-12-23 22:42:45 +00:00
</button>
2018-12-23 13:17:39 +00:00
</div>
</div>
2018-12-23 22:42:45 +00:00
<application-tags :type="application.type" :level="application.level"></application-tags>
2018-12-23 13:17:39 +00:00
</div>
</div>
2018-12-24 08:46:33 +00:00
<div v-if="display == 'list'" class="bg-white p-3 border-grey border-b">
<div class="flex flex-row-reverse items-center justify-between">
<div class="flex flex-1 justify-between">
<div class="flex-1">
<router-link :to="{name: 'environments', params: {id: id}}" class="text-blue-dark no-underline hover:underline focus:underline"><h2 class="text-base font-normal mb-1">{{ application.name }}</h2></router-link>
</div>
<application-tags :type="application.type" :level="application.level" class="w-1/5"></application-tags>
<div class="w-2/5">
<a href="#0" class="text-blue-dark no-underline hover:underline focus:underline">{{ application.environments['prod'].url }}</a>
</div>
</div>
<div class="mr-3">
<button type="button" @click="starred = !starred" class="focus:outline-none">
<svg class="h-6 w-6 text-orange fill-current" role="presentation"><use :xlink:href="`/img/icons.symbol.svg#state__${starred ? 'starred' : 'unstarred'}`"></use></svg>
2018-12-24 08:46:33 +00:00
</button>
</div>
</div>
</div>
2018-12-23 13:17:39 +00:00
</div>
</template>
<script>
import ApplicationTags from '@/components/ApplicationTags'
export default {
components: {
ApplicationTags,
},
props: {
application: Object,
2018-12-24 08:46:33 +00:00
display: String,
2018-12-23 13:17:39 +00:00
id: Number,
},
data() {
return {
starred: false,
}
}
}
</script>