[WIP] bootstrap-vue upgrade (#9178)

* update bootstrap-vue to 1.0.0-beta.9 - remove all individual bootstrap components and use BootstrapVue into Vue

* change modal action names from show::modal to bv::show::modal

* check if drops are undefined

* fix modal widths - sellModal now using input instead of dropbox

* upgrade to bootstrap 4.0beta

* include package-lock changes

* fix app menu dropdown position

* upgrade bootstrap to beta2 (was missing grid offset and other fixes) - refix header menu position

* fix tags popup (auto width to max not working) - fix filter panel width (adding width: 100% works until max-width)

* show hide logo on different screensize (new css breakpoints - http://getbootstrap.com/docs/4.0/utilities/display/ )

* fix package-lock?

* fix active button style / app header toggle button

* fix package-lock !

* update package lock after merge - new mixin "openedItemRows" to save the "show more/show less" in stable

* mixin naming style

* fix buyQuestModal marginTop

* fix customMenuDropdown position

* fix userDropdown items
This commit is contained in:
negue
2017-11-08 18:40:37 +01:00
committed by Matteo Pagliazzi
parent 34f6b63968
commit 4108a22d78
105 changed files with 354 additions and 684 deletions

121
package-lock.json generated
View File

@@ -32,6 +32,15 @@
"ws": "1.1.4" "ws": "1.1.4"
} }
}, },
"JSONStream": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz",
"integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=",
"requires": {
"jsonparse": "1.3.1",
"through": "2.3.8"
}
},
"abbrev": { "abbrev": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
@@ -1643,31 +1652,16 @@
} }
}, },
"bootstrap": { "bootstrap": {
"version": "4.0.0-alpha.6", "version": "4.0.0-beta.2",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.0.0-alpha.6.tgz", "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.0.0-beta.2.tgz",
"integrity": "sha1-T1TdM6wN6sOyhAe8LffsYIhpycg=", "integrity": "sha512-DzGtdTlKbrMoGMpz0LigKSqJ+MgtFKxA791PU/q062OlRG0HybNZcTLH7rpDAmLS66Y3esN9yzKHLLbqa5UR3w=="
"requires": {
"jquery": "3.2.1",
"tether": "1.4.0"
}
}, },
"bootstrap-vue": { "bootstrap-vue": {
"version": "1.0.0-beta.7", "version": "1.0.0-beta.9",
"resolved": "https://registry.npmjs.org/bootstrap-vue/-/bootstrap-vue-1.0.0-beta.7.tgz", "resolved": "https://registry.npmjs.org/bootstrap-vue/-/bootstrap-vue-1.0.0-beta.9.tgz",
"integrity": "sha512-m9MOvv7Okl03JoZx+J1crEw24Qenn6MdXCKHCivcx1iVRj1wUUs6ZfLO5xJ1W2xd4aW8Gv8LOy+CUtP5DnuCiA==", "integrity": "sha512-0wYWRebZROB+IXpatXgr/pUsiZ7ZUl/uJmc3bpIKlsi9sciE7wIdjV9PhdHnqoipU0kYylHfdcHimOHl5aIbjA==",
"requires": { "requires": {
"bootstrap": "4.0.0-beta.2", "bootstrap": "4.0.0-beta.2"
"jquery": "3.2.1",
"popper.js": "1.12.6",
"vue": "2.5.3",
"vue-functional-data-merge": "1.0.6"
},
"dependencies": {
"bootstrap": {
"version": "4.0.0-beta.2",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.0.0-beta.2.tgz",
"integrity": "sha512-DzGtdTlKbrMoGMpz0LigKSqJ+MgtFKxA791PU/q062OlRG0HybNZcTLH7rpDAmLS66Y3esN9yzKHLLbqa5UR3w=="
}
} }
}, },
"boxen": { "boxen": {
@@ -1778,9 +1772,9 @@
"resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.0.2.tgz", "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.0.2.tgz",
"integrity": "sha1-+GzWzvT1MAyOY+B6TVEvZfv/RTE=", "integrity": "sha1-+GzWzvT1MAyOY+B6TVEvZfv/RTE=",
"requires": { "requires": {
"JSONStream": "1.3.1",
"combine-source-map": "0.7.2", "combine-source-map": "0.7.2",
"defined": "1.0.0", "defined": "1.0.0",
"JSONStream": "1.3.1",
"through2": "2.0.3", "through2": "2.0.3",
"umd": "3.0.1" "umd": "3.0.1"
} }
@@ -1810,6 +1804,7 @@
"resolved": "https://registry.npmjs.org/browserify/-/browserify-12.0.2.tgz", "resolved": "https://registry.npmjs.org/browserify/-/browserify-12.0.2.tgz",
"integrity": "sha1-V/IeXm4wj/WYfE2v1EhAsrmPehk=", "integrity": "sha1-V/IeXm4wj/WYfE2v1EhAsrmPehk=",
"requires": { "requires": {
"JSONStream": "1.3.1",
"assert": "1.3.0", "assert": "1.3.0",
"browser-pack": "6.0.2", "browser-pack": "6.0.2",
"browser-resolve": "1.11.2", "browser-resolve": "1.11.2",
@@ -1831,7 +1826,6 @@
"inherits": "2.0.3", "inherits": "2.0.3",
"insert-module-globals": "7.0.1", "insert-module-globals": "7.0.1",
"isarray": "0.0.1", "isarray": "0.0.1",
"JSONStream": "1.3.1",
"labeled-stream-splicer": "2.0.0", "labeled-stream-splicer": "2.0.0",
"module-deps": "4.1.1", "module-deps": "4.1.1",
"os-browserify": "0.1.2", "os-browserify": "0.1.2",
@@ -6605,13 +6599,6 @@
} }
} }
}, },
"string_decoder": {
"version": "1.0.1",
"bundled": true,
"requires": {
"safe-buffer": "5.0.1"
}
},
"string-width": { "string-width": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
@@ -6621,6 +6608,13 @@
"strip-ansi": "3.0.1" "strip-ansi": "3.0.1"
} }
}, },
"string_decoder": {
"version": "1.0.1",
"bundled": true,
"requires": {
"safe-buffer": "5.0.1"
}
},
"stringstream": { "stringstream": {
"version": "0.0.5", "version": "0.0.5",
"bundled": true, "bundled": true,
@@ -8779,10 +8773,10 @@
"resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.0.1.tgz", "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.0.1.tgz",
"integrity": "sha1-wDv04BywhtW15azorQr+eInWOMM=", "integrity": "sha1-wDv04BywhtW15azorQr+eInWOMM=",
"requires": { "requires": {
"JSONStream": "1.3.1",
"combine-source-map": "0.7.2", "combine-source-map": "0.7.2",
"concat-stream": "1.5.2", "concat-stream": "1.5.2",
"is-buffer": "1.1.6", "is-buffer": "1.1.6",
"JSONStream": "1.3.1",
"lexical-scope": "1.2.0", "lexical-scope": "1.2.0",
"process": "0.11.10", "process": "0.11.10",
"through2": "2.0.3", "through2": "2.0.3",
@@ -9618,15 +9612,6 @@
"resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz",
"integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=" "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk="
}, },
"JSONStream": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz",
"integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=",
"requires": {
"jsonparse": "1.3.1",
"through": "2.3.8"
}
},
"jsprim": { "jsprim": {
"version": "1.4.1", "version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
@@ -11424,6 +11409,7 @@
"resolved": "https://registry.npmjs.org/module-deps/-/module-deps-4.1.1.tgz", "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-4.1.1.tgz",
"integrity": "sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=", "integrity": "sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=",
"requires": { "requires": {
"JSONStream": "1.3.1",
"browser-resolve": "1.11.2", "browser-resolve": "1.11.2",
"cached-path-relative": "1.0.1", "cached-path-relative": "1.0.1",
"concat-stream": "1.5.2", "concat-stream": "1.5.2",
@@ -11431,7 +11417,6 @@
"detective": "4.5.0", "detective": "4.5.0",
"duplexer2": "0.1.4", "duplexer2": "0.1.4",
"inherits": "2.0.3", "inherits": "2.0.3",
"JSONStream": "1.3.1",
"parents": "1.0.1", "parents": "1.0.1",
"readable-stream": "2.0.6", "readable-stream": "2.0.6",
"resolve": "1.5.0", "resolve": "1.5.0",
@@ -15299,22 +15284,6 @@
"throttleit": "1.0.0" "throttleit": "1.0.0"
} }
}, },
"require_optional": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz",
"integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==",
"requires": {
"resolve-from": "2.0.0",
"semver": "5.4.1"
},
"dependencies": {
"semver": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
"integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg=="
}
}
},
"require-again": { "require-again": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-again/-/require-again-2.0.0.tgz", "resolved": "https://registry.npmjs.org/require-again/-/require-again-2.0.0.tgz",
@@ -15354,6 +15323,22 @@
} }
} }
}, },
"require_optional": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz",
"integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==",
"requires": {
"resolve-from": "2.0.0",
"semver": "5.4.1"
},
"dependencies": {
"semver": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
"integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg=="
}
}
},
"requires-port": { "requires-port": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
@@ -16663,11 +16648,6 @@
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM="
}, },
"string_decoder": {
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
},
"string-width": { "string-width": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
@@ -16678,6 +16658,11 @@
"strip-ansi": "3.0.1" "strip-ansi": "3.0.1"
} }
}, },
"string_decoder": {
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
},
"stringstream": { "stringstream": {
"version": "0.0.5", "version": "0.0.5",
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
@@ -17208,11 +17193,6 @@
"require-main-filename": "1.0.1" "require-main-filename": "1.0.1"
} }
}, },
"tether": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/tether/-/tether-1.4.0.tgz",
"integrity": "sha1-D5+hcfdb9YSF2BSelHmdeudNHBo="
},
"text-table": { "text-table": {
"version": "0.2.0", "version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
@@ -18209,11 +18189,6 @@
"resolved": "https://registry.npmjs.org/vue/-/vue-2.5.3.tgz", "resolved": "https://registry.npmjs.org/vue/-/vue-2.5.3.tgz",
"integrity": "sha512-C8O5ZtR9jpwm6sCre3k42/WvuAcil5hH1+c3mJks8kNCYKh57sQh6I5U7m9L0fD89OKkIofmebUORngZkLedNA==" "integrity": "sha512-C8O5ZtR9jpwm6sCre3k42/WvuAcil5hH1+c3mJks8kNCYKh57sQh6I5U7m9L0fD89OKkIofmebUORngZkLedNA=="
}, },
"vue-functional-data-merge": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/vue-functional-data-merge/-/vue-functional-data-merge-1.0.6.tgz",
"integrity": "sha512-wzUHcvLBiVJcDais1HdmFObi2VagMB5jd/dZuacDO0GCdHURxkvPrReaAyAhW/+g29j5gRu0QKP1DH7CaBRwmQ=="
},
"vue-hot-reload-api": { "vue-hot-reload-api": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.2.0.tgz", "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.2.0.tgz",

View File

@@ -31,8 +31,8 @@
"bcrypt": "^1.0.2", "bcrypt": "^1.0.2",
"bluebird": "^3.3.5", "bluebird": "^3.3.5",
"body-parser": "^1.15.0", "body-parser": "^1.15.0",
"bootstrap": "4.0.0-alpha.6", "bootstrap": "4.0.0-beta.2",
"bootstrap-vue": "1.0.0-beta.7", "bootstrap-vue": "1.0.0-beta.9",
"browserify": "~12.0.1", "browserify": "~12.0.1",
"compression": "^1.6.1", "compression": "^1.6.1",
"connect-ratelimit": "0.0.7", "connect-ratelimit": "0.0.7",

View File

@@ -135,12 +135,12 @@ export default {
// @TODO: I'm not sure these should be at the app level. Can we move these back into shop/inventory or maybe they need a lateral move? // @TODO: I'm not sure these should be at the app level. Can we move these back into shop/inventory or maybe they need a lateral move?
this.$root.$on('buyModal::showItem', (item) => { this.$root.$on('buyModal::showItem', (item) => {
this.selectedItemToBuy = item; this.selectedItemToBuy = item;
this.$root.$emit('show::modal', 'buy-modal'); this.$root.$emit('bv::show::modal', 'buy-modal');
}); });
this.$root.$on('selectMembersModal::showItem', (item) => { this.$root.$on('selectMembersModal::showItem', (item) => {
this.selectedSpellToBuy = item; this.selectedSpellToBuy = item;
this.$root.$emit('show::modal', 'select-member-modal'); this.$root.$emit('bv::show::modal', 'select-member-modal');
}); });
// @TODO split up this file, it's too big // @TODO split up this file, it's too big
@@ -264,7 +264,7 @@ export default {
} }
// Manage modals // Manage modals
this.$root.$on('show::modal', (modalId, data = {}) => { this.$root.$on('bv::show::modal', (modalId, data = {}) => {
if (data.fromRoot) return; if (data.fromRoot) return;
// Track opening of gems modal unless it's been already tracked // Track opening of gems modal unless it's been already tracked
@@ -286,7 +286,7 @@ export default {
this.$store.state.modalStack.push(modalId); this.$store.state.modalStack.push(modalId);
// Hide the previous top modal // Hide the previous top modal
if (modalOnTop) this.$root.$emit('hide::modal', modalOnTop, {fromRoot: true}); if (modalOnTop) this.$root.$emit('bv::hide::modal', modalOnTop, {fromRoot: true});
}); });
// @TODO: This part is hacky and could be solved with two options: // @TODO: This part is hacky and could be solved with two options:
@@ -307,7 +307,7 @@ export default {
// Recalculate and show the last modal if there is one // Recalculate and show the last modal if there is one
modalStackLength = this.$store.state.modalStack.length; modalStackLength = this.$store.state.modalStack.length;
modalOnTop = this.$store.state.modalStack[modalStackLength - 1]; modalOnTop = this.$store.state.modalStack[modalStackLength - 1];
if (modalOnTop) this.$root.$emit('show::modal', modalOnTop, {fromRoot: true}); if (modalOnTop) this.$root.$emit('bv::show::modal', modalOnTop, {fromRoot: true});
}); });
}, },
methods: { methods: {
@@ -333,8 +333,8 @@ export default {
if (this.user.party._id) { if (this.user.party._id) {
this.selectedSpellToBuy = item; this.selectedSpellToBuy = item;
this.$root.$emit('hide::modal', 'buy-modal'); this.$root.$emit('bv::hide::modal', 'buy-modal');
this.$root.$emit('show::modal', 'select-member-modal'); this.$root.$emit('bv::show::modal', 'select-member-modal');
} else { } else {
this.error(this.$t('errorNotInParty')); this.error(this.$t('errorNotInParty'));
} }
@@ -346,7 +346,7 @@ export default {
this.$store.dispatch('party:getMembers', {forceLoad: true}); this.$store.dispatch('party:getMembers', {forceLoad: true});
this.$root.$emit('hide::modal', 'select-member-modal'); this.$root.$emit('bv::hide::modal', 'select-member-modal');
}, },
hideLoadingScreen () { hideLoadingScreen () {
const loadingScreen = document.getElementById('loading-screen'); const loadingScreen = document.getElementById('loading-screen');

View File

@@ -26,7 +26,7 @@
} }
&:active:not(.btn-flat), &.active:not(.btn-flat) { &:active:not(.btn-flat), &.active:not(.btn-flat) {
box-shadow: none; box-shadow: none !important;
border: 1px solid transparent; border: 1px solid transparent;
} }
} }
@@ -45,7 +45,7 @@
} }
&:hover:not(:disabled), &:active, &.active, &:focus { &:hover:not(:disabled), &:active, &.active, &:focus {
background: #5d3b9c; background: #5d3b9c !important;
color: $white; color: $white;
} }
} }

View File

@@ -1,7 +1,6 @@
@import '~client/assets/scss/colors.scss'; @import '~client/assets/scss/colors.scss';
@mixin centeredModal() { @mixin centeredModal() {
display: flex; display: flex;
justify-content: center; justify-content: center;
@@ -13,6 +12,8 @@
} }
.modal-dialog { .modal-dialog {
width: auto;
.title { .title {
min-height: 24px; min-height: 24px;
margin-top: 24px; margin-top: 24px;

View File

@@ -18,15 +18,10 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
export default { export default {
components: {
bModal,
},
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'armoire-empty'); this.$root.$emit('bv::hide::modal', 'armoire-empty');
}, },
}, },
}; };

