diff --git a/www/components/Logo.vue b/www/components/Logo.vue deleted file mode 100644 index b1de012..0000000 --- a/www/components/Logo.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - diff --git a/www/nuxt.config.js b/www/nuxt.config.js index 783ed8d..1072ad2 100644 --- a/www/nuxt.config.js +++ b/www/nuxt.config.js @@ -79,7 +79,11 @@ export default { myBadge: process.env.NODE_ENV === "production" ? "https://badges.toozhao.com/badges/01EGTQ64XK7M48A67K9Y62J0QZ" - : "http://localhost:8080/badges/01EGTQ3JBFYS7VZG36SBPM0SA9" + : "http://localhost:8080/badges/01EGTQ3JBFYS7VZG36SBPM0SA9", + myStats: + process.env.NODE_ENV === "production" + ? "https://badges.toozhao.com/stats/01EGTQ64XK7M48A67K9Y62J0QZ" + : "http://localhost:3000/stats/01EGTQ3JBFYS7VZG36SBPM0SA9" }, /* ** Axios module configuration diff --git a/www/package-lock.json b/www/package-lock.json index 09386d2..78fdecb 100644 --- a/www/package-lock.json +++ b/www/package-lock.json @@ -2203,23 +2203,6 @@ "resolved": "https://registry.npmjs.org/@csstools/convert-colors/-/convert-colors-1.4.0.tgz", "integrity": "sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw==" }, - "@intlify/vue-i18n-extensions": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@intlify/vue-i18n-extensions/-/vue-i18n-extensions-1.0.2.tgz", - "integrity": "sha512-rnfA0ScyBXyp9xsSD4EAMGeOh1yv/AE7fhqdAdSOr5X8N39azz257umfRtzNT9sHXAKSSzpCVhIbMAkp5c/gjQ==", - "requires": { - "@babel/parser": "^7.9.6" - } - }, - "@intlify/vue-i18n-loader": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@intlify/vue-i18n-loader/-/vue-i18n-loader-1.0.0.tgz", - "integrity": "sha512-y7LlpKEQ01u7Yq14l4VNlbFYEHMmSEH1QXXASOMWspj9ZcIdCebhhvHCHqk5Oy5Epw3PtoxyRJNpb6Wle5udgA==", - "requires": { - "js-yaml": "^3.13.1", - "json5": "^2.1.1" - } - }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -7541,14 +7524,6 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, - "deepcopy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/deepcopy/-/deepcopy-2.1.0.tgz", - "integrity": "sha512-8cZeTb1ZKC3bdSCP6XOM1IsTczIO73fdqtwa2B0N15eAz7gmyhQo+mc5gnFuulsgN3vIQYmTgbmQVKalH1dKvQ==", - "requires": { - "type-detect": "^4.0.8" - } - }, "deepmerge": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", @@ -10099,11 +10074,6 @@ "is-extglob": "^2.1.1" } }, - "is-https": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-https/-/is-https-2.0.2.tgz", - "integrity": "sha512-UfUCKVQH/6PQRCh5Qk9vNu4feLZiFmV/gr8DjbtJD0IrCRIDTA6E+d/AVFGPulI5tqK5W45fYbn1Nir1O99rFw==" - }, "is-negative-zero": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", @@ -12983,22 +12953,6 @@ } } }, - "nuxt-i18n": { - "version": "6.13.12", - "resolved": "https://registry.npmjs.org/nuxt-i18n/-/nuxt-i18n-6.13.12.tgz", - "integrity": "sha512-lpk59Fs8+heoXSJ/7VAHmSLXvyegaPmlYe+wSeI7g4VHVHL7YHIHypUPu/pQfEe0h1f5GY0R/w1Y8AEEPaXiVw==", - "requires": { - "@babel/parser": "^7.5.5", - "@babel/traverse": "^7.5.5", - "@intlify/vue-i18n-extensions": "^1.0.1", - "@intlify/vue-i18n-loader": "^1.0.0", - "cookie": "^0.4.0", - "deepcopy": "^2.1.0", - "is-https": "^2.0.0", - "js-cookie": "^2.2.1", - "vue-i18n": "^8.18.1" - } - }, "nwsapi": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", @@ -17010,7 +16964,8 @@ "type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true }, "type-fest": { "version": "0.8.1", @@ -17375,11 +17330,6 @@ "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz", "integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==" }, - "vue-i18n": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.21.0.tgz", - "integrity": "sha512-pKBq6Kg5hNacFHMFgPbpYsFlDIMRu4Ew/tpvTWns14CZoCxt7B3tmSNdrLruGMMivnJu1rhhRqsQqT6YwHkuQQ==" - }, "vue-jest": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/vue-jest/-/vue-jest-3.0.6.tgz", diff --git a/www/package.json b/www/package.json index e4a7e8f..40f1bf1 100644 --- a/www/package.json +++ b/www/package.json @@ -24,7 +24,6 @@ "moment": "^2.27.0", "nanoid": "^2.1.11", "nuxt": "^2.14.12", - "nuxt-i18n": "^6.13.12", "vue-chartjs": "^3.5.1" }, "devDependencies": { diff --git a/www/pages/index.vue b/www/pages/index.vue index dd36fb9..bd027f1 100644 --- a/www/pages/index.vue +++ b/www/pages/index.vue @@ -78,16 +78,18 @@

Count your page views in seconds

-
+
+ +

Badges generates a unique SVG image for a web page, requests gets calcaulted and reflected on the value of the Badge.
Think about this is simplifed Goolge Analytics on a static page - without JS script, isn't this handy? + without any JS script, isn't this neat?
- In the near future, we will allow you to display data from various - data source like HTTP API and so on. +
+ More features coming soon

@@ -125,10 +127,10 @@ alt="Generic placeholder image" height="140" /> -

Data comes realtime

+

Realtime analytics chart

- The page view count data gets calculated in realtime.
And it - will be refreshed on your web page automatically. + Every access gets counted and you are able to view the realtime statistic data via a chart + Observe how your application grows in time.

@@ -170,17 +172,17 @@ import Vue from "vue"; import { mapMutations, mapActions } from "vuex"; export default Vue.extend({ - auth: 'guest', + auth: "guest", data() { return { - buttonText: "Generate your Badge", + buttonText: "Create your badge", text: "", canGenerate: true, activeBadgeColor: "green" }; }, mounted() { - this.$store.commit("error/setError", "") + this.$store.commit("error/setError", ""); }, computed: { badge() { @@ -189,11 +191,14 @@ export default Vue.extend({ defaultBadge() { return `${this.$config.myBadge}/green.svg`; }, - state () { - return JSON.stringify(this.$auth.$state, undefined, 2) + defaultStats() { + return `${this.$config.myStats}`; + }, + state() { + return JSON.stringify(this.$auth.$state, undefined, 2); }, currentUser() { - return this.$auth.user + return this.$auth.user; } }, methods: { diff --git a/www/pages/stats/_id.vue b/www/pages/stats/_id.vue index 01612d8..6b691f7 100644 --- a/www/pages/stats/_id.vue +++ b/www/pages/stats/_id.vue @@ -21,7 +21,7 @@ variant="outline-primary" href="/" > - Get your page views badge + Create your page views badge diff --git a/www/tsconfig.json b/www/tsconfig.json index 2553998..9cf246c 100644 --- a/www/tsconfig.json +++ b/www/tsconfig.json @@ -18,7 +18,7 @@ "types": [ "@types/node", "@nuxt/types", - "nuxt-i18n", + // "nuxt-i18n", "@nuxtjs/axios", "@nuxtjs/auth-next", "bootstrap-vue"