forked from vikunja/frontend
Compare commits
27 Commits
renovate/f
...
main
Author | SHA1 | Date | |
---|---|---|---|
419c0b2d96 | |||
449b11c1ff | |||
f818c207c2 | |||
4ee8f600a3 | |||
29f68747bb | |||
ce201e0880 | |||
bd26b81318 | |||
|
b80f82c411 | ||
5afafb7c82 | |||
9de20b4c54 | |||
c9b18232c9 | |||
8e460f9856 | |||
2db263f2d2 | |||
79872c96de | |||
2c881b3126 | |||
8093ce9441 | |||
c4d7f6fdfa | |||
c20de51a3c | |||
ed56176f2d | |||
ab7d889650 | |||
b334712dfe | |||
454b680117 | |||
830ecc2c03 | |||
0e448a123e | |||
1c01fcbb84 | |||
e8fb4ce1fa | |||
37cbbdbec8 |
42
package.json
42
package.json
|
@ -24,13 +24,13 @@
|
|||
"@fortawesome/vue-fontawesome": "3.0.1",
|
||||
"@github/hotkey": "2.0.1",
|
||||
"@kyvg/vue3-notification": "2.4.1",
|
||||
"@sentry/tracing": "7.15.0",
|
||||
"@sentry/vue": "7.15.0",
|
||||
"@sentry/tracing": "7.16.0",
|
||||
"@sentry/vue": "7.16.0",
|
||||
"@types/is-touch-device": "1.0.0",
|
||||
"@types/lodash.clonedeep": "4.5.7",
|
||||
"@types/sortablejs": "1.15.0",
|
||||
"@vueuse/core": "9.3.0",
|
||||
"@vueuse/router": "9.3.0",
|
||||
"@vueuse/core": "9.3.1",
|
||||
"@vueuse/router": "9.3.1",
|
||||
"axios": "0.27.2",
|
||||
"blurhash": "2.0.3",
|
||||
"bulma-css-variables": "0.9.33",
|
||||
|
@ -52,7 +52,7 @@
|
|||
"register-service-worker": "1.7.2",
|
||||
"snake-case": "3.0.4",
|
||||
"sortablejs": "1.15.0",
|
||||
"ufo": "0.8.5",
|
||||
"ufo": "0.8.6",
|
||||
"vue": "3.2.41",
|
||||
"vue-advanced-cropper": "2.8.6",
|
||||
"vue-drag-resize": "2.0.3",
|
||||
|
@ -65,16 +65,17 @@
|
|||
"devDependencies": {
|
||||
"@4tw/cypress-drag-drop": "2.2.1",
|
||||
"@cypress/vite-dev-server": "3.3.1",
|
||||
"@cypress/vue": "4.2.0",
|
||||
"@cypress/vue": "4.2.1",
|
||||
"@faker-js/faker": "7.6.0",
|
||||
"@rushstack/eslint-patch": "1.2.0",
|
||||
"@types/dompurify": "2.3.4",
|
||||
"@types/flexsearch": "0.7.3",
|
||||
"@types/lodash.debounce": "4.0.7",
|
||||
"@types/marked": "4.0.7",
|
||||
"@types/node": "16.11.65",
|
||||
"@typescript-eslint/eslint-plugin": "5.40.0",
|
||||
"@typescript-eslint/parser": "5.40.0",
|
||||
"@types/node": "16.11.68",
|
||||
"@types/postcss-preset-env": "7.7.0",
|
||||
"@typescript-eslint/eslint-plugin": "5.40.1",
|
||||
"@typescript-eslint/parser": "5.40.1",
|
||||
"@vitejs/plugin-legacy": "2.2.0",
|
||||
"@vitejs/plugin-vue": "3.1.2",
|
||||
"@vue/eslint-config-typescript": "11.0.2",
|
||||
|
@ -82,33 +83,28 @@
|
|||
"@vue/tsconfig": "0.1.3",
|
||||
"autoprefixer": "10.4.12",
|
||||
"browserslist": "4.21.4",
|
||||
"caniuse-lite": "1.0.30001418",
|
||||
"caniuse-lite": "1.0.30001420",
|
||||
"cypress": "10.10.0",
|
||||
"esbuild": "0.15.10",
|
||||
"esbuild": "0.15.11",
|
||||
"eslint": "8.25.0",
|
||||
"eslint-plugin-vue": "9.6.0",
|
||||
"express": "4.18.2",
|
||||
"happy-dom": "7.4.0",
|
||||
"netlify-cli": "12.0.7",
|
||||
"happy-dom": "7.5.12",
|
||||
"netlify-cli": "12.0.9",
|
||||
"postcss": "8.4.18",
|
||||
"postcss-preset-env": "7.8.2",
|
||||
"rollup": "3.1.0",
|
||||
"rollup-plugin-visualizer": "5.8.2",
|
||||
"rollup": "3.2.3",
|
||||
"rollup-plugin-visualizer": "5.8.3",
|
||||
"sass": "1.55.0",
|
||||
"typescript": "4.8.4",
|
||||
"vite": "3.1.8",
|
||||
"vite-plugin-pwa": "0.13.1",
|
||||
"vite-svg-loader": "3.6.0",
|
||||
"vitest": "0.24.1",
|
||||
"vue-tsc": "1.0.7",
|
||||
"vitest": "0.24.3",
|
||||
"vue-tsc": "1.0.8",
|
||||
"wait-on": "6.0.1",
|
||||
"workbox-cli": "6.5.4"
|
||||
},
|
||||
"postcss": {
|
||||
"plugins": {
|
||||
"autoprefixer": {}
|
||||
}
|
||||
},
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"packageManager": "pnpm@7.13.4"
|
||||
"packageManager": "pnpm@7.13.5"
|
||||
}
|
||||
|
|
664
pnpm-lock.yaml
664
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -44,8 +44,8 @@
|
|||
variant="secondary"
|
||||
:shadow="false"
|
||||
>
|
||||
<img :src="userAvatar" alt="" class="avatar" width="40" height="40"/>
|
||||
<span class="username">{{ userInfo.name !== '' ? userInfo.name : userInfo.username }}</span>
|
||||
<img :src="authStore.avatarUrl" alt="" class="avatar" width="40" height="40"/>
|
||||
<span class="username">{{ authStore.userDisplayName }}</span>
|
||||
<span class="icon is-small">
|
||||
<icon icon="chevron-down"/>
|
||||
</span>
|
||||
|
@ -80,7 +80,7 @@
|
|||
{{ $t('about.title') }}
|
||||
</dropdown-item>
|
||||
<dropdown-item
|
||||
@click="logout()"
|
||||
@click="authStore.logout()"
|
||||
>
|
||||
{{ $t('user.auth.logout') }}
|
||||
</dropdown-item>
|
||||
|
@ -117,8 +117,6 @@ const canWriteCurrentList = computed(() => baseStore.currentList.maxRight > Righ
|
|||
const menuActive = computed(() => baseStore.menuActive)
|
||||
|
||||
const authStore = useAuthStore()
|
||||
const userInfo = computed(() => authStore.info)
|
||||
const userAvatar = computed(() => authStore.avatarUrl)
|
||||
|
||||
const configStore = useConfigStore()
|
||||
const imprintUrl = computed(() => configStore.legal.imprintUrl)
|
||||
|
@ -136,10 +134,6 @@ onMounted(async () => {
|
|||
listTitle.value.style.setProperty('--nav-username-width', `${usernameWidth}px`)
|
||||
})
|
||||
|
||||
function logout() {
|
||||
authStore.logout()
|
||||
}
|
||||
|
||||
function openQuickActions() {
|
||||
baseStore.setQuickActionsActive(true)
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ import {success} from '@/message'
|
|||
import {useTaskStore} from '@/stores/tasks'
|
||||
|
||||
import type {IUser} from '@/modelTypes/IUser'
|
||||
import { getDisplayName } from '@/models/user'
|
||||
|
||||
const props = defineProps({
|
||||
taskId: {
|
||||
|
@ -65,7 +66,7 @@ const taskStore = useTaskStore()
|
|||
const {t} = useI18n({useScope: 'global'})
|
||||
|
||||
const listUserService = shallowReactive(new ListUserService())
|
||||
const foundUsers = ref([])
|
||||
const foundUsers = ref<IUser[]>([])
|
||||
const assignees = ref<IUser[]>([])
|
||||
let isAdding = false
|
||||
|
||||
|
@ -114,13 +115,14 @@ async function findUser(query: string) {
|
|||
return
|
||||
}
|
||||
|
||||
const response = await listUserService.getAll({listId: props.listId}, {s: query})
|
||||
const response = await listUserService.getAll({listId: props.listId}, {s: query}) as IUser[]
|
||||
|
||||
// Filter the results to not include users who are already assigned
|
||||
foundUsers.value = response.filter(({id}) => !includesById(assignees.value, id))
|
||||
foundUsers.value = response
|
||||
.filter(({id}) => !includesById(assignees.value, id))
|
||||
.map(u => {
|
||||
// Users may not have a display name set, so we fall back on the username in that case
|
||||
u.name = u.name === '' ? u.username : u.name
|
||||
u.name = getDisplayName(u)
|
||||
return u
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
import {describe, it, expect} from 'vitest'
|
||||
import {hourToSalutation} from './useDateTimeSalutation'
|
||||
|
||||
const dateWithHour = (hours: number): Date => {
|
||||
const date = new Date()
|
||||
date.setHours(hours)
|
||||
return date
|
||||
}
|
||||
|
||||
describe('Salutation', () => {
|
||||
it('shows the right salutation in the night', () => {
|
||||
const salutation = hourToSalutation(dateWithHour(4))
|
||||
expect(salutation).toBe('home.welcomeNight')
|
||||
})
|
||||
it('shows the right salutation in the morning', () => {
|
||||
const salutation = hourToSalutation(dateWithHour(8))
|
||||
expect(salutation).toBe('home.welcomeMorning')
|
||||
})
|
||||
it('shows the right salutation in the day', () => {
|
||||
const salutation = hourToSalutation(dateWithHour(13))
|
||||
expect(salutation).toBe('home.welcomeDay')
|
||||
})
|
||||
it('shows the right salutation in the night', () => {
|
||||
const salutation = hourToSalutation(dateWithHour(20))
|
||||
expect(salutation).toBe('home.welcomeEvening')
|
||||
})
|
||||
it('shows the right salutation in the night again', () => {
|
||||
const salutation = hourToSalutation(dateWithHour(23))
|
||||
expect(salutation).toBe('home.welcomeNight')
|
||||
})
|
||||
})
|
|
@ -1,31 +0,0 @@
|
|||
import {computed} from 'vue'
|
||||
import {useNow} from '@vueuse/core'
|
||||
|
||||
const TRANSLATION_KEY_PREFIX = 'home.welcome'
|
||||
|
||||
export function hourToSalutation(now: Date) {
|
||||
const hours = now.getHours()
|
||||
|
||||
if (hours < 5) {
|
||||
return `${TRANSLATION_KEY_PREFIX}Night`
|
||||
}
|
||||
|
||||
if (hours < 11) {
|
||||
return `${TRANSLATION_KEY_PREFIX}Morning`
|
||||
}
|
||||
|
||||
if (hours < 18) {
|
||||
return `${TRANSLATION_KEY_PREFIX}Day`
|
||||
}
|
||||
|
||||
if (hours < 23) {
|
||||
return `${TRANSLATION_KEY_PREFIX}Evening`
|
||||
}
|
||||
|
||||
return `${TRANSLATION_KEY_PREFIX}Night`
|
||||
}
|
||||
|
||||
export function useDateTimeSalutation() {
|
||||
const now = useNow()
|
||||
return computed(() => hourToSalutation(now.value))
|
||||
}
|
26
src/composables/useDaytimeSalutation.ts
Normal file
26
src/composables/useDaytimeSalutation.ts
Normal file
|
@ -0,0 +1,26 @@
|
|||
import {computed} from 'vue'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
import {useNow} from '@vueuse/core'
|
||||
|
||||
import {useAuthStore} from '@/stores/auth'
|
||||
import {hourToDaytime} from '@/helpers/hourToDaytime'
|
||||
|
||||
export type Daytime = 'night' | 'morning' | 'day' | 'evening'
|
||||
|
||||
export function useDaytimeSalutation() {
|
||||
const {t} = useI18n({useScope: 'global'})
|
||||
const now = useNow()
|
||||
const authStore = useAuthStore()
|
||||
|
||||
const name = computed(() => authStore.userDisplayName)
|
||||
const daytime = computed(() => hourToDaytime(now.value))
|
||||
|
||||
const salutations = {
|
||||
'night': () => t('home.welcomeNight', {username: name.value}),
|
||||
'morning': () => t('home.welcomeMorning', {username: name.value}),
|
||||
'day': () => t('home.welcomeDay', {username: name.value}),
|
||||
'evening': () => t('home.welcomeEvening', {username: name.value}),
|
||||
} as Record<Daytime, () => string>
|
||||
|
||||
return computed(() => name.value ? salutations[daytime.value]() : undefined)
|
||||
}
|
31
src/helpers/hourToDaytime.test.ts
Normal file
31
src/helpers/hourToDaytime.test.ts
Normal file
|
@ -0,0 +1,31 @@
|
|||
import {describe, it, expect} from 'vitest'
|
||||
import {hourToDaytime} from "./hourToDaytime"
|
||||
|
||||
function dateWithHour(hours: number): Date {
|
||||
const newDate = new Date()
|
||||
newDate.setHours(hours, 0, 0,0 )
|
||||
return newDate
|
||||
}
|
||||
|
||||
describe('Salutation', () => {
|
||||
it('shows the right salutation in the night', () => {
|
||||
const salutation = hourToDaytime(dateWithHour(4))
|
||||
expect(salutation).toBe('night')
|
||||
})
|
||||
it('shows the right salutation in the morning', () => {
|
||||
const salutation = hourToDaytime(dateWithHour(8))
|
||||
expect(salutation).toBe('morning')
|
||||
})
|
||||
it('shows the right salutation in the day', () => {
|
||||
const salutation = hourToDaytime(dateWithHour(13))
|
||||
expect(salutation).toBe('day')
|
||||
})
|
||||
it('shows the right salutation in the night', () => {
|
||||
const salutation = hourToDaytime(dateWithHour(20))
|
||||
expect(salutation).toBe('evening')
|
||||
})
|
||||
it('shows the right salutation in the night again', () => {
|
||||
const salutation = hourToDaytime(dateWithHour(23))
|
||||
expect(salutation).toBe('night')
|
||||
})
|
||||
})
|
14
src/helpers/hourToDaytime.ts
Normal file
14
src/helpers/hourToDaytime.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import type { Daytime } from '@/composables/useDaytimeSalutation'
|
||||
|
||||
export function hourToDaytime(now: Date): Daytime {
|
||||
const hours = now.getHours()
|
||||
|
||||
const daytimeMap = {
|
||||
night: hours < 5 || hours > 23,
|
||||
morning: hours < 11,
|
||||
day: hours < 18,
|
||||
evening: hours < 23,
|
||||
} as Record<Daytime, boolean>
|
||||
|
||||
return (Object.keys(daytimeMap) as Daytime[]).find((daytime) => daytimeMap[daytime]) || 'night'
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"home": {
|
||||
"welcomeNight": "Good Night {username}",
|
||||
"welcomeMorning": "Good Morning {username}",
|
||||
"welcomeDay": "Hi {username}",
|
||||
"welcomeEvening": "Good Evening {username}",
|
||||
"welcomeNight": "Good Night {username}!",
|
||||
"welcomeMorning": "Good Morning {username}!",
|
||||
"welcomeDay": "Hi {username}!",
|
||||
"welcomeEvening": "Good Evening {username}!",
|
||||
"lastViewed": "Last viewed",
|
||||
"list": {
|
||||
"newText": "You can create a new list for your new tasks:",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"home": {
|
||||
"welcomeNight": "Dobrou noc {username}",
|
||||
"welcomeMorning": "Dobré ráno {username}",
|
||||
"welcomeDay": "Ahoj {username}",
|
||||
"welcomeEvening": "Dobrý večer {username}",
|
||||
"welcomeNight": "Good Night {username}!",
|
||||
"welcomeMorning": "Good Morning {username}!",
|
||||
"welcomeDay": "Hi {username}!",
|
||||
"welcomeEvening": "Good Evening {username}!",
|
||||
"lastViewed": "Naposledy zobrazeno",
|
||||
"list": {
|
||||
"newText": "Můžete vytvořit nový seznam pro své nové úkoly:",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"home": {
|
||||
"welcomeNight": "Gute Nacht, {username}",
|
||||
"welcomeMorning": "Guten Morgen, {username}",
|
||||
"welcomeDay": "Hallo, {username}",
|
||||
"welcomeEvening": "Guten Abend, {username}",
|
||||
"welcomeNight": "Good Night {username}!",
|
||||
"welcomeMorning": "Good Morning {username}!",
|
||||
"welcomeDay": "Hi {username}!",
|
||||
"welcomeEvening": "Good Evening {username}!",
|
||||
"lastViewed": "Zuletzt angesehen",
|
||||
"list": {
|
||||
"newText": "Du kannst eine neue Liste für deine neuen Aufgaben erstellen:",
|
||||
|
@ -335,7 +335,7 @@
|
|||
"create": {
|
||||
"title": "Neuer Namespace",
|
||||
"titleRequired": "Bitte gebe einen Titel an.",
|
||||
"explanation": "Ein Namespace ist eine Sammlung von Listen, die du teilen und zur Organisation verwenden kannst. Jede Liste zu einem Namespace.",
|
||||
"explanation": "Ein Namespace ist eine Sammlung von Listen, die du teilen und zur Organisation verwenden kannst. Jede Liste gehört zu einem Namespace.",
|
||||
"tooltip": "Was ist ein Namespace?",
|
||||
"success": "Der Namespace wurde erfolgreich erstellt."
|
||||
},
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"home": {
|
||||
"welcomeNight": "Guet Nacht, {username}",
|
||||
"welcomeMorning": "Guete Morgä, {username}",
|
||||
"welcomeDay": "Hoi {username}",
|
||||
"welcomeEvening": "Guete Abig, {username}",
|
||||
"welcomeNight": "Good Night {username}!",
|
||||
"welcomeMorning": "Good Morning {username}!",
|
||||
"welcomeDay": "Hi {username}!",
|
||||
"welcomeEvening": "Good Evening {username}!",
|
||||
"lastViewed": "Zletscht ahglueget",
|
||||
"list": {
|
||||
"newText": "Du chasch e Liste für dini neue Uufgabe erstelle:",
|
||||
|
@ -335,7 +335,7 @@
|
|||
"create": {
|
||||
"title": "Neuer Namespace",
|
||||
"titleRequired": "Bitte gib en Titl ah.",
|
||||
"explanation": "Ein Namespace ist eine Sammlung von Listen, die du teilen und zur Organisation verwenden kannst. Jede Liste zu einem Namespace.",
|
||||
"explanation": "Ein Namespace ist eine Sammlung von Listen, die du teilen und zur Organisation verwenden kannst. Jede Liste gehört zu einem Namespace.",
|
||||
"tooltip": "Was isch en Namensruum?",
|
||||
"success": "Namensruum erstellt."
|
||||
},
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"home": {
|
||||
"welcomeNight": "Good Night {username}",
|
||||
"welcomeMorning": "Good Morning {username}",
|
||||
"welcomeDay": "Hi {username}",
|
||||
"welcomeEvening": "Good Evening {username}",
|
||||
"welcomeNight": "Good Night {username}!",
|
||||
"welcomeMorning": "Good Morning {username}!",
|
||||
"welcomeDay": "Hi {username}!",
|
||||
"welcomeEvening": "Good Evening {username}!",
|
||||
"lastViewed": "Last viewed",
|
||||
"list": {
|
||||
"newText": "You can create a new list for your new tasks:",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"home": {
|
||||
"welcomeNight": "Good Night {username}",
|
||||
"welcomeMorning": "Good Morning {username}",
|
||||
"welcomeDay": "Hi {username}",
|
||||
"welcomeEvening": "Good Evening {username}",
|
||||
"welcomeNight": "Good Night {username}!",
|
||||
"welcomeMorning": "Good Morning {username}!",
|
||||
"welcomeDay": "Hi {username}!",
|
||||
"welcomeEvening": "Good Evening {username}!",
|
||||
"lastViewed": "Last viewed",
|
||||
"list": {
|
||||
"newText": "You can create a new list for your new tasks:",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"home": {
|
||||
"welcomeNight": "Bonne nuit {username}",
|
||||
"welcomeMorning": "Bonjour {username}",
|
||||
"welcomeDay": "Salut {username}",
|
||||
"welcomeEvening": "Bonsoir {username}",
|
||||
"welcomeNight": "Good Night {username}!",
|
||||
"welcomeMorning": "Good Morning {username}!",
|
||||
"welcomeDay": "Hi {username}!",
|
||||
"welcomeEvening": "Good Evening {username}!",
|
||||
"lastViewed": "Dernière consultation",
|
||||
"list": {
|
||||
"newText": "Tu peux créer une nouvelle liste pour tes nouvelles tâches :",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"home": {
|
||||
"welcomeNight": "Buonanotte {username}",
|
||||
"welcomeMorning": "Buongiorno {username}",
|
||||
"welcomeDay": "Ciao {username}",
|
||||
"welcomeEvening": "Buonasera {username}",
|
||||
"welcomeNight": "Good Night {username}!",
|
||||
"welcomeMorning": "Good Morning {username}!",
|
||||
"welcomeDay": "Hi {username}!",
|
||||
"welcomeEvening": "Good Evening {username}!",
|
||||
"lastViewed": "Ultima visualizzazione",
|
||||
"list": {
|
||||
"newText": "È possibile creare una nuova lista per le nuove attività:",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"home": {
|
||||
"welcomeNight": "Goede nacht {username}",
|
||||
"welcomeMorning": "Goedemorgen {username}",
|
||||
"welcomeDay": "Hallo {username}",
|
||||
"welcomeEvening": "Goedenavond {username}",
|
||||
"welcomeNight": "Good Night {username}!",
|
||||
"welcomeMorning": "Good Morning {username}!",
|
||||
"welcomeDay": "Hi {username}!",
|
||||
"welcomeEvening": "Good Evening {username}!",
|
||||
"lastViewed": "Laatst bekeken",
|
||||
"list": {
|
||||
"newText": "Je kan een nieuwe lijst maken voor je nieuwe taken:",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"home": {
|
||||
"welcomeNight": "Dobrej nocy {username}",
|
||||
"welcomeMorning": "Dzień dobry {username}",
|
||||
"welcomeDay": "Cześć {username}",
|
||||
"welcomeEvening": "Dobry wieczór {username}",
|
||||
"welcomeNight": "Good Night {username}!",
|
||||
"welcomeMorning": "Good Morning {username}!",
|
||||
"welcomeDay": "Hi {username}!",
|
||||
"welcomeEvening": "Good Evening {username}!",
|
||||
"lastViewed": "Ostatnio oglądane",
|
||||
"list": {
|
||||
"newText": "Możesz stworzyć nową listę dla swoich nowych zadań:",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"home": {
|
||||
"welcomeNight": "Good Night {username}",
|
||||
"welcomeMorning": "Good Morning {username}",
|
||||
"welcomeDay": "Hi {username}",
|
||||
"welcomeEvening": "Good Evening {username}",
|
||||
"welcomeNight": "Good Night {username}!",
|
||||
"welcomeMorning": "Good Morning {username}!",
|
||||
"welcomeDay": "Hi {username}!",
|
||||
"welcomeEvening": "Good Evening {username}!",
|
||||
"lastViewed": "Last viewed",
|
||||
"list": {
|
||||
"newText": "You can create a new list for your new tasks:",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"home": {
|
||||
"welcomeNight": "Boa Noite {username}",
|
||||
"welcomeMorning": "Bom Dia {username}",
|
||||
"welcomeDay": "Olá {username}",
|
||||
"welcomeEvening": "Boa Tarde {username}",
|
||||
"welcomeNight": "Good Night {username}!",
|
||||
"welcomeMorning": "Good Morning {username}!",
|
||||
"welcomeDay": "Hi {username}!",
|
||||
"welcomeEvening": "Good Evening {username}!",
|
||||
"lastViewed": "Visto recentemente",
|
||||
"list": {
|
||||
"newText": "Podes criar uma nova lista para as tuas novas tarefas:",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"home": {
|
||||
"welcomeNight": "Доброй ночи, {username}",
|
||||
"welcomeMorning": "Доброе утро, {username}",
|
||||
"welcomeDay": "Привет, {username}",
|
||||
"welcomeEvening": "Добрый вечер, {username}",
|
||||
"welcomeNight": "Good Night {username}!",
|
||||
"welcomeMorning": "Good Morning {username}!",
|
||||
"welcomeDay": "Hi {username}!",
|
||||
"welcomeEvening": "Good Evening {username}!",
|
||||
"lastViewed": "Последние просмотренные",
|
||||
"list": {
|
||||
"newText": "Ты можешь создать новый список для своих задач:",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"home": {
|
||||
"welcomeNight": "Good Night {username}",
|
||||
"welcomeMorning": "Good Morning {username}",
|
||||
"welcomeDay": "Hi {username}",
|
||||
"welcomeEvening": "Good Evening {username}",
|
||||
"welcomeNight": "Good Night {username}!",
|
||||
"welcomeMorning": "Good Morning {username}!",
|
||||
"welcomeDay": "Hi {username}!",
|
||||
"welcomeEvening": "Good Evening {username}!",
|
||||
"lastViewed": "Last viewed",
|
||||
"list": {
|
||||
"newText": "You can create a new list for your new tasks:",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"home": {
|
||||
"welcomeNight": "Good Night {username}",
|
||||
"welcomeMorning": "Good Morning {username}",
|
||||
"welcomeDay": "Hi {username}",
|
||||
"welcomeEvening": "Good Evening {username}",
|
||||
"welcomeNight": "Good Night {username}!",
|
||||
"welcomeMorning": "Good Morning {username}!",
|
||||
"welcomeDay": "Hi {username}!",
|
||||
"welcomeEvening": "Good Evening {username}!",
|
||||
"lastViewed": "Last viewed",
|
||||
"list": {
|
||||
"newText": "You can create a new list for your new tasks:",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"home": {
|
||||
"welcomeNight": "Good Night {username}",
|
||||
"welcomeMorning": "Good Morning {username}",
|
||||
"welcomeDay": "Hi {username}",
|
||||
"welcomeEvening": "Good Evening {username}",
|
||||
"welcomeNight": "Good Night {username}!",
|
||||
"welcomeMorning": "Good Morning {username}!",
|
||||
"welcomeDay": "Hi {username}!",
|
||||
"welcomeEvening": "Good Evening {username}!",
|
||||
"lastViewed": "Last viewed",
|
||||
"list": {
|
||||
"newText": "You can create a new list for your new tasks:",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"home": {
|
||||
"welcomeNight": "Ngủ ngon nhé, {username}",
|
||||
"welcomeMorning": "Chào buổi sáng, {username}",
|
||||
"welcomeDay": "Hi {username}",
|
||||
"welcomeEvening": "Chào buổi tối, {username}",
|
||||
"welcomeNight": "Good Night {username}!",
|
||||
"welcomeMorning": "Good Morning {username}!",
|
||||
"welcomeDay": "Hi {username}!",
|
||||
"welcomeEvening": "Good Evening {username}!",
|
||||
"lastViewed": "Xem gần đây",
|
||||
"list": {
|
||||
"newText": "Bạn có thể tạo một danh sách công việc mới cho mình:",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"home": {
|
||||
"welcomeNight": "Good Night {username}",
|
||||
"welcomeMorning": "Good Morning {username}",
|
||||
"welcomeDay": "Hi {username}",
|
||||
"welcomeEvening": "Good Evening {username}",
|
||||
"welcomeNight": "Good Night {username}!",
|
||||
"welcomeMorning": "Good Morning {username}!",
|
||||
"welcomeDay": "Hi {username}!",
|
||||
"welcomeEvening": "Good Evening {username}!",
|
||||
"lastViewed": "Last viewed",
|
||||
"list": {
|
||||
"newText": "You can create a new list for your new tasks:",
|
||||
|
|
|
@ -7,7 +7,7 @@ export const AUTH_TYPES = {
|
|||
'LINK_SHARE': 2,
|
||||
} as const
|
||||
|
||||
type AuthType = typeof AUTH_TYPES[keyof typeof AUTH_TYPES]
|
||||
export type AuthType = typeof AUTH_TYPES[keyof typeof AUTH_TYPES]
|
||||
|
||||
export interface IUser extends IAbstract {
|
||||
id: number
|
||||
|
|
|
@ -3,7 +3,7 @@ import {defineStore, acceptHMRUpdate} from 'pinia'
|
|||
import {HTTPFactory, AuthenticatedHTTPFactory} from '@/http-common'
|
||||
import {i18n, getCurrentLanguage, saveLanguage} from '@/i18n'
|
||||
import {objectToSnakeCase} from '@/helpers/case'
|
||||
import UserModel, { getAvatarUrl } from '@/models/user'
|
||||
import UserModel, { getAvatarUrl, getDisplayName } from '@/models/user'
|
||||
import UserSettingsService from '@/services/userSettings'
|
||||
import {getToken, refreshToken, removeToken, saveToken} from '@/helpers/auth'
|
||||
import {setModuleLoading} from '@/stores/helper'
|
||||
|
@ -54,6 +54,9 @@ export const useAuthStore = defineStore('auth', {
|
|||
state.info.type === AUTH_TYPES.LINK_SHARE
|
||||
)
|
||||
},
|
||||
userDisplayName(state) {
|
||||
return state.info ? getDisplayName(state.info) : undefined
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
setIsLoading(isLoading: boolean) {
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
<template>
|
||||
<div class="content has-text-centered">
|
||||
<h2 v-if="userInfo">
|
||||
{{ $t(welcome, {username: userInfo.name !== '' ? userInfo.name : userInfo.username}) }}!
|
||||
</h2>
|
||||
<h2 v-if="salutation">{{ salutation }}</h2>
|
||||
|
||||
<message variant="danger" v-if="deletionScheduledAt !== null" class="mb-4">
|
||||
{{
|
||||
$t('user.deletion.scheduled', {
|
||||
|
@ -69,7 +68,7 @@ import AddTask from '@/components/tasks/add-task.vue'
|
|||
import {getHistory} from '@/modules/listHistory'
|
||||
import {parseDateOrNull} from '@/helpers/parseDateOrNull'
|
||||
import {formatDateShort, formatDateSince} from '@/helpers/time/formatDate'
|
||||
import {useDateTimeSalutation} from '@/composables/useDateTimeSalutation'
|
||||
import {useDaytimeSalutation} from '@/composables/useDaytimeSalutation'
|
||||
|
||||
import {useBaseStore} from '@/stores/base'
|
||||
import {useListStore} from '@/stores/lists'
|
||||
|
@ -78,7 +77,7 @@ import {useNamespaceStore} from '@/stores/namespaces'
|
|||
import {useAuthStore} from '@/stores/auth'
|
||||
import {useTaskStore} from '@/stores/tasks'
|
||||
|
||||
const welcome = useDateTimeSalutation()
|
||||
const salutation = useDaytimeSalutation()
|
||||
|
||||
const baseStore = useBaseStore()
|
||||
const authStore = useAuthStore()
|
||||
|
@ -99,7 +98,6 @@ const listHistory = computed(() => {
|
|||
})
|
||||
|
||||
const migratorsEnabled = computed(() => configStore.availableMigrators?.length > 0)
|
||||
const userInfo = computed(() => authStore.info)
|
||||
const hasTasks = computed(() => baseStore.hasTasks)
|
||||
const defaultListId = computed(() => authStore.settings.defaultListId)
|
||||
const defaultNamespaceId = computed(() => namespaceStore.namespaces?.[0]?.id || 0)
|
||||
|
|
|
@ -6,6 +6,8 @@ import legacyFn from '@vitejs/plugin-legacy'
|
|||
import {VitePWA} from 'vite-plugin-pwa'
|
||||
import {visualizer} from 'rollup-plugin-visualizer'
|
||||
import svgLoader from 'vite-svg-loader'
|
||||
import postcssPresetEnv from "postcss-preset-env";
|
||||
|
||||
import { fileURLToPath, URL } from 'url'
|
||||
|
||||
const pathSrc = fileURLToPath(new URL('./src', import.meta.url))
|
||||
|
@ -40,6 +42,11 @@ export default defineConfig({
|
|||
charset: false, // fixes "@charset" must be the first rule in the file" warnings
|
||||
},
|
||||
},
|
||||
postcss: {
|
||||
plugins: [
|
||||
postcssPresetEnv(),
|
||||
],
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
vue({
|
||||
|
|
Loading…
Reference in New Issue
Block a user