View File

@@ -117,9 +117,6 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import bPopover from 'bootstrap-vue/lib/components/popover';
import Avatar from '../avatar'; import Avatar from '../avatar';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import markdownDirective from 'client/directives/markdown'; import markdownDirective from 'client/directives/markdown';
@@ -130,8 +127,6 @@ import wizardIcon from 'assets/svg/wizard.svg';
export default { export default {
components: { components: {
bModal,
bPopover,
Avatar, Avatar,
}, },
computed: { computed: {
@@ -156,7 +151,7 @@ export default {
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'choose-class'); this.$root.$emit('bv::hide::modal', 'choose-class');
}, },
clickSelectClass (heroClass) { clickSelectClass (heroClass) {
this.$store.dispatch('user:changeClass', {query: {class: heroClass}}); this.$store.dispatch('user:changeClass', {query: {class: heroClass}});

View File

@@ -22,7 +22,6 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import achievementFooter from './achievementFooter'; import achievementFooter from './achievementFooter';
import achievementAvatar from './achievementAvatar'; import achievementAvatar from './achievementAvatar';
@@ -30,7 +29,6 @@ import { mapState } from 'client/libs/store';
export default { export default {
components: { components: {
bModal,
achievementFooter, achievementFooter,
achievementAvatar, achievementAvatar,
}, },
@@ -39,7 +37,7 @@ export default {
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'contributor'); this.$root.$emit('bv::hide::modal', 'contributor');
}, },
}, },
}; };

View File

@@ -31,8 +31,6 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import axios from 'axios'; import axios from 'axios';
import Avatar from '../avatar'; import Avatar from '../avatar';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
@@ -42,7 +40,6 @@ import {maxHealth} from '../../../common/script/index';
export default { export default {
components: { components: {
bModal,
Avatar, Avatar,
}, },
data () { data () {
@@ -60,7 +57,7 @@ export default {
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'death'); this.$root.$emit('bv::hide::modal', 'death');
}, },
async revive () { async revive () {
await axios.post('/api/v3/user/revive'); await axios.post('/api/v3/user/revive');

View File

@@ -20,15 +20,10 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import eggs from '../../../common/script/content/eggs'; import eggs from '../../../common/script/content/eggs';
export default { export default {
components: {
bModal,
},
data () { data () {
return { return {
eggs, eggs,
@@ -45,7 +40,7 @@ export default {
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'drops-enabled'); this.$root.$emit('bv::hide::modal', 'drops-enabled');
}, },
}, },
}; };

View File

@@ -21,19 +21,17 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import achievementFooter from './achievementFooter'; import achievementFooter from './achievementFooter';
import achievementAvatar from './achievementAvatar'; import achievementAvatar from './achievementAvatar';
export default { export default {
components: { components: {
bModal,
achievementFooter, achievementFooter,
achievementAvatar, achievementAvatar,
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'invited-friend'); this.$root.$emit('bv::hide::modal', 'invited-friend');
}, },
}, },
}; };

View File

@@ -21,19 +21,17 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import achievementFooter from './achievementFooter'; import achievementFooter from './achievementFooter';
import achievementAvatar from './achievementAvatar'; import achievementAvatar from './achievementAvatar';
export default { export default {
components: { components: {
bModal,
achievementFooter, achievementFooter,
achievementAvatar, achievementAvatar,
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'joined-challenge'); this.$root.$emit('bv::hide::modal', 'joined-challenge');
}, },
}, },
}; };

View File

@@ -21,19 +21,17 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import achievementFooter from './achievementFooter'; import achievementFooter from './achievementFooter';
import achievementAvatar from './achievementAvatar'; import achievementAvatar from './achievementAvatar';
export default { export default {
components: { components: {
bModal,
achievementFooter, achievementFooter,
achievementAvatar, achievementAvatar,
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'joined-guild'); this.$root.$emit('bv::hide::modal', 'joined-guild');
}, },
}, },
}; };

View File

@@ -114,8 +114,6 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import Avatar from '../avatar'; import Avatar from '../avatar';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import {maxHealth} from '../../../common/script/index'; import {maxHealth} from '../../../common/script/index';
@@ -128,7 +126,6 @@ let BASE_URL = 'https://habitica.com';
export default { export default {
mixins: [styleHelper], mixins: [styleHelper],
components: { components: {
bModal,
Avatar, Avatar,
}, },
data () { data () {
@@ -157,7 +154,7 @@ export default {
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'level-up'); this.$root.$emit('bv::hide::modal', 'level-up');
}, },
loadWidgets () { loadWidgets () {
// @TODO: // @TODO:

View File

@@ -51,7 +51,6 @@ b-modal#login-incentives(:title="data.message", size='md', :hide-footer="true")
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import Avatar from '../avatar'; import Avatar from '../avatar';
import {loginIncentives} from '../../../common/script/content/index'; import {loginIncentives} from '../../../common/script/content/index';
@@ -59,7 +58,6 @@ import {loginIncentives} from '../../../common/script/content/index';
export default { export default {
components: { components: {
Avatar, Avatar,
bModal,
}, },
props: ['data'], props: ['data'],
data () { data () {
@@ -79,7 +77,7 @@ export default {
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'login-incentives'); this.$root.$emit('bv::hide::modal', 'login-incentives');
}, },
}, },
}; };

View File

@@ -56,8 +56,6 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import Avatar from '../avatar'; import Avatar from '../avatar';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import * as Analytics from 'client/libs/analytics'; import * as Analytics from 'client/libs/analytics';
@@ -66,7 +64,6 @@ import {maxHealth} from '../../../common/script/index';
export default { export default {
components: { components: {
bModal,
Avatar, Avatar,
}, },
data () { data () {
@@ -95,7 +92,7 @@ export default {
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'low-health'); this.$root.$emit('bv::hide::modal', 'low-health');
}, },
acknowledgeHealthWarning () { acknowledgeHealthWarning () {
this.$store.dispatch('user:set', { this.$store.dispatch('user:set', {

View File

@@ -22,15 +22,12 @@
</style> </style>
<script> <script>
// import axios from 'axios';
import bModal from 'bootstrap-vue/lib/components/modal';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import markdown from 'client/directives/markdown'; import markdown from 'client/directives/markdown';
import newStuff from 'client/components/static/newStuff'; import newStuff from 'client/components/static/newStuff';
export default { export default {
components: { components: {
bModal,
newStuff, newStuff,
}, },
computed: { computed: {
@@ -40,18 +37,18 @@
markdown, markdown,
}, },
mounted () { mounted () {
this.$root.$on('show::modal', async (modalId) => { this.$root.$on('bv::show::modal', async (modalId) => {
if (modalId !== 'new-stuff') return; if (modalId !== 'new-stuff') return;
// Request the lastest news, but not locally incase they don't refresh // Request the lastest news, but not locally incase they don't refresh
// let response = await axios.get('/static/new-stuff'); // let response = await axios.get('/static/new-stuff');
}); });
}, },
destroyed () { destroyed () {
this.$root.$off('show::modal'); this.$root.$off('bv::show::modal');
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'new-stuff'); this.$root.$emit('bv::hide::modal', 'new-stuff');
}, },
dismissAlert () { dismissAlert () {
this.$store.dispatch('user:set', {'flags.newStuff': false}); this.$store.dispatch('user:set', {'flags.newStuff': false});

View File

@@ -22,7 +22,6 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import quests from 'common/script/content/quests'; import quests from 'common/script/content/quests';
import questDialogDrops from 'client/components/shops/quests/questDialogDrops'; import questDialogDrops from 'client/components/shops/quests/questDialogDrops';
@@ -32,7 +31,6 @@ import { maxHealth } from '../../../common/script/index';
export default { export default {
components: { components: {
bModal,
questDialogDrops, questDialogDrops,
}, },
data () { data () {
@@ -57,7 +55,7 @@ export default {
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'quest-completed'); this.$root.$emit('bv::hide::modal', 'quest-completed');
}, },
setQuestCompleted () { setQuestCompleted () {
this.$store.dispatch('user:set', {'party.quest.completed': ''}); this.$store.dispatch('user:set', {'party.quest.completed': ''});

View File

@@ -45,17 +45,12 @@
</template> </template>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import quests from 'common/script/content/quests'; import quests from 'common/script/content/quests';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import percent from '../../../common/script/libs/percent'; import percent from '../../../common/script/libs/percent';
import {maxHealth} from '../../../common/script/index'; import {maxHealth} from '../../../common/script/index';
export default { export default {
components: {
bModal,
},
data () { data () {
return { return {
maxHealth, maxHealth,
@@ -72,7 +67,7 @@ export default {
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'quest-invitation'); this.$root.$emit('bv::hide::modal', 'quest-invitation');
}, },
}, },
}; };

View File

@@ -24,7 +24,6 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import achievementFooter from './achievementFooter'; import achievementFooter from './achievementFooter';
import achievementAvatar from './achievementAvatar'; import achievementAvatar from './achievementAvatar';
@@ -32,7 +31,6 @@ import { mapState } from 'client/libs/store';
export default { export default {
components: { components: {
bModal,
achievementFooter, achievementFooter,
achievementAvatar, achievementAvatar,
}, },
@@ -41,7 +39,7 @@ export default {
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'rebirth'); this.$root.$emit('bv::hide::modal', 'rebirth');
}, },
}, },
}; };

View File

@@ -17,20 +17,15 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
export default { export default {
components: {
bModal,
},
computed: { computed: {
...mapState({user: 'user.data'}), ...mapState({user: 'user.data'}),
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'rebirth-enabled'); this.$root.$emit('bv::hide::modal', 'rebirth-enabled');
}, },
}, },
}; };

View File

@@ -27,7 +27,6 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import achievementFooter from './achievementFooter'; import achievementFooter from './achievementFooter';
import achievementAvatar from './achievementAvatar'; import achievementAvatar from './achievementAvatar';
@@ -35,7 +34,6 @@ import { mapState } from 'client/libs/store';
export default { export default {
components: { components: {
bModal,
achievementFooter, achievementFooter,
achievementAvatar, achievementAvatar,
}, },
@@ -44,7 +42,7 @@ export default {
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'streak'); this.$root.$emit('bv::hide::modal', 'streak');
}, },
suppressModals () { suppressModals () {
let surpress = this.user.preferences.suppressModals.streak ? true : false; let surpress = this.user.preferences.suppressModals.streak ? true : false;

View File

@@ -21,15 +21,10 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
export default { export default {
components: {
bModal,
},
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'testing'); this.$root.$emit('bv::hide::modal', 'testing');
}, },
takeMethere () { takeMethere () {
this.$router.push('/groups/discovery'); this.$router.push('/groups/discovery');

View File

@@ -22,15 +22,10 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
export default { export default {
components: {
bModal,
},
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'testingletiant'); this.$root.$emit('bv::hide::modal', 'testingletiant');
}, },
takeMethere () { takeMethere () {
this.$router.push('/groups/discovery'); this.$router.push('/groups/discovery');

View File

@@ -46,14 +46,12 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import achievementFooter from './achievementFooter'; import achievementFooter from './achievementFooter';
import achievementAvatar from './achievementAvatar'; import achievementAvatar from './achievementAvatar';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
export default { export default {
components: { components: {
bModal,
achievementFooter, achievementFooter,
achievementAvatar, achievementAvatar,
}, },
@@ -62,7 +60,7 @@ export default {
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'ultimate-gear'); this.$root.$emit('bv::hide::modal', 'ultimate-gear');
}, },
}, },
}; };

View File

@@ -31,17 +31,12 @@
</template> </template>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
export default { export default {
components: {
bModal,
},
methods: { methods: {
ready () { ready () {
// Guide.goto("intro",0)' // Guide.goto("intro",0)'
this.$router.push('/avatar'); this.$router.push('/avatar');
this.$root.$emit('hide::modal', 'welcome'); this.$root.$emit('bv::hide::modal', 'welcome');
}, },
}, },
}; };

View File

@@ -38,13 +38,11 @@
<script> <script>
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import bModal from 'bootstrap-vue/lib/components/modal';
import markdownDirective from 'client/directives/markdown'; import markdownDirective from 'client/directives/markdown';
import Avatar from '../avatar'; import Avatar from '../avatar';
export default { export default {
components: { components: {
bModal,
Avatar, Avatar,
}, },
directives: { directives: {
@@ -61,7 +59,7 @@ export default {
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'won-challenge'); this.$root.$emit('bv::hide::modal', 'won-challenge');
}, },
}, },
}; };

View File

@@ -363,7 +363,7 @@ export default {
// @TODO: sync() // @TODO: sync()
}, },
openModifyInventoryModal () { openModifyInventoryModal () {
this.$root.$emit('show::modal', 'modify-inventory'); this.$root.$emit('bv::show::modal', 'modify-inventory');
}, },
donate () { donate () {
Analytics.track({ Analytics.track({
@@ -372,7 +372,7 @@ export default {
eventAction: 'click', eventAction: 'click',
eventLabel: 'Gems > Donate', eventLabel: 'Gems > Donate',
}); });
this.$root.$emit('show::modal', 'buy-gems'); this.$root.$emit('bv::show::modal', 'buy-gems');
}, },
}, },
}; };

View File

@@ -177,8 +177,6 @@
const TASK_KEYS_TO_REMOVE = ['_id', 'completed', 'date', 'dateCompleted', 'history', 'id', 'streak', 'createdAt', 'challenge']; const TASK_KEYS_TO_REMOVE = ['_id', 'completed', 'date', 'dateCompleted', 'history', 'id', 'streak', 'createdAt', 'challenge'];
import Vue from 'vue'; import Vue from 'vue';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import findIndex from 'lodash/findIndex'; import findIndex from 'lodash/findIndex';
import cloneDeep from 'lodash/cloneDeep'; import cloneDeep from 'lodash/cloneDeep';
import omit from 'lodash/omit'; import omit from 'lodash/omit';
@@ -209,8 +207,6 @@ export default {
challengeMemberProgressModal, challengeMemberProgressModal,
TaskColumn: Column, TaskColumn: Column,
TaskModal, TaskModal,
bDropdown,
bDropdownItem,
}, },
data () { data () {
return { return {
@@ -325,7 +321,7 @@ export default {
this.workingTask = this.editingTask; this.workingTask = this.editingTask;
// Necessary otherwise the first time the modal is not rendered // Necessary otherwise the first time the modal is not rendered
Vue.nextTick(() => { Vue.nextTick(() => {
this.$root.$emit('show::modal', 'task-modal'); this.$root.$emit('bv::show::modal', 'task-modal');
}); });
}, },
createTask (type) { createTask (type) {
@@ -334,7 +330,7 @@ export default {
this.workingTask = this.creatingTask; this.workingTask = this.creatingTask;
// Necessary otherwise the first time the modal is not rendered // Necessary otherwise the first time the modal is not rendered
Vue.nextTick(() => { Vue.nextTick(() => {
this.$root.$emit('show::modal', 'task-modal'); this.$root.$emit('bv::show::modal', 'task-modal');
}); });
}, },
cancelTaskModal () { cancelTaskModal () {
@@ -361,7 +357,7 @@ export default {
this.$store.state.memberModalOptions.groupId = 'challenge'; // @TODO: change these terrible settings this.$store.state.memberModalOptions.groupId = 'challenge'; // @TODO: change these terrible settings
this.$store.state.memberModalOptions.group = this.group; this.$store.state.memberModalOptions.group = this.group;
this.$store.state.memberModalOptions.viewingMembers = this.members; this.$store.state.memberModalOptions.viewingMembers = this.members;
this.$root.$emit('show::modal', 'members-modal'); this.$root.$emit('bv::show::modal', 'members-modal');
}, },
async joinChallenge () { async joinChallenge () {
this.user.challenges.push(this.searchId); this.user.challenges.push(this.searchId);
@@ -384,13 +380,13 @@ export default {
await this.$store.dispatch('tasks:fetchUserTasks', {forceLoad: true}); await this.$store.dispatch('tasks:fetchUserTasks', {forceLoad: true});
}, },
closeChallenge () { closeChallenge () {
this.$root.$emit('show::modal', 'close-challenge-modal'); this.$root.$emit('bv::show::modal', 'close-challenge-modal');
}, },
edit () { edit () {
// @TODO: set working challenge // @TODO: set working challenge
this.cloning = false; this.cloning = false;
this.$store.state.challengeOptions.workingChallenge = Object.assign({}, this.$store.state.challengeOptions.workingChallenge, this.challenge); this.$store.state.challengeOptions.workingChallenge = Object.assign({}, this.$store.state.challengeOptions.workingChallenge, this.challenge);
this.$root.$emit('show::modal', 'challenge-modal'); this.$root.$emit('bv::show::modal', 'challenge-modal');
}, },
// @TODO: view members // @TODO: view members
updatedChallenge (eventData) { updatedChallenge (eventData) {
@@ -398,7 +394,7 @@ export default {
}, },
openMemberProgressModal (memberId) { openMemberProgressModal (memberId) {
this.progressMemberId = memberId; this.progressMemberId = memberId;
this.$root.$emit('show::modal', 'challenge-member-modal'); this.$root.$emit('bv::show::modal', 'challenge-member-modal');
}, },
async exportChallengeCsv () { async exportChallengeCsv () {
// let response = await this.$store.dispatch('challenges:exportChallengeCsv', { // let response = await this.$store.dispatch('challenges:exportChallengeCsv', {
@@ -410,7 +406,7 @@ export default {
this.cloning = true; this.cloning = true;
this.$store.state.challengeOptions.tasksToClone = this.tasksByType; this.$store.state.challengeOptions.tasksToClone = this.tasksByType;
this.$store.state.challengeOptions.workingChallenge = Object.assign({}, this.$store.state.challengeOptions.workingChallenge, this.challenge); this.$store.state.challengeOptions.workingChallenge = Object.assign({}, this.$store.state.challengeOptions.workingChallenge, this.challenge);
this.$root.$emit('show::modal', 'challenge-modal'); this.$root.$emit('bv::show::modal', 'challenge-modal');
}, },
}, },
}; };

View File

@@ -10,13 +10,11 @@
<script> <script>
import axios from 'axios'; import axios from 'axios';
import bModal from 'bootstrap-vue/lib/components/modal';
import Column from '../tasks/column'; import Column from '../tasks/column';
export default { export default {
props: ['challengeId', 'memberId'], props: ['challengeId', 'memberId'],
components: { components: {
bModal,
TaskColumn: Column, TaskColumn: Column,
}, },
data () { data () {

View File

@@ -131,10 +131,6 @@
<script> <script>
import clone from 'lodash/clone'; import clone from 'lodash/clone';
import bModal from 'bootstrap-vue/lib/components/modal';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import bFormInput from 'bootstrap-vue/lib/components/form-input';
import markdownDirective from 'client/directives/markdown'; import markdownDirective from 'client/directives/markdown';
@@ -143,12 +139,6 @@ import { mapState } from 'client/libs/store';
export default { export default {
props: ['groupId', 'cloning'], props: ['groupId', 'cloning'],
components: {
bModal,
bDropdown,
bDropdownItem,
bFormInput,
},
directives: { directives: {
markdown: markdownDirective, markdown: markdownDirective,
}, },
@@ -402,7 +392,7 @@ export default {
if (this.cloning) this.$store.state.challengeOptions.cloning = true; if (this.cloning) this.$store.state.challengeOptions.cloning = true;
this.$root.$emit('hide::modal', 'challenge-modal'); this.$root.$emit('bv::hide::modal', 'challenge-modal');
this.$router.push(`/challenges/${challenge._id}`); this.$router.push(`/challenges/${challenge._id}`);
}, },
updateChallenge () { updateChallenge () {
@@ -425,7 +415,7 @@ export default {
}); });
this.$store.dispatch('challenges:updateChallenge', {challenge: challengeDetails}); this.$store.dispatch('challenges:updateChallenge', {challenge: challengeDetails});
this.resetWorkingChallenge(); this.resetWorkingChallenge();
this.$root.$emit('hide::modal', 'challenge-modal'); this.$root.$emit('bv::hide::modal', 'challenge-modal');
}, },
toggleCategorySelect () { toggleCategorySelect () {
this.showCategorySelect = !this.showCategorySelect; this.showCategorySelect = !this.showCategorySelect;

View File

@@ -75,17 +75,9 @@ div
<script> <script>
import debounce from 'lodash/debounce'; import debounce from 'lodash/debounce';
import bModal from 'bootstrap-vue/lib/components/modal';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
export default { export default {
props: ['challengeId', 'members'], props: ['challengeId', 'members'],
components: {
bModal,
bDropdown,
bDropdownItem,
},
data () { data () {
return { return {
winner: {}, winner: {},

View File

@@ -44,8 +44,6 @@
<script> <script>
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import Sidebar from './sidebar'; import Sidebar from './sidebar';
import ChallengeItem from './challengeItem'; import ChallengeItem from './challengeItem';
import challengeModal from './challengeModal'; import challengeModal from './challengeModal';
@@ -59,8 +57,6 @@ export default {
Sidebar, Sidebar,
ChallengeItem, ChallengeItem,
challengeModal, challengeModal,
bDropdown,
bDropdownItem,
}, },
data () { data () {
return { return {
@@ -124,7 +120,7 @@ export default {
this.filters = eventData; this.filters = eventData;
}, },
createChallenge () { createChallenge () {
this.$root.$emit('show::modal', 'challenge-modal'); this.$root.$emit('bv::show::modal', 'challenge-modal');
}, },
async loadchallanges () { async loadchallanges () {
this.loading = true; this.loading = true;

View File

@@ -125,7 +125,7 @@ export default {
this.challenges = await this.$store.dispatch('challenges:getGroupChallenges', {groupId: this.groupIdForChallenges}); this.challenges = await this.$store.dispatch('challenges:getGroupChallenges', {groupId: this.groupIdForChallenges});
}, },
createChallenge () { createChallenge () {
this.$root.$emit('show::modal', 'challenge-modal'); this.$root.$emit('bv::show::modal', 'challenge-modal');
}, },
challengeCreated (challenge) { challengeCreated (challenge) {
if (challenge.group._id !== this.groupIdForChallenges) return; if (challenge.group._id !== this.groupIdForChallenges) return;

View File

@@ -65,8 +65,6 @@
<script> <script>
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import Sidebar from './sidebar'; import Sidebar from './sidebar';
import ChallengeItem from './challengeItem'; import ChallengeItem from './challengeItem';
import challengeModal from './challengeModal'; import challengeModal from './challengeModal';
@@ -81,8 +79,6 @@ export default {
Sidebar, Sidebar,
ChallengeItem, ChallengeItem,
challengeModal, challengeModal,
bDropdown,
bDropdownItem,
}, },
data () { data () {
return { return {
@@ -151,7 +147,7 @@ export default {
}, },
createChallenge () { createChallenge () {
this.$store.state.challengeOptions.workingChallenge = {}; this.$store.state.challengeOptions.workingChallenge = {};
this.$root.$emit('show::modal', 'challenge-modal'); this.$root.$emit('bv::show::modal', 'challenge-modal');
}, },
async loadchallanges () { async loadchallanges () {
this.challenges = await this.$store.dispatch('challenges:getUserChallenges', { this.challenges = await this.$store.dispatch('challenges:getUserChallenges', {

View File

@@ -447,13 +447,13 @@ export default {
}, },
copyAsTodo (message) { copyAsTodo (message) {
this.copyingMessage = message; this.copyingMessage = message;
this.$root.$emit('show::modal', 'copyAsTodo'); this.$root.$emit('bv::show::modal', 'copyAsTodo');
}, },
async report (message) { async report (message) {
this.$store.state.flagChatOptions.message = message; this.$store.state.flagChatOptions.message = message;
this.$store.state.flagChatOptions.groupId = this.groupId; this.$store.state.flagChatOptions.groupId = this.groupId;
this.$root.$emit('show::modal', 'report-flag'); this.$root.$emit('bv::show::modal', 'report-flag');
}, },
async remove (message, index) { async remove (message, index) {
if (!confirm(this.$t('areYouSureDeleteMessage'))) return; if (!confirm(this.$t('areYouSureDeleteMessage'))) return;
@@ -479,7 +479,7 @@ export default {
// @TODO move to action or anyway move from here because it's super duplicate // @TODO move to action or anyway move from here because it's super duplicate
this.$store.state.profileUser = profile; this.$store.state.profileUser = profile;
this.$store.state.profileOptions.startingPage = 'profile'; this.$store.state.profileOptions.startingPage = 'profile';
this.$root.$emit('show::modal', 'profile'); this.$root.$emit('bv::show::modal', 'profile');
} }
}, },
}, },

View File

@@ -25,13 +25,9 @@
</template> </template>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import markdownDirective from 'client/directives/markdown'; import markdownDirective from 'client/directives/markdown';
export default { export default {
components: {
bModal,
},
directives: { directives: {
markdown: markdownDirective, markdown: markdownDirective,
}, },
@@ -51,7 +47,7 @@ export default {
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'copyAsTodo'); this.$root.$emit('bv::hide::modal', 'copyAsTodo');
}, },
saveTodo () { saveTodo () {
// let newTask = { // let newTask = {
@@ -63,7 +59,7 @@ export default {
// @TODO: Add after tasks: User.addTask({body:newTask}); // @TODO: Add after tasks: User.addTask({body:newTask});
// @TODO: Notification.text(window.env.t('messageAddedAsToDo')); // @TODO: Notification.text(window.env.t('messageAddedAsToDo'));
this.$root.$emit('hide::modal', 'copyAsTodo'); this.$root.$emit('bv::hide::modal', 'copyAsTodo');
}, },
}, },
}; };

View File

@@ -14,16 +14,12 @@
</template> </template>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import notifications from 'client/mixins/notifications'; import notifications from 'client/mixins/notifications';
import markdownDirective from 'client/directives/markdown'; import markdownDirective from 'client/directives/markdown';
export default { export default {
mixins: [notifications], mixins: [notifications],
components: {
bModal,
},
directives: { directives: {
markdown: markdownDirective, markdown: markdownDirective,
}, },
@@ -57,7 +53,7 @@ export default {
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'report-flag'); this.$root.$emit('bv::hide::modal', 'report-flag');
}, },
async reportAbuse () { async reportAbuse () {
this.notify('Thank you for reporting this violation. The moderators have been notified.'); this.notify('Thank you for reporting this violation. The moderators have been notified.');

View File

@@ -813,8 +813,6 @@ import notifications from 'client/mixins/notifications';
import appearance from 'common/script/content/appearance'; import appearance from 'common/script/content/appearance';
import appearanceSets from 'common/script/content/appearance/sets'; import appearanceSets from 'common/script/content/appearance/sets';
import bModal from 'bootstrap-vue/lib/components/modal';
import logoPurple from 'assets/svg/logo-purple.svg'; import logoPurple from 'assets/svg/logo-purple.svg';
import bodyIcon from 'assets/svg/body.svg'; import bodyIcon from 'assets/svg/body.svg';
import accessoriesIcon from 'assets/svg/accessories.svg'; import accessoriesIcon from 'assets/svg/accessories.svg';
@@ -961,7 +959,6 @@ export default {
mixins: [guide, notifications], mixins: [guide, notifications],
components: { components: {
avatar, avatar,
bModal,
}, },
mounted () { mounted () {
if (this.editing) this.modalPage = 2; if (this.editing) this.modalPage = 2;
@@ -1326,7 +1323,7 @@ export default {
this.$store.state.tasks.data[`${task.type}s`].unshift(task); this.$store.state.tasks.data[`${task.type}s`].unshift(task);
}); });
this.$root.$emit('hide::modal', 'avatar-modal'); this.$root.$emit('bv::hide::modal', 'avatar-modal');
this.$router.push('/'); this.$router.push('/');
this.$store.dispatch('user:set', { this.$store.dispatch('user:set', {
'flags.welcomed': true, 'flags.welcomed': true,

View File

@@ -228,8 +228,6 @@
import taskDefaults from 'common/script/libs/taskDefaults'; import taskDefaults from 'common/script/libs/taskDefaults';
import TaskColumn from '../tasks/column'; import TaskColumn from '../tasks/column';
import TaskModal from '../tasks/taskModal'; import TaskModal from '../tasks/taskModal';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import positiveIcon from 'assets/svg/positive.svg'; import positiveIcon from 'assets/svg/positive.svg';
import filterIcon from 'assets/svg/filter.svg'; import filterIcon from 'assets/svg/filter.svg';
@@ -250,8 +248,6 @@ export default {
components: { components: {
TaskColumn, TaskColumn,
TaskModal, TaskModal,
bDropdown,
bDropdownItem,
}, },
data () { data () {
return { return {
@@ -371,7 +367,7 @@ export default {
this.workingTask = this.editingTask; this.workingTask = this.editingTask;
// Necessary otherwise the first time the modal is not rendered // Necessary otherwise the first time the modal is not rendered
Vue.nextTick(() => { Vue.nextTick(() => {
this.$root.$emit('show::modal', 'task-modal'); this.$root.$emit('bv::show::modal', 'task-modal');
}); });
}, },
createTask (type) { createTask (type) {
@@ -380,7 +376,7 @@ export default {
this.workingTask = this.creatingTask; this.workingTask = this.creatingTask;
// Necessary otherwise the first time the modal is not rendered // Necessary otherwise the first time the modal is not rendered
Vue.nextTick(() => { Vue.nextTick(() => {
this.$root.$emit('show::modal', 'task-modal'); this.$root.$emit('bv::show::modal', 'task-modal');
}); });
}, },
taskCreated (task) { taskCreated (task) {

View File

@@ -139,8 +139,6 @@ b-modal#create-party-modal(title="Empty", size='lg', hide-footer=true)
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import * as Analytics from 'client/libs/analytics'; import * as Analytics from 'client/libs/analytics';
import bModal from 'bootstrap-vue/lib/components/modal';
import copyIcon from 'assets/svg/copy.svg'; import copyIcon from 'assets/svg/copy.svg';
import greyBadgeIcon from 'assets/svg/grey-badge.svg'; import greyBadgeIcon from 'assets/svg/grey-badge.svg';
import qrCodeIcon from 'assets/svg/qrCode.svg'; import qrCodeIcon from 'assets/svg/qrCode.svg';
@@ -148,9 +146,6 @@ import facebookIcon from 'assets/svg/facebook.svg';
import twitterIcon from 'assets/svg/twitter.svg'; import twitterIcon from 'assets/svg/twitter.svg';
export default { export default {
components: {
bModal,
},
data () { data () {
return { return {
icons: Object.freeze({ icons: Object.freeze({
@@ -190,7 +185,7 @@ export default {
partySize: 1, partySize: 1,
}); });
this.$root.$emit('hide::modal', 'create-party-modal'); this.$root.$emit('bv::hide::modal', 'create-party-modal');
this.$router.push('/party'); this.$router.push('/party');
}, },
}, },

View File

@@ -47,10 +47,6 @@ import PublicGuildItem from './publicGuildItem';
import Sidebar from './sidebar'; import Sidebar from './sidebar';
import groupUtilities from 'client/mixins/groupsUtilities'; import groupUtilities from 'client/mixins/groupsUtilities';
import bFormSelect from 'bootstrap-vue/lib/components/form-select';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import positiveIcon from 'assets/svg/positive.svg'; import positiveIcon from 'assets/svg/positive.svg';
function _mapCategories (guilds) { function _mapCategories (guilds) {
@@ -65,7 +61,7 @@ function _mapCategories (guilds) {
export default { export default {
mixins: [groupUtilities], mixins: [groupUtilities],
components: { PublicGuildItem, MugenScroll, Sidebar, bFormSelect, bDropdown, bDropdownItem }, components: { PublicGuildItem, MugenScroll, Sidebar },
data () { data () {
return { return {
icons: Object.freeze({ icons: Object.freeze({
@@ -193,7 +189,7 @@ export default {
}, },
createGroup () { createGroup () {
this.$store.state.editingGroup = {}; this.$store.state.editingGroup = {};
this.$root.$emit('show::modal', 'guild-form'); this.$root.$emit('bv::show::modal', 'guild-form');
}, },
}, },
}; };

View File

@@ -491,11 +491,6 @@ import groupChallenges from '../challenges/groupChallenges';
import groupGemsModal from 'client/components/groups/groupGemsModal'; import groupGemsModal from 'client/components/groups/groupGemsModal';
import markdownDirective from 'client/directives/markdown'; import markdownDirective from 'client/directives/markdown';
import bCollapse from 'bootstrap-vue/lib/components/collapse';
import bCard from 'bootstrap-vue/lib/components/card';
import bToggle from 'bootstrap-vue/lib/directives/toggle';
import bTooltip from 'bootstrap-vue/lib/components/tooltip';
import deleteIcon from 'assets/svg/delete.svg'; import deleteIcon from 'assets/svg/delete.svg';
import copyIcon from 'assets/svg/copy.svg'; import copyIcon from 'assets/svg/copy.svg';
import likeIcon from 'assets/svg/like.svg'; import likeIcon from 'assets/svg/like.svg';
@@ -517,9 +512,6 @@ export default {
components: { components: {
membersModal, membersModal,
startQuestModal, startQuestModal,
bCollapse,
bCard,
bTooltip,
groupFormModal, groupFormModal,
chatMessage, chatMessage,
inviteModal, inviteModal,
@@ -529,7 +521,6 @@ export default {
groupGemsModal, groupGemsModal,
}, },
directives: { directives: {
bToggle,
markdown: markdownDirective, markdown: markdownDirective,
}, },
data () { data () {
@@ -735,7 +726,7 @@ export default {
showMemberModal () { showMemberModal () {
this.$store.state.memberModalOptions.groupId = this.group._id; this.$store.state.memberModalOptions.groupId = this.group._id;
this.$store.state.memberModalOptions.group = this.group; this.$store.state.memberModalOptions.group = this.group;
this.$root.$emit('show::modal', 'members-modal'); this.$root.$emit('bv::show::modal', 'members-modal');
}, },
async sendMessage () { async sendMessage () {
if (!this.newMessage) return; if (!this.newMessage) return;
@@ -755,14 +746,14 @@ export default {
}, },
updateGuild () { updateGuild () {
this.$store.state.editingGroup = this.group; this.$store.state.editingGroup = this.group;
this.$root.$emit('show::modal', 'guild-form'); this.$root.$emit('bv::show::modal', 'guild-form');
}, },
showInviteModal () { showInviteModal () {
this.$root.$emit('show::modal', 'invite-modal'); this.$root.$emit('bv::show::modal', 'invite-modal');
}, },
async fetchGuild () { async fetchGuild () {
if (this.searchId === 'party' && !this.user.party._id) { if (this.searchId === 'party' && !this.user.party._id) {
this.$root.$emit('show::modal', 'create-party-modal'); this.$root.$emit('bv::show::modal', 'create-party-modal');
return; return;
} }
@@ -783,10 +774,10 @@ export default {
} }
}, },
openStartQuestModal () { openStartQuestModal () {
this.$root.$emit('show::modal', 'start-quest-modal'); this.$root.$emit('bv::show::modal', 'start-quest-modal');
}, },
openQuestDetails () { openQuestDetails () {
this.$root.$emit('show::modal', 'quest-details'); this.$root.$emit('bv::show::modal', 'quest-details');
}, },
checkForAchievements () { checkForAchievements () {
// Checks if user's party has reached 2 players for the first time. // Checks if user's party has reached 2 players for the first time.
@@ -871,7 +862,7 @@ export default {
}); });
if (hasQuests) { if (hasQuests) {
this.$root.$emit('show::modal', 'start-quest-modal'); this.$root.$emit('bv::show::modal', 'start-quest-modal');
return; return;
} }
// $rootScope.$state.go('options.inventory.quests'); // $rootScope.$state.go('options.inventory.quests');
@@ -880,7 +871,7 @@ export default {
let heroDetails = await this.$store.dispatch('members:fetchMember', { memberId: leader._id }); let heroDetails = await this.$store.dispatch('members:fetchMember', { memberId: leader._id });
this.$store.state.profileUser = heroDetails.data.data; this.$store.state.profileUser = heroDetails.data.data;
this.$store.state.profileOptions.startingPage = 'profile'; this.$store.state.profileOptions.startingPage = 'profile';
this.$root.$emit('show::modal', 'profile'); this.$root.$emit('bv::show::modal', 'profile');
}, },
async questAbort () { async questAbort () {
if (!confirm(this.$t('sureAbort'))) return; if (!confirm(this.$t('sureAbort'))) return;
@@ -902,7 +893,7 @@ export default {
this.user.party.quest = quest; this.user.party.quest = quest;
}, },
showGroupGems () { showGroupGems () {
this.$root.$emit('show::modal', 'group-gems-modal'); this.$root.$emit('bv::show::modal', 'group-gems-modal');
}, },
}, },
}; };

View File

@@ -168,13 +168,6 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import bBtn from 'bootstrap-vue/lib/components/button';
import bFormInput from 'bootstrap-vue/lib/components/form-input';
import bFormCheckbox from 'bootstrap-vue/lib/components/form-checkbox';
import bFormSelect from 'bootstrap-vue/lib/components/form-select';
import bTooltip from 'bootstrap-vue/lib/components/tooltip';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import toggleSwitch from 'client/components/ui/toggleSwitch'; import toggleSwitch from 'client/components/ui/toggleSwitch';
import markdownDirective from 'client/directives/markdown'; import markdownDirective from 'client/directives/markdown';
@@ -191,12 +184,6 @@ import { MAX_SUMMARY_SIZE_FOR_GUILDS } from '../../../common/script/constants';
export default { export default {
components: { components: {
bModal,
bBtn,
bFormInput,
bFormCheckbox,
bFormSelect,
bTooltip,
toggleSwitch, toggleSwitch,
}, },
directives: { directives: {
@@ -465,7 +452,7 @@ export default {
if (newgroup && newgroup._id) { if (newgroup && newgroup._id) {
this.$router.push(`/groups/guild/${newgroup._id}`); this.$router.push(`/groups/guild/${newgroup._id}`);
} }
this.$root.$emit('hide::modal', 'guild-form'); this.$root.$emit('bv::hide::modal', 'guild-form');
}, },
resetWorkingGroup () { resetWorkingGroup () {
this.workingGroup = { this.workingGroup = {

View File

@@ -17,15 +17,10 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
export default { export default {
components: {
bModal,
},
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'group-gems-modal'); this.$root.$emit('bv::hide::modal', 'group-gems-modal');
}, },
}, },
}; };

View File

@@ -323,7 +323,6 @@ div
import paymentsMixin from '../../mixins/payments'; import paymentsMixin from '../../mixins/payments';
import amazonPaymentsModal from '../payments/amazonModal'; import amazonPaymentsModal from '../payments/amazonModal';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import bModal from 'bootstrap-vue/lib/components/modal';
import group from 'assets/svg/group.svg'; import group from 'assets/svg/group.svg';
import amazonpay from 'assets/svg/amazonpay.svg'; import amazonpay from 'assets/svg/amazonpay.svg';
import positiveIcon from 'assets/svg/positive.svg'; import positiveIcon from 'assets/svg/positive.svg';
@@ -332,7 +331,6 @@ export default {
mixins: [paymentsMixin], mixins: [paymentsMixin],
components: { components: {
amazonPaymentsModal, amazonPaymentsModal,
bModal,
}, },
data () { data () {
return { return {
@@ -381,7 +379,7 @@ export default {
methods: { methods: {
launchModal () { launchModal () {
this.changePage(this.PAGES.CREATE_GROUP); this.changePage(this.PAGES.CREATE_GROUP);
this.$root.$emit('show::modal', 'group-plan-modal'); this.$root.$emit('bv::show::modal', 'group-plan-modal');
}, },
changePage (page) { changePage (page) {
this.activePage = page; this.activePage = page;

View File

@@ -53,14 +53,10 @@ import { mapState } from 'client/libs/store';
import filter from 'lodash/filter'; import filter from 'lodash/filter';
import map from 'lodash/map'; import map from 'lodash/map';
import bModal from 'bootstrap-vue/lib/components/modal';
import notifications from 'client/mixins/notifications'; import notifications from 'client/mixins/notifications';
import * as Analytics from 'client/libs/analytics'; import * as Analytics from 'client/libs/analytics';
export default { export default {
components: {
bModal,
},
mixins: [notifications], mixins: [notifications],
props: ['group'], props: ['group'],
data () { data () {
@@ -143,7 +139,7 @@ export default {
// } else { // } else {
// this.$router.push(`/groups/guilds/${this.group._id}`); // this.$router.push(`/groups/guilds/${this.group._id}`);
// } // }
this.$root.$emit('hide::modal', 'invite-modal'); this.$root.$emit('bv::hide::modal', 'invite-modal');
// @TODO: error? // @TODO: error?
// _resetInvitees(); // _resetInvitees();
}, },

View File

@@ -173,9 +173,6 @@ div
<script> <script>
import sortBy from 'lodash/sortBy'; import sortBy from 'lodash/sortBy';
import bModal from 'bootstrap-vue/lib/components/modal';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import removeMemberModal from 'client/components/members/removeMemberModal'; import removeMemberModal from 'client/components/members/removeMemberModal';
@@ -188,9 +185,6 @@ import dots from 'assets/svg/dots.svg';
export default { export default {
props: ['hideBadge'], props: ['hideBadge'],
components: { components: {
bModal,
bDropdown,
bDropdownItem,
MemberDetails, MemberDetails,
removeMemberModal, removeMemberModal,
}, },
@@ -330,18 +324,25 @@ export default {
memberId: uid, memberId: uid,
}); });
this.$root.$emit('show::modal', 'members-modal'); this.$root.$emit('bv::show::modal', 'members-modal');
}, },
async removeMember (member, index) { async removeMember (member, index) {
this.memberToRemove = member; this.memberToRemove = member;
this.memberToRemove.index = index; this.memberToRemove.index = index;
this.$root.$emit('show::modal', 'remove-member'); this.$root.$emit('bv::show::modal', 'remove-member');
}, },
memberRemoved () { memberRemoved () {
this.members.splice(this.memberToRemove.index, 1); this.members.splice(this.memberToRemove.index, 1);
this.group.memberCount -= 1; this.group.memberCount -= 1;
this.memberToRemove = {}; this.memberToRemove = {};
}, },
async quickReply (uid) {
this.memberToReply = uid;
await this.$store.dispatch('members:selectMember', {
memberId: uid,
});
this.$root.$emit('bv::show::modal', 'private-message'); // MemberModalCtrl
},
async addManager (memberId) { async addManager (memberId) {
await this.$store.dispatch('guilds:addManager', { await this.$store.dispatch('guilds:addManager', {
groupId: this.groupId, groupId: this.groupId,
@@ -357,7 +358,7 @@ export default {
alert(this.$t('managerRemoved')); alert(this.$t('managerRemoved'));
}, },
close () { close () {
this.$root.$emit('hide::modal', 'members-modal'); this.$root.$emit('bv::hide::modal', 'members-modal');
}, },
sort (option) { sort (option) {
this.sortOption = option; this.sortOption = option;

View File

@@ -67,9 +67,6 @@ import { mapState } from 'client/libs/store';
import groupUtilities from 'client/mixins/groupsUtilities'; import groupUtilities from 'client/mixins/groupsUtilities';
import MugenScroll from 'vue-mugen-scroll'; import MugenScroll from 'vue-mugen-scroll';
import bFormSelect from 'bootstrap-vue/lib/components/form-select';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import PublicGuildItem from './publicGuildItem'; import PublicGuildItem from './publicGuildItem';
import Sidebar from './sidebar'; import Sidebar from './sidebar';
@@ -79,7 +76,7 @@ import positiveIcon from 'assets/svg/positive.svg';
export default { export default {
mixins: [groupUtilities], mixins: [groupUtilities],
components: { PublicGuildItem, MugenScroll, Sidebar, bFormSelect, bDropdown, bDropdownItem }, components: { PublicGuildItem, MugenScroll, Sidebar },
data () { data () {
return { return {
icons: Object.freeze({ icons: Object.freeze({
@@ -142,7 +139,7 @@ export default {
}, },
createGroup () { createGroup () {
this.$store.state.editingGroup = {}; this.$store.state.editingGroup = {};
this.$root.$emit('show::modal', 'guild-form'); this.$root.$emit('bv::show::modal', 'guild-form');
}, },
}, },
}; };

View File

@@ -1,6 +1,6 @@
<template lang="pug"> <template lang="pug">
div div
button.btn.btn-primary(b-btn, @click="$root.$emit('show::modal','new-party-modal')") {{ $t('viewMembers') }} button.btn.btn-primary(b-btn, @click="$root.$emit('bv::show::modal','new-party-modal')") {{ $t('viewMembers') }}
b-modal#new-party-modal(:title="$t('createGuild')", size='lg') b-modal#new-party-modal(:title="$t('createGuild')", size='lg')
.header-wrap(slot="modal-header") .header-wrap(slot="modal-header")

View File

@@ -136,8 +136,6 @@
<script> <script>
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import bModal from 'bootstrap-vue/lib/components/modal';
import quests from 'common/script/content/quests'; import quests from 'common/script/content/quests';
import copyIcon from 'assets/svg/copy.svg'; import copyIcon from 'assets/svg/copy.svg';
@@ -154,7 +152,6 @@ import questDialogContent from '../shops/quests/questDialogContent';
export default { export default {
props: ['group'], props: ['group'],
components: { components: {
bModal,
questDialogDrops, questDialogDrops,
questDialogContent, questDialogContent,
}, },
@@ -210,7 +207,7 @@ export default {
this.close(); this.close();
}, },
close () { close () {
this.$root.$emit('hide::modal', 'quest-details'); this.$root.$emit('bv::hide::modal', 'quest-details');
}, },
}, },
}; };

View File

@@ -98,7 +98,6 @@
<script> <script>
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import * as Analytics from 'client/libs/analytics'; import * as Analytics from 'client/libs/analytics';
import bModal from 'bootstrap-vue/lib/components/modal';
import quests from 'common/script/content/quests'; import quests from 'common/script/content/quests';
@@ -116,7 +115,6 @@ import questDialogContent from '../shops/quests/questDialogContent';
export default { export default {
props: ['group'], props: ['group'],
components: { components: {
bModal,
questDialogDrops, questDialogDrops,
questDialogContent, questDialogContent,
}, },
@@ -175,7 +173,7 @@ export default {
this.loading = false; this.loading = false;
this.$root.$emit('hide::modal', 'start-quest-modal'); this.$root.$emit('bv::hide::modal', 'start-quest-modal');
}, },
}, },
}; };

View File

@@ -201,7 +201,7 @@ export default {
let heroDetails = await this.$store.dispatch('members:fetchMember', { memberId: hero._id }); let heroDetails = await this.$store.dispatch('members:fetchMember', { memberId: hero._id });
this.$store.state.profileUser = heroDetails.data.data; this.$store.state.profileUser = heroDetails.data.data;
this.$store.state.profileOptions.startingPage = 'profile'; this.$store.state.profileOptions.startingPage = 'profile';
this.$root.$emit('show::modal', 'profile'); this.$root.$emit('bv::show::modal', 'profile');
}, },
userLevelStyle () { userLevelStyle () {
// @TODO: implement // @TODO: implement

View File

@@ -159,10 +159,10 @@ export default {
this.$store.state.memberModalOptions.groupId = this.user.party._id; this.$store.state.memberModalOptions.groupId = this.user.party._id;
// @TODO: do we need to fetch party? // @TODO: do we need to fetch party?
// this.$store.state.memberModalOptions.group = this.$store.state.party; // this.$store.state.memberModalOptions.group = this.$store.state.party;
this.$root.$emit('show::modal', 'members-modal'); this.$root.$emit('bv::show::modal', 'members-modal');
return; return;
} }
this.$root.$emit('show::modal', 'create-party-modal'); this.$root.$emit('bv::show::modal', 'create-party-modal');
}, },
setPartyMembersWidth ($event) { setPartyMembersWidth ($event) {
if (this.currentWidth !== $event.width) { if (this.currentWidth !== $event.width) {

View File

@@ -3,10 +3,13 @@ div
inbox-modal inbox-modal
creator-intro creator-intro
profile profile
nav.navbar.navbar-inverse.fixed-top.navbar-toggleable-md b-navbar.navbar.navbar-inverse.fixed-top.navbar-expand-md(type="dark")
.navbar-header .navbar-header
.logo.svg-icon.hidden-lg-down(v-html="icons.logo") .logo.svg-icon.d-none.d-xl-block(v-html="icons.logo")
.svg-icon.gryphon.hidden-xl-up .svg-icon.gryphon.d-md-block.d-none.d-xl-none
.svg-icon.gryphon.d-sm-block.d-lg-none.d-md-none
b-nav-toggle(target='nav_collapse')
b-collapse#nav_collapse.collapse.navbar-collapse(is-nav) b-collapse#nav_collapse.collapse.navbar-collapse(is-nav)
ul.navbar-nav.mr-auto ul.navbar-nav.mr-auto
router-link.nav-item(tag="li", :to="{name: 'tasks'}", exact) router-link.nav-item(tag="li", :to="{name: 'tasks'}", exact)
@@ -67,7 +70,6 @@ div
.svg-icon(v-html="icons.sync") .svg-icon(v-html="icons.sync")
notification-menu.item-with-icon notification-menu.item-with-icon
user-dropdown.item-with-icon user-dropdown.item-with-icon
b-nav-toggle(target='nav_collapse')
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
@@ -92,12 +94,20 @@ div
background-size: cover; background-size: cover;
color: $white; color: $white;
margin: 0 auto; margin: 0 auto;
}
.svg-icon.gryphon.d-sm-block {
position: absolute;
left: calc(50% - 30px);
top: 1em;
} }
} }
@media only screen and (max-width: 990px) { @media only screen and (max-width: 990px) {
#nav_collapse { #nav_collapse {
margin-top: 1.3em; margin-top: 0.6em;
background-color: $purple-200; background-color: $purple-200;
} }
} }
@@ -122,7 +132,7 @@ div
.nav-item { .nav-item {
.nav-link { .nav-link {
font-size: 16px; font-size: 16px;
color: $white; color: $white !important;
font-weight: bold; font-weight: bold;
line-height: 1.5; line-height: 1.5;
padding: 16px 24px; padding: 16px 24px;
@@ -131,7 +141,7 @@ div
&:hover { &:hover {
.nav-link { .nav-link {
color: $white; color: $white !important;
background: $purple-200; background: $purple-200;
} }
} }
@@ -188,6 +198,7 @@ div
.item-with-icon { .item-with-icon {
color: $white; color: $white;
font-size: 16px; font-size: 16px;
font-weight: normal;
white-space: nowrap; white-space: nowrap;
span { span {
@@ -220,12 +231,29 @@ div
.gem:hover { .gem:hover {
cursor: pointer; cursor: pointer;
} }
.message-count {
background-color: $blue-50;
border-radius: 50%;
height: 20px;
width: 20px;
float: right;
color: $white;
text-align: center;
font-weight: bold;
font-size: 12px;
}
.message-count.top-count {
background-color: $red-50;
position: absolute;
right: 0;
top: -0.5em;
padding: .2em;
}
</style> </style>
<script> <script>
import bNavToggle from 'bootstrap-vue/lib/components/nav-toggle';
import bCollapse from 'bootstrap-vue/lib/components/collapse';
import { mapState, mapGetters } from 'client/libs/store'; import { mapState, mapGetters } from 'client/libs/store';
import * as Analytics from 'client/libs/analytics'; import * as Analytics from 'client/libs/analytics';
import gemIcon from 'assets/svg/gem.svg'; import gemIcon from 'assets/svg/gem.svg';
@@ -238,7 +266,6 @@ import notificationMenu from './notificationsDropdown';
import creatorIntro from '../creatorIntro'; import creatorIntro from '../creatorIntro';
import profile from '../userMenu/profile'; import profile from '../userMenu/profile';
import userDropdown from './userDropdown'; import userDropdown from './userDropdown';
import bTooltip from 'bootstrap-vue/lib/directives/tooltip';
export default { export default {
components: { components: {
@@ -247,11 +274,6 @@ export default {
notificationMenu, notificationMenu,
creatorIntro, creatorIntro,
profile, profile,
bNavToggle,
bCollapse,
},
directives: {
bTooltip,
}, },
data () { data () {
return { return {
@@ -292,7 +314,7 @@ export default {
this.$store.state.groupPlans = await this.$store.dispatch('guilds:getGroupPlans'); this.$store.state.groupPlans = await this.$store.dispatch('guilds:getGroupPlans');
}, },
openPartyModal () { openPartyModal () {
this.$root.$emit('show::modal', 'create-party-modal'); this.$root.$emit('bv::show::modal', 'create-party-modal');
}, },
showBuyGemsModal (startingPage) { showBuyGemsModal (startingPage) {
this.$store.state.gemModalOptions.startingPage = startingPage; this.$store.state.gemModalOptions.startingPage = startingPage;
@@ -304,7 +326,7 @@ export default {
eventLabel: 'Gems > Toolbar', eventLabel: 'Gems > Toolbar',
}); });
this.$root.$emit('show::modal', 'buy-gems', {alreadyTracked: true}); this.$root.$emit('bv::show::modal', 'buy-gems', {alreadyTracked: true});
}, },
}, },
}; };

View File

@@ -69,16 +69,12 @@ import MenuDropdown from '../ui/customMenuDropdown';
import axios from 'axios'; import axios from 'axios';
import markPMSRead from 'common/script/ops/markPMSRead'; import markPMSRead from 'common/script/ops/markPMSRead';
import MessageCount from './messageCount'; import MessageCount from './messageCount';
import bTooltip from 'bootstrap-vue/lib/directives/tooltip';
export default { export default {
components: { components: {
MenuDropdown, MenuDropdown,
MessageCount, MessageCount,
}, },
directives: {
bTooltip,
},
data () { data () {
return { return {
icons: Object.freeze({ icons: Object.freeze({
@@ -94,17 +90,17 @@ export default {
this.$store.state.avatarEditorOptions.editingUser = true; this.$store.state.avatarEditorOptions.editingUser = true;
this.$store.state.avatarEditorOptions.startingPage = startingPage; this.$store.state.avatarEditorOptions.startingPage = startingPage;
this.$store.state.avatarEditorOptions.subpage = subpage; this.$store.state.avatarEditorOptions.subpage = subpage;
this.$root.$emit('show::modal', 'avatar-modal'); this.$root.$emit('bv::show::modal', 'avatar-modal');
}, },
showInbox () { showInbox () {
markPMSRead(this.user); markPMSRead(this.user);
axios.post('/api/v3/user/mark-pms-read'); axios.post('/api/v3/user/mark-pms-read');
this.$root.$emit('show::modal', 'inbox-modal'); this.$root.$emit('bv::show::modal', 'inbox-modal');
}, },
showProfile (startingPage) { showProfile (startingPage) {
this.$store.state.profileUser = this.user; this.$store.state.profileUser = this.user;
this.$store.state.profileOptions.startingPage = startingPage; this.$store.state.profileOptions.startingPage = startingPage;
this.$root.$emit('show::modal', 'profile'); this.$root.$emit('bv::show::modal', 'profile');
}, },
showBuyGemsModal (startingPage) { showBuyGemsModal (startingPage) {
this.$store.state.gemModalOptions.startingPage = startingPage; this.$store.state.gemModalOptions.startingPage = startingPage;
@@ -116,7 +112,7 @@ export default {
eventLabel: 'Gems > User Dropdown', eventLabel: 'Gems > User Dropdown',
}); });
this.$root.$emit('show::modal', 'buy-gems', {alreadyTracked: true}); this.$root.$emit('bv::show::modal', 'buy-gems', {alreadyTracked: true});
}, },
logout () { logout () {
this.$store.dispatch('auth:logout'); this.$store.dispatch('auth:logout');

View File

@@ -41,6 +41,10 @@
#equipgear-modal { #equipgear-modal {
@include centeredModal(); @include centeredModal();
.modal-dialog {
width: 330px;
}
.content { .content {
text-align: center; text-align: center;
} }
@@ -88,7 +92,6 @@
<script> <script>
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import bModal from 'bootstrap-vue/lib/components/modal';
import svgClose from 'assets/svg/close.svg'; import svgClose from 'assets/svg/close.svg';
@@ -97,7 +100,6 @@
export default { export default {
components: { components: {
bModal,
Avatar, Avatar,
EquipmentAttributesGrid, EquipmentAttributesGrid,
}, },
@@ -144,7 +146,7 @@
this.hideDialog(); this.hideDialog();
}, },
hideDialog () { hideDialog () {
this.$root.$emit('hide::modal', 'equipgear-modal'); this.$root.$emit('bv::hide::modal', 'equipgear-modal');
}, },
memberOverrideAvatarGear (gear) { memberOverrideAvatarGear (gear) {
return { return {

View File

@@ -147,9 +147,6 @@ import throttle from 'lodash/throttle';
import _sortBy from 'lodash/sortBy'; import _sortBy from 'lodash/sortBy';
import _reverse from 'lodash/reverse'; import _reverse from 'lodash/reverse';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import bPopover from 'bootstrap-vue/lib/components/popover';
import toggleSwitch from 'client/components/ui/toggleSwitch'; import toggleSwitch from 'client/components/ui/toggleSwitch';
import Item from 'client/components/inventory/item'; import Item from 'client/components/inventory/item';
@@ -181,9 +178,6 @@ export default {
EquipmentAttributesPopover, EquipmentAttributesPopover,
StarBadge, StarBadge,
Drawer, Drawer,
bDropdown,
bDropdownItem,
bPopover,
toggleSwitch, toggleSwitch,
EquipGearModal, EquipGearModal,
}, },

View File

@@ -22,13 +22,9 @@ div(v-else)
</template> </template>
<script> <script>
import bPopover from 'bootstrap-vue/lib/components/popover';
import uuid from 'uuid'; import uuid from 'uuid';
export default { export default {
components: {
bPopover,
},
props: { props: {
item: { item: {
type: Object, type: Object,

View File

@@ -19,7 +19,6 @@
<script> <script>
import axios from 'axios'; import axios from 'axios';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import bModal from 'bootstrap-vue/lib/components/modal';
import markdown from 'client/directives/markdown'; import markdown from 'client/directives/markdown';
export default { export default {
@@ -27,9 +26,6 @@ export default {
directives: { directives: {
markdown, markdown,
}, },
components: {
bModal,
},
computed: { computed: {
...mapState({ ...mapState({
user: 'user.data', user: 'user.data',
@@ -64,7 +60,7 @@ export default {
this.close(); this.close();
}, },
close () { close () {
this.$root.$emit('hide::modal', 'card'); this.$root.$emit('bv::hide::modal', 'card');
}, },
}, },
}; };

View File

@@ -180,8 +180,6 @@ import { mapState } from 'client/libs/store';
import each from 'lodash/each'; import each from 'lodash/each';
import throttle from 'lodash/throttle'; import throttle from 'lodash/throttle';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import Item from 'client/components/inventory/item'; import Item from 'client/components/inventory/item';
import ItemRows from 'client/components/ui/itemRows'; import ItemRows from 'client/components/ui/itemRows';
import CountBadge from 'client/components/ui/countBadge'; import CountBadge from 'client/components/ui/countBadge';
@@ -227,8 +225,6 @@ export default {
components: { components: {
Item, Item,
ItemRows, ItemRows,
bDropdown,
bDropdownItem,
HatchedPetDialog, HatchedPetDialog,
CountBadge, CountBadge,
startQuestModal, startQuestModal,
@@ -408,7 +404,7 @@ export default {
cardType: item.key, cardType: item.key,
messageOptions: this.content.cardTypes[item.key].messageOptions, messageOptions: this.content.cardTypes[item.key].messageOptions,
}; };
this.$root.$emit('show::modal', 'card'); this.$root.$emit('bv::show::modal', 'card');
return; return;
} }
@@ -430,7 +426,7 @@ export default {
this.$root.$emit('selectMembersModal::showItem', item); this.$root.$emit('selectMembersModal::showItem', item);
} }
} else if (groupKey === 'quests') { } else if (groupKey === 'quests') {
this.$root.$emit('show::modal', 'start-quest-modal'); this.$root.$emit('bv::show::modal', 'start-quest-modal');
this.$root.$emit('selectQuest', item); this.$root.$emit('selectQuest', item);
} }

View File

@@ -22,7 +22,6 @@ div
</template> </template>
<script> <script>
import bPopover from 'bootstrap-vue/lib/components/popover';
import DragDropDirective from 'client/directives/dragdrop.directive'; import DragDropDirective from 'client/directives/dragdrop.directive';
import CountBadge from 'client/components/ui/countBadge'; import CountBadge from 'client/components/ui/countBadge';
@@ -31,7 +30,6 @@ import uuid from 'uuid';
export default { export default {
components: { components: {
bPopover,
CountBadge, CountBadge,
}, },
directives: { directives: {

View File

@@ -63,13 +63,9 @@
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import markdownDirective from 'client/directives/markdown'; import markdownDirective from 'client/directives/markdown';
export default { export default {
components: {
bModal,
},
data () { data () {
return { return {
pet: null, pet: null,
@@ -90,12 +86,12 @@
methods: { methods: {
openDialog (item) { openDialog (item) {
this.pet = item; this.pet = item;
this.$root.$emit('show::modal', 'hatchedPet-modal'); this.$root.$emit('bv::show::modal', 'hatchedPet-modal');
}, },
close () { close () {
this.$emit('closed', this.item); this.$emit('closed', this.item);
this.$root.$emit('hide::modal', 'hatchedPet-modal'); this.$root.$emit('bv::hide::modal', 'hatchedPet-modal');
this.pet = null; this.pet = null;
}, },
}, },

View File

@@ -82,7 +82,7 @@
.pet-row.d-flex( .pet-row.d-flex(
v-for="(group, key, index) in pets(petGroup, hideMissing, selectedSortBy, searchTextThrottled)", v-for="(group, key, index) in pets(petGroup, hideMissing, selectedSortBy, searchTextThrottled)",
v-if='index === 0 || showMore === petGroup.key') v-if='index === 0 || $_openedItemRows_isToggled(petGroup.key)')
.pet-group( .pet-group(
v-for='item in group' v-for='item in group'
v-drag.drop.food="item.key", v-drag.drop.food="item.key",
@@ -116,7 +116,7 @@
starBadge(:selected="item.key === currentPet", :show="item.isOwned()", @click="selectPet(item)") starBadge(:selected="item.key === currentPet", :show="item.isOwned()", @click="selectPet(item)")
.btn.btn-flat.btn-show-more(@click="setShowMore(petGroup.key)", v-if='petGroup.key !== "specialPets"') .btn.btn-flat.btn-show-more(@click="setShowMore(petGroup.key)", v-if='petGroup.key !== "specialPets"')
| {{ showMore === petGroup.key ? $t('showLess') : $t('showMore') }} | {{ $_openedItemRows_isToggled(petGroup.key) ? $t('showLess') : $t('showMore') }}
h2 h2
| {{ $t('mounts') }} | {{ $t('mounts') }}
@@ -131,7 +131,7 @@
h4(v-if="viewOptions[mountGroup.key].animalCount != 0") {{ mountGroup.label }} h4(v-if="viewOptions[mountGroup.key].animalCount != 0") {{ mountGroup.label }}
.pet-row.d-flex(v-for="(group, key, index) in mounts(mountGroup, hideMissing, selectedSortBy, searchTextThrottled)" .pet-row.d-flex(v-for="(group, key, index) in mounts(mountGroup, hideMissing, selectedSortBy, searchTextThrottled)"
v-if='index === 0 || showMore === mountGroup.key') v-if='index === 0 || $_openedItemRows_isToggled(mountGroup.key)')
.pet-group(v-for='item in group') .pet-group(v-for='item in group')
mountItem( mountItem(
:item="item", :item="item",
@@ -152,7 +152,7 @@
) )
.btn.btn-flat.btn-show-more(@click="setShowMore(mountGroup.key)", v-if='mountGroup.key !== "specialMounts"') .btn.btn-flat.btn-show-more(@click="setShowMore(mountGroup.key)", v-if='mountGroup.key !== "specialMounts"')
| {{ showMore === mountGroup.key ? $t('showLess') : $t('showMore') }} | {{ $_openedItemRows_isToggled(mountGroup.key) ? $t('showLess') : $t('showMore') }}
drawer( drawer(
:title="$t('quickInventory')", :title="$t('quickInventory')",
@@ -488,11 +488,6 @@
<script> <script>
import {mapState} from 'client/libs/store'; import {mapState} from 'client/libs/store';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import bPopover from 'bootstrap-vue/lib/components/popover';
import bModal from 'bootstrap-vue/lib/components/modal';
import _each from 'lodash/each'; import _each from 'lodash/each';
import _sortBy from 'lodash/sortBy'; import _sortBy from 'lodash/sortBy';
import _filter from 'lodash/filter'; import _filter from 'lodash/filter';
@@ -522,6 +517,7 @@
import svgClose from 'assets/svg/close.svg'; import svgClose from 'assets/svg/close.svg';
import notifications from 'client/mixins/notifications'; import notifications from 'client/mixins/notifications';
import openedItemRowsMixin from 'client/mixins/openedItemRows';
// TODO Normalize special pets and mounts // TODO Normalize special pets and mounts
// import Store from 'client/store'; // import Store from 'client/store';
@@ -531,7 +527,7 @@
let lastMouseMoveEvent = {}; let lastMouseMoveEvent = {};
export default { export default {
mixins: [notifications], mixins: [notifications, openedItemRowsMixin],
components: { components: {
PetItem, PetItem,
Item, Item,
@@ -539,10 +535,6 @@
FoodItem, FoodItem,
MountItem, MountItem,
Drawer, Drawer,
bDropdown,
bDropdownItem,
bPopover,
bModal,
toggleSwitch, toggleSwitch,
StarBadge, StarBadge,
CountBadge, CountBadge,
@@ -583,7 +575,6 @@
currentDraggingFood: null, currentDraggingFood: null,
selectedDrawerTab: 0, selectedDrawerTab: 0,
showMore: '',
}; };
}, },
watch: { watch: {
@@ -712,11 +703,7 @@
}, },
methods: { methods: {
setShowMore (key) { setShowMore (key) {
if (this.showMore === key) { this.$_openedItemRows_toggleByType(key, !this.$_openedItemRows_isToggled(key));
this.showMore = '';
return;
}
this.showMore = key;
}, },
getAnimalList (animalGroup, type) { getAnimalList (animalGroup, type) {
let key = animalGroup.key; let key = animalGroup.key;
@@ -967,7 +954,7 @@
// opens the hatch dialog // opens the hatch dialog
this.hatchablePet = pet; this.hatchablePet = pet;
this.$root.$emit('show::modal', 'hatching-modal'); this.$root.$emit('bv::show::modal', 'hatching-modal');
} }
}, },
@@ -980,7 +967,7 @@
}, },
closeHatchPetDialog () { closeHatchPetDialog () {
this.$root.$emit('hide::modal', 'hatching-modal'); this.$root.$emit('bv::hide::modal', 'hatching-modal');
}, },
resetHatchablePet ($event) { resetHatchablePet ($event) {

View File

@@ -16,13 +16,9 @@ div
</template> </template>
<script> <script>
import bPopover from 'bootstrap-vue/lib/components/popover';
import uuid from 'uuid'; import uuid from 'uuid';
export default { export default {
components: {
bPopover,
},
props: { props: {
item: { item: {
type: Object, type: Object,

View File

@@ -35,13 +35,9 @@ div
</style> </style>
<script> <script>
import bPopover from 'bootstrap-vue/lib/components/popover';
import uuid from 'uuid'; import uuid from 'uuid';
export default { export default {
components: {
bPopover,
},
props: { props: {
item: { item: {
type: Object, type: Object,

View File

@@ -248,7 +248,7 @@ export default {
showMemberModal (member) { showMemberModal (member) {
this.$store.state.profileUser = member; this.$store.state.profileUser = member;
this.$store.state.profileOptions.startingPage = 'profile'; this.$store.state.profileOptions.startingPage = 'profile';
this.$root.$emit('show::modal', 'profile'); this.$root.$emit('bv::show::modal', 'profile');
}, },
}, },
computed: { computed: {

View File

@@ -21,13 +21,8 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
export default { export default {
props: ['memberToRemove', 'groupId'], props: ['memberToRemove', 'groupId'],
components: {
bModal,
},
data () { data () {
return { return {
removeMessage: '', removeMessage: '',
@@ -46,7 +41,7 @@ export default {
this.close(); this.close();
}, },
close () { close () {
this.$root.$emit('hide::modal', 'remove-member'); this.$root.$emit('bv::hide::modal', 'remove-member');
}, },
}, },
}; };

View File

@@ -255,16 +255,12 @@
<script> <script>
import axios from 'axios'; import axios from 'axios';
import bModal from 'bootstrap-vue/lib/components/modal';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import Content from '../../common/script/content'; import Content from '../../common/script/content';
export default { export default {
components: {
bModal,
},
computed: { computed: {
...mapState({user: 'user.data'}), ...mapState({user: 'user.data'}),
}, },
@@ -313,7 +309,7 @@ export default {
// @TODO: Sync // @TODO: Sync
}, },
close () { close () {
this.$root.$emit('hide::modal', 'modify-inventory'); this.$root.$emit('bv::hide::modal', 'modify-inventory');
}, },
}, },
}; };

View File

@@ -210,15 +210,15 @@ export default {
}, },
watch: { watch: {
baileyShouldShow () { baileyShouldShow () {
this.$root.$emit('show::modal', 'new-stuff'); this.$root.$emit('bv::show::modal', 'new-stuff');
}, },
userHp (after, before) { userHp (after, before) {
if (after <= 0) { if (after <= 0) {
this.playSound('Death'); this.playSound('Death');
this.$root.$emit('show::modal', 'death'); this.$root.$emit('bv::show::modal', 'death');
// @TODO: {keyboard:false, backdrop:'static'} // @TODO: {keyboard:false, backdrop:'static'}
} else if (after <= 30 && !this.user.flags.warnedLowHealth) { } else if (after <= 30 && !this.user.flags.warnedLowHealth) {
this.$root.$emit('show::modal', 'low-health'); this.$root.$emit('bv::show::modal', 'low-health');
// @TODO: {keyboard:false, backdrop:'static', controller:'UserCtrl', track:'Health Warning'} // @TODO: {keyboard:false, backdrop:'static', controller:'UserCtrl', track:'Health Warning'}
} }
if (after === before) return; if (after === before) return;
@@ -262,7 +262,7 @@ export default {
}, },
userClassSelect (after) { userClassSelect (after) {
if (!after) return; if (!after) return;
this.$root.$emit('show::modal', 'choose-class'); this.$root.$emit('bv::show::modal', 'choose-class');
// @TODO: {controller:'UserCtrl', keyboard:false, backdrop:'static'} // @TODO: {controller:'UserCtrl', keyboard:false, backdrop:'static'}
}, },
userNotifications (after) { userNotifications (after) {
@@ -274,15 +274,15 @@ export default {
}, },
armoireEmpty (after, before) { armoireEmpty (after, before) {
if (after === before || after === false) return; if (after === before || after === false) return;
this.$root.$emit('show::modal', 'armoire-empty'); this.$root.$emit('bv::show::modal', 'armoire-empty');
}, },
questCompleted () { questCompleted () {
if (!this.questCompleted) return; if (!this.questCompleted) return;
this.$root.$emit('show::modal', 'quest-completed'); this.$root.$emit('bv::show::modal', 'quest-completed');
}, },
invitedToQuest (after) { invitedToQuest (after) {
if (after !== true) return; if (after !== true) return;
this.$root.$emit('show::modal', 'quest-invitation'); this.$root.$emit('bv::show::modal', 'quest-invitation');
}, },
}, },
mounted () { mounted () {
@@ -312,25 +312,25 @@ export default {
checkUserAchievements () { checkUserAchievements () {
// List of prompts for user on changes. Sounds like we may need a refactor here, but it is clean for now // List of prompts for user on changes. Sounds like we may need a refactor here, but it is clean for now
if (this.user.flags.newStuff) { if (this.user.flags.newStuff) {
this.$root.$emit('show::modal', 'new-stuff'); this.$root.$emit('bv::show::modal', 'new-stuff');
} }
if (!this.user.flags.welcomed) { if (!this.user.flags.welcomed) {
this.$store.state.avatarEditorOptions.editingUser = false; this.$store.state.avatarEditorOptions.editingUser = false;
this.$root.$emit('show::modal', 'avatar-modal'); this.$root.$emit('bv::show::modal', 'avatar-modal');
} }
if (this.user.stats.hp <= 0) { if (this.user.stats.hp <= 0) {
this.playSound('Death'); this.playSound('Death');
this.$root.$emit('show::modal', 'death'); this.$root.$emit('bv::show::modal', 'death');
} }
if (this.questCompleted) { if (this.questCompleted) {
this.$root.$emit('show::modal', 'quest-completed'); this.$root.$emit('bv::show::modal', 'quest-completed');
} }
if (this.userClassSelect) { if (this.userClassSelect) {
this.$root.$emit('show::modal', 'choose-class'); this.$root.$emit('bv::show::modal', 'choose-class');
} }
}, },
showLevelUpNotifications (newlevel) { showLevelUpNotifications (newlevel) {
@@ -338,7 +338,7 @@ export default {
this.playSound('Level_Up'); this.playSound('Level_Up');
if (this.user._tmp && this.user._tmp.drop && this.user._tmp.drop.type === 'Quest') return; if (this.user._tmp && this.user._tmp.drop && this.user._tmp.drop.type === 'Quest') return;
if (this.unlockLevels[`${newlevel}`]) return; if (this.unlockLevels[`${newlevel}`]) return;
if (!this.user.preferences.suppressModals.levelUp) this.$root.$emit('show::modal', 'level-up'); if (!this.user.preferences.suppressModals.levelUp) this.$root.$emit('bv::show::modal', 'level-up');
}, },
playSound (sound) { playSound (sound) {
this.$root.$emit('playSound', sound); this.$root.$emit('playSound', sound);
@@ -397,7 +397,7 @@ export default {
} }
this.levelBeforeYesterdailies = this.user.stats.lvl; this.levelBeforeYesterdailies = this.user.stats.lvl;
this.$root.$emit('show::modal', 'yesterdaily'); this.$root.$emit('bv::show::modal', 'yesterdaily');
}, },
async runYesterDailiesAction () { async runYesterDailiesAction () {
// Run Cron // Run Cron
@@ -449,50 +449,50 @@ export default {
case 'GUILD_PROMPT': case 'GUILD_PROMPT':
// @TODO: I'm pretty sure we can find better names for these // @TODO: I'm pretty sure we can find better names for these
if (notification.data.textletiant === -1) { if (notification.data.textletiant === -1) {
this.$root.$emit('show::modal', 'testing'); this.$root.$emit('bv::show::modal', 'testing');
} else { } else {
this.$root.$emit('show::modal', 'testingletiant'); this.$root.$emit('bv::show::modal', 'testingletiant');
} }
break; break;
case 'DROPS_ENABLED': case 'DROPS_ENABLED':
this.$root.$emit('show::modal', 'drops-enabled'); this.$root.$emit('bv::show::modal', 'drops-enabled');
break; break;
case 'REBIRTH_ENABLED': case 'REBIRTH_ENABLED':
this.$root.$emit('show::modal', 'rebirth-enabled'); this.$root.$emit('bv::show::modal', 'rebirth-enabled');
break; break;
case 'WON_CHALLENGE': case 'WON_CHALLENGE':
this.$root.$emit('show::modal', 'won-challenge'); this.$root.$emit('bv::show::modal', 'won-challenge');
break; break;
case 'STREAK_ACHIEVEMENT': case 'STREAK_ACHIEVEMENT':
this.streak(this.user.achievements.streak); this.streak(this.user.achievements.streak);
this.playSound('Achievement_Unlocked'); this.playSound('Achievement_Unlocked');
if (!this.user.preferences.suppressModals.streak) { if (!this.user.preferences.suppressModals.streak) {
this.$root.$emit('show::modal', 'streak'); this.$root.$emit('bv::show::modal', 'streak');
} }
break; break;
case 'ULTIMATE_GEAR_ACHIEVEMENT': case 'ULTIMATE_GEAR_ACHIEVEMENT':
this.playSound('Achievement_Unlocked'); this.playSound('Achievement_Unlocked');
this.$root.$emit('show::modal', 'ultimate-gear'); this.$root.$emit('bv::show::modal', 'ultimate-gear');
break; break;
case 'REBIRTH_ACHIEVEMENT': case 'REBIRTH_ACHIEVEMENT':
this.playSound('Achievement_Unlocked'); this.playSound('Achievement_Unlocked');
this.$root.$emit('show::modal', 'rebirth'); this.$root.$emit('bv::show::modal', 'rebirth');
break; break;
case 'GUILD_JOINED_ACHIEVEMENT': case 'GUILD_JOINED_ACHIEVEMENT':
this.playSound('Achievement_Unlocked'); this.playSound('Achievement_Unlocked');
this.$root.$emit('show::modal', 'joined-guild'); this.$root.$emit('bv::show::modal', 'joined-guild');
break; break;
case 'CHALLENGE_JOINED_ACHIEVEMENT': case 'CHALLENGE_JOINED_ACHIEVEMENT':
this.playSound('Achievement_Unlocked'); this.playSound('Achievement_Unlocked');
this.$root.$emit('show::modal', 'joined-challenge'); this.$root.$emit('bv::show::modal', 'joined-challenge');
break; break;
case 'INVITED_FRIEND_ACHIEVEMENT': case 'INVITED_FRIEND_ACHIEVEMENT':
this.playSound('Achievement_Unlocked'); this.playSound('Achievement_Unlocked');
this.$root.$emit('show::modal', 'invited-friend'); this.$root.$emit('bv::show::modal', 'invited-friend');
break; break;
case 'NEW_CONTRIBUTOR_LEVEL': case 'NEW_CONTRIBUTOR_LEVEL':
this.playSound('Achievement_Unlocked'); this.playSound('Achievement_Unlocked');
this.$root.$emit('show::modal', 'contributor'); this.$root.$emit('bv::show::modal', 'contributor');
break; break;
case 'CRON': case 'CRON':
if (notification.data) { if (notification.data) {
@@ -528,7 +528,7 @@ export default {
case 'LOGIN_INCENTIVE': case 'LOGIN_INCENTIVE':
if (this.user.flags.tour.intro === this.TOUR_END && this.user.flags.welcomed) { if (this.user.flags.tour.intro === this.TOUR_END && this.user.flags.welcomed) {
this.notificationData = notification.data; this.notificationData = notification.data;
this.$root.$emit('show::modal', 'login-incentives'); this.$root.$emit('bv::show::modal', 'login-incentives');
} }
break; break;
default: default:

View File

@@ -26,14 +26,10 @@
<script> <script>
import axios from 'axios'; import axios from 'axios';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import bModal from 'bootstrap-vue/lib/components/modal';
const AMAZON_PAYMENTS = process.env.AMAZON_PAYMENTS; // eslint-disable-line const AMAZON_PAYMENTS = process.env.AMAZON_PAYMENTS; // eslint-disable-line
export default { export default {
components: {
bModal,
},
props: ['amazonPaymentsProp'], props: ['amazonPaymentsProp'],
data () { data () {
return { return {

View File

@@ -340,7 +340,6 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import markdown from 'client/directives/markdown'; import markdown from 'client/directives/markdown';
import planGemLimits from 'common/script/libs/planGemLimits'; import planGemLimits from 'common/script/libs/planGemLimits';
@@ -360,7 +359,6 @@
export default { export default {
mixins: [paymentsMixin], mixins: [paymentsMixin],
components: { components: {
bModal,
planGemLimits, planGemLimits,
amazonPaymentsModal, amazonPaymentsModal,
}, },
@@ -400,7 +398,7 @@
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'buy-gems'); this.$root.$emit('bv::hide::modal', 'buy-gems');
}, },
}, },
watch: { watch: {

View File

@@ -77,7 +77,6 @@ b-modal#send-gems(:title="title", :hide-footer="true", size='lg')
import toArray from 'lodash/toArray'; import toArray from 'lodash/toArray';
import omitBy from 'lodash/omitBy'; import omitBy from 'lodash/omitBy';
import orderBy from 'lodash/orderBy'; import orderBy from 'lodash/orderBy';
import bModal from 'bootstrap-vue/lib/components/modal';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import planGemLimits from '../../../common/script/libs/planGemLimits'; import planGemLimits from '../../../common/script/libs/planGemLimits';
import paymentsMixin from 'client/mixins/payments'; import paymentsMixin from 'client/mixins/payments';
@@ -88,9 +87,6 @@ const TECH_ASSISTANCE_EMAIL = 'admin@habitica.com';
export default { export default {
props: ['userReceivingGems'], props: ['userReceivingGems'],
components: {
bModal,
},
mixins: [paymentsMixin, notificationsMixin], mixins: [paymentsMixin, notificationsMixin],
data () { data () {
return { return {
@@ -144,7 +140,7 @@ export default {
this.close(); this.close();
}, },
close () { close () {
this.$root.$emit('hide::modal', 'send-gems'); this.$root.$emit('bv::hide::modal', 'send-gems');
}, },
}, },
}; };

View File

@@ -86,9 +86,6 @@ div
<script> <script>
// @TODO: Move this under members directory // @TODO: Move this under members directory
import sortBy from 'lodash/sortBy'; import sortBy from 'lodash/sortBy';
import bModal from 'bootstrap-vue/lib/components/modal';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import MemberDetails from './memberDetails'; import MemberDetails from './memberDetails';
import removeIcon from 'assets/members/remove.svg'; import removeIcon from 'assets/members/remove.svg';
@@ -98,9 +95,6 @@ import starIcon from 'assets/members/star.svg';
export default { export default {
props: ['group', 'hideBadge', 'item'], props: ['group', 'hideBadge', 'item'],
components: { components: {
bModal,
bDropdown,
bDropdownItem,
MemberDetails, MemberDetails,
}, },
data () { data () {
@@ -181,7 +175,7 @@ export default {
} }
}, },
close () { close () {
this.$root.$emit('hide::modal', 'select-member-modal'); this.$root.$emit('bv::hide::modal', 'select-member-modal');
}, },
sort (option) { sort (option) {
this.sortOption = option; this.sortOption = option;

View File

@@ -32,12 +32,7 @@
import axios from 'axios'; import axios from 'axios';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import bModal from 'bootstrap-vue/lib/components/modal';
export default { export default {
components: {
bModal,
},
data () { data () {
return { return {
password: '', password: '',
@@ -49,7 +44,7 @@ export default {
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'reset'); this.$root.$emit('bv::hide::modal', 'reset');
}, },
async deleteAccount () { async deleteAccount () {
await axios.delete('/api/v3/user', { await axios.delete('/api/v3/user', {
@@ -60,7 +55,7 @@ export default {
}); });
localStorage.clear(); localStorage.clear();
window.location.href = '/static/home'; window.location.href = '/static/home';
this.$root.$emit('hide::modal', 'reset'); this.$root.$emit('bv::hide::modal', 'reset');
}, },
}, },
}; };

View File

@@ -11,25 +11,20 @@
import axios from 'axios'; import axios from 'axios';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import bModal from 'bootstrap-vue/lib/components/modal';
export default { export default {
components: {
bModal,
},
computed: { computed: {
...mapState({user: 'user.data'}), ...mapState({user: 'user.data'}),
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'reset'); this.$root.$emit('bv::hide::modal', 'reset');
}, },
async reset () { async reset () {
let response = await axios.post('/api/v3/user/reset'); let response = await axios.post('/api/v3/user/reset');
// @TODO: Not sure if this is correct // @TODO: Not sure if this is correct
this.$store.user = response.data.data.user; this.$store.user = response.data.data.user;
this.$router.push('/'); this.$router.push('/');
this.$root.$emit('hide::modal', 'reset'); this.$root.$emit('bv::hide::modal', 'reset');
}, },
}, },
}; };

View File

@@ -50,12 +50,7 @@
import clone from 'lodash/clone'; import clone from 'lodash/clone';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import bModal from 'bootstrap-vue/lib/components/modal';
export default { export default {
components: {
bModal,
},
data () { data () {
return { return {
restoreValues: { restoreValues: {
@@ -81,7 +76,7 @@ export default {
}, },
methods: { methods: {
close () { close () {
this.$root.$emit('hide::modal', 'restore'); this.$root.$emit('bv::hide::modal', 'restore');
}, },
restore () { restore () {
if (this.restoreValues.stats.lvl < 1) { if (this.restoreValues.stats.lvl < 1) {
@@ -103,7 +98,7 @@ export default {
}; };
this.$store.dispatch('user:set', settings); this.$store.dispatch('user:set', settings);
this.$root.$emit('hide::modal', 'restore'); this.$root.$emit('bv::hide::modal', 'restore');
}, },
}, },
}; };

View File

@@ -193,7 +193,6 @@ import moment from 'moment';
import axios from 'axios'; import axios from 'axios';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import bPopover from 'bootstrap-vue/lib/directives/popover';
import restoreModal from './restoreModal'; import restoreModal from './restoreModal';
import resetModal from './resetModal'; import resetModal from './resetModal';
import deleteModal from './deleteModal'; import deleteModal from './deleteModal';
@@ -208,9 +207,6 @@ export default {
resetModal, resetModal,
deleteModal, deleteModal,
}, },
directives: {
bPopover,
},
data () { data () {
let dayStartOptions = []; let dayStartOptions = [];
for (let number = 0; number < 24; number += 1) { for (let number = 0; number < 24; number += 1) {
@@ -299,7 +295,7 @@ export default {
}, },
showBailey () { showBailey () {
this.user.flags.newStuff = true; this.user.flags.newStuff = true;
this.$root.$emit('show::modal', 'new-stuff'); this.$root.$emit('bv::show::modal', 'new-stuff');
}, },
hasBackupAuthOption (networkKeyToCheck) { hasBackupAuthOption (networkKeyToCheck) {
if (this.user.auth.local.username) { if (this.user.auth.local.username) {
@@ -352,13 +348,13 @@ export default {
updates = {}; updates = {};
}, },
openRestoreModal () { openRestoreModal () {
this.$root.$emit('show::modal', 'restore'); this.$root.$emit('bv::show::modal', 'restore');
}, },
openResetModal () { openResetModal () {
this.$root.$emit('show::modal', 'reset'); this.$root.$emit('bv::show::modal', 'reset');
}, },
openDeleteModal () { openDeleteModal () {
this.$root.$emit('show::modal', 'delete'); this.$root.$emit('bv::show::modal', 'delete');
}, },
async deleteSocialAuth (networkKey) { async deleteSocialAuth (networkKey) {
// @TODO: What do we use this for? // @TODO: What do we use this for?

View File

@@ -90,6 +90,10 @@
#buy-modal { #buy-modal {
@include centeredModal(); @include centeredModal();
.modal-dialog {
width: 330px;
}
.avatar { .avatar {
cursor: default; cursor: default;
margin: 0 auto; margin: 0 auto;
@@ -254,9 +258,6 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import * as Analytics from 'client/libs/analytics'; import * as Analytics from 'client/libs/analytics';
import spellsMixin from 'client/mixins/spells'; import spellsMixin from 'client/mixins/spells';
import planGemLimits from 'common/script/libs/planGemLimits'; import planGemLimits from 'common/script/libs/planGemLimits';
@@ -287,9 +288,6 @@
export default { export default {
mixins: [currencyMixin, notifications, spellsMixin, buyMixin], mixins: [currencyMixin, notifications, spellsMixin, buyMixin],
components: { components: {
bModal,
bDropdown,
bDropdownItem,
BalanceInfo, BalanceInfo,
EquipmentAttributesGrid, EquipmentAttributesGrid,
Item, Item,
@@ -384,7 +382,7 @@
eventLabel: 'Gems > Rebirth', eventLabel: 'Gems > Rebirth',
}); });
} }
this.$root.$emit('show::modal', 'buy-gems'); this.$root.$emit('bv::show::modal', 'buy-gems');
}, },
togglePinned () { togglePinned () {
this.isPinned = this.$store.dispatch('user:togglePinnedItem', {type: this.item.pinType, path: this.item.path}); this.isPinned = this.$store.dispatch('user:togglePinnedItem', {type: this.item.pinType, path: this.item.path});
@@ -394,7 +392,7 @@
} }
}, },
hideDialog () { hideDialog () {
this.$root.$emit('hide::modal', 'buy-modal'); this.$root.$emit('bv::hide::modal', 'buy-modal');
}, },
getPriceClass () { getPriceClass () {
if (this.priceType && this.icons[this.priceType]) { if (this.priceType && this.icons[this.priceType]) {

View File

@@ -379,10 +379,6 @@
import EquipmentAttributesGrid from './equipmentAttributesGrid.vue'; import EquipmentAttributesGrid from './equipmentAttributesGrid.vue';
import SelectMembersModal from 'client/components/selectMembersModal.vue'; import SelectMembersModal from 'client/components/selectMembersModal.vue';
import bPopover from 'bootstrap-vue/lib/components/popover';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import svgPin from 'assets/svg/pin.svg'; import svgPin from 'assets/svg/pin.svg';
import svgGem from 'assets/svg/gem.svg'; import svgGem from 'assets/svg/gem.svg';
import svgInformation from 'assets/svg/information.svg'; import svgInformation from 'assets/svg/information.svg';
@@ -427,10 +423,6 @@ export default {
ItemRows, ItemRows,
toggleSwitch, toggleSwitch,
bPopover,
bDropdown,
bDropdownItem,
SellModal, SellModal,
EquipmentAttributesGrid, EquipmentAttributesGrid,
Avatar, Avatar,

View File

@@ -17,14 +17,9 @@
div div
b.how-many-to-sell {{ $t('howManyToSell') }} b.how-many-to-sell {{ $t('howManyToSell') }}
div div
b-dropdown(:text="selectedAmountToSell +''", right=true) b-input.itemsToSell(type="number", v-model="selectedAmountToSell", :max="itemCount", min="1")
b-dropdown-item(
v-for="num of dropDownItems",
@click="selectedAmountToSell = num",
:active="selectedAmountToSell === num",
:key="num"
) {{ num }}
span.svg-icon.inline.icon-32(aria-hidden="true", v-html="icons.gold") span.svg-icon.inline.icon-32(aria-hidden="true", v-html="icons.gold")
span.value {{ item.value }} span.value {{ item.value }}
@@ -43,6 +38,15 @@
#sell-modal { #sell-modal {
@include centeredModal(); @include centeredModal();
.itemsToSell {
display: inline-block;
width: 5em;
}
.modal-dialog {
width: 330px;
}
.content { .content {
text-align: center; text-align: center;
@@ -112,10 +116,6 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import svgClose from 'assets/svg/close.svg'; import svgClose from 'assets/svg/close.svg';
import svgGold from 'assets/svg/gold.svg'; import svgGold from 'assets/svg/gold.svg';
import svgGem from 'assets/svg/gem.svg'; import svgGem from 'assets/svg/gem.svg';
@@ -124,9 +124,6 @@
export default { export default {
components: { components: {
bModal,
bDropdown,
bDropdownItem,
BalanceInfo, BalanceInfo,
}, },
data () { data () {
@@ -140,20 +137,11 @@
}), }),
}; };
}, },
computed: {
dropDownItems () {
let result = [];
for (let i = 1; i <= this.itemCount; i++) {
result.push(i);
}
return result;
},
},
methods: { methods: {
onChange ($event) { onChange ($event) {
this.$emit('change', $event); this.$emit('change', $event);
this.selectedAmountToSell = 1;
}, },
sellItems () { sellItems () {
this.$store.dispatch('shops:sellItems', { this.$store.dispatch('shops:sellItems', {
@@ -164,7 +152,7 @@
this.hideDialog(); this.hideDialog();
}, },
hideDialog () { hideDialog () {
this.$root.$emit('hide::modal', 'sell-modal'); this.$root.$emit('bv::hide::modal', 'sell-modal');
}, },
}, },
props: { props: {

View File

@@ -56,7 +56,8 @@
@include centeredModal(); @include centeredModal();
.modal-dialog { .modal-dialog {
margin-top: 25em; margin-top: 8%;
width: 448px;
} }
.content { .content {
@@ -210,8 +211,6 @@
<script> <script>
import {mapState} from 'client/libs/store'; import {mapState} from 'client/libs/store';
import bModal from 'bootstrap-vue/lib/components/modal';
import svgClose from 'assets/svg/close.svg'; import svgClose from 'assets/svg/close.svg';
import svgGold from 'assets/svg/gold.svg'; import svgGold from 'assets/svg/gold.svg';
import svgGem from 'assets/svg/gem.svg'; import svgGem from 'assets/svg/gem.svg';
@@ -230,7 +229,6 @@
export default { export default {
mixins: [currencyMixin, notifications, buyMixin], mixins: [currencyMixin, notifications, buyMixin],
components: { components: {
bModal,
BalanceInfo, BalanceInfo,
QuestInfo, QuestInfo,
questDialogDrops, questDialogDrops,
@@ -292,7 +290,7 @@
} }
}, },
hideDialog () { hideDialog () {
this.$root.$emit('hide::modal', 'buy-quest-modal'); this.$root.$emit('bv::hide::modal', 'buy-quest-modal');
}, },
getDropIcon (drop) { getDropIcon (drop) {
switch (drop.type) { switch (drop.type) {
@@ -328,7 +326,7 @@
}, },
purchaseGems () { purchaseGems () {
this.$root.$emit('show::modal', 'buy-gems'); this.$root.$emit('bv::show::modal', 'buy-gems');
}, },
}, },
props: { props: {

View File

@@ -335,9 +335,6 @@
import BuyModal from './buyQuestModal.vue'; import BuyModal from './buyQuestModal.vue';
import QuestInfo from './questInfo.vue'; import QuestInfo from './questInfo.vue';
import bPopover from 'bootstrap-vue/lib/components/popover';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import svgPin from 'assets/svg/pin.svg'; import svgPin from 'assets/svg/pin.svg';
@@ -360,10 +357,6 @@ export default {
ItemRows, ItemRows,
toggleSwitch, toggleSwitch,
bPopover,
bDropdown,
bDropdownItem,
Avatar, Avatar,
BuyModal, BuyModal,
QuestInfo, QuestInfo,
@@ -477,7 +470,7 @@ export default {
this.selectedItemToBuy = item; this.selectedItemToBuy = item;
this.$root.$emit('show::modal', 'buy-quest-modal'); this.$root.$emit('bv::show::modal', 'buy-quest-modal');
}, },
}, },
}; };

View File

@@ -286,10 +286,6 @@
import buyMixin from 'client/mixins/buy'; import buyMixin from 'client/mixins/buy';
import currencyMixin from '../_currencyMixin'; import currencyMixin from '../_currencyMixin';
import bPopover from 'bootstrap-vue/lib/components/popover';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import svgPin from 'assets/svg/pin.svg'; import svgPin from 'assets/svg/pin.svg';
import svgWarrior from 'assets/svg/warrior.svg'; import svgWarrior from 'assets/svg/warrior.svg';
import svgWizard from 'assets/svg/wizard.svg'; import svgWizard from 'assets/svg/wizard.svg';
@@ -321,10 +317,6 @@
ItemRows, ItemRows,
toggleSwitch, toggleSwitch,
bPopover,
bDropdown,
bDropdownItem,
Avatar, Avatar,
}, },
watch: { watch: {

View File

@@ -151,7 +151,6 @@ div
</style> </style>
<script> <script>
import bPopover from 'bootstrap-vue/lib/components/popover';
import uuid from 'uuid'; import uuid from 'uuid';
import svgGem from 'assets/svg/gem.svg'; import svgGem from 'assets/svg/gem.svg';
@@ -170,7 +169,6 @@ div
export default { export default {
components: { components: {
bPopover,
EquipmentAttributesPopover, EquipmentAttributesPopover,
QuestInfo, QuestInfo,
}, },

View File

@@ -233,9 +233,6 @@
import Avatar from 'client/components/avatar'; import Avatar from 'client/components/avatar';
import BuyModal from '../buyModal.vue'; import BuyModal from '../buyModal.vue';
import bPopover from 'bootstrap-vue/lib/components/popover';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import svgPin from 'assets/svg/pin.svg'; import svgPin from 'assets/svg/pin.svg';
import svgHourglass from 'assets/svg/hourglass.svg'; import svgHourglass from 'assets/svg/hourglass.svg';
@@ -258,10 +255,6 @@
ItemRows, ItemRows,
toggleSwitch, toggleSwitch,
bPopover,
bDropdown,
bDropdownItem,
Avatar, Avatar,
BuyModal, BuyModal,
}, },

View File

@@ -109,7 +109,7 @@ export default {
}, },
showRequests () { showRequests () {
this.$root.$emit('show::modal', 'approval-modal'); this.$root.$emit('bv::show::modal', 'approval-modal');
}, },
}, },
}; };

View File

@@ -18,13 +18,8 @@
</style> </style>
<script> <script>
import bModal from 'bootstrap-vue/lib/components/modal';
export default { export default {
props: ['task'], props: ['task'],
components: {
bModal,
},
methods: { methods: {
approve (index) { approve (index) {
if (!confirm('Are you sure you want to approve this task?')) return; if (!confirm('Are you sure you want to approve this task?')) return;
@@ -37,7 +32,7 @@ export default {
this.task.approvals.splice(index, 1); this.task.approvals.splice(index, 1);
}, },
close () { close () {
this.$root.$emit('hide::modal', 'approval-modal'); this.$root.$emit('bv::hide::modal', 'approval-modal');
}, },
}, },
}; };

View File

@@ -33,14 +33,10 @@
<script> <script>
import { mapActions } from 'client/libs/store'; import { mapActions } from 'client/libs/store';
import bModal from 'bootstrap-vue/lib/components/modal';
import notifications from 'client/mixins/notifications'; import notifications from 'client/mixins/notifications';
export default { export default {
mixins: [notifications], mixins: [notifications],
components: {
bModal,
},
data () { data () {
return { return {
brokenChallengeTask: {}, brokenChallengeTask: {},
@@ -90,7 +86,7 @@ export default {
}, },
close () { close () {
this.$store.state.brokenChallengeTask = {}; this.$store.state.brokenChallengeTask = {};
this.$root.$emit('hide::modal', 'broken-task-modal'); this.$root.$emit('bv::hide::modal', 'broken-task-modal');
}, },
}, },
}; };

View File

@@ -226,8 +226,6 @@
import Task from './task'; import Task from './task';
import sortBy from 'lodash/sortBy'; import sortBy from 'lodash/sortBy';
import throttle from 'lodash/throttle'; import throttle from 'lodash/throttle';
import bModal from 'bootstrap-vue/lib/components/modal';
import sortable from 'client/directives/sortable.directive'; import sortable from 'client/directives/sortable.directive';
import buyMixin from 'client/mixins/buy'; import buyMixin from 'client/mixins/buy';
import { mapState, mapActions } from 'client/libs/store'; import { mapState, mapActions } from 'client/libs/store';
@@ -249,7 +247,6 @@ export default {
components: { components: {
Task, Task,
BuyQuestModal, BuyQuestModal,
bModal,
shopItem, shopItem,
}, },
directives: { directives: {

View File

@@ -148,8 +148,6 @@ div(v-if='user.stats.lvl > 10')
</style> </style>
<script> <script>
import bPopover from 'bootstrap-vue/lib/directives/popover';
import spells from '../../../common/script/content/spells'; import spells from '../../../common/script/content/spells';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
@@ -169,7 +167,6 @@ export default {
}, },
directives: { directives: {
mousePosition: MouseMoveDirective, mousePosition: MouseMoveDirective,
bPopover,
}, },
data () { data () {
return { return {

View File

@@ -21,7 +21,7 @@
.tags-popup { .tags-popup {
padding-left: 24px; padding-left: 24px;
padding-right: 24px; padding-right: 24px;
max-width: 593px; width: 593px;
z-index: 9999; z-index: 9999;
background: $white; background: $white;
border-radius: 2px; border-radius: 2px;

View File

@@ -477,7 +477,6 @@ import axios from 'axios';
import scoreTask from 'common/script/ops/scoreTask'; import scoreTask from 'common/script/ops/scoreTask';
import Vue from 'vue'; import Vue from 'vue';
import * as Analytics from 'client/libs/analytics'; import * as Analytics from 'client/libs/analytics';
import bTooltip from 'bootstrap-vue/lib/directives/tooltip';
import positiveIcon from 'assets/svg/positive.svg'; import positiveIcon from 'assets/svg/positive.svg';
import negativeIcon from 'assets/svg/negative.svg'; import negativeIcon from 'assets/svg/negative.svg';
@@ -493,7 +492,6 @@ import bottomIcon from 'assets/svg/bottom.svg';
import deleteIcon from 'assets/svg/delete.svg'; import deleteIcon from 'assets/svg/delete.svg';
import checklistIcon from 'assets/svg/checklist.svg'; import checklistIcon from 'assets/svg/checklist.svg';
import menuIcon from 'assets/svg/menu.svg'; import menuIcon from 'assets/svg/menu.svg';
import bPopover from 'bootstrap-vue/lib/components/popover';
import markdownDirective from 'client/directives/markdown'; import markdownDirective from 'client/directives/markdown';
import notifications from 'client/mixins/notifications'; import notifications from 'client/mixins/notifications';
import approvalHeader from './approvalHeader'; import approvalHeader from './approvalHeader';
@@ -503,14 +501,12 @@ import MenuDropdown from '../ui/customMenuDropdown';
export default { export default {
mixins: [notifications], mixins: [notifications],
components: { components: {
bPopover,
approvalFooter, approvalFooter,
approvalHeader, approvalHeader,
MenuDropdown, MenuDropdown,
}, },
directives: { directives: {
markdown: markdownDirective, markdown: markdownDirective,
bTooltip,
}, },
props: ['task', 'isUser', 'group', 'dueDate'], // @TODO: maybe we should store the group on state? props: ['task', 'isUser', 'group', 'dueDate'], // @TODO: maybe we should store the group on state?
data () { data () {

View File

@@ -507,10 +507,7 @@
<script> <script>
import TagsPopup from './tagsPopup'; import TagsPopup from './tagsPopup';
import bModal from 'bootstrap-vue/lib/components/modal';
import { mapGetters, mapActions, mapState } from 'client/libs/store'; import { mapGetters, mapActions, mapState } from 'client/libs/store';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import toggleSwitch from 'client/components/ui/toggleSwitch'; import toggleSwitch from 'client/components/ui/toggleSwitch';
import sortable from 'client/directives/sortable.directive'; import sortable from 'client/directives/sortable.directive';
import clone from 'lodash/clone'; import clone from 'lodash/clone';
@@ -531,9 +528,6 @@ import goldIcon from 'assets/svg/gold.svg';
export default { export default {
components: { components: {
TagsPopup, TagsPopup,
bModal,
bDropdown,
bDropdownItem,
Datepicker, Datepicker,
toggleSwitch, toggleSwitch,
}, },
@@ -752,16 +746,16 @@ export default {
this.saveTask(this.task); this.saveTask(this.task);
this.$emit('taskEdited', this.task); this.$emit('taskEdited', this.task);
} }
this.$root.$emit('hide::modal', 'task-modal'); this.$root.$emit('bv::hide::modal', 'task-modal');
}, },
destroy () { destroy () {
if (!confirm(this.$t('sureDelete'))) return; if (!confirm(this.$t('sureDelete'))) return;
this.destroyTask(this.task); this.destroyTask(this.task);
this.$emit('taskDestroyed', this.task); this.$emit('taskDestroyed', this.task);
this.$root.$emit('hide::modal', 'task-modal'); this.$root.$emit('bv::hide::modal', 'task-modal');
}, },
cancel () { cancel () {
this.$root.$emit('hide::modal', 'task-modal'); this.$root.$emit('bv::hide::modal', 'task-modal');
}, },
onClose () { onClose () {
this.showTagsSelect = false; this.showTagsSelect = false;

View File

@@ -192,6 +192,7 @@
padding-left: 24px; padding-left: 24px;
padding-right: 24px; padding-right: 24px;
max-width: 40vw; max-width: 40vw;
width: 100%;
z-index: 9999; z-index: 9999;
background: $white; background: $white;
border-radius: 2px; border-radius: 2px;
@@ -305,11 +306,6 @@ import rewardIcon from 'assets/svg/reward.svg';
import uuid from 'uuid'; import uuid from 'uuid';
import Vue from 'vue'; import Vue from 'vue';
import bDropdown from 'bootstrap-vue/lib/components/dropdown';
import bTooltip from 'bootstrap-vue/lib/directives/tooltip';
import bTooltipComponent from 'bootstrap-vue/lib/components/tooltip';
import bDropdownItem from 'bootstrap-vue/lib/components/dropdown-item';
import throttle from 'lodash/throttle'; import throttle from 'lodash/throttle';
import cloneDeep from 'lodash/cloneDeep'; import cloneDeep from 'lodash/cloneDeep';
import { mapState, mapActions } from 'client/libs/store'; import { mapState, mapActions } from 'client/libs/store';
@@ -322,16 +318,12 @@ export default {
components: { components: {
TaskColumn, TaskColumn,
TaskModal, TaskModal,
bDropdown,
bDropdownItem,
bTooltip: bTooltipComponent,
Item, Item,
spells, spells,
brokenTaskModal, brokenTaskModal,
}, },
directives: { directives: {
markdown, markdown,
bTooltip,
}, },
data () { data () {
return { return {
@@ -438,7 +430,7 @@ export default {
this.editingTask = cloneDeep(task); this.editingTask = cloneDeep(task);
// Necessary otherwise the first time the modal is not rendered // Necessary otherwise the first time the modal is not rendered
Vue.nextTick(() => { Vue.nextTick(() => {
this.$root.$emit('show::modal', 'task-modal'); this.$root.$emit('bv::show::modal', 'task-modal');
}); });
}, },
createTask (type) { createTask (type) {
@@ -448,7 +440,7 @@ export default {
// Necessary otherwise the first time the modal is not rendered // Necessary otherwise the first time the modal is not rendered
Vue.nextTick(() => { Vue.nextTick(() => {
this.$root.$emit('show::modal', 'task-modal'); this.$root.$emit('bv::show::modal', 'task-modal');
}); });
}, },
cancelTaskModal () { cancelTaskModal () {

View File

@@ -32,6 +32,8 @@ A simplified dropdown component that doesn't rely on buttons as toggles like bo
box-shadow: 0 2px 2px 0 rgba($black, 0.16), 0 1px 4px 0 rgba($black, 0.12); box-shadow: 0 2px 2px 0 rgba($black, 0.16), 0 1px 4px 0 rgba($black, 0.12);
max-height: calc(100vh - 100px); max-height: calc(100vh - 100px);
overflow: auto; overflow: auto;
left: inherit;
right: 0px !important;
/deep/ .dropdown-separated { /deep/ .dropdown-separated {
border-bottom: 1px solid $gray-500; border-bottom: 1px solid $gray-500;

View File

@@ -31,18 +31,16 @@
<script> <script>
import ResizeDirective from 'client/directives/resize.directive'; import ResizeDirective from 'client/directives/resize.directive';
import { mapState } from 'client/libs/store'; import openedItemRowsMixin from 'client/mixins/openedItemRows';
import _take from 'lodash/take'; import _take from 'lodash/take';
export default { export default {
mixins: [openedItemRowsMixin],
directives: { directives: {
resize: ResizeDirective, resize: ResizeDirective,
}, },
computed: { computed: {
...mapState({
openedItemRows: 'openedItemRows',
}),
itemsPerRow () { itemsPerRow () {
return Math.floor(this.currentWidth / (this.itemWidth + this.itemMargin)); return Math.floor(this.currentWidth / (this.itemWidth + this.itemMargin));
}, },
@@ -59,16 +57,7 @@
toggleItemsToShow () { toggleItemsToShow () {
this.showAll = !this.showAll; this.showAll = !this.showAll;
let array = this.$store.state.openedItemRows; this.$_openedItemRows_toggleByType(this.type, this.showAll);
if (this.showAll) {
array.push(this.type);
} else {
let index = array.indexOf(this.type);
if (index > -1) {
array.splice(index, 1);
}
}
}, },
itemsToShow (showAll) { itemsToShow (showAll) {
let itemsLength = this.items.length; let itemsLength = this.items.length;
@@ -108,7 +97,7 @@
}, },
}, },
created () { created () {
this.showAll = this.openedItemRows.includes(this.type); this.showAll = this.$_openedItemRows_isToggled(this.type);
}, },
}; };
</script> </script>

View File

@@ -163,9 +163,6 @@ import sortBy from 'lodash/sortBy';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import styleHelper from 'client/mixins/styleHelper'; import styleHelper from 'client/mixins/styleHelper';
import bModal from 'bootstrap-vue/lib/components/modal';
import bFormInput from 'bootstrap-vue/lib/components/form-input';
import messageIcon from 'assets/svg/message.svg'; import messageIcon from 'assets/svg/message.svg';
import chatMessage from '../chat/chatMessages'; import chatMessage from '../chat/chatMessages';
import svgClose from 'assets/svg/close.svg'; import svgClose from 'assets/svg/close.svg';
@@ -173,13 +170,11 @@ import svgClose from 'assets/svg/close.svg';
export default { export default {
mixins: [styleHelper], mixins: [styleHelper],
components: { components: {
bModal,
bFormInput,
chatMessage, chatMessage,
}, },
mounted () { mounted () {
this.$root.$on('habitica::new-inbox-message', (data) => { this.$root.$on('habitica::new-inbox-message', (data) => {
this.$root.$emit('show::modal', 'inbox-modal'); this.$root.$emit('bv::show::modal', 'inbox-modal');
const conversation = this.conversations.find(convo => { const conversation = this.conversations.find(convo => {
return convo.key === data.userIdToMessage; return convo.key === data.userIdToMessage;
@@ -325,7 +320,7 @@ export default {
}); });
}, },
close () { close () {
this.$root.$emit('hide::modal', 'inbox-modal'); this.$root.$emit('bv::hide::modal', 'inbox-modal');
}, },
}, },
}; };

View File

@@ -551,7 +551,6 @@ div
<script> <script>
import moment from 'moment'; import moment from 'moment';
import axios from 'axios'; import axios from 'axios';
import bModal from 'bootstrap-vue/lib/components/modal';
import each from 'lodash/each'; import each from 'lodash/each';
import { mapState } from 'client/libs/store'; import { mapState } from 'client/libs/store';
import size from 'lodash/size'; import size from 'lodash/size';
@@ -562,7 +561,6 @@ import autoAllocate from '../../../common/script/fns/autoAllocate';
import allocate from '../../../common/script/ops/stats/allocate'; import allocate from '../../../common/script/ops/stats/allocate';
import MemberDetails from '../memberDetails'; import MemberDetails from '../memberDetails';
import bPopover from 'bootstrap-vue/lib/components/popover';
import sendGemsModal from 'client/components/payments/sendGemsModal'; import sendGemsModal from 'client/components/payments/sendGemsModal';
import markdown from 'client/directives/markdown'; import markdown from 'client/directives/markdown';
import toggleSwitch from 'client/components/ui/toggleSwitch'; import toggleSwitch from 'client/components/ui/toggleSwitch';
@@ -582,11 +580,9 @@ export default {
markdown, markdown,
}, },
components: { components: {
bModal,
sendGemsModal, sendGemsModal,
MemberDetails, MemberDetails,
toggleSwitch, toggleSwitch,
bPopover,
}, },
data () { data () {
return { return {
@@ -818,7 +814,7 @@ export default {
}, },
openSendGemsModal () { openSendGemsModal () {
this.userReceivingGems = this.user; this.userReceivingGems = this.user;
this.$root.$emit('show::modal', 'send-gems'); this.$root.$emit('bv::show::modal', 'send-gems');
}, },
}, },
}; };

Some files were not shown because too many files have changed in this diff Show More