refactor: externalize document editor adapter runtime
This commit is contained in:
@@ -2802,7 +2802,13 @@ mod tests {
|
||||
assert!(html.contains(r#"data-testid="mnote-document-workspace""#));
|
||||
assert!(html.contains(r#"data-mnote-resource-tab-host="true""#));
|
||||
assert!(html.contains("__MNOTE_DOCUMENT_PANES_BOOTSTRAP__"));
|
||||
assert!(html.contains("openResourceInActiveTab"));
|
||||
assert!(html.contains(
|
||||
r#"<script type="module" src="/api/mnote-browser-runtime/document-editor-adapter-runtime.js"></script>"#
|
||||
));
|
||||
assert!(
|
||||
include_str!("../../browser/document-editor-adapter-runtime.js")
|
||||
.contains("openResourceInActiveTab")
|
||||
);
|
||||
assert!(!html.contains(r#"<script id="__MNOTE_PAGE_AGGREGATE__""#));
|
||||
}
|
||||
|
||||
|
||||
@@ -142,6 +142,10 @@ pub fn build_router(state: AppState) -> Router {
|
||||
"/api/mnote-browser-runtime/document-conflict-panel-runtime.js",
|
||||
get(web_shell::document_conflict_panel_runtime_asset),
|
||||
)
|
||||
.route(
|
||||
"/api/mnote-browser-runtime/document-editor-adapter-runtime.js",
|
||||
get(web_shell::document_editor_adapter_runtime_asset),
|
||||
)
|
||||
.route("/api/search/documents", post(search::documents))
|
||||
.route(
|
||||
"/api/search/local-index/refresh",
|
||||
@@ -555,6 +559,7 @@ mod tests {
|
||||
"/api/mnote-browser-runtime/tree-live-controller.js",
|
||||
"/api/mnote-browser-runtime/tree-shell-runtime.js",
|
||||
"/api/mnote-browser-runtime/document-conflict-panel-runtime.js",
|
||||
"/api/mnote-browser-runtime/document-editor-adapter-runtime.js",
|
||||
] {
|
||||
let response = app(false)
|
||||
.oneshot(
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user