Skip to content
Snippets Groups Projects
Commit d8db3816 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Merge branch '490-selector-by-default' into 'develop'

Resolve "Instance picker is showing up by default"

Closes #490

See merge request funkwhale/funkwhale!383
parents 14774f39 5e798538
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@ review_front:
- yarn run i18n-compile
# this is to ensure we don't have any errors in the output,
# cf https://code.eliotberriot.com/funkwhale/funkwhale/issues/169
- INSTANCE_URL=$REVIEW_INSTANCE_URL yarn run build | tee /dev/stderr | (! grep -i 'ERROR in')
- VUE_APP_INSTANCE_URL=$REVIEW_INSTANCE_URL yarn run build | tee /dev/stderr | (! grep -i 'ERROR in')
- mkdir -p /static/front/$CI_PROJECT_PATH_SLUG-$CI_BUILD_REF_SLUG
- cp -r dist/* /static/front/$CI_PROJECT_PATH_SLUG-$CI_BUILD_REF_SLUG
cache:
......
Ensure we always have a default api url set on first load to avoid displaying the instance picker (#490)
......@@ -124,12 +124,13 @@ export default {
// used to redraw ago dates every minute
self.$store.commit('ui/computeLastDate')
}, 1000 * 60)
if (this.$store.state.instance.instanceUrl) {
this.$store.commit('instance/instanceUrl', this.$store.state.instance.instanceUrl)
this.$store.dispatch('auth/check')
this.$store.dispatch('instance/fetchSettings')
this.fetchNodeInfo()
if (!this.$store.state.instance.instanceUrl) {
let defaultInstanceUrl = process.env.VUE_APP_INSTANCE_URL || this.$store.getters['instance/defaultUrl']()
this.$store.commit('instance/instanceUrl', defaultInstanceUrl)
}
this.$store.dispatch('auth/check')
this.$store.dispatch('instance/fetchSettings')
this.fetchNodeInfo()
},
methods: {
fetchNodeInfo () {
......
......@@ -14,7 +14,7 @@ export default {
state: {
maxEvents: 200,
frontSettings: {},
instanceUrl: process.env.INSTANCE_URL,
instanceUrl: process.env.VUE_APP_INSTANCE_URL,
events: [],
settings: {
instance: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment