Fix photos appering twice in profileview

This commit is contained in:
Marco Realacci 2023-01-17 23:43:49 +01:00
parent 8b38411710
commit c5b5472f0e
4 changed files with 11 additions and 11 deletions

View file

@ -1,23 +1,23 @@
{ {
"hash": "0c3e4771", "hash": "e339c443",
"browserHash": "01248067", "browserHash": "13931410",
"optimized": { "optimized": {
"axios": { "axios": {
"src": "../../axios/index.js", "src": "../../axios/index.js",
"file": "axios.js", "file": "axios.js",
"fileHash": "d8d02cf0", "fileHash": "d6919863",
"needsInterop": true "needsInterop": true
}, },
"vue": { "vue": {
"src": "../../vue/dist/vue.runtime.esm-bundler.js", "src": "../../vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js", "file": "vue.js",
"fileHash": "f8034b26", "fileHash": "f454023d",
"needsInterop": false "needsInterop": false
}, },
"vue-router": { "vue-router": {
"src": "../../vue-router/dist/vue-router.mjs", "src": "../../vue-router/dist/vue-router.mjs",
"file": "vue-router.js", "file": "vue-router.js",
"fileHash": "b4ca170f", "fileHash": "d2da74f6",
"needsInterop": false "needsInterop": false
} }
}, },

View file

@ -3,6 +3,7 @@
"version": "0.0.0", "version": "0.0.0",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"dev-backend": "vite --mode development-backend",
"build-dev": "vite build --mode development", "build-dev": "vite build --mode development",
"build-prod": "vite build --mode production", "build-prod": "vite build --mode production",
"build-embed": "vite build --mode production --base=/dashboard/", "build-embed": "vite build --mode production --base=/dashboard/",

View file

@ -100,11 +100,6 @@ export default {
this.loadContent() this.loadContent()
}, },
}, },
created() {
// Fetch the profile info and the first batch of photos
this.refresh()
},
components: { IntersectionObserver }
} }
</script> </script>

View file

@ -13,7 +13,7 @@ export default defineConfig(({command, mode, ssrBuild}) => {
} }
}, },
}; };
if (command === 'serve') { if (command === 'serve' && mode !== 'development-backend') {
ret.define = { ret.define = {
"__API_URL__": JSON.stringify("http://localhost:3000"), "__API_URL__": JSON.stringify("http://localhost:3000"),
}; };
@ -21,6 +21,10 @@ export default defineConfig(({command, mode, ssrBuild}) => {
ret.define = { ret.define = {
"__API_URL__": JSON.stringify("/"), "__API_URL__": JSON.stringify("/"),
}; };
} else if (mode === 'development-backend') {
ret.define = {
"__API_URL__": JSON.stringify("https://wasaphoto.marcorealacci.me"),
};
} else { } else {
ret.define = { ret.define = {
"__API_URL__": JSON.stringify("http://localhost:3000"), "__API_URL__": JSON.stringify("http://localhost:3000"),