[WIKI-400] feat: page navigation pane (#7206)
* init: page navigation pane * chore: outline and info tabs * chore: asset download endpoint * chore: realtime document info updates * chore: add support for code splitting * fix: formatting * refactor: image block id generation * chore: implement translation * refactor: assets list storage logic * fix: build errors * fix: image extension name * refactor: add support for additional asset items * refactor: asset extraction logic * chore: add translations * fix: merge conflicts resolved from preview * chore: remove version history option from the dropdown * chore: query params handling * chore: remove unnecessary logic * refactor: empty state components * fix: empty state asset path
This commit is contained in:
parent
cfe169c6d7
commit
0b159c4963
83 changed files with 2185 additions and 767 deletions
|
|
@ -22,6 +22,21 @@ export const getEditorAssetSrc = (args: TEditorSrcArgs): string | undefined => {
|
|||
return url;
|
||||
};
|
||||
|
||||
/**
|
||||
* @description generate the file source using assetId
|
||||
* @param {TEditorSrcArgs} args
|
||||
*/
|
||||
export const getEditorAssetDownloadSrc = (args: TEditorSrcArgs): string | undefined => {
|
||||
const { assetId, projectId, workspaceSlug } = args;
|
||||
let url: string | undefined = "";
|
||||
if (projectId) {
|
||||
url = getFileURL(`/api/assets/v2/workspaces/${workspaceSlug}/projects/${projectId}/download/${assetId}/`);
|
||||
} else {
|
||||
url = getFileURL(`/api/assets/v2/workspaces/${workspaceSlug}/download/${assetId}/`);
|
||||
}
|
||||
return url;
|
||||
};
|
||||
|
||||
export const getTextContent = (jsx: JSX.Element | React.ReactNode | null | undefined): string => {
|
||||
if (!jsx) return "";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue