Skip to content

Commit 5d9f62d

Browse files
Init home page (#9735)
Signed-off-by: Kristina Fefelova <[email protected]>
1 parent 8246b96 commit 5d9f62d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1168
-82
lines changed

models/card/src/plugin.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { mergeIds, type Resource } from '@hcengineering/platform'
2121
import { type Location, type ResolvedLocation } from '@hcengineering/ui/src/types'
2222
import { type LocationData } from '@hcengineering/workbench'
2323
import { type ActionCategory, type Action, type ViewAction } from '@hcengineering/view'
24-
import { type TagCategory, type TagElement } from '@hcengineering/tags'
24+
import { type TagCategory } from '@hcengineering/tags'
2525

2626
export default mergeIds(cardId, card, {
2727
app: {
@@ -57,9 +57,5 @@ export default mergeIds(cardId, card, {
5757
CardCustomLinkMatch: '' as Resource<(doc: Doc) => boolean>,
5858
CardCustomLinkEncode: '' as Resource<(doc: Doc) => Location>,
5959
CheckRelationsSectionVisibility: '' as Resource<(doc: Card) => Promise<boolean>>
60-
},
61-
label: {
62-
Subscribed: '' as Ref<TagElement>,
63-
NewMessages: '' as Ref<TagElement>
6460
}
6561
})

packages/presentation/src/components/LiteMessageViewer.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
import LiteNode from './markup/lite/LiteNode.svelte'
1919
2020
export let message: Markup | MarkupNode
21+
export let colorInherit: boolean = false
2122
2223
$: node = typeof message === 'string' ? markupToJSON(message) : message
2324
</script>
2425

25-
<div class="text-markup-view">
26-
<LiteNode {node} />
26+
<div class="text-markup-view" class:colorInherit>
27+
<LiteNode {node} {colorInherit} />
2728
</div>

packages/presentation/src/components/markup/lite/LiteNode.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919
import NodeMarks from '../NodeMarks.svelte'
2020
2121
export let node: MarkupNode
22+
export let colorInherit: boolean = false
2223
</script>
2324

2425
{#if node}
2526
{@const marks = node.marks ?? []}
2627

2728
<NodeMarks {marks}>
28-
<LiteNodeContent {node} />
29+
<LiteNodeContent {node} {colorInherit} />
2930
</NodeMarks>
3031
{/if}

packages/presentation/src/components/markup/lite/LiteNodeContent.svelte

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import { getBlobRef } from '../../../preview'
2323
2424
export let node: MarkupNode
25+
export let colorInherit: boolean = false
2526
2627
function toRefBlob (blobId: AttrValue): Ref<Blob> {
2728
return blobId as Ref<Blob>
@@ -48,15 +49,15 @@
4849
{@const nodes = node.content ?? []}
4950

5051
{#if node.type === MarkupNodeType.doc}
51-
<LiteNodes {nodes} />
52+
<LiteNodes {nodes} {colorInherit} />
5253
{:else if node.type === MarkupNodeType.text}
5354
{node.text}
5455
{:else if node.type === MarkupNodeType.paragraph}
55-
<p class="p-inline contrast" class:overflow-label={true} style:margin="0">
56-
<LiteNodes {nodes} />
56+
<p class="p-inline" class:overflow-label={true} style:margin="0" class:contrast={!colorInherit} class:colorInherit>
57+
<LiteNodes {nodes} {colorInherit} />
5758
</p>
5859
{:else if node.type === MarkupNodeType.blockquote}
59-
<LiteNodes {nodes} />
60+
<LiteNodes {nodes} {colorInherit} />
6061
{:else if node.type === MarkupNodeType.horizontal_rule}
6162
<!-- nothing-->
6263
{:else if node.type === MarkupNodeType.code_block}
@@ -69,7 +70,7 @@
6970
}
7071
]}
7172
>
72-
<LiteNodes {nodes} />
73+
<LiteNodes {nodes} {colorInherit} />
7374
</NodeMarks>
7475
</p>
7576
{:else if node.type === MarkupNodeType.reference}
@@ -80,7 +81,7 @@
8081
{#if objectClass !== undefined && objectId !== undefined}
8182
<ObjectNode _id={toRef(objectId)} _class={toClassRef(objectClass)} title={objectLabel} />
8283
{:else}
83-
<LiteNodes {nodes} />
84+
<LiteNodes {nodes} {colorInherit} />
8485
{/if}
8586
{:else if node.type === MarkupNodeType.emoji}
8687
<span class="emoji">
@@ -100,9 +101,15 @@
100101
<!-- TODO not implemented -->
101102
{:else if node.type === MarkupNodeType.subLink}
102103
<sub>
103-
<LiteNodes {nodes} />
104+
<LiteNodes {nodes} {colorInherit} />
104105
</sub>
105106
{:else}
106-
<LiteNodes {nodes} />
107+
<LiteNodes {nodes} {colorInherit} />
107108
{/if}
108109
{/if}
110+
111+
<style lang="scss">
112+
.colorInherit {
113+
color: inherit;
114+
}
115+
</style>

packages/presentation/src/components/markup/lite/LiteNodes.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
import LiteNode from './LiteNode.svelte'
1919
2020
export let nodes: MarkupNode[]
21+
export let colorInherit: boolean = false
2122
</script>
2223

2324
{#if nodes}
2425
{#each nodes as node}
25-
<LiteNode {node} />
26+
<LiteNode {node} {colorInherit} />
2627
{/each}
2728
{/if}

packages/theme/styles/_text-editor.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
color: var(--theme-text-primary-color);
1414
margin: 0.25rem 0;
1515

16+
&.colorInherit {
17+
color: inherit;
18+
}
19+
1620
.suggestion {
1721
padding-left: 0.25rem;
1822
color: var(--theme-link-color);
@@ -544,7 +548,7 @@
544548
}
545549
}
546550

547-
&.embed-youtube {
551+
&.embed-youtube {
548552
iframe {
549553
margin: 0;
550554
padding: 0;
@@ -585,4 +589,4 @@
585589

586590
.select-text .text-editor-image-container {
587591
user-select: all;
588-
}
592+
}

packages/ui/lang/cs.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@
9999
"WeeksWOValue": "{weeks, plural, =1 {týden} other {týdny}}",
100100
"MonthsWOValue": "{months, plural, =1 {měsíc} other {měsíce}}",
101101
"Filter": "Filtr",
102-
"Clear": "Vymazat"
102+
"Clear": "Vymazat",
103+
"Yesterday": "Včera",
104+
"ThisWeek": "Tento týden",
105+
"ThisMonth": "Tento měsíc",
106+
"ThisYear": "Tento rok"
103107
}
104108
}

packages/ui/lang/de.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@
100100
"WeeksWOValue": "{weeks, plural, =1 {Woche} other {Wochen}}",
101101
"MonthsWOValue": "{months, plural, =1 {Monat} other {Monate}}",
102102
"Filter": "Filter",
103-
"Clear": "Löschen"
103+
"Clear": "Löschen",
104+
"Yesterday": "Gestern",
105+
"ThisWeek": "Diese Woche",
106+
"ThisMonth": "Diesen Monat",
107+
"ThisYear": "Dieses Jahr"
104108
}
105109
}

packages/ui/lang/en.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@
100100
"WeeksWOValue": "{weeks, plural, =1 {week} other {weeks}}",
101101
"MonthsWOValue": "{months, plural, =1 {month} other {months}}",
102102
"Filter": "Filter",
103-
"Clear": "Clear"
103+
"Clear": "Clear",
104+
"Yesterday": "Yesterday",
105+
"ThisWeek": "This week",
106+
"ThisMonth": "This month",
107+
"ThisYear": "This year"
104108
}
105109
}

0 commit comments

Comments
 (0)