mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
fix: address comments (#3044)
* fix: address comments * fix unread notification mocks * fix row click for notification --------- Co-authored-by: Matt Hill <mattnine@protonmail.com>
This commit is contained in:
@@ -12,15 +12,15 @@ import { getErrorMessage } from '../services/error.service'
|
||||
@Component({
|
||||
template: `
|
||||
@if (error()) {
|
||||
<tui-notification appearance="negative" safeLinks>
|
||||
{{ error() }}
|
||||
</tui-notification>
|
||||
<tui-notification appearance="negative" safeLinks [innerHTML]="error()" />
|
||||
}
|
||||
|
||||
@if (content(); as result) {
|
||||
<div safeLinks [innerHTML]="result | markdown | dompurify"></div>
|
||||
} @else {
|
||||
<tui-loader textContent="Loading" [style.height.%]="100" />
|
||||
@if (!error()) {
|
||||
<tui-loader textContent="Loading" [style.height.%]="100" />
|
||||
}
|
||||
}
|
||||
`,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
@@ -34,14 +34,10 @@ import { getErrorMessage } from '../services/error.service'
|
||||
],
|
||||
})
|
||||
export class MarkdownComponent {
|
||||
private readonly data =
|
||||
injectContext<TuiDialogContext<void, { content: Observable<string> }>>({
|
||||
optional: true,
|
||||
})?.data || inject(ActivatedRoute).snapshot.data
|
||||
|
||||
readonly content = toSignal<string>(this.data['content'])
|
||||
readonly error = toSignal(
|
||||
this.data['content'].pipe(
|
||||
protected readonly data = injectContext<{ data: Observable<string> }>().data
|
||||
protected readonly content = toSignal<string>(this.data)
|
||||
protected readonly error = toSignal(
|
||||
this.data.pipe(
|
||||
ignoreElements(),
|
||||
catchError(e => of(getErrorMessage(e))),
|
||||
),
|
||||
|
||||
@@ -95,6 +95,9 @@ $wide-modal: 900px;
|
||||
--tw-color-zinc-800: 39 39 42;
|
||||
--tw-color-zinc-900: 24 24 27;
|
||||
--tw-color-zinc-950: 9 9 11;
|
||||
|
||||
--tui-font-text: 'Proxima Nova', system-ui;
|
||||
--tui-font-heading: 'Proxima Nova', system-ui;
|
||||
}
|
||||
|
||||
body {
|
||||
@@ -172,14 +175,6 @@ a {
|
||||
font-weight: 300;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.06rem;
|
||||
margin: 0rem 0 1rem 0;
|
||||
margin: 0 0 1rem 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
margin-top: 1rem;
|
||||
|
||||
:first-child {
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user