Files
habitica/website/client/components/yesterdailyModal.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

85 lines
1.7 KiB
Vue

<template lang="pug">
b-modal#yesterdaily(
size="m",
:hide-header="true",
:hide-footer="true",
:no-close-on-backdrop="true",
:no-close-on-esc="true",
@hide="$emit('hide')",
)
.modal-body
h1.header-welcome.text-center {{ $t('welcomeBack') }}
p.call-to-action.text-center {{ $t('checkOffYesterDailies') }}
.tasks-list
task(
v-for="task in tasksByType.daily",
:key="task.id",
:task="task",
:isUser="true",
:dueDate="dueDate",
)
.start-day.text-center
button.btn.btn-primary(@click='close()') {{ $t('yesterDailiesCallToAction') }}
</template>
<style lang="scss" scoped>
@import '~client/assets/scss/colors.scss';
.header-welcome {
color: $purple-200;
margin-top: 1.33333em;
}
.call-to-action {
font-size: 14px;
font-weight: bold;
}
.tasks-list {
border-radius: 4px;
background: $gray-600;
padding: 8px;
padding-bottom: 0.1px;
position: relative;
height: calc(100% - 64px);
overflow: auto;
}
.start-day {
margin: 2em auto 2em auto;
}
</style>
<script>
import moment from 'moment';
import { mapState } from 'client/libs/store';
import Task from './tasks/task';
export default {
props: ['yesterDailies'],
components: {
Task,
},
data () {
return {
dueDate: moment().subtract(1, 'days'),
};
},
computed: {
...mapState({user: 'user.data'}),
tasksByType () {
this.dueDate = moment().subtract(1, 'days');
return {
daily: this.yesterDailies,
};
},
},
methods: {
async close () {
this.$root.$emit('bv::hide::modal', 'yesterdaily');
},
},
};
</script>