forked from boos/BoosAPI
feat(desktop): embed BoosAPI Desktop client as a subproject
Vendor the rebranded BoosAPI Desktop client (Tauri + Vue) into metapi as a monorepo subdirectory under desktop/. Source only — node_modules, dist, Cargo target and the upstream .git history are excluded. desktop/ keeps its own independent Cargo workspace (desktop/src-tauri with crates/*); it is not part of the backend boosapi crate, so a `cargo check` at the metapi root still compiles only the backend. Build the desktop app from desktop/src-tauri per desktop/README.md. Note: app icons are still placeholder assets pending the final BoosAPI logo. The updater signing keys live outside the repo and are not included.
This commit is contained in:
+79
@@ -0,0 +1,79 @@
|
||||
import type { AngularRenderableNode, AngularRenderContext } from '../shared/node-helpers'
|
||||
import { CommonModule } from '@angular/common'
|
||||
import { ChangeDetectionStrategy, Component, forwardRef, Input } from '@angular/core'
|
||||
import { NestedRendererComponent } from '../NestedRenderer/NestedRenderer.component'
|
||||
import {
|
||||
escapeHtml,
|
||||
getNodeList,
|
||||
getString,
|
||||
sanitizeClassToken,
|
||||
} from '../shared/node-helpers'
|
||||
|
||||
@Component({
|
||||
selector: 'markstream-angular-fallback-node',
|
||||
standalone: true,
|
||||
imports: [CommonModule, forwardRef(() => NestedRendererComponent)],
|
||||
template: `
|
||||
<div
|
||||
class="markstream-nested-custom"
|
||||
[class]="customClassName"
|
||||
[attr.data-markstream-custom-tag]="customTag"
|
||||
>
|
||||
<markstream-angular-nested-renderer
|
||||
*ngIf="hasNestedContent; else fallbackBody"
|
||||
[node]="node"
|
||||
[context]="context"
|
||||
[indexPrefix]="nestedPrefix"
|
||||
[final]="resolvedFinal"
|
||||
[customHtmlTags]="context?.customHtmlTags"
|
||||
[parseOptions]="context?.parseOptions"
|
||||
[customMarkdownIt]="context?.customMarkdownIt"
|
||||
/>
|
||||
|
||||
<ng-template #fallbackBody>
|
||||
<div [innerHTML]="rawBodyHtml"></div>
|
||||
</ng-template>
|
||||
</div>
|
||||
`,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class FallbackComponent {
|
||||
@Input({ required: true }) node!: AngularRenderableNode
|
||||
@Input() context?: AngularRenderContext
|
||||
@Input() indexKey?: string
|
||||
|
||||
get children() {
|
||||
return getNodeList((this.node as any)?.children)
|
||||
}
|
||||
|
||||
get hasChildren() {
|
||||
return this.children.length > 0
|
||||
}
|
||||
|
||||
get hasNestedContent() {
|
||||
return this.hasChildren || !!getString((this.node as any)?.content)
|
||||
}
|
||||
|
||||
get customTag() {
|
||||
return getString((this.node as any)?.tag || (this.node as any)?.type)
|
||||
}
|
||||
|
||||
get customClassName() {
|
||||
const tag = sanitizeClassToken(this.customTag) || 'node'
|
||||
return `markstream-nested-custom--${tag}`
|
||||
}
|
||||
|
||||
get rawBodyHtml() {
|
||||
return escapeHtml(getString((this.node as any)?.raw))
|
||||
}
|
||||
|
||||
get nestedPrefix() {
|
||||
return `${this.indexKey || 'fallback'}-children`
|
||||
}
|
||||
|
||||
get resolvedFinal() {
|
||||
if (typeof (this.node as any)?.loading === 'boolean')
|
||||
return !(this.node as any).loading
|
||||
return this.context?.final
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user