1
0
Fork 0

feat: optimize print view for project views

This commit is contained in:
kolaente 2023-05-30 19:50:37 +02:00
parent b3666ec27e
commit 8e2c76a33e
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
4 changed files with 36 additions and 15 deletions

View File

@ -8,7 +8,8 @@
<MenuButton class="menu-button" />
<div v-if="currentProject?.id" class="project-title-wrapper">
<h1 class="project-title">{{ currentProject.title === '' ? $t('misc.loading') : getProjectTitle(currentProject) }}
<h1 class="project-title">
{{ currentProject.title === '' ? $t('misc.loading') : getProjectTitle(currentProject) }}
</h1>
<BaseButton :to="{ name: 'project.info', params: { projectId: currentProject.id } }" class="project-title-button">

View File

@ -24,12 +24,12 @@
}"
>
<div :class="{'content': hasContent}">
<slot />
<slot/>
</div>
</div>
<footer v-if="$slots.footer" class="card-footer">
<slot name="footer" />
<slot name="footer"/>
</footer>
</div>
</template>
@ -76,22 +76,27 @@ defineEmits(['close'])
<style lang="scss" scoped>
.card {
background-color: var(--white);
border-radius: $radius;
margin-bottom: 1rem;
border: 1px solid var(--card-border-color);
box-shadow: var(--shadow-sm);
background-color: var(--white);
border-radius: $radius;
margin-bottom: 1rem;
border: 1px solid var(--card-border-color);
box-shadow: var(--shadow-sm);
@media print {
box-shadow: none;
border: none;
}
}
.card-header {
box-shadow: none;
border-bottom: 1px solid var(--card-border-color);
border-radius: $radius $radius 0 0;
box-shadow: none;
border-bottom: 1px solid var(--card-border-color);
border-radius: $radius $radius 0 0;
}
.card-footer {
background-color: var(--grey-50);
border-top: 0;
background-color: var(--grey-50);
border-top: 0;
padding: var(--modal-card-head-padding);
display: flex;
justify-content: flex-end;

View File

@ -3,7 +3,11 @@
:class="{ 'is-loading': projectService.loading, 'is-archived': currentProject?.isArchived}"
class="loader-container"
>
<div class="switch-view-container">
<h1 class="project-title-print">
{{ getProjectTitle(currentProject) }}
</h1>
<div class="switch-view-container d-print-none">
<div class="switch-view">
<BaseButton
v-shortcut="'g l'"
@ -197,4 +201,15 @@ watch(
.is-archived .notification.is-warning {
margin-bottom: 1rem;
}
.project-title-print {
display: none;
font-size: 1.75rem;
text-align: center;
margin-bottom: .5rem;
@media print {
display: block;
}
}
</style>

View File

@ -55,7 +55,7 @@
<card :padding="false" :has-content="false" class="has-overflow">
<add-task
v-if="!project.isArchived && canWrite"
class="list-view__add-task"
class="list-view__add-task d-print-none"
ref="addTaskRef"
:default-position="firstNewPosition"
@taskAdded="updateTaskList"