Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jeff
funkwhale
Commits
4ce73861
Verified
Commit
4ce73861
authored
Feb 21, 2022
by
Kasper Seweryn
🥞
Browse files
Fix env variables
parent
873e4980
Changes
5
Hide whitespace changes
Inline
Side-by-side
front/src/App.vue
View file @
4ce73861
...
...
@@ -272,7 +272,7 @@ export default {
// 3. use the current url
const
defaultInstanceUrl
=
this
.
$store
.
state
.
instance
.
frontSettings
.
defaultServerUrl
||
process
.
env
.
VUE_APP_INSTANCE_URL
||
this
.
$store
.
getters
[
'
instance/defaultUrl
'
]()
import
.
meta
.
env
.
VUE_APP_INSTANCE_URL
||
this
.
$store
.
getters
[
'
instance/defaultUrl
'
]()
this
.
$store
.
commit
(
'
instance/instanceUrl
'
,
defaultInstanceUrl
)
}
else
{
// needed to trigger initialization of axios / service worker
...
...
front/src/components/Sidebar.vue
View file @
4ce73861
...
...
@@ -590,7 +590,7 @@ export default {
)
},
production
()
{
return
process
.
env
.
NODE_ENV
===
'
production
'
return
import
.
meta
.
env
.
NODE_ENV
===
'
production
'
}
},
watch
:
{
...
...
front/src/components/audio/EmbedWizard.vue
View file @
4ce73861
...
...
@@ -134,7 +134,7 @@ export default {
return
_
.
get
(
this
.
nodeinfo
,
'
metadata.library.anonymousCanListen
'
,
false
)
},
iframeSrc
()
{
let
base
=
process
.
env
.
BASE_URL
let
base
=
import
.
meta
.
env
.
BASE_URL
if
(
base
.
startsWith
(
'
/
'
))
{
// include hostname/protocol too so that the iframe link is absolute
base
=
`
${
window
.
location
.
protocol
}
//
${
window
.
location
.
host
}${
base
}
`
...
...
front/src/registerServiceWorker.js
View file @
4ce73861
...
...
@@ -4,8 +4,8 @@ import { register } from 'register-service-worker'
import
store
from
'
./store
'
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
register
(
`
${
process
.
env
.
BASE_URL
}
service-worker.js`
,
{
if
(
import
.
meta
.
env
.
NODE_ENV
===
'
production
'
)
{
register
(
`
${
import
.
meta
.
env
.
BASE_URL
}
service-worker.js`
,
{
registrationOptions
:
{
scope
:
'
/
'
},
ready
()
{
console
.
log
(
...
...
front/src/store/instance.js
View file @
4ce73861
...
...
@@ -20,7 +20,7 @@ export default {
state
:
{
maxEvents
:
200
,
frontSettings
:
{},
instanceUrl
:
process
.
env
.
VUE_APP_INSTANCE_URL
,
instanceUrl
:
import
.
meta
.
env
.
VUE_APP_INSTANCE_URL
,
events
:
[],
knownInstances
:
[],
nodeinfo
:
null
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment