Skip to content

Commit

Permalink
Merge branch 'env-support' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
m-atia committed Nov 17, 2023
2 parents 9567fce + af5f0f8 commit 7b63922
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 32 deletions.
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VUE_APP_BUCKET_URL=https://translated-endpoints-json.s3.amazonaws.com/
1 change: 1 addition & 0 deletions .env.staging
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VUE_APP_BUCKET_URL=https://translated-endpoints-json.s3.amazonaws.com/staging/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# phila.gov-programs
Vue app for searching through programs on the phila.gov website
# phila.gov-tools
Vue app for searching through select web applications and resource finders
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"build": "vue-cli-service build --mode production",
"build-staging": "vue-cli-service build --mode staging",
"build-modern": "vue-cli-service build --modern",
"build-dev": "vue-cli-service build --mode dev",
"lint": "vue-cli-service lint"
Expand Down
42 changes: 13 additions & 29 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -262,38 +262,22 @@ export default {
},
toolsEndpoint() {
const toolsUrls = {
'es': 'https://translated-endpoints-json.s3.amazonaws.com/es/tools.json',
'zh': 'https://translated-endpoints-json.s3.amazonaws.com/zh/tools.json',
'ar': 'https://translated-endpoints-json.s3.amazonaws.com/ar/tools.json',
'ht': 'https://translated-endpoints-json.s3.amazonaws.com/ht/tools.json',
'fr': 'https://translated-endpoints-json.s3.amazonaws.com/fr/tools.json',
'sw': 'https://translated-endpoints-json.s3.amazonaws.com/sw/tools.json',
'pt': 'https://translated-endpoints-json.s3.amazonaws.com/pt/tools.json',
'ru': 'https://translated-endpoints-json.s3.amazonaws.com/ru/tools.json',
'vi': 'https://translated-endpoints-json.s3.amazonaws.com/vi/tools.json',
};
if (toolsUrls[this.language]) {
return toolsUrls[this.language];
}
return defaultToolsEndpoint;
let vm = this;
if (vm.language === 'en') {
return defaultToolsEndpoint;
}
const languageCode = vm.language;
const url = process.env.VUE_APP_BUCKET_URL + `${languageCode}/tools.json`;
return url;
},
topicsEndpoint() {
const topicsUrls = {
'es': 'https://translated-endpoints-json.s3.amazonaws.com/es/topics.json',
'zh': 'https://translated-endpoints-json.s3.amazonaws.com/zh/topics.json',
'ar': 'https://translated-endpoints-json.s3.amazonaws.com/ar/topics.json',
'ht': 'https://translated-endpoints-json.s3.amazonaws.com/ht/topics.json',
'fr': 'https://translated-endpoints-json.s3.amazonaws.com/fr/topics.json',
'sw': 'https://translated-endpoints-json.s3.amazonaws.com/sw/topics.json',
'pt': 'https://translated-endpoints-json.s3.amazonaws.com/pt/topics.json',
'ru': 'https://translated-endpoints-json.s3.amazonaws.com/ru/topics.json',
'vi': 'https://translated-endpoints-json.s3.amazonaws.com/vi/topics.json',
};
if (topicsUrls[this.language]) {
return topicsUrls[this.language];
let vm = this;
if (vm.language === 'en') {
return defaultTopicsEndpoint;
}
return defaultTopicsEndpoint;
const languageCode = vm.language;
const url = process.env.VUE_APP_BUCKET_URL + `${languageCode}/topics.json`;
return url;
},
},
Expand Down

0 comments on commit 7b63922

Please sign in to comment.