diff --git a/src/App.svelte b/src/App.svelte index bc7891f2..ff6f3c17 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -114,7 +114,7 @@ await authInstance.login(); } - const progress = await fetch('https://content.sheaft.com/progress/departments.json'); + const progress = await fetch(config.content + '/progress/departments.json'); var data = await progress.json(); allDepartmentsProgress.set(data); diff --git a/src/components/nav/Nav.svelte b/src/components/nav/Nav.svelte index dcf16a7e..88ebdfd7 100644 --- a/src/components/nav/Nav.svelte +++ b/src/components/nav/Nav.svelte @@ -41,6 +41,7 @@ import SellingPointRoutes from "./../../routes/selling-points/routes.js"; import DeliveryRoutes from "./../../routes/deliveries/routes.js"; import QuickOrderRoutes from "./../../routes/quick-orders/routes.js"; +import { config } from "../../configs/config"; const authInstance = GetAuthInstance(); const routerInstance = GetRouterInstance(); @@ -323,7 +324,7 @@ {$authUserAccount.profile.given_name ? $authUserAccount.profile.given_name : $authUserAccount.profile.name}
{:else} diff --git a/src/configs/config.local.js b/src/configs/config.local.js index 39527e50..4065ad24 100644 --- a/src/configs/config.local.js +++ b/src/configs/config.local.js @@ -3,6 +3,7 @@ export const config = { front: "http://localhost:4200", api: "http://localhost:5002", signalr: "http://localhost:5009", + content: "http://localhost:10000/devstoreaccount1", auth: { url: "http://localhost:5000", settings: { diff --git a/src/configs/config.production.js b/src/configs/config.production.js index 3bfeb098..7fda61f6 100644 --- a/src/configs/config.production.js +++ b/src/configs/config.production.js @@ -3,6 +3,7 @@ export const config = { front: "https://app.sheaft.com", api: "https://api.sheaft.com", signalr: "https://signalr.sheaft.com", + content: "https://content.sheaft.com", auth: { url: "https://auth.sheaft.com", settings: { diff --git a/src/configs/config.remote.js b/src/configs/config.remote.js index fc6bc146..8ad40cd7 100644 --- a/src/configs/config.remote.js +++ b/src/configs/config.remote.js @@ -3,6 +3,7 @@ export const config = { front: "http://localhost:4200", api: "https://sheaft-api-rd.azurewebsites.net", signalr: "https://sheaft-signalr-rd.azurewebsites.net", + content: "https://rd.content.sheaft.com", auth: { url: "https://sheaft-identity-rd.azurewebsites.net", settings: { diff --git a/src/configs/config.staging.js b/src/configs/config.staging.js index 25491733..fce6ddb5 100644 --- a/src/configs/config.staging.js +++ b/src/configs/config.staging.js @@ -3,6 +3,7 @@ export const config = { front: "https://dev.app.sheaft.com", api: "https://sheaft-api-rd.azurewebsites.net", signalr: "https://sheaft-signalr-rd.azurewebsites.net", + content: "https://rd.content.sheaft.com", auth: { url: "https://sheaft-identity-rd.azurewebsites.net", settings: { diff --git a/src/routes/account/Profile.svelte b/src/routes/account/Profile.svelte index 1a4f3d32..15ec13c5 100644 --- a/src/routes/account/Profile.svelte +++ b/src/routes/account/Profile.svelte @@ -15,6 +15,7 @@ import EditConsumer from "./EditConsumer.svelte"; import EditProducer from "./EditProducer.svelte"; import EditStore from "./EditStore.svelte"; + import { config } from "../../configs/config"; const errorsHandler = new SheaftErrors(); const authInstance = GetAuthInstance(); @@ -65,7 +66,7 @@ $authUserAccount.profile && $authUserAccount.profile.picture ? $authUserAccount.profile.picture - : "https://content.sheaft.com/pictures/users/profile.svg"; + : config.content + "/pictures/users/profile.svg"; diff --git a/src/routes/account/UpdateImage.svelte b/src/routes/account/UpdateImage.svelte index 9721a29d..e0dd05ac 100644 --- a/src/routes/account/UpdateImage.svelte +++ b/src/routes/account/UpdateImage.svelte @@ -4,10 +4,11 @@ import ActionConfirm from "./../../components/modal/ActionConfirm.svelte"; import GetGraphQLInstance from "./../../services/SheaftGraphQL.js"; import SheaftErrors from "./../../services/SheaftErrors"; +import { config } from "../../configs/config"; const errorsHandler = new SheaftErrors(); - export let id, mutation, close, onClose, initialSrc = "https://content.sheaft.com/pictures/users/profile.svg"; + export let id, mutation, close, onClose, initialSrc = config.content + "/pictures/users/profile.svg"; var graphQLInstance = GetGraphQLInstance(); let src = initialSrc; diff --git a/src/routes/leaderboard/Leaderboard.svelte b/src/routes/leaderboard/Leaderboard.svelte index d1932209..d5090d82 100644 --- a/src/routes/leaderboard/Leaderboard.svelte +++ b/src/routes/leaderboard/Leaderboard.svelte @@ -12,6 +12,7 @@ USER_POINTS_PER_COUNTRY, USER_POSITION_IN_COUNTRY } from "./queries.js"; +import { config } from "../../configs/config"; export let params; @@ -77,7 +78,7 @@ const getUserPicture = (user) => { if (user.picture) return user.picture; - return "https://content.sheaft.com/pictures/users/profile.svg"; + return config.content + "/pictures/users/profile.svg"; } const getUserName = (user) => { diff --git a/src/routes/products/ImportProducts.svelte b/src/routes/products/ImportProducts.svelte index ce0a9f0e..67120378 100644 --- a/src/routes/products/ImportProducts.svelte +++ b/src/routes/products/ImportProducts.svelte @@ -96,7 +96,7 @@
diff --git a/src/routes/products/ProductRatings.svelte b/src/routes/products/ProductRatings.svelte index 7602c464..efdd7474 100644 --- a/src/routes/products/ProductRatings.svelte +++ b/src/routes/products/ProductRatings.svelte @@ -12,6 +12,7 @@ import { GET_PRODUCT_RATINGS } from "./queries.js"; import SheaftErrors from "../../services/SheaftErrors"; import ErrorCard from "./../../components/ErrorCard.svelte"; +import { config } from "../../configs/config"; export let params = {}; @@ -78,7 +79,7 @@ {rating.user.name}
(acceptMangoCgv = !acceptMangoCgv)} /> Je reconnais avoir lu et compris - + les conditions générales d'utilisation de MangoPay, notre tiers de paiement, et je les accepte diff --git a/src/routes/register/owner/FormProductionSite.svelte b/src/routes/register/owner/FormProductionSite.svelte index cdc0ee70..23a98f6d 100644 --- a/src/routes/register/owner/FormProductionSite.svelte +++ b/src/routes/register/owner/FormProductionSite.svelte @@ -5,6 +5,7 @@ import Loader from "./../../../components/Loader.svelte"; import Icon from "svelte-awesome"; import { faInfoCircle } from "@fortawesome/free-solid-svg-icons"; +import { config } from "../../../configs/config"; export let company, stepper = 4, isStore, submit = () => {}; @@ -111,7 +112,7 @@ checked={acceptMangoCgv} onClick={() => (acceptMangoCgv = !acceptMangoCgv)} /> Je reconnais avoir lu et compris - + les conditions générales d'utilisation de services de paiement de MangoPay, notre tiers de paiement, et je les accepte diff --git a/src/routes/search-producers/ProducerCard.svelte b/src/routes/search-producers/ProducerCard.svelte index 9f0077a2..9ca03d10 100644 --- a/src/routes/search-producers/ProducerCard.svelte +++ b/src/routes/search-producers/ProducerCard.svelte @@ -101,7 +101,7 @@
{#if producer.tags && producer.tags.find(c => c.name == 'bio') != null} - Bio + Bio {/if}
diff --git a/src/routes/search-producers/ProducerDetails.svelte b/src/routes/search-producers/ProducerDetails.svelte index f3d72df3..54fb48de 100644 --- a/src/routes/search-producers/ProducerDetails.svelte +++ b/src/routes/search-producers/ProducerDetails.svelte @@ -21,6 +21,7 @@ import RatingStars from "./../../components/rating/RatingStars.svelte"; import AgreementRoutes from "../agreements/routes"; import GetNotificationsInstance from "./../../services/SheaftNotifications.js"; +import { config } from "../../configs/config"; const graphQLInstance = GetGraphQLInstance(); const routerInstance = GetRouterInstance(); @@ -230,7 +231,7 @@

{producer.name}

{#if producer.tags && producer.tags && producer.tags.length > 0 && producer.tags.find((t) => t.name === "Bio")}
- Bio + Bio
{/if}
diff --git a/src/routes/search-products/ProductCard.svelte b/src/routes/search-products/ProductCard.svelte index 20be600c..d9c83ab2 100644 --- a/src/routes/search-products/ProductCard.svelte +++ b/src/routes/search-products/ProductCard.svelte @@ -9,6 +9,7 @@ import { cartItems, selectedItem } from "./../../stores/app.js"; import { GetDistanceInfos } from "./../../helpers/distances.js"; import { formatMoney, formatConditioningDisplay } from "./../../helpers/app"; +import { config } from "../../configs/config"; const routerInstance = GetRouterInstance(); export let product, hoveredProduct = null; @@ -132,7 +133,7 @@
{#if product.tags.map(t => t.name).includes('bio')} - Bio + Bio {/if} {#if product.isReturnable} Consigné diff --git a/src/routes/search-products/ProductDetails.svelte b/src/routes/search-products/ProductDetails.svelte index e5929676..f87f6ac3 100644 --- a/src/routes/search-products/ProductDetails.svelte +++ b/src/routes/search-products/ProductDetails.svelte @@ -25,6 +25,7 @@ import ErrorCard from "./../../components/ErrorCard.svelte"; import { groupBy, encodeQuerySearchUrl, formatConditioningDisplay } from "./../../helpers/app"; import orderBy from "lodash/orderBy"; +import { config } from "../../configs/config"; const errorsHandler = new SheaftErrors(); const routerInstance = GetRouterInstance(); @@ -129,7 +130,7 @@ const getUserPicture = picture => { if (picture) return picture; - return "https://content.sheaft.com/pictures/users/profile.svg"; + return config.content + '/pictures/users/profile.svg'; }; const focus = node => { @@ -223,7 +224,7 @@
{/if}