mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-03 08:18:52 +02:00
EQMS-1435: Enable watermark in obsolete documents (#8032)
* EQMS-1435: Enable waterwark in obsolete documents Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com> * added watermark to the doc Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com> --------- Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>
This commit is contained in:
+40
-4
@@ -20,7 +20,7 @@
|
||||
import { getClient } from '@hcengineering/presentation'
|
||||
import view from '@hcengineering/view'
|
||||
import attachment, { Attachment } from '@hcengineering/attachment'
|
||||
import documents from '@hcengineering/controlled-documents'
|
||||
import documents, { DocumentState } from '@hcengineering/controlled-documents'
|
||||
import { Editor, Heading } from '@hcengineering/text-editor'
|
||||
import {
|
||||
CollaboratorEditor,
|
||||
@@ -34,8 +34,9 @@
|
||||
highlightUpdateCommand,
|
||||
getNodeElement
|
||||
} from '@hcengineering/text-editor-resources'
|
||||
import { navigate, EditBox, Scroller } from '@hcengineering/ui'
|
||||
import { navigate, EditBox, Scroller, Label } from '@hcengineering/ui'
|
||||
import { getCollaborationUser, getObjectLinkFragment } from '@hcengineering/view-resources'
|
||||
import plugin from '../../plugin'
|
||||
|
||||
import {
|
||||
$areDocumentCommentPopupsOpened as areDocumentCommentPopupsOpened,
|
||||
@@ -248,7 +249,7 @@
|
||||
<TableOfContents items={headings} enumerated={true} on:select={(ev) => handleShowHeading(ev.detail)} />
|
||||
</div>
|
||||
<Scroller>
|
||||
<div class="content">
|
||||
<div class="content relative">
|
||||
<DocumentTitle>
|
||||
{#if $isEditable}
|
||||
<EditBox
|
||||
@@ -262,6 +263,13 @@
|
||||
{$controlledDocument.title}
|
||||
{/if}
|
||||
</DocumentTitle>
|
||||
{#if $controlledDocument.state === DocumentState.Obsolete}
|
||||
<div class="watermark-container">
|
||||
{#each { length: 24 } as _, i}
|
||||
<div class="watermark"><Label label={plugin.string.Obsolete} /></div>
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
<CollaboratorEditor
|
||||
bind:this={textEditor}
|
||||
object={$controlledDocument}
|
||||
@@ -351,6 +359,34 @@
|
||||
}
|
||||
|
||||
.bottomSpacing {
|
||||
padding-bottom: 30vh;
|
||||
padding-bottom: 55vh;
|
||||
}
|
||||
|
||||
.watermark-container {
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 35rem;
|
||||
padding-top: 20rem;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.watermark {
|
||||
z-index: 100;
|
||||
margin: auto;
|
||||
height: 4rem;
|
||||
width: 100%;
|
||||
color: var(--theme-divider-color);
|
||||
font-size: 8rem;
|
||||
transform: rotate(-45deg);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@
|
||||
$controlledDocument != null &&
|
||||
(isOrgSpace
|
||||
? $controlledDocument.state !== DocumentState.Effective
|
||||
: ![DocumentState.Effective, DocumentState.Obsolete, DocumentState.Archived].includes($controlledDocument.state))
|
||||
: ![DocumentState.Effective, DocumentState.Archived].includes($controlledDocument.state))
|
||||
</script>
|
||||
|
||||
{#if $controlledDocument !== null}
|
||||
|
||||
Reference in New Issue
Block a user