Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions packages/design-system/src/components/OcCard/OcCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
<component :is="tag" class="oc-card">
<div v-if="hasSlotHeader" class="oc-card-header" :class="headerClass">
<slot name="header">
<img
v-if="logoUrl"
:src="logoUrl"
alt=""
:aria-hidden="true"
class="max-w-48 max-h-48 absolute -translate-y-16"
/>
<component :is="titleTag" v-if="title" class="mt-0">
{{ title }}
</component>
Expand Down Expand Up @@ -41,11 +34,6 @@ export interface Props {
* @default 'h2'
*/
titleTag?: string
/**
* @docs The url of the logo to be rendered in the header of this card.
* @default ''
*/
logoUrl?: string
/**
* @docs The classes to be applied on the card header
* @default ''
Expand Down Expand Up @@ -82,7 +70,6 @@ const {
tag = 'div',
title,
titleTag = 'h2',
logoUrl = '',
headerClass = '',
bodyClass = '',
footerClass = ''
Expand All @@ -91,7 +78,7 @@ const {
const slots = defineSlots<Slots>()

const hasSlotHeader = computed(() => {
return Object.hasOwn(slots, 'header') || !!unref(title) || !!unref(logoUrl)
return Object.hasOwn(slots, 'header') || !!unref(title)
})
const hasSlotFooter = computed(() => {
return Object.hasOwn(slots, 'footer')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ exports[`ResourceTiles component > renders an array of spaces correctly 1`] = `
</div>
<ul data-v-67d39700="" class="oc-list oc-tiles grid justify-start gap-3">
<li data-v-67d39700="" class="oc-tiles-item has-item-context-menu">
<div data-v-67d39700="" class="oc-card oc-tile-card flex flex-col h-full shadow-none [&amp;.item-accentuated]:bg-role-secondary-container bg-role-surface-container hover:bg-role-surface-container-highest outline outline-role-surface-container-highest" data-item-id="1" draggable="false">
<!--v-if-->
<div class="oc-card w-full sm:w-sm">
<!--v-if-->
<div class="oc-card-body p-0"><a data-v-88f32d7c="" attrs="[object Object]" target="_self" draggable="false" class="oc-resource-link max-w-full oc-card-media-top flex justify-center items-center m-0 w-full relative aspect-[16/9]" tabindex="-1"></a>
<div class="p-2">
Expand Down Expand Up @@ -63,7 +64,8 @@ exports[`ResourceTiles component > renders an array of spaces correctly 1`] = `
</div>
</li>
<li data-v-67d39700="" class="oc-tiles-item has-item-context-menu">
<div data-v-67d39700="" class="oc-card oc-tile-card flex flex-col h-full shadow-none [&amp;.item-accentuated]:bg-role-secondary-container bg-role-surface-container hover:bg-role-surface-container-highest outline outline-role-surface-container-highest" data-item-id="2" draggable="false">
<!--v-if-->
<div class="oc-card w-full sm:w-sm">
<!--v-if-->
<div class="oc-card-body p-0"><a data-v-88f32d7c="" attrs="[object Object]" target="_self" draggable="false" class="oc-resource-link max-w-full oc-card-media-top flex justify-center items-center m-0 w-full relative aspect-[16/9]" tabindex="-1"></a>
<div class="p-2">
Expand Down
2 changes: 1 addition & 1 deletion packages/web-runtime/src/components/Topbar/TopBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<oc-image
:src="currentTheme.logo"
:alt="sidebarLogoAlt"
class="oc-logo-image align-middle ml-1 max-h-[28px] select-none"
class="oc-logo-image align-middle ml-1 h-[28px] w-auto select-none"
/>
</picture>
</router-link>
Expand Down
2 changes: 1 addition & 1 deletion packages/web-runtime/src/pages/accessDenied.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="h-screen flex flex-col justify-center items-center p-4">
<img v-if="logoImg" :src="logoImg" alt="" :aria-hidden="true" class="max-w-48 max-h-48 mb-4" />
<oc-card
:logo-url="logoImg"
:title="cardTitle"
body-class="text-center"
header-class="text-center"
Expand Down
2 changes: 1 addition & 1 deletion packages/web-runtime/src/pages/logout.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="h-screen flex flex-col justify-center items-center p-4">
<img v-if="logoImg" :src="logoImg" alt="" :aria-hidden="true" class="max-w-48 max-h-48 mb-4" />
<oc-card
:logo-url="logoImg"
:title="cardTitle"
body-class="text-center"
header-class="text-center"
Expand Down
2 changes: 1 addition & 1 deletion packages/web-runtime/src/pages/missingOrInvalidConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
class="bg-role-chrome h-dvh max-h-dvh overflow-y-hidden flex flex-col justify-center items-center p-4"
>
<h1 class="sr-only" v-text="$gettext('Error')" />
<img v-if="logoImg" :src="logoImg" alt="" :aria-hidden="true" class="max-w-48 max-h-48 mb-4" />
<oc-card
:logo-url="logoImg"
:title="$gettext('Missing or invalid config')"
body-class="text-center"
header-class="text-center"
Expand Down
2 changes: 1 addition & 1 deletion packages/web-runtime/src/pages/oidcCallback.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="h-screen flex flex-col justify-center items-center">
<img v-if="logoImg" :src="logoImg" alt="" :aria-hidden="true" class="max-w-48 max-h-48 mb-4" />
<oc-card
:logo-url="logoImg"
:title="cardTitle"
body-class="w-sm text-center"
class="rounded-lg"
Expand Down
2 changes: 1 addition & 1 deletion packages/web-runtime/src/pages/resolvePublicLink.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="oc-link-resolve h-screen flex flex-col justify-center items-center p-4">
<img v-if="logoImg" :src="logoImg" alt="" :aria-hidden="true" class="max-w-48 max-h-48 mb-4" />
<oc-card
:logo-url="logoImg"
:title="headerTitle"
body-class="text-center"
header-class="text-center"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`access denied page > renders component 1`] = `
"<div class="h-screen flex flex-col justify-center items-center p-4">
<div class="oc-card w-full sm:w-sm rounded-lg">
<div class="oc-card-header text-center"><img src="themes/opencloud/assets/logo.svg" alt="" aria-hidden="true" class="max-w-48 max-h-48 absolute -translate-y-16">
"<div class="h-screen flex flex-col justify-center items-center p-4"><img src="themes/opencloud/assets/logo.svg" alt="" aria-hidden="true" class="max-w-48 max-h-48 mb-4">
<div class="oc-card w-full sm:w-sm">
<div class="oc-card-header text-center">
<h2 class="mt-0">Not logged in</h2>
</div>
<div class="oc-card-body text-center">
Expand Down