Compare commits

..

2 Commits

Author SHA1 Message Date
izzy lyseggen 22e6ea7515 fix(ui): init apollo url 2021-11-09 14:40:07 +00:00
izzy lyseggen 81af3da8b4 feat(build): rel paths for build and puts logging 2021-11-09 11:17:08 +00:00
4 changed files with 9 additions and 8 deletions
+2
View File
@@ -21,6 +21,8 @@ module SpeckleSystems
# Run from localhost or from build files
DEV_MODE = false
puts("Loading Speckle Connector v#{CONNECTOR_VERSION} from #{DEV_MODE ? 'dev' : 'build'}")
unless file_loaded?(__FILE__)
+4 -4
View File
@@ -42,13 +42,13 @@ module SpeckleSystems::SpeckleConnector
init_local_accounts
end
puts DEV_MODE
if DEV_MODE
puts('Launching Speckle Connector from http://localhost:8081')
@dialog.set_url("http://localhost:8081")
else
basedir = File.join(File.dirname(File.expand_path(__FILE__)), "html")
html = File.read(File.join(basedir, "index.html"))
@dialog.set_html(html)
html_file = File.join(File.dirname(File.expand_path(__FILE__)), "html", "index.html")
puts("Launching Speckle Connector from #{html_file}")
@dialog.set_file(html_file)
end
@dialog.show
+2
View File
@@ -11,6 +11,8 @@ const AUTH_TOKEN = `SpeckleSketchup.AuthToken`
if (process.env.NODE_ENV === 'development') {
localStorage.setItem(AUTH_TOKEN, process.env.VUE_APP_DEV_TOKEN)
localStorage.setItem('serverUrl', process.env.VUE_APP_DEFAULT_SERVER)
} else if (!localStorage.getItem('serverUrl')) {
localStorage.setItem('serverUrl', 'https://speckle.xyz')
}
const authLink = setContext((_, { headers }) => {
+1 -4
View File
@@ -1,10 +1,7 @@
const path = require('path')
module.exports = {
publicPath:
process.env.NODE_ENV === 'production'
? path.resolve(__dirname, '../speckle_connector', 'html')
: '/',
publicPath: "./",
outputDir: path.resolve(__dirname, '../speckle_connector', 'html'),
transpileDependencies: ['vuetify', '@speckle/objectloader']
}