Skip to content

Commit

Permalink
Merge pull request #614 from codex-team/nuxt
Browse files Browse the repository at this point in the history
feat(event-overview): nuxt addons support
  • Loading branch information
neSpecc authored Oct 22, 2024
2 parents a19d84b + 19a7510 commit 0cad4d0
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 15 deletions.
3 changes: 3 additions & 0 deletions src/assets/sprite-icons/nuxt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 4 additions & 6 deletions src/assets/sprite-icons/vue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion src/components/event/Overview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,16 @@
v-if="getIntegrationAddons('vue')"
class="event-overview__section"
:addons="getIntegrationAddons('vue')"
icon="vue"
title="Vue"
/>
<DetailsAddons
v-if="getIntegrationAddons('nuxt')"
class="event-overview__section"
:addons="getIntegrationAddons('nuxt')"
icon="nuxt"
title="Nuxt"
/>
<DetailsAddons
v-if="hasContext"
class="event-overview__section"
Expand Down Expand Up @@ -112,7 +120,7 @@ export default Vue.extend({
return null;
}
const integrationToFilter = [ 'vue' ];
const integrationToFilter = [ 'vue', 'nuxt' ];
const filteredAddons = {};
Object.entries(this.event.payload.addons).forEach(([name, value]) => {
Expand Down
16 changes: 12 additions & 4 deletions src/components/event/details/DetailsAddons.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<template>
<DetailsBase>
<template #header>
{{ title }}
<template v-if="title === 'Vue' ">
<Icon symbol="vue" />
<template v-if="icon">
<Icon :symbol="icon" />
</template>
{{ title }}
</template>
<template #content>
<div
Expand Down Expand Up @@ -90,6 +90,14 @@ export default Vue.extend({
type: Object as PropType<EventAddons>,
required: true,
},
/**
* Integration framework logo
*/
icon: {
type: String,
default: '',
}
},
computed: {
},
Expand All @@ -101,7 +109,7 @@ export default Vue.extend({
* @param key - addon key
*/
isHTML(key: string): boolean {
return key === 'component' && this.title === 'Vue';
return key.toLowerCase() === 'component' && ['Vue', 'Nuxt'].includes(this.title);
},
},
});
Expand Down
9 changes: 5 additions & 4 deletions src/components/event/details/DetailsBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@ export default {
font-size: 12px;
letter-spacing: 0.15px;
text-transform: uppercase;
display: flex;
align-items: center;
gap: 4px;
.icon {
width: 16px;
height: 13px;
margin-top: -2px;
margin-left: 5px;
width: 20px;
height: 20px;
vertical-align: middle;
}
}
Expand Down

0 comments on commit 0cad4d0

Please sign in to comment.