mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-10-15 19:19:21 +08:00
Refactor analytics events (#209)
* Refactor analytics.js * Update analytics calls in app.vue * Update analytics calls in presets.vue * Update analytics calls in tools.vue (and app.vue) * Update analytics calls in global.vue * Update analytics calls in domain.vue * Update analytics calls in setup.vue * Add list of all events to analytics.js * Add custom copy to clipboard that emits event * Emit the events from the components * Update copyright year in all files touched * Update analytics calls in download.vue * Update analytics calls in ssl.vue * Update analytics calls in certbot.vue * Update analytics calls in domain.vue * Update analytics calls in app.vue * Note down 'Code snippet copied' events
This commit is contained in:
committed by
GitHub
parent
c86fb3cf76
commit
3fdccfa68a
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Copyright 2020 DigitalOcean
|
||||
Copyright 2021 DigitalOcean
|
||||
|
||||
This code is licensed under the MIT License.
|
||||
You may obtain a copy of the License at
|
||||
@@ -25,7 +25,7 @@ THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div @copied="copied">
|
||||
<pre><code class="language-bash">{{ cmd }}</code></pre>
|
||||
</div>
|
||||
</template>
|
||||
@@ -42,5 +42,10 @@ THE SOFTWARE.
|
||||
console.info(`Highlighting ${this.$props.cmd}...`);
|
||||
Prism.highlightAllUnder(this.$el);
|
||||
},
|
||||
methods: {
|
||||
copied(event) {
|
||||
this.$emit('copied', event.detail.text);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Copyright 2020 DigitalOcean
|
||||
Copyright 2021 DigitalOcean
|
||||
|
||||
This code is licensed under the MIT License.
|
||||
You may obtain a copy of the License at
|
||||
@@ -25,7 +25,7 @@ THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div :class="`column ${half ? 'is-half' : 'is-full'} is-full-mobile is-full-tablet`">
|
||||
<div :class="`column ${half ? 'is-half' : 'is-full'} is-full-mobile is-full-tablet`" @copied="copied">
|
||||
<h3 v-html="name"></h3>
|
||||
<pre><code class="language-docker" v-html="conf"></code></pre>
|
||||
</div>
|
||||
@@ -46,5 +46,10 @@ THE SOFTWARE.
|
||||
console.info(`Highlighting ${this.$props.name}...`);
|
||||
Prism.highlightAllUnder(this.$el);
|
||||
},
|
||||
methods: {
|
||||
copied(event) {
|
||||
this.$emit('copied', event.detail.text);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Copyright 2020 DigitalOcean
|
||||
Copyright 2021 DigitalOcean
|
||||
|
||||
This code is licensed under the MIT License.
|
||||
You may obtain a copy of the License at
|
||||
@@ -25,7 +25,7 @@ THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div :class="`column ${half ? 'is-half' : 'is-full'} is-full-mobile is-full-tablet`">
|
||||
<div :class="`column ${half ? 'is-half' : 'is-full'} is-full-mobile is-full-tablet`" @copied="copied">
|
||||
<h3 v-html="name"></h3>
|
||||
<pre><code class="language-nginx" v-html="conf"></code></pre>
|
||||
</div>
|
||||
@@ -45,5 +45,10 @@ THE SOFTWARE.
|
||||
console.info(`Highlighting ${this.$props.name}...`);
|
||||
Prism.highlightAllUnder(this.$el);
|
||||
},
|
||||
methods: {
|
||||
copied(event) {
|
||||
this.$emit('copied', event.detail.text);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Copyright 2020 DigitalOcean
|
||||
Copyright 2021 DigitalOcean
|
||||
|
||||
This code is licensed under the MIT License.
|
||||
You may obtain a copy of the License at
|
||||
@@ -25,7 +25,7 @@ THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div :class="`column ${half ? 'is-half' : 'is-full'} is-full-mobile is-full-tablet`">
|
||||
<div :class="`column ${half ? 'is-half' : 'is-full'} is-full-mobile is-full-tablet`" @copied="copied">
|
||||
<h3 v-html="name"></h3>
|
||||
<pre><code class="language-yaml" v-html="conf"></code></pre>
|
||||
</div>
|
||||
@@ -46,5 +46,10 @@ THE SOFTWARE.
|
||||
console.info(`Highlighting ${this.$props.name}...`);
|
||||
Prism.highlightAllUnder(this.$el);
|
||||
},
|
||||
methods: {
|
||||
copied(event) {
|
||||
this.$emit('copied', event.detail.text);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user