@silexlabs/silex-dashboard 1.0.33 → 1.0.34-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- <script src="/js/vue.global.js"></script>
1
+ <script src="/js/vue.global.prod.js"></script>
2
2
  <script src="/js/main.js"></script>
3
3
  <script type="module">
4
4
  window.addEventListener('load', function() {
@@ -8,6 +8,7 @@ window.addEventListener('load', function() {
8
8
  ConnectorType,
9
9
  } = types
10
10
  const {
11
+ setServerUrl,
11
12
  connectorList,
12
13
  logout,
13
14
  } = api
@@ -34,6 +35,10 @@ window.addEventListener('load', function() {
34
35
  methods: {
35
36
  async init() {
36
37
  try {
38
+ // Init Silex server path
39
+ // Go up 2 levels because of the language prefix + the page path
40
+ setServerUrl((window.location.origin + window.location.pathname.replace(/\/$/, '')).replace(/\/[^/]+\/[^/]+$/, ''))
41
+ // Start
37
42
  this.loading = true
38
43
  console.log('init')
39
44
  this.connectors = await connectorList({type: ConnectorType.STORAGE})
@@ -1,4 +1,4 @@
1
- <script src="/js/vue.global.js"></script>
1
+ <script src="/js/vue.global.prod.js"></script>
2
2
  <script src="/js/main.js"></script>
3
3
  <script type="module">
4
4
  const CONNECTORS_PATH = '/connectors/'
@@ -9,6 +9,7 @@ window.addEventListener('load', function() {
9
9
  ConnectorType,
10
10
  } = types
11
11
  const {
12
+ setServerUrl,
12
13
  getUser,
13
14
  logout,
14
15
  websiteDelete,
@@ -40,8 +41,10 @@ window.addEventListener('load', function() {
40
41
  methods: {
41
42
  async init() {
42
43
  try {
43
- // Debug
44
- window.app = this
44
+ // Init Silex server path
45
+ // Go up one level because of the language prefix
46
+ setServerUrl((window.location.origin + window.location.pathname.replace(/\/$/, '')).replace(/\/[^/]+$/, ''))
47
+ // Start
45
48
  const user = await getUser({type: ConnectorType.STORAGE})
46
49
  if(user) {
47
50
  this.user = user
@@ -163,7 +163,7 @@ input:focus {
163
163
 
164
164
  /*FX ANIMATIONS*/
165
165
  </style>
166
- <script src="/js/vue.global.js"></script>
166
+ <script src="/js/vue.global.prod.js"></script>
167
167
  <script src="/js/main.js"></script>
168
168
  <script type="module">
169
169
  window.addEventListener('load', function() {
@@ -173,6 +173,7 @@ window.addEventListener('load', function() {
173
173
  ConnectorType,
174
174
  } = types
175
175
  const {
176
+ setServerUrl,
176
177
  connectorList,
177
178
  logout,
178
179
  } = api
@@ -199,6 +200,10 @@ window.addEventListener('load', function() {
199
200
  methods: {
200
201
  async init() {
201
202
  try {
203
+ // Init Silex server path
204
+ // Go up 2 levels because of the language prefix + the page path
205
+ setServerUrl((window.location.origin + window.location.pathname.replace(/\/$/, '')).replace(/\/[^/]+\/[^/]+$/, ''))
206
+ // Start
202
207
  this.loading = true
203
208
  console.log('init')
204
209
  this.connectors = await connectorList({type: ConnectorType.STORAGE})
@@ -163,7 +163,7 @@ input:focus {
163
163
 
164
164
  /*FX ANIMATIONS*/
165
165
  </style>
166
- <script src="/js/vue.global.js"></script>
166
+ <script src="/js/vue.global.prod.js"></script>
167
167
  <script src="/js/main.js"></script>
168
168
  <script type="module">
169
169
  const CONNECTORS_PATH = '/connectors/'
@@ -174,6 +174,7 @@ window.addEventListener('load', function() {
174
174
  ConnectorType,
175
175
  } = types
176
176
  const {
177
+ setServerUrl,
177
178
  getUser,
178
179
  logout,
179
180
  websiteDelete,
@@ -205,8 +206,10 @@ window.addEventListener('load', function() {
205
206
  methods: {
206
207
  async init() {
207
208
  try {
208
- // Debug
209
- window.app = this
209
+ // Init Silex server path
210
+ // Go up one level because of the language prefix
211
+ setServerUrl((window.location.origin + window.location.pathname.replace(/\/$/, '')).replace(/\/[^/]+$/, ''))
212
+ // Start
210
213
  const user = await getUser({type: ConnectorType.STORAGE})
211
214
  if(user) {
212
215
  this.user = user
@@ -163,7 +163,7 @@ input:focus {
163
163
 
164
164
  /*FX ANIMATIONS*/
165
165
  </style>
166
- <script src="/js/vue.global.js"></script>
166
+ <script src="/js/vue.global.prod.js"></script>
167
167
  <script src="/js/main.js"></script>
168
168
  <script type="module">
169
169
  window.addEventListener('load', function() {
@@ -173,6 +173,7 @@ window.addEventListener('load', function() {
173
173
  ConnectorType,
174
174
  } = types
175
175
  const {
176
+ setServerUrl,
176
177
  connectorList,
177
178
  logout,
178
179
  } = api
@@ -199,6 +200,10 @@ window.addEventListener('load', function() {
199
200
  methods: {
200
201
  async init() {
201
202
  try {
203
+ // Init Silex server path
204
+ // Go up 2 levels because of the language prefix + the page path
205
+ setServerUrl((window.location.origin + window.location.pathname.replace(/\/$/, '')).replace(/\/[^/]+\/[^/]+$/, ''))
206
+ // Start
202
207
  this.loading = true
203
208
  console.log('init')
204
209
  this.connectors = await connectorList({type: ConnectorType.STORAGE})
@@ -163,7 +163,7 @@ input:focus {
163
163
 
164
164
  /*FX ANIMATIONS*/
165
165
  </style>
166
- <script src="/js/vue.global.js"></script>
166
+ <script src="/js/vue.global.prod.js"></script>
167
167
  <script src="/js/main.js"></script>
168
168
  <script type="module">
169
169
  const CONNECTORS_PATH = '/connectors/'
@@ -174,6 +174,7 @@ window.addEventListener('load', function() {
174
174
  ConnectorType,
175
175
  } = types
176
176
  const {
177
+ setServerUrl,
177
178
  getUser,
178
179
  logout,
179
180
  websiteDelete,
@@ -205,8 +206,10 @@ window.addEventListener('load', function() {
205
206
  methods: {
206
207
  async init() {
207
208
  try {
208
- // Debug
209
- window.app = this
209
+ // Init Silex server path
210
+ // Go up one level because of the language prefix
211
+ setServerUrl((window.location.origin + window.location.pathname.replace(/\/$/, '')).replace(/\/[^/]+$/, ''))
212
+ // Start
210
213
  const user = await getUser({type: ConnectorType.STORAGE})
211
214
  if(user) {
212
215
  this.user = user
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexlabs/silex-dashboard",
3
- "version": "1.0.33",
3
+ "version": "1.0.34-0",
4
4
  "description": "Dashboard for Silex v3",
5
5
  "main": ".silex.js",
6
6
  "scripts": {
@@ -24,7 +24,7 @@
24
24
  "homepage": "https://github.com/silexlabs/silex-dashboard#readme",
25
25
  "devDependencies": {
26
26
  "@11ty/eleventy": "^2.0.1",
27
- "@silexlabs/silex": "^3.0.0-alpha.66"
27
+ "@silexlabs/silex": "^3.0.0-alpha.89"
28
28
  },
29
29
  "dependencies": {
30
30
  "locale": "^0.1.0",