1
0

Merge branch 'main' into feature/login-improvements

This commit is contained in:
konrad
2022-01-23 17:06:49 +00:00
60 changed files with 1300 additions and 1156 deletions

View File

@ -254,4 +254,13 @@ export default {
background-color: var(--primary-dark);
}
}
@media (prefers-reduced-motion: reduce) {
@keyframes wave {
10% {
transform: translate(0, 0);
background-color: var(--primary);
}
}
}
</style>

View File

@ -22,7 +22,7 @@
</router-link>
</p>
<div :key="`n${n.id}`" class="namespace" v-for="n in namespaces">
<section :key="`n${n.id}`" class="namespace" v-for="n in namespaces">
<x-button
:to="{name: 'list.create', params: {id: n.id}}"
class="is-pulled-right"
@ -64,7 +64,7 @@
:show-archived="showArchived"
/>
</div>
</div>
</section>
</div>
</template>

View File

@ -44,7 +44,7 @@ import Message from '@/components/misc/message.vue'
const {t} = useI18n()
useTitle(t('sharing.authenticating'))
async function useAuth() {
function useAuth() {
const store = useStore()
const route = useRoute()
const router = useRouter()
@ -75,21 +75,21 @@ async function useAuth() {
password: password.value,
})
router.push({name: 'list.list', params: {listId}})
} catch (e) {
} catch (e: any) {
if (e.response?.data?.code === 13001) {
authenticateWithPassword.value = true
return
}
// TODO: Put this logic in a global errorMessage handler method which checks all auth codes
let errorMessage = t('sharing.error')
let err = t('sharing.error')
if (e.response?.data?.message) {
errorMessage = e.response.data.message
err = e.response.data.message
}
if (e.response?.data?.code === 13002) {
errorMessage = t('sharing.invalidPassword')
err = t('sharing.invalidPassword')
}
errorMessage.value = errorMessage
errorMessage.value = err
} finally {
loading.value = false
}

View File

@ -386,22 +386,28 @@
<!-- Created / Updated [by] -->
<p class="created">
<i18n-t keypath="task.detail.created">
<span v-tooltip="formatDate(task.created)">{{ formatDateSince(task.created) }}</span>
{{ task.createdBy.getDisplayName() }}
</i18n-t>
<time :datetime="formatISO(task.created)" v-tooltip="formatDate(task.created)">
<i18n-t keypath="task.detail.created">
<span>{{ formatDateSince(task.created) }}</span>
{{ task.createdBy.getDisplayName() }}
</i18n-t>
</time>
<template v-if="+new Date(task.created) !== +new Date(task.updated)">
<br/>
<!-- Computed properties to show the actual date every time it gets updated -->
<i18n-t keypath="task.detail.updated">
<span v-tooltip="updatedFormatted">{{ updatedSince }}</span>
</i18n-t>
<time :datetime="formatISO(task.updated)" v-tooltip="updatedFormatted">
<i18n-t keypath="task.detail.updated">
<span>{{ updatedSince }}</span>
</i18n-t>
</time>
</template>
<template v-if="task.done">
<br/>
<i18n-t keypath="task.detail.doneAt">
<span v-tooltip="doneFormatted">{{ doneSince }}</span>
</i18n-t>
<time :datetime="formatISO(task.doneAt)" v-tooltip="doneFormatted">
<i18n-t keypath="task.detail.doneAt">
<span>{{ doneSince }}</span>
</i18n-t>
</time>
</template>
</p>
</div>
@ -589,6 +595,9 @@ export default {
}
},
scrollToHeading() {
if(!this.$refs?.heading?.$el) {
return
}
this.$refs.heading.$el.scrollIntoView({block: 'center'})
},
setActiveFields() {
@ -627,7 +636,6 @@ export default {
}
this.task = await this.$store.dispatch('tasks/update', this.task)
this.setActiveFields()
if (!showNotification) {
return
@ -871,7 +879,7 @@ $flash-background-duration: 750ms;
}
.action-buttons {
a.button {
.button {
width: 100%;
margin-bottom: .5rem;
justify-content: left;
@ -932,4 +940,12 @@ $flash-background-duration: 750ms;
background: transparent;
}
}
@media (prefers-reduced-motion: reduce) {
@keyframes flash-background {
0% {
background: transparent;
}
}
}
</style>