Skip to content

Commit

Permalink
Merge pull request #381 from axonivy/fix-view-url
Browse files Browse the repository at this point in the history
XIVY-12602 Fix viewer url
  • Loading branch information
ivy-lli committed Nov 6, 2023
2 parents 8730d85 + 7f694c8 commit 050293e
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 33 deletions.
3 changes: 1 addition & 2 deletions integration/eclipse/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ async function initialize(connectionProvider: MessageConnection): Promise<void>
actionDispatcher.dispatch(EnableViewportAction.create());
actionDispatcher.dispatch(SwitchThemeAction.create({ theme }));
actionDispatcher.dispatch(ShowGridAction.create({ show: urlParameters.grid === 'true' ?? true }));
MonacoUtil.initStandalone(editorWorker);
MonacoEditorUtil.initMonaco(reactMonaco, theme);
MonacoUtil.initStandalone(editorWorker).then(() => MonacoEditorUtil.initMonaco(reactMonaco, theme));
actionDispatcher.dispatch(EnableInscriptionAction.create());
})
);
Expand Down
9 changes: 4 additions & 5 deletions integration/standalone/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ import * as reactMonaco from 'monaco-editor/esm/vs/editor/editor.api';
import './index.css';

const parameters = getParameters();
const app = parameters.get('app') ?? 'designer';
let server = parameters.get('server');
if (server === undefined) {
server = getServerDomain();
if (!server) {
server = getServerDomain().replace(app, '');
}
const app = parameters.get('app') ?? 'designer';
const id = 'ivy-glsp-process';
const diagramType = 'ivy-glsp-process';
const webSocketBase = `${isSecureConnection() ? 'wss' : 'ws'}://${server}/`;
Expand Down Expand Up @@ -86,8 +86,7 @@ async function initialize(connectionProvider: MessageConnection): Promise<void>
setViewerMode();
} else {
actionDispatcher.dispatch(EnableToolPaletteAction.create());
MonacoUtil.initStandalone(editorWorker);
MonacoEditorUtil.initMonaco(reactMonaco, theme);
MonacoUtil.initStandalone(editorWorker).then(() => MonacoEditorUtil.initMonaco(reactMonaco, theme));
actionDispatcher.dispatch(EnableInscriptionAction.create({ server: webSocketBase, app, pmv }));
}
if (!isInPreviewMode()) {
Expand Down
2 changes: 1 addition & 1 deletion integration/standalone/src/url-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function getServerDomain(): string {
}

export function isSecureConnection(): boolean {
return window.location.protocol === 'https:' || getParameters()['secure'] === 'true';
return window.location.protocol === 'https:' || getParameters().get('secure') === 'true';
}

export function isReadonly(): boolean {
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
],
"dependencies": {
"@eclipse-glsp/client": "1.1.0-RC10",
"@axonivy/editor-icons": "11.2.1-next.701",
"@axonivy/editor-icons": "11.2.1-next.711",
"@axonivy/process-editor-protocol": "11.2.1-next",
"showdown": "^2.1.0",
"toastify-js": "1.12.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/inscription/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"dependencies": {
"@eclipse-glsp/client": "1.1.0-RC10",
"@axonivy/process-editor": "11.2.1-next",
"@axonivy/inscription-core": "~11.2.1-next.701",
"@axonivy/inscription-editor": "~11.2.1-next.701",
"@axonivy/inscription-protocol": "~11.2.1-next.701",
"@axonivy/inscription-core": "~11.2.1-next.711",
"@axonivy/inscription-editor": "~11.2.1-next.711",
"@axonivy/inscription-protocol": "~11.2.1-next.711",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
6 changes: 4 additions & 2 deletions packages/inscription/src/inscription/inscription-ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { ClientContextProvider, MonacoEditorUtil, ThemeContextProvider, initQuer
import * as reactMonaco from 'monaco-editor/esm/vs/editor/editor.api';
import { InscriptionClient } from '@axonivy/inscription-protocol';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { InscriptionClientJsonRpc, IvyScriptLanguage } from '@axonivy/inscription-core';
import { InscriptionClientJsonRpc, IvyScriptLanguage, MonacoUtil } from '@axonivy/inscription-core';
import { SwitchThemeActionHandler } from '@axonivy/process-editor';
import { EnableInscriptionAction, SwitchThemeAction, ToggleInscriptionAction } from '@axonivy/process-editor-protocol';

Expand Down Expand Up @@ -119,7 +119,9 @@ export class InscriptionUi extends AbstractUIExtension implements IActionHandler
}
if (SwitchThemeAction.is(action)) {
this.updateInscriptionUi();
reactMonaco.editor.defineTheme(MonacoEditorUtil.DEFAULT_THEME_NAME, MonacoEditorUtil.themeData(action.theme));
MonacoUtil.monacoInitialized().then(() => {
reactMonaco.editor.defineTheme(MonacoEditorUtil.DEFAULT_THEME_NAME, MonacoEditorUtil.themeData(action.theme));
});
}
return;
}
Expand Down
38 changes: 19 additions & 19 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@
# yarn lockfile v1


"@axonivy/editor-icons@11.2.1-next.701", "@axonivy/editor-icons@11.2.1-next.701+58665f4":
version "11.2.1-next.701"
resolved "https://npmjs-registry.ivyteam.io/@axonivy/editor-icons/-/editor-icons-11.2.1-next.701.tgz#d6c1fe2adfeb29d86e8f45b92f87d45074f73907"
integrity sha512-DvaqyLbH0Hm46FQ/vqJlISQuGCguDQCIB3Ij0ghuqbRaKQCBsXgyEk6zDuWgv74iGyzSfAIDz49t9eIoMRAyEw==
"@axonivy/editor-icons@11.2.1-next.711", "@axonivy/editor-icons@11.2.1-next.711+b7ba620":
version "11.2.1-next.711"
resolved "https://npmjs-registry.ivyteam.io/@axonivy/editor-icons/-/editor-icons-11.2.1-next.711.tgz#3eec43f7b2d9c3e731236b72b3a1e6b53d70b4e4"
integrity sha512-7ks7ttFkP5sib1KH5d2AbmIW380DGIGiCyhxJG6ZDauKRH8nFlW88RetkPsmk2x89OQ394+WCLES8STk1ubLeQ==

"@axonivy/inscription-core@~11.2.1-next.701":
version "11.2.1-next.701"
resolved "https://npmjs-registry.ivyteam.io/@axonivy/inscription-core/-/inscription-core-11.2.1-next.701.tgz#c1c9f447e7f3cdccf62caf9b1b4999fe4e21e236"
integrity sha512-+SSobBc7KeUScHbrYMrbhxIffsU8qyCWgKmv9c+IhrlYURKNFN16Wa1jMXYiqG7Mw3ZsPaNM6PaMXKoFZo5bag==
"@axonivy/inscription-core@~11.2.1-next.711":
version "11.2.1-next.711"
resolved "https://npmjs-registry.ivyteam.io/@axonivy/inscription-core/-/inscription-core-11.2.1-next.711.tgz#498a8674463b481934fd00d76d026eadefaab0cb"
integrity sha512-K1YVSVB6g1CbREjC/RhJqPAzvOvyHAyNLMgeV7nmI3u+xEIH+OF+D8owzUpPi7LnQmgNIvp8c/y8ZdcZQ0iRUw==
dependencies:
"@axonivy/inscription-protocol" "11.2.1-next.701+58665f4"
"@axonivy/inscription-protocol" "11.2.1-next.711+b7ba620"
monaco-editor "^0.44.0"
monaco-editor-workers "^0.44.0"
monaco-languageclient "^6.6.1"
vscode-jsonrpc "^8.2.0"
vscode-languageserver-protocol "^3.17.5"
vscode-ws-jsonrpc "^3.0.0"

"@axonivy/inscription-editor@~11.2.1-next.701":
version "11.2.1-next.701"
resolved "https://npmjs-registry.ivyteam.io/@axonivy/inscription-editor/-/inscription-editor-11.2.1-next.701.tgz#69cec349a2a2d692080b5951fc7b81f86e8421d0"
integrity sha512-bUu/s+3axf/bzZcqvG0ZoD2NfjAgAdq2t/PrEJ6WjzBA0jbW+yQrcBbyTrn/yZzDTNqpQrgK1OPVb5egkS44EA==
"@axonivy/inscription-editor@~11.2.1-next.711":
version "11.2.1-next.711"
resolved "https://npmjs-registry.ivyteam.io/@axonivy/inscription-editor/-/inscription-editor-11.2.1-next.711.tgz#82fbfd524ce8a488ca26f4302536259b0af2c788"
integrity sha512-YlEnOYr+8lqkGszdtBPmeVOkkhhf3ViQnYwiyG6ObJm0M/EjScNE6ugmvd78WnY73Y76/tbvuIptdU5ohvHoKA==
dependencies:
"@axonivy/editor-icons" "11.2.1-next.701+58665f4"
"@axonivy/inscription-protocol" "11.2.1-next.701+58665f4"
"@axonivy/editor-icons" "11.2.1-next.711+b7ba620"
"@axonivy/inscription-protocol" "11.2.1-next.711+b7ba620"
"@monaco-editor/react" "^4.6.0"
"@radix-ui/react-accordion" "^1.1.2"
"@radix-ui/react-checkbox" "^1.0.4"
Expand All @@ -46,10 +46,10 @@
react-aria "^3.25.0"
react-error-boundary "^4.0.9"

"@axonivy/inscription-protocol@11.2.1-next.701+58665f4", "@axonivy/inscription-protocol@~11.2.1-next.701":
version "11.2.1-next.701"
resolved "https://npmjs-registry.ivyteam.io/@axonivy/inscription-protocol/-/inscription-protocol-11.2.1-next.701.tgz#caddc233962b0ad78e5df7b7fa368f38ab1b4bd1"
integrity sha512-O7R5FnI32H0ov64paTmCFiU1cV8HvP2OYRk3NNiifGEfUgHG+GL/Hd4i1Yej9VtsIHCTJt4TifO5r6jWAflL9A==
"@axonivy/inscription-protocol@11.2.1-next.711+b7ba620", "@axonivy/inscription-protocol@~11.2.1-next.711":
version "11.2.1-next.711"
resolved "https://npmjs-registry.ivyteam.io/@axonivy/inscription-protocol/-/inscription-protocol-11.2.1-next.711.tgz#1b8f964ee1198e417a0327b456a15058229590f4"
integrity sha512-LALEiAQfFTYayrSWmLdU2OnLR2bUgk2UwrY4Lyx245bVloWVE37WK2z+wRUshoHz2qtRkaweHFnyhCIsAfM+Qg==

"@babel/code-frame@^7.0.0":
version "7.18.6"
Expand Down

0 comments on commit 050293e

Please sign in to comment.