mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
AudioMedia entity for loading & controlling a single audio media AudioMediaManagerService: Global audio state synchronization across tabs AudioAttachmentService + AudioAttachmentBlock for manipulating AttachmentBlock in affine - e.g., filling transcription (using mock endpoint for now) Added AudioBlock + AudioPlayer for rendering audio block in affine (new transcription block whose renderer is provided in affine) fix AF-2292 fix AF-2337
36 lines
846 B
TypeScript
36 lines
846 B
TypeScript
import './setup';
|
|
|
|
import { appConfigProxy } from '@affine/core/components/hooks/use-app-config-storage';
|
|
import { Telemetry } from '@affine/core/components/telemetry';
|
|
import { StrictMode } from 'react';
|
|
import { createRoot } from 'react-dom/client';
|
|
|
|
import { App } from './app';
|
|
|
|
function main() {
|
|
// load persistent config for electron
|
|
// TODO(@Peng): should be sync, but it's not necessary for now
|
|
appConfigProxy
|
|
.getSync()
|
|
.catch(() => console.error('failed to load app config'));
|
|
|
|
mountApp();
|
|
}
|
|
|
|
function mountApp() {
|
|
// oxlint-disable-next-line typescript-eslint/no-non-null-assertion
|
|
const root = document.getElementById('app')!;
|
|
createRoot(root).render(
|
|
<StrictMode>
|
|
<Telemetry />
|
|
<App />
|
|
</StrictMode>
|
|
);
|
|
}
|
|
|
|
try {
|
|
main();
|
|
} catch (err) {
|
|
console.error('Failed to bootstrap app', err);
|
|
}
|