Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ const getDirectories = source => {
.filter(i => isDirectory(i))
}

const serverUrl = process.env.SERVER_URL;
console.log('Server URL:', serverUrl);

// capture the list of files to build for extensions and ext-locales
const extensionDirs = getDirectories('src/editor/extensions')
Expand Down Expand Up @@ -67,10 +65,6 @@ const config = [
}
],
plugins: [
replace({
preventAssignment: true,
'process.env.SERVER_URL': JSON.stringify(process.env.SERVER_URL),
}),
copy({
targets: [
{
Expand Down
2 changes: 0 additions & 2 deletions src/editor/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,6 @@ class Editor extends EditorStartup {
// Add empty password
this.password = null

this.server = process.env.SERVER_URL;

// Add empty ID and secret key
// this.graphicId = ""// Math.random().toString().replace('9', '').substring(2, 8)
// this.secretKey = "" // crypto.randomUUID()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ var secretKey = ""
var graphic = ""
var coords = ""
var placeId = ""
var serverUrl = window.APP_CONFIG?.serverUrl

const loadExtensionTranslation = async function (svgEditor) {
let translationModule
Expand Down Expand Up @@ -315,9 +316,9 @@ connectedCallback () {
svgString = await encryptData(svgEditor, svgString)

if (graphicId == ""){
xhr.open("POST", svgEditor.server + "create");
xhr.open("POST", serverUrl + "monarch/create");
} else {
xhr.open("POST", svgEditor.server + "update/" + graphicId);
xhr.open("POST", serverUrl + "monarch/update/" + graphicId);
}
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Access-Control-Allow-Origin", '*');
Expand Down
1 change: 1 addition & 0 deletions src/editor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ <h1>End</h1>
</body>
<!-- If you do not wish to add extensions by URL, you can add calls
within the following file to svgEditor.setConfig -->
<script src="config.js"></script>
<script type="module">
import Editor from './Editor.js'
/* for available options see the file `docs/tutorials/ConfigOptions.md */
Expand Down