From 8645387657bf84d958c530b9af3d81d4c9f6cdc1 Mon Sep 17 00:00:00 2001 From: talon Date: Fri, 3 May 2019 15:11:29 -0400 Subject: [PATCH] add doubletap to like --- package-lock.json | 174 ++++++++++++++++-- package.json | 3 +- resources/assets/js/bootstrap.js | 6 + .../assets/js/components/PostComponent.vue | 24 +-- resources/assets/js/components/Profile.vue | 10 +- resources/assets/js/components/Timeline.vue | 8 +- 6 files changed, 192 insertions(+), 33 deletions(-) diff --git a/package-lock.json b/package-lock.json index b4d479309..72597c6f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1625,6 +1625,21 @@ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, + "browser-resolve": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", + "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", + "requires": { + "resolve": "1.1.7" + }, + "dependencies": { + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" + } + } + }, "browserify-aes": { "version": "1.2.0", "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", @@ -3317,6 +3332,11 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" }, + "estree-walker": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.2.1.tgz", + "integrity": "sha1-va/oCVOD2EFNXcLs9MkXO225QS4=" + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", @@ -3914,7 +3934,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -3932,11 +3953,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3949,15 +3972,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -4060,7 +4086,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -4070,6 +4097,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -4082,17 +4110,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -4109,6 +4140,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -4181,7 +4213,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -4191,6 +4224,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -4266,7 +4300,8 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -4296,6 +4331,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -4313,6 +4349,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -4351,11 +4388,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.0.3", - "bundled": true + "bundled": true, + "optional": true } } }, @@ -4557,6 +4596,11 @@ "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=" }, + "hammerjs": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz", + "integrity": "sha1-BO93hiz/K7edMPdpIJWTAiK/YPE=" + }, "handle-thing": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.0.tgz", @@ -5745,6 +5789,14 @@ "yallist": "^2.1.2" } }, + "magic-string": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.16.0.tgz", + "integrity": "sha1-lw67DacZMwEoX7GqZQ85vdgetFo=", + "requires": { + "vlq": "^0.2.1" + } + }, "make-dir": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", @@ -8021,6 +8073,90 @@ "inherits": "^2.0.1" } }, + "rollup-plugin-cleanup": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/rollup-plugin-cleanup/-/rollup-plugin-cleanup-0.1.4.tgz", + "integrity": "sha1-n+06tDAJiKiC1j3jMh5BDNr8YzE=", + "requires": { + "acorn": "^3.3.0", + "magic-string": "^0.16.0", + "rollup-pluginutils": "^1.5.2" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=" + } + } + }, + "rollup-plugin-commonjs": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-7.1.0.tgz", + "integrity": "sha1-w6dywuSl+hNQf1xXi2bME7DLink=", + "requires": { + "acorn": "^4.0.1", + "estree-walker": "^0.3.0", + "magic-string": "^0.19.0", + "resolve": "^1.1.7", + "rollup-pluginutils": "^2.0.1" + }, + "dependencies": { + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=" + }, + "estree-walker": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.3.1.tgz", + "integrity": "sha1-5rGlHPcpJSTnI3wxLl/mZgwc4ao=" + }, + "magic-string": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.19.1.tgz", + "integrity": "sha1-FNdoATyvLsj96hakmvgvw3fnUgE=", + "requires": { + "vlq": "^0.2.1" + } + }, + "rollup-pluginutils": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.6.0.tgz", + "integrity": "sha512-aGQwspEF8oPKvg37u3p7h0cYNwmJR1sCBMZGZ5b9qy8HGtETknqjzcxrDRrcAnJNXN18lBH4Q9vZYth/p4n8jQ==", + "requires": { + "estree-walker": "^0.6.0", + "micromatch": "^3.1.10" + }, + "dependencies": { + "estree-walker": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.0.tgz", + "integrity": "sha512-peq1RfVAVzr3PU/jL31RaOjUKLoZJpObQWJJ+LgfcxDUifyLZ1RjPQZTl0pzj2uJ45b7A7XpyppXvxdEqzo4rw==" + } + } + } + } + }, + "rollup-plugin-node-resolve": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-2.1.1.tgz", + "integrity": "sha1-y7eDsNFbAnlNWJFTULLw2QK43cg=", + "requires": { + "browser-resolve": "^1.11.0", + "builtin-modules": "^1.1.0", + "resolve": "^1.1.6" + } + }, + "rollup-pluginutils": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz", + "integrity": "sha1-HhVud4+UtyVb+hs9AXi+j1xVJAg=", + "requires": { + "estree-walker": "^0.2.1", + "minimatch": "^3.0.2" + } + }, "run-async": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", @@ -9532,6 +9668,11 @@ "extsprintf": "^1.2.0" } }, + "vlq": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", + "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==" + }, "vm-browserify": { "version": "0.0.4", "resolved": "http://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", @@ -9618,6 +9759,17 @@ "date-fns": "^1.29.0" } }, + "vue-touch": { + "version": "2.0.0-beta.4", + "resolved": "https://registry.npmjs.org/vue-touch/-/vue-touch-2.0.0-beta.4.tgz", + "integrity": "sha1-Alml+/if7RLV5deJ//uZuHSuBQE=", + "requires": { + "hammerjs": "^2.0.8", + "rollup-plugin-cleanup": "^0.1.4", + "rollup-plugin-commonjs": "^7.0.0", + "rollup-plugin-node-resolve": "^2.0.0" + } + }, "watchpack": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", diff --git a/package.json b/package.json index af915c663..838400e84 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,8 @@ "vue-content-loader": "^0.2.1", "vue-infinite-loading": "^2.4.3", "vue-loading-overlay": "^3.1.1", - "vue-timeago": "^5.0.0" + "vue-timeago": "^5.0.0", + "vue-touch": "^2.0.0-beta.4" }, "collective": { "type": "opencollective", diff --git a/resources/assets/js/bootstrap.js b/resources/assets/js/bootstrap.js index ad0c293af..cbd10ca31 100644 --- a/resources/assets/js/bootstrap.js +++ b/resources/assets/js/bootstrap.js @@ -7,6 +7,12 @@ window.axios = require('axios'); window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; require('readmore-js'); +Vue.use(require("vue-touch"), {name: "v-touch"}) +VueTouch.registerCustomEvent('doubletap', { + type: 'tap', + taps: 2 +}) + let token = document.head.querySelector('meta[name="csrf-token"]'); if (token) { window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; diff --git a/resources/assets/js/components/PostComponent.vue b/resources/assets/js/components/PostComponent.vue index d90fa82bf..1ab953ff7 100644 --- a/resources/assets/js/components/PostComponent.vue +++ b/resources/assets/js/components/PostComponent.vue @@ -212,7 +212,7 @@
-
+
@@ -345,8 +345,8 @@
- { @@ -900,7 +900,7 @@ export default { this.replyText += em; $('textarea[name="comment"]').focus(); } - }, + }, toggleCommentVisibility() { if(this.ownerOrAdmin() == false) { diff --git a/resources/assets/js/components/Profile.vue b/resources/assets/js/components/Profile.vue index be2884baf..b97f9b1ed 100644 --- a/resources/assets/js/components/Profile.vue +++ b/resources/assets/js/components/Profile.vue @@ -23,7 +23,7 @@

- + {{profile.username}} @@ -57,7 +57,7 @@ - + @@ -212,7 +212,7 @@

-
+
@@ -312,7 +312,7 @@
- + @@ -983,7 +983,7 @@ export default { if(res.data.length < 10) { this.followerMore = false; } - }) + }) this.$refs.followerModal.show(); }, diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index 92b70c01c..f35169d71 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -57,7 +57,7 @@
-
+
@@ -327,8 +327,8 @@
--> -