Skip to content

Commit 8fb9fe3

Browse files
authored
Merge pull request #1584 from aeternity/restore-browser-intro
Restore browser's intro page
2 parents b6277aa + 322b2c4 commit 8fb9fe3

28 files changed

+365
-66
lines changed

.env

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
VUE_APP_BACKEND_URL=https://base-backend.prd.aepps.com
22
VUE_APP_VAPID_PUBLIC_KEY=BHkQhNWW2TKfKfxo7vAgXkZGcVOXGrjhIZJlN1hKp6abIjWJgO8FYPswXJ35XEuKw46O9yZ-8KmsZ4-TXNBePcw
3-
VUE_APP_HOME_PAGE_URL=https://home.base.aepps.com

src/components/AppShortcut.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<ButtonPlain v-bind="$attrs" class="app-shortcut" v-on="$listeners">
3-
<img :src="icon" :alt="name" />
3+
<img :class="{ iconNotPadded }" :src="icon" :alt="name" />
44
{{ name }}
55
</ButtonPlain>
66
</template>
@@ -14,6 +14,7 @@ export default {
1414
props: {
1515
name: { type: String, required: true },
1616
icon: { type: String, default: DEFAULT_ICON },
17+
iconNotPadded: Boolean,
1718
},
1819
};
1920
</script>
@@ -31,11 +32,17 @@ export default {
3132
overflow-wrap: break-word;
3233
3334
img {
35+
box-sizing: border-box;
3436
width: functions.rem(75px);
3537
height: functions.rem(75px);
3638
border-radius: functions.rem(18px);
3739
box-shadow: 0 0 16px rgba(0, 33, 87, 0.15);
3840
margin-bottom: 5px;
41+
background: #fff;
42+
43+
&.iconNotPadded {
44+
padding: functions.rem(10px);
45+
}
3946
}
4047
}
4148
</style>

src/lib/appsRegistry.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
["superhero.com", "governance.aeternity.com", "graffiti.aeternity.com", "faucet.aepps.com"]

src/lib/storeErrorHandler.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Vue from 'vue';
22

3-
window.onerror = async function errorHandler() {
3+
window.onerror = async function errorHandler(...args) {
44
if (document.getElementById('app').innerHTML) {
55
window.onerror = null;
66
return;
@@ -10,4 +10,7 @@ window.onerror = async function errorHandler() {
1010
new Vue({
1111
render: (h) => h(StoreLoadError),
1212
}).$mount('#app');
13+
14+
// eslint-disable-next-line no-console
15+
console.error('Unknown error', ...args);
1316
};

src/locales/cn.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132

133133
"list": {
134134
"featured-guide": "<primary>精选</primary>",
135+
"browse-guide": "浏览",
135136
"bookmarked-guide": "Bookmarks",
136137
"guide": "æpps <primary>浏览器</primary> (beta)",
137138
"note": "将运行在æternity区块链上的æpps添加到这里",

src/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132

133133
"list": {
134134
"featured-guide": "<primary>Featured</primary>",
135+
"browse-guide": "Browse",
135136
"bookmarked-guide": "Bookmarks",
136137
"guide": "æpps <primary>browser</primary> (beta)",
137138
"note": "æpps running on the æternity blockchain will be added below.",

src/locales/es.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132

133133
"list": {
134134
"featured-guide": "<primary>æpps destacados</primary>",
135+
"browse-guide": "Examinar æpps",
135136
"bookmarked-guide": "Mis æpps",
136137
"guide": "æpps <primary>explorador</primary> (beta)",
137138
"note": "æpps que se ejecutan en la blockchain de æternity se agregarán a continuación",

src/locales/keysUsedInOtherProjects.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/locales/ru.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132

133133
"list": {
134134
"featured-guide": "<primary>Избранное</primary>",
135+
"browse-guide": "Просмотр",
135136
"bookmarked-guide": "Закладки",
136137
"guide": "æpps <primary>браузер</primary> (бета)",
137138
"note": "æpps, работающие в блокчейне æternity, будут добавлены ниже.",

src/pages/desktop/Apps.vue

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,7 @@
77
</Note>
88

99
<div class="shortcuts">
10-
<AppShortcut
11-
v-for="(app, idx) in aeternityApps"
12-
:key="idx"
13-
v-bind="app"
14-
:to="`https://${app.path}`"
15-
/>
10+
<AppShortcut v-for="(app, idx) in apps" :key="idx" v-bind="app" :to="`https://${app.host}`" />
1611
</div>
1712
</div>
1813
</template>
@@ -23,21 +18,14 @@ import { fetchJson } from '../../store/utils';
2318
import Guide from '../../components/Guide.vue';
2419
import Note from '../../components/Note.vue';
2520
import AppShortcut from '../../components/AppShortcut.vue';
21+
import appsRegistry from '../../lib/appsRegistry';
2622
2723
export default {
2824
components: { Guide, Note, AppShortcut },
29-
data: () => ({ aeternityAppsPaths: [] }),
3025
computed: mapState({
31-
aeternityApps(state, getters) {
32-
return this.aeternityAppsPaths.map((path) => ({
33-
...getters['appsMetadata/get'](path),
34-
path,
35-
}));
36-
},
26+
apps: (state, getters) =>
27+
appsRegistry.map((host) => ({ ...getters['appsMetadata/get'](host), host })),
3728
}),
38-
async mounted() {
39-
this.aeternityAppsPaths = await fetchJson(`${process.env.VUE_APP_HOME_PAGE_URL}/apps.json`);
40-
},
4129
};
4230
</script>
4331

0 commit comments

Comments
 (0)