From f104b05ec5f6d0da92fac56b190d21dfeb180d87 Mon Sep 17 00:00:00 2001 From: Andy Gray Date: Fri, 29 Nov 2019 14:08:19 +0000 Subject: [PATCH] bootstrapping --- package-lock.json | 67 +++++++++++++++++--- package.json | 1 + src/App.vue | 47 +++++++------- src/components/Chat.vue | 135 ++++++++++++++++++++++++++++------------ src/main.js | 5 +- 5 files changed, 181 insertions(+), 74 deletions(-) diff --git a/package-lock.json b/package-lock.json index 487f236..fc5a195 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1387,6 +1387,23 @@ "integrity": "sha1-K1o6s/kYzKSKjHVMCBaOPwPrphs=", "dev": true }, + "@nuxt/opencollective": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@nuxt/opencollective/-/opencollective-0.3.0.tgz", + "integrity": "sha512-Vf09BxCdj1iT2IRqVwX5snaY2WCTkvM0O4cWWSO1ThCFuc4if0Q/nNwAgCxRU0FeYHJ7DdyMUNSdswCLKlVqeg==", + "requires": { + "chalk": "^2.4.2", + "consola": "^2.10.1", + "node-fetch": "^2.6.0" + }, + "dependencies": { + "node-fetch": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" + } + } + }, "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -2297,7 +2314,6 @@ "version": "3.2.1", "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, "requires": { "color-convert": "^1.9.0" } @@ -2816,6 +2832,23 @@ "hoek": "0.7.x" } }, + "bootstrap": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.4.1.tgz", + "integrity": "sha512-tbx5cHubwE6e2ZG7nqM3g/FZ5PQEDMWmMGNrCUBVRPHXTJaH7CBDdsLeu3eCh3B1tzAxTnAbtmrzvWEvT2NNEA==" + }, + "bootstrap-vue": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/bootstrap-vue/-/bootstrap-vue-2.1.0.tgz", + "integrity": "sha512-dftb5fc42x7QLv814nN+3Cx8MMuCB+xrGQjOmSXH81ET0+yo7KYb4lUN3/pOnf+8Tkv8oaawZ1OOth5/AZfktg==", + "requires": { + "@nuxt/opencollective": "^0.3.0", + "bootstrap": ">=4.3.1 <5.0.0", + "popper.js": "^1.16.0", + "portal-vue": "^2.1.6", + "vue-functional-data-merge": "^3.1.0" + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz", @@ -3281,7 +3314,6 @@ "version": "2.4.2", "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz", "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -3575,7 +3607,6 @@ "version": "1.9.3", "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz", "integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=", - "dev": true, "requires": { "color-name": "1.1.3" } @@ -3583,8 +3614,7 @@ "color-name": { "version": "1.1.3", "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "color-string": { "version": "1.5.3", @@ -3749,6 +3779,11 @@ "integrity": "sha1-izIIk1kwjRERFdgcrT/Oq4iPl7w=", "dev": true }, + "consola": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/consola/-/consola-2.11.0.tgz", + "integrity": "sha512-2bcAqHastlPSCvZ+ur8bgHInGAWvUnysWz3h3xRX+/XZoCY7avolJJnVXOPGoVoyCcg1b231XixonoArmgxaoA==" + }, "console-browserify": { "version": "1.2.0", "resolved": "https://registry.npm.taobao.org/console-browserify/download/console-browserify-1.2.0.tgz", @@ -4934,8 +4969,7 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint-scope": { "version": "4.0.3", @@ -7025,8 +7059,7 @@ "has-flag": { "version": "3.0.0", "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, "has-symbols": { "version": "1.0.1", @@ -9472,6 +9505,16 @@ "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz", "integrity": "sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE=" }, + "popper.js": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.0.tgz", + "integrity": "sha512-+G+EkOPoE5S/zChTpmBSSDYmhXJ5PsW8eMhH8cP/CQHMFPBG/kC9Y5IIw6qNYgdJ+/COf0ddY2li28iHaZRSjw==" + }, + "portal-vue": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/portal-vue/-/portal-vue-2.1.6.tgz", + "integrity": "sha512-lvCF85D4e8whd0nN32D8FqKwwkk7nYUI3Ku8UAEx4Z1reomu75dv5evRUTZNaj1EalxxWNXiNl0EHRq36fG8WA==" + }, "portfinder": { "version": "1.0.25", "resolved": "https://registry.npm.taobao.org/portfinder/download/portfinder-1.0.25.tgz", @@ -11545,7 +11588,6 @@ "version": "5.5.0", "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz?cache=0&sync_timestamp=1574418315746&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-5.5.0.tgz", "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, "requires": { "has-flag": "^3.0.0" } @@ -13295,6 +13337,11 @@ "resolved": "https://registry.npm.taobao.org/vue/download/vue-2.6.10.tgz", "integrity": "sha1-pysaQqTYKnIepDjRtr9V5mGVxjc=" }, + "vue-functional-data-merge": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/vue-functional-data-merge/-/vue-functional-data-merge-3.1.0.tgz", + "integrity": "sha512-leT4kdJVQyeZNY1kmnS1xiUlQ9z1B/kdBFCILIjYYQDqZgLqCLa0UhjSSeRX6c3mUe6U5qYeM8LrEqkHJ1B4LA==" + }, "vue-hot-reload-api": { "version": "2.3.4", "resolved": "https://registry.npm.taobao.org/vue-hot-reload-api/download/vue-hot-reload-api-2.3.4.tgz", diff --git a/package.json b/package.json index 4cef576..9cef6e7 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ }, "dependencies": { "axios": "^0.19.0", + "bootstrap-vue": "^2.1.0", "core-js": "^3.3.2", "dns": "^0.2.2", "ethers": "^4.0.39", diff --git a/src/App.vue b/src/App.vue index 5b77756..729e15e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,32 +1,31 @@ diff --git a/src/components/Chat.vue b/src/components/Chat.vue index e053095..adc1c8c 100644 --- a/src/components/Chat.vue +++ b/src/components/Chat.vue @@ -1,37 +1,98 @@ @@ -102,23 +163,23 @@ await KittiesService.matchKitties('mainnet', studId.toString(), kittieId.toString()); console.log('done matching!'); }, - find: async function() { + find: async function () { this.kitties.other = await KittiesService.getAllKittiesForAddress('mainnet', this.accounts.other.toLowerCase()); }, - getUserKitties: async function() { + getUserKitties: async function () { const cryptoKittiesApiEndpoint = `https://api.cryptokitties.co/v2/kitties?offset=0&limit=12&owner_wallet_address=${this.accounts.user}&parents=false&authenticated=true&include=sale,sire,other&orderBy=id&orderDirection=desc`; const kitties = (await axios.get(cryptoKittiesApiEndpoint)).data.kitties; this.kitties.userSelected = kitties[0].id.toString(); this.kitties.user = kitties; this.upsertKittiesAndGetSwipeRights(kitties); }, - upsertKittiesAndGetSwipeRights: async function(kitties) { + upsertKittiesAndGetSwipeRights: async function (kitties) { await KittiesService.upsertKitties('mainnet', kitties); this.kitties.user = await KittiesService.getAllKittiesWithSwipeRightsForAddress('mainnet', this.accounts.user.toLowerCase()); this.kitties.userSelected = this.kitties.user[0].id.toString(); console.log(this.kitties.user); }, - userKittieSelected: async function(e) { + userKittieSelected: async function (e) { this.kitties.userSelected = e.target.value; } }, @@ -157,15 +218,11 @@ }); } }, - } + }; diff --git a/src/main.js b/src/main.js index 9d8e610..986ceef 100644 --- a/src/main.js +++ b/src/main.js @@ -2,8 +2,11 @@ import Vue from 'vue' import App from './App.vue' import router from './router' import store from './store' -import UUID from 'vue-uuid'; +import BootstrapVue from 'bootstrap-vue'; +Vue.use(BootstrapVue); + +import UUID from 'vue-uuid'; Vue.use(UUID); Vue.config.productionTip = false;