Files
habitica/website/client/components/yesterdailyModal.vue
Matteo Pagliazzi a208ba4aba Tasks v2 Part 2 (#9236)
* start updating colors for tasks controls

* finish updating controls colors

* change hoevr behavior

* change transition duration

* update color with transition

* refactor menu wip

* wip

* upgrade vue deps

* fix warnings

* fix menu

* misc fixes

* more fixes

* fix badge

* fix margins in menu

* wip tooltips

* tooltips

* fix checklist colors

* add badges

* fix quick add input

* add transition to task controls too

* add batch add

* fix task filtering

* finish tasks badges

* fix menu

* upgrade deps

* fix shop items using all the same image

* fix animation

* disable client tests until we remove phantomjs

* revert changes to tasks colors

* fix opacity in task modal inputs

* remove client unit tests from travis

* wip task dropdown

* fix z-index for task footer/header

* fixes and add files

* fixes

* bigger clickable area

* more space to open task dropdown

* droddown position

* fix menu position

* make sure other dropdowns get closed correctly

* fixes

* start to fix z-index

* draggable = false for task dropdown

* fix for dropdown position

* implement move to top / bottom

* fix push to bottom

* typo

* fix drag and drop

* use standard code

* wider click area for dropdown

* unify badge look

* fix padding

* misc fixes

* more fixes

* make dropdown scrollable

* misc fixes

* fix padding for notes

* use existing code instead of new props
2017-11-02 21:07:38 +01:00

87 lines
1.8 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 bModal from 'bootstrap-vue/lib/components/modal';
import Task from './tasks/task';
export default {
props: ['yesterDailies'],
components: {
bModal,
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('hide::modal', 'yesterdaily');
},
},
};
</script>