Skip to content

Commit

Permalink
Merge pull request #1285 from williamchong007/feature/migrate_cta
Browse files Browse the repository at this point in the history
📱 Redirect mobile users to get app page
  • Loading branch information
williamchong authored Nov 22, 2019
2 parents c29d498 + 8f5c937 commit 7ed7883
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
4 changes: 4 additions & 0 deletions layouts/in.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
import { mapGetters } from 'vuex';
import localeMixin from '~/mixins/locale';
import { checkIsMobileClient } from '~/util/client';
import PromptNotificationDialog from '@/components/dialogs/PromptNotificationDialog';
import MigrateTokenDialog from '@/components/dialogs/MigrateTokenDialog';
Expand Down Expand Up @@ -129,6 +130,9 @@ export default {
]),
},
mounted() {
if (checkIsMobileClient()) {
this.$router.push({ name: 'in-getapp' });
}
if (this.getUserHasERC20LikeCoin) {
this.isShowMigrationDialog = true;
}
Expand Down
7 changes: 7 additions & 0 deletions locales/client/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1633,6 +1633,13 @@
}
}
},
"GetApp": {
"title": "Reinventing the Like, in your pocket",
"button": {
"downloadNow": "Download now",
"continueToWeb": "Visit without app"
}
},
"CivicLikerReferral": {
"success": "Civic Liker Referral: {referee}"
}
Expand Down
6 changes: 5 additions & 1 deletion pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@
<script>
import { mapGetters, mapActions } from 'vuex';
import { checkIsMobileClient } from '~/util/client';
import ArticleDialog from '@/components/dialogs/ArticleDialog';
import HomeBanner from '@/components/home/Banner';
import HomeMobileHeader from '@/components/home/MobileHeader';
Expand Down Expand Up @@ -193,8 +195,10 @@ export default {
},
mounted() {
if (window.fbq) window.fbq('track', 'ViewContent');
this.queryLikeCoinUsdPrice();
if (checkIsMobileClient()) {
this.$router.push({ name: 'index' });
}
},
methods: {
...mapActions([
Expand Down
2 changes: 2 additions & 0 deletions util/api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import { IS_TESTNET, EXTERNAL_HOSTNAME } from '@/constant';

const LIKECOIN_API_BASE = IS_TESTNET ? 'https://api.rinkeby.like.co' : 'https://api.like.co';
const LIKECOIN_MISC_API_BASE = `https://${EXTERNAL_HOSTNAME}`;
const LIKER_LAND_URL = `https://${IS_TESTNET ? 'rinkeby.' : ''}liker.land`;
const LIKE_CO_CLOUD_FN_BASE = `https://us-central1-likecoin-${IS_TESTNET ? 'develop' : 'foundation'}.cloudfunctions.net`;
const LIKECOIN_MIGRATION = IS_TESTNET ? 'https://migration.taipei.like.co' : 'https://migration.like.co';

export const COSMOS_API_BASE = '/api/cosmos/lcd';

export const getMigrationSiteURL = likerId => (likerId ? `${LIKECOIN_MIGRATION}?likerid=${likerId}` : LIKECOIN_MIGRATION);
export const getLikerLandAppURL = () => 'https://likecoin.page.link/likeco';
export const getLikerLandURL = () => LIKER_LAND_URL;

export const apiCheckIsUser = addr => axios.get(`/users/addr/${addr}/min`);

Expand Down

0 comments on commit 7ed7883

Please # to comment.