Skip to content
Merged
16 changes: 8 additions & 8 deletions sbom.cdx.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json",
"bomFormat": "CycloneDX",
"specVersion": "1.5",
"serialNumber": "urn:uuid:b6f82c4f-31d3-47a9-b458-59149fefc9c8",
"serialNumber": "urn:uuid:4553dd3d-8dce-414d-b473-33581a9b9630",
"version": 1,
"metadata": {
"timestamp": "2026-03-20T08:08:22Z",
"timestamp": "2026-03-20T08:21:12Z",
"tools": [
{
"name": "composer",
Expand Down Expand Up @@ -82,10 +82,10 @@
}
],
"component": {
"bom-ref": "conductionnl/openregister-dev-feature/nextcloud-vue-package-usage",
"bom-ref": "conductionnl/openregister-dev-feature/REGISTERS-480/data-sources-page",
"type": "application",
"name": "openregister",
"version": "dev-feature/nextcloud-vue-package-usage",
"version": "dev-feature/REGISTERS-480/data-sources-page",
"group": "conductionnl",
"description": "Quickly build data registers based on schema.json",
"author": "Conduction b.v.",
Expand All @@ -96,15 +96,15 @@
}
}
],
"purl": "pkg:composer/conductionnl/openregister@dev-feature/nextcloud-vue-package-usage",
"purl": "pkg:composer/conductionnl/openregister@dev-feature/REGISTERS-480/data-sources-page",
"properties": [
{
"name": "cdx:composer:package:distReference",
"value": "89dc6c516258c4947cb64a8fe465497435f79156"
"value": "e34f86e513a3d4e76024abe79a3c29addcb4c8fe"
},
{
"name": "cdx:composer:package:sourceReference",
"value": "89dc6c516258c4947cb64a8fe465497435f79156"
"value": "e34f86e513a3d4e76024abe79a3c29addcb4c8fe"
},
{
"name": "cdx:composer:package:type",
Expand Down Expand Up @@ -55484,7 +55484,7 @@
"ref": "webonyx/graphql-php-15.31.1.0"
},
{
"ref": "conductionnl/openregister-dev-feature/nextcloud-vue-package-usage",
"ref": "conductionnl/openregister-dev-feature/REGISTERS-480/data-sources-page",
"dependsOn": [
"adbario/php-dot-notation-3.3.0.0",
"elasticsearch/elasticsearch-8.19.0.0",
Expand Down
169 changes: 43 additions & 126 deletions src/components/cards/ApplicationCard.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
<script setup>
import { applicationStore, navigationStore } from '../../store/store.js'
</script>

<template>
<div class="applicationCard">
<div class="cardHeader">
<h2 v-tooltip.bottom="item.description">
<ApplicationOutline :size="20" />
{{ item.name }}
<span v-if="item.active !== undefined"
:class="item.active ? 'statusBadge--active' : 'statusBadge--inactive'">
{{ item.active ? 'Active' : 'Inactive' }}
</span>
</h2>
<CnCard
:title="item.name"
:description="item.description"
:title-tooltip="item.description"
:labels="applicationLabels"
:stats="applicationStats">
<template #icon>
<ApplicationOutline :size="20" />
</template>
<template #actions>
<NcActions :primary="true" menu-name="Actions">
<template #icon>
<DotsHorizontal :size="20" />
Expand All @@ -32,36 +28,17 @@ import { applicationStore, navigationStore } from '../../store/store.js'
Delete
</NcActionButton>
</NcActions>
</div>

<div class="applicationInfo">
<p v-if="item.description" class="description">
{{ item.description }}
</p>
<div class="applicationStats">
<div v-if="item.version" class="stat">
<span class="statLabel">{{ t('openregister', 'Version') }}:</span>
<span class="statValue">{{ item.version }}</span>
</div>
<div v-if="item.configurations" class="stat">
<span class="statLabel">{{ t('openregister', 'Configurations') }}:</span>
<span class="statValue">{{ item.configurations.length }}</span>
</div>
<div v-if="item.registers" class="stat">
<span class="statLabel">{{ t('openregister', 'Registers') }}:</span>
<span class="statValue">{{ item.registers.length }}</span>
</div>
<div v-if="item.schemas" class="stat">
<span class="statLabel">{{ t('openregister', 'Schemas') }}:</span>
<span class="statValue">{{ item.schemas.length }}</span>
</div>
</div>
</div>
</div>
</template>
</CnCard>
</template>

<script setup>
import { applicationStore, navigationStore } from '../../store/store.js'
</script>

<script>
import { NcActions, NcActionButton } from '@nextcloud/vue'
import { CnCard } from '@conduction/nextcloud-vue'
import ApplicationOutline from 'vue-material-design-icons/ApplicationOutline.vue'
import DotsHorizontal from 'vue-material-design-icons/DotsHorizontal.vue'
import Pencil from 'vue-material-design-icons/Pencil.vue'
Expand All @@ -70,6 +47,7 @@ import TrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue'
export default {
name: 'ApplicationCard',
components: {
CnCard,
NcActions,
NcActionButton,
ApplicationOutline,
Expand All @@ -83,91 +61,30 @@ export default {
required: true,
},
},
computed: {
applicationLabels() {
if (this.item.active === undefined) return []
return [{
text: this.item.active ? 'Active' : 'Inactive',
variant: this.item.active ? 'success' : 'default',
}]
},
applicationStats() {
return [
this.item.version
? { label: t('openregister', 'Version'), value: this.item.version }
: null,
this.item.configurations
? { label: t('openregister', 'Configurations'), value: this.item.configurations.length }
: null,
this.item.registers
? { label: t('openregister', 'Registers'), value: this.item.registers.length }
: null,
this.item.schemas
? { label: t('openregister', 'Schemas'), value: this.item.schemas.length }
: null,
].filter(Boolean)
},
},
}
</script>

<style scoped lang="scss">
.applicationCard {
padding: 16px;
border: 1px solid var(--color-border);
border-radius: var(--border-radius-large);
background: var(--color-main-background);
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}

.cardHeader {
display: flex;
justify-content: space-between;
align-items: flex-start;

h2 {
display: flex;
align-items: center;
gap: 6px;
font-size: 16px;
margin: 0;
flex-wrap: wrap;
}
}

.statusBadge--active,
.statusBadge--inactive {
display: inline-block;
padding: 2px 8px;
border-radius: 12px;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
}

.statusBadge--active {
background: var(--color-success);
color: white;
}

.statusBadge--inactive {
background: var(--color-text-lighter);
color: white;
}

.applicationInfo {
padding: 12px 0 0;
}

.description {
color: var(--color-text-lighter);
margin-bottom: 12px;
font-style: italic;
word-wrap: break-word;
overflow-wrap: break-word;
display: -webkit-box;
-webkit-line-clamp: 3;
line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}

.applicationStats {
display: flex;
flex-direction: column;
gap: 4px;
}

.stat {
display: flex;
justify-content: space-between;
}

.statLabel {
color: var(--color-text-lighter);
font-size: 12px;
}

.statValue {
font-weight: 600;
font-size: 12px;
}
</style>
Loading
Loading