Skip to content

Commit 5440186

Browse files
island205iamkun
authored andcommitted
Theme: Refine GA track & Update footer link forward to online theme roller (#16007)
1 parent b0aae6d commit 5440186

File tree

7 files changed

+27
-28
lines changed

7 files changed

+27
-28
lines changed

examples/components/footer.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
<a href="https://github.com/ElemeFE/element/releases" class="footer-main-link" target="_blank">{{ langConfig.changelog }}</a>
88
<a href="https://github.com/ElemeFE/element/blob/dev/FAQ.md" class="footer-main-link" target="_blank">{{ langConfig.faq }}</a>
99
<a href="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/ElementUI/element-starter" class="footer-main-link" target="_blank">{{ langConfig.starter }}</a>
10-
<a href="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/ElementUI/element-theme" class="footer-main-link" target="_blank">{{ langConfig.theme }}</a>
11-
<a href="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/ElementUI/theme-chalk-preview" class="footer-main-link" target="_blank">{{ langConfig.preview }}</a>
10+
<a :href="'/#/' + lang + '/component/custom-theme'" class="footer-main-link" target="_blank">{{ langConfig.theme }}</a>
1211
<a href="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/elemefe/element-react" class="footer-main-link" target="_blank">Element-React</a>
1312
<a href="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/ElemeFE/element-angular" class="footer-main-link" target="_blank">Element-Angular</a>
1413
</div>
@@ -62,7 +61,7 @@
6261
display: inline-block;
6362
vertical-align: top;
6463
margin-right: 110px;
65-
64+
6665
h4 {
6766
font-size: 18px;
6867
color: #333;
@@ -86,7 +85,7 @@
8685
.footer-social {
8786
float: right;
8887
text-align: right;
89-
88+
9089
.footer-social-title {
9190
color: #666;
9291
font-size: 18px;
@@ -144,13 +143,13 @@
144143
height: auto;
145144
}
146145
}
147-
146+
148147
@media (max-width: 1000px) {
149148
.footer-social {
150149
display: none;
151150
}
152151
}
153-
152+
154153
@media (max-width: 768px) {
155154
.footer {
156155
.footer-main {

examples/components/theme-configurator/index.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ import {
4848
export default {
4949
props: {
5050
themeConfig: Object,
51+
previewConfig: Object,
5152
isOfficial: Boolean,
5253
onUserConfigUpdate: Function
5354
},
@@ -155,7 +156,7 @@ export default {
155156
this.onAction();
156157
},
157158
onDownload() {
158-
bus.$emit(ACTION_DOWNLOAD_THEME, this.userConfig);
159+
bus.$emit(ACTION_DOWNLOAD_THEME, this.userConfig, this.previewConfig.name);
159160
},
160161
onAction() {
161162
this.onUserConfigUpdate(this.userConfig);

examples/components/theme/loader/index.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ export default {
2323
this.userConfig = val;
2424
this.onAction();
2525
});
26-
bus.$on(ACTION_DOWNLOAD_THEME, val => {
27-
this.onDownload(val);
26+
bus.$on(ACTION_DOWNLOAD_THEME, (themeConfig, themeName) => {
27+
this.onDownload(themeConfig, themeName);
2828
});
2929
},
3030
data() {
@@ -41,7 +41,7 @@ export default {
4141
});
4242
this.lastApply = time;
4343
},
44-
onDownload(themeConfig) {
44+
onDownload(themeConfig, themeName) {
4545
this.triggertProgressBar(true);
4646
updateVars(
4747
Object.assign({}, themeConfig, { download: true }),
@@ -55,7 +55,7 @@ export default {
5555
.then(() => {
5656
this.triggertProgressBar(false);
5757
});
58-
ga('send', 'event', 'ThemeConfigurator', 'Download');
58+
ga('send', 'event', 'ThemeConfigurator', 'Download', themeName);
5959
},
6060
onAction() {
6161
this.triggertProgressBar(true);

examples/components/theme/theme-card.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
}
153153
&.is-upload:hover {
154154
box-shadow: none;
155-
}
155+
}
156156
157157
&:hover {
158158
box-shadow: 0 0 10px 0 #999;
@@ -172,10 +172,10 @@
172172
<span>{{getActionDisplayName('upload-theme')}}</span>
173173
</div>
174174
</div>
175-
<input
176-
class="el-upload__input"
177-
type="file"
178-
ref="input"
175+
<input
176+
class="el-upload__input"
177+
type="file"
178+
ref="input"
179179
@change="uploadAction"
180180
accept="application/json"
181181
/>
@@ -224,8 +224,8 @@
224224
<el-dropdown-menu slot="dropdown">
225225
<el-dropdown-item command="rename">{{getActionDisplayName('rename-theme')}}</el-dropdown-item>
226226
<el-dropdown-item command="copy">{{getActionDisplayName('copy-theme')}}</el-dropdown-item>
227-
<el-dropdown-item
228-
command="delete"
227+
<el-dropdown-item
228+
command="delete"
229229
style="color: #F56C6C;"
230230
>
231231
{{getActionDisplayName('delete-theme')}}
@@ -325,7 +325,7 @@ export default {
325325
});
326326
break;
327327
case 'download':
328-
bus.$emit(ACTION_DOWNLOAD_THEME, this.theme);
328+
bus.$emit(ACTION_DOWNLOAD_THEME, this.theme, this.config.name);
329329
break;
330330
default:
331331
this.$emit('action', e, this.config);

examples/i18n/component.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
"repo": "代码仓库",
1313
"community": "社区",
1414
"changelog": "更新日志",
15-
"theme": "自定义主题工具",
16-
"preview": "在线主题生成",
15+
"theme": "在线主题生成器",
1716
"faq": "常见问题",
1817
"gitter": "在线讨论",
1918
"starter": "脚手架",
@@ -44,8 +43,7 @@
4443
"repo": "GitHub",
4544
"community": "Community",
4645
"changelog": "Changelog",
47-
"theme": "Theme CLI tool",
48-
"preview": "Online theme generator",
46+
"theme": "Online Theme Roller",
4947
"faq": "FAQ",
5048
"gitter": "Gitter",
5149
"starter": "Starter kit",
@@ -76,8 +74,7 @@
7674
"repo": "GitHub",
7775
"community": "Comunidad",
7876
"changelog": "Lista de cambios",
79-
"theme": "Generador de temas por CLI",
80-
"preview": "Generador de temas en línea",
77+
"theme": "Online Theme Roller",
8178
"faq": "FAQ",
8279
"gitter": "Gitter",
8380
"starter": "Kit de inicio",
@@ -108,8 +105,7 @@
108105
"repo": "GitHub",
109106
"community": "Communauté",
110107
"changelog": "Changelog",
111-
"theme": "Générateur de thème (CLI)",
112-
"preview": "Générateur de thème en ligne",
108+
"theme": "Online Theme Roller",
113109
"faq": "FAQ",
114110
"gitter": "Gitter",
115111
"starter": "Kit de démarrage",

examples/index.tpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
});
3838
</script><% } %>
3939
<% if (process.env.NODE_ENV !== 'production') { %><script>
40-
var ga = function() {};
40+
var ga = function() {
41+
console.log(arguments)
42+
};
4143
</script><% } %>
4244
</html>

examples/pages/template/theme-preview.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
<theme-configurator
4646
:isOfficial="isOfficial"
4747
:themeConfig="themeConfig"
48+
:previewConfig="previewConfig"
4849
:onUserConfigUpdate="onUserConfigUpdate"
4950
>
5051
</theme-configurator>

0 commit comments

Comments
 (0)