File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 154
154
v-on:hide-modal =" closeSecretLinkModal"
155
155
:title =" modalTitle"
156
156
:link =" modalLink"
157
+ :host =" this.linkHost"
157
158
:existingProps =" existingProps"
158
159
:username =" this.context.username"
159
160
/>
@@ -225,6 +226,7 @@ module.exports = {
225
226
choice_options: [],
226
227
existingProps: null ,
227
228
secretLinksList: [],
229
+ linkHost: " " ,
228
230
};
229
231
},
230
232
props: [
@@ -254,6 +256,9 @@ module.exports = {
254
256
methods: {
255
257
loadSecretLinks () {
256
258
let that = this ;
259
+ this .context .getLinkHost ().thenApply (host => {
260
+ that .linkHost = host;
261
+ });
257
262
this .showSpinner = true ;
258
263
let file = this .files [0 ];
259
264
let props = file .getFileProperties ();
Original file line number Diff line number Diff line change @@ -156,6 +156,7 @@ module.exports = {
156
156
" link" ,
157
157
" username" ,
158
158
" existingProps" ,
159
+ " host"
159
160
],
160
161
created : function () {
161
162
let that = this ;
@@ -198,7 +199,7 @@ module.exports = {
198
199
args += " &args=%7B%22filename%22:%22" + link .filename + " %22%7D" ;
199
200
}
200
201
}
201
- let href = window . location . origin + " /" + this .baseUrl + args;
202
+ let href = this . host + " /" + this .baseUrl + args;
202
203
let secretLinkQrCode = peergos .shared .SecretLinkQRCode .generate (href);
203
204
this .base64QrCode = secretLinkQrCode .getBase64Thumbnail ();
204
205
return href;
You can’t perform that action at this time.
0 commit comments