Files
habitica/website/client/components/achievements/newStuff.vue
negue 4108a22d78 [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
2017-11-08 18:40:37 +01:00

60 lines
1.5 KiB
Vue

<template lang="pug">
b-modal#new-stuff(
v-if='user.flags.newStuff',
size='lg',
:hide-header='true',
:hide-footer='true',
)
.modal-body
new-stuff
.modal-footer
a.btn.btn-info(href='http://habitica.wikia.com/wiki/Whats_New', target='_blank') {{ this.$t('newsArchive') }}
button.btn.btn-default(@click='close()') {{ this.$t('cool') }}
button.btn.btn-warning(@click='dismissAlert();') {{ this.$t('dismissAlert') }}
</template>
<style lang='scss' scoped>
@import '~client/assets/scss/static.scss';
.modal-body {
padding-top: 2em;
}
</style>
<script>
import { mapState } from 'client/libs/store';
import markdown from 'client/directives/markdown';
import newStuff from 'client/components/static/newStuff';
export default {
components: {
newStuff,
},
computed: {
...mapState({user: 'user.data'}),
},
directives: {
markdown,
},
mounted () {
this.$root.$on('bv::show::modal', async (modalId) => {
if (modalId !== 'new-stuff') return;
// Request the lastest news, but not locally incase they don't refresh
// let response = await axios.get('/static/new-stuff');
});
},
destroyed () {
this.$root.$off('bv::show::modal');
},
methods: {
close () {
this.$root.$emit('bv::hide::modal', 'new-stuff');
},
dismissAlert () {
this.$store.dispatch('user:set', {'flags.newStuff': false});
this.close();
},
},
};
</script>