From df32893ce657bc57a6a5f9b850e23d7e814d76db Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 16 Oct 2021 21:37:21 +0200 Subject: [PATCH 01/12] fix: always sort tasks the same order in chrome and firefox Discussion at https://community.vikunja.io/t/custom-sorting-tasks-on-overview/392 --- src/views/tasks/ShowTasks.vue | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/views/tasks/ShowTasks.vue b/src/views/tasks/ShowTasks.vue index 601e110c..015044d3 100644 --- a/src/views/tasks/ShowTasks.vue +++ b/src/views/tasks/ShowTasks.vue @@ -33,12 +33,15 @@
{{ $t('task.show.today') }} - {{ $t('task.show.nextWeek') }} + {{ + $t('task.show.nextWeek') + }} + {{ $t('task.show.nextMonth') }}
@@ -163,7 +166,10 @@ export default { if (this.showAll) { this.setTitle(this.$t('task.show.titleCurrent')) } else { - this.setTitle(this.$t('task.show.titleDates', { from: this.cStartDate.toLocaleDateString(), to: this.cEndDate.toLocaleDateString()})) + this.setTitle(this.$t('task.show.titleDates', { + from: this.cStartDate.toLocaleDateString(), + to: this.cEndDate.toLocaleDateString(), + })) } const params = { @@ -200,14 +206,17 @@ export default { this.$store.dispatch('tasks/loadTasks', params) .then(r => { - // Sort all tasks to put those with a due date before the ones without a due date, the - // soonest before the later ones. - // We can't use the api sorting here because that sorts tasks with a due date after - // ones without a due date. - r.sort((a, b) => { - return a.dueDate === null && b.dueDate === null ? -1 : 1 - }) - const tasks = r.filter(t => t.dueDate !== null).concat(r.filter(t => t.dueDate === null)) + // Sorting tasks with a due date so that the soonest or overdue are displayed at the top of the list. + const tasksWithDueDates = r + .filter(t => t.dueDate !== null) + .sort((a, b) => a.dueDate > b.dueDate ? 1 : -1) + + const tasksWithoutDueDates = r.filter(t => t.dueDate === null) + + const tasks = [ + ...tasksWithDueDates, + ...tasksWithoutDueDates, + ] this.$set(this, 'tasks', tasks) }) From 5766ae48d7676a4c921d26879a8989fbe8819a9c Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 16 Oct 2021 23:25:02 +0200 Subject: [PATCH 02/12] fix: kanban card elements spacing --- src/styles/components/kanban.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/styles/components/kanban.scss b/src/styles/components/kanban.scss index 2a551b2a..70e849ee 100644 --- a/src/styles/components/kanban.scss +++ b/src/styles/components/kanban.scss @@ -72,6 +72,7 @@ $filter-container-height: '1rem - #{$switch-view-height}'; margin: .5rem; border-radius: $radius; background: $task-background; + padding-bottom: .125rem; &.loader-container.is-loading:after { width: 1.5rem; @@ -122,6 +123,7 @@ $filter-container-height: '1rem - #{$switch-view-height}'; .tag, .assignees, .icon, .priority-label, .checklist-summary { margin-top: 0; margin-right: .25rem; + margin-bottom: .25rem; } .checklist-summary { From a85e27b49750307bb5f733b27463696a336e2d87 Mon Sep 17 00:00:00 2001 From: renovate Date: Sun, 17 Oct 2021 10:18:27 +0000 Subject: [PATCH 03/12] chore(deps): update dependency esbuild to v0.13.8 (#861) Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/861 Co-authored-by: renovate Co-committed-by: renovate --- package.json | 2 +- yarn.lock | 178 +++++++++++++++++++++++++-------------------------- 2 files changed, 90 insertions(+), 90 deletions(-) diff --git a/package.json b/package.json index f282124c..9d1d27e7 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "browserslist": "4.17.4", "cypress": "8.6.0", "cypress-file-upload": "5.0.8", - "esbuild": "0.13.7", + "esbuild": "0.13.8", "eslint": "8.0.1", "eslint-plugin-vue": "7.19.1", "express": "4.17.1", diff --git a/yarn.lock b/yarn.lock index 1cfea886..4f317a91 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3712,188 +3712,188 @@ esbuild-android-arm64@0.13.3: resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.13.3.tgz#ef734c76eeff42e8c53acdffe901da090164a890" integrity sha512-jc9E8vGTHkzb0Vwl74H8liANV9BWsqtzLHaKvcsRgf1M+aVCBSF0gUheduAKfDsbDMT0judeMLhwBP34EUesTA== -esbuild-android-arm64@0.13.7: - version "0.13.7" - resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.13.7.tgz#528886c36968aa6ab6496392d419654dda88f092" - integrity sha512-yqCTKzmm3jiUXgi0yeKhvwZCZTqClUXwwMRAntcM9u/xvXhmpw0V0Z4qDEpnkmF2NCMzmJRH+DAAQ5whuf3CYA== +esbuild-android-arm64@0.13.8: + version "0.13.8" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.13.8.tgz#c20e875c3c98164b1ffba9b28637bdf96f5e9e7c" + integrity sha512-AilbChndywpk7CdKkNSZ9klxl+9MboLctXd9LwLo3b0dawmOF/i/t2U5d8LM6SbT1Xw36F8yngSUPrd8yPs2RA== esbuild-darwin-64@0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.13.3.tgz#35f29376b7451add79f0640980683ef923365385" integrity sha512-8bG3Zq+ZNuLlIJebOO2+weI7P2LVf33sOzaUfHj8MuJ+1Ixe4KtQxfYp7qhFnP6xP2ToJaYHxGUfLeiUCEz9hw== -esbuild-darwin-64@0.13.7: - version "0.13.7" - resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.13.7.tgz#32cf420d43ca448e7741a90d0d4c6dc5385969da" - integrity sha512-MvsgMUWzq5FxoeJLSavw3rgQbaC55A8QTI1U2/8MWamtAeDKyzWQnglcsF0/TkjGLaKEqS0ZLo8akJ8q34BCtw== +esbuild-darwin-64@0.13.8: + version "0.13.8" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.13.8.tgz#f46e6b471ddbf62265234808a6a1aa91df18a417" + integrity sha512-b6sdiT84zV5LVaoF+UoMVGJzR/iE2vNUfUDfFQGrm4LBwM/PWXweKpuu6RD9mcyCq18cLxkP6w/LD/w9DtX3ng== esbuild-darwin-arm64@0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.13.3.tgz#530a1326e7d18d62c9a54b6dce70f2b77ed50eec" integrity sha512-5E81eImYtTgh8pY7Gq4WQHhWkR/LvYadUXmuYeZBiP+3ADZJZcG60UFceZrjqNPaFOWKr/xmh4aNocwagEubcA== -esbuild-darwin-arm64@0.13.7: - version "0.13.7" - resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.13.7.tgz#c80f0b62c8ae4710b17090f507037aeae73e9016" - integrity sha512-tuP+dpIzXj17UC17VkHFDAH5nB7MajJK7sF8Fz4iVo8cml8YXj3MeNtjjLmx9YFvPs4XW3hFw1eqZJ06h2ssIA== +esbuild-darwin-arm64@0.13.8: + version "0.13.8" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.13.8.tgz#a991157a6013facd4f2e14159b7da52626c90154" + integrity sha512-R8YuPiiJayuJJRUBG4H0VwkEKo6AvhJs2m7Tl0JaIer3u1FHHXwGhMxjJDmK+kXwTFPriSysPvcobXC/UrrZCQ== esbuild-freebsd-64@0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.13.3.tgz#ce2896ac362e06eb82ca5dec06b2568901eb5afc" integrity sha512-ou+f91KkTGexi8HvF/BdtsITL6plbciQfZGys7QX6/QEwyE96PmL5KnU6ZQwoU7E99Ts6Sc9bUDq8HXJubKtBA== -esbuild-freebsd-64@0.13.7: - version "0.13.7" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.13.7.tgz#0b826a9655446c0d0a01a4a996d450e5cb0e033a" - integrity sha512-p07TrpkCJJyAXXCXFm2IpAvyASUTcuT0OF43riEsgjuRJmtaNBOUENecr2B2k/zd9wkGz6UyxxtnFntaBttkDg== +esbuild-freebsd-64@0.13.8: + version "0.13.8" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.13.8.tgz#301601d2e443ad458960e359b402a17d9500be9d" + integrity sha512-zBn6urrn8FnKC+YSgDxdof9jhPCeU8kR/qaamlV4gI8R3KUaUK162WYM7UyFVAlj9N0MyD3AtB+hltzu4cysTw== esbuild-freebsd-arm64@0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.13.3.tgz#a20454f99e060bea4e465d131556a9f0533f403f" integrity sha512-F1zV7nySjHswJuvIgjkiG5liZ63MeazDGXGKViTCeegjZ71sAhOChcaGhKcu6vq9+vqZxlfEi1fmXlx6Pc3coQ== -esbuild-freebsd-arm64@0.13.7: - version "0.13.7" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.13.7.tgz#f9c980ce7e71e6702f82706a6244959eba2b80dc" - integrity sha512-MCtfBRkE1GwAnjVoWPYoZ+S/+zanzWxAJVER1/8jmWobCXJG0w+YM2IXQ2fN4T9U96RusFWQDMJVoACnqhIAzg== +esbuild-freebsd-arm64@0.13.8: + version "0.13.8" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.13.8.tgz#039a63acc12ec0892006c147ea221e55f9125a9f" + integrity sha512-pWW2slN7lGlkx0MOEBoUGwRX5UgSCLq3dy2c8RIOpiHtA87xAUpDBvZK10MykbT+aMfXc0NI2lu1X+6kI34xng== esbuild-linux-32@0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.13.3.tgz#ad56f18208ecf007cd9ab16cd39626ca0312b8ee" integrity sha512-mHHc2v6uLrHH4zaaq5RB/5IWzgimEJ1HGldzf1qtGI513KZWfH0HRRQ8p1di4notJgBn7tDzWQ1f34ZHy69viQ== -esbuild-linux-32@0.13.7: - version "0.13.7" - resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.13.7.tgz#3d9d704452ed13da20771537bf30f695b9f80327" - integrity sha512-HM4d16XbqToo93LPrgzkiLgX3Xgr9Mw67tEM8vjhHDx18JnaZqPdIsl5ZfCqRGHlLUq+GdFKl6+dH7WlsiWMCA== +esbuild-linux-32@0.13.8: + version "0.13.8" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.13.8.tgz#c537b67d7e694b60bfa2786581412838c6ba0284" + integrity sha512-T0I0ueeKVO/Is0CAeSEOG9s2jeNNb8jrrMwG9QBIm3UU18MRB60ERgkS2uV3fZ1vP2F8i3Z2e3Zju4lg9dhVmw== esbuild-linux-64@0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.13.3.tgz#be1eabadf68d153897ed887678f7496d3949810f" integrity sha512-FJ1De2O89mrOuqtaEXu41qIYJU6R41F+OA6vheNwcAQcX8fu0aiA13FJeLABq29BYJuTVgRj3cyC8q+tz19/dQ== -esbuild-linux-64@0.13.7: - version "0.13.7" - resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.13.7.tgz#ce5c7b964990fdb2713ce816f0a24ffffd96942c" - integrity sha512-krgiIEyqcS0kfTjptGEQzdYwiEmmqpmiZHlKqZILVuU5BaIVWCBMmVx20HH9waJw1yT0Ao4fZTZ9kg8s/pKAYA== +esbuild-linux-64@0.13.8: + version "0.13.8" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.13.8.tgz#0092fc8a064001a777bfa0e3b425bb8be8f96e6a" + integrity sha512-Bm8SYmFtvfDCIu9sjKppFXzRXn2BVpuCinU1ChTuMtdKI/7aPpXIrkqBNOgPTOQO9AylJJc1Zw6EvtKORhn64w== esbuild-linux-arm64@0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.13.3.tgz#329348bb4a19cfb5e9046cc5d97ba5017d8f74ad" integrity sha512-Cauhr45KSo+wRUojs+1qfycQqQCAXTOvsWvkZ6xmEMAXLAm+f8RQGDQeP8CAf8Yeelnegcn6UNdvzdzLHhWDFg== -esbuild-linux-arm64@0.13.7: - version "0.13.7" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.13.7.tgz#53a53f43669ef705c925bf275491d507cb77b06b" - integrity sha512-aM2BUTdbtzEUOuLqDusGCuWQRqc0JazgbA/6+Q9xhUgNLHGUMAsu4C5G0qPnJCTlWGZX+bcQYma6wFVEp9ibBg== +esbuild-linux-arm64@0.13.8: + version "0.13.8" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.13.8.tgz#5cd3f2bb924212971482e8dbc25c4afd09b28110" + integrity sha512-X4pWZ+SL+FJ09chWFgRNO3F+YtvAQRcWh0uxKqZSWKiWodAB20flsW/OWFYLXBKiVCTeoGMvENZS/GeVac7+tQ== esbuild-linux-arm@0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.13.3.tgz#b3b3167c9d5d3038894fbc75b194a4fbe93eaf09" integrity sha512-9BJNRtLwBh3OP22cln9g3AJdbAQUcjRHqA4BScx9k4RZpGqPokFr548zpeplxWhcwrIjT8qPebwH9CrRVy8Bsw== -esbuild-linux-arm@0.13.7: - version "0.13.7" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.13.7.tgz#3372ea117517aa3194ed1622305ab76bf2550b1d" - integrity sha512-GOAt1brGG14mmQx2sRD3wHi3rih94OzhmDRVyo7JvlSmWOfEczPf7zL7YfmgjuktvvuLTERtTJzaih7nyCwPOg== +esbuild-linux-arm@0.13.8: + version "0.13.8" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.13.8.tgz#ad634f96bf2975536907aeb9fdb75a3194f4ddce" + integrity sha512-4/HfcC40LJ4GPyboHA+db0jpFarTB628D1ifU+/5bunIgY+t6mHkJWyxWxAAE8wl/ZIuRYB9RJFdYpu1AXGPdg== esbuild-linux-mips64le@0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.13.3.tgz#ea1687f28ea2c85399ecc2fe23a48ab343b7b35d" integrity sha512-YVzJUGCncuuLm2boYyVeuMFsak4ZAhdiBwi0xNDZCC8sy+tS6Boe2mzcrD2uubv5JKAUOrpN186S1DtU4WgBgw== -esbuild-linux-mips64le@0.13.7: - version "0.13.7" - resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.13.7.tgz#c431291deecb949a4cdbbab0bc01b6b4a962104a" - integrity sha512-+UJq6cxpc2ldaQFdpEDrBhqhluXsqCNlWiHccIjq25r+3YbFg0c/RJEypoVU7tjhGXUGWyWWQ7SLkzHYpf+Nsg== +esbuild-linux-mips64le@0.13.8: + version "0.13.8" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.13.8.tgz#57857edfebf9bf65766dc8be1637f2179c990572" + integrity sha512-o7e0D+sqHKT31v+mwFircJFjwSKVd2nbkHEn4l9xQ1hLR+Bv8rnt3HqlblY3+sBdlrOTGSwz0ReROlKUMJyldA== esbuild-linux-ppc64le@0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.13.3.tgz#a462cf42eae3d7fc29a9f277679f5adee70afa67" integrity sha512-GU6CqqKtJEoyxC2QWHiJtmuOz9wc/jMv8ZloK2WwiGY5yMvAmM3PI103Dj7xcjebNTHBqITTUw/aigY1wx5A3w== -esbuild-linux-ppc64le@0.13.7: - version "0.13.7" - resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.13.7.tgz#d47b2322ac1ad61669045d5f95181d4f0d9744d2" - integrity sha512-6zwpliO4ZZtodDYM1JJEmSMpkd07I8bnNOKoHe7TOs9VhylXJooHh5ObSbSvk3FxCBs+jL5bxb24p10/Cg4RGw== +esbuild-linux-ppc64le@0.13.8: + version "0.13.8" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.13.8.tgz#fdb82a059a5b86bb10fb42091b4ebcf488b9cd46" + integrity sha512-eZSQ0ERsWkukJp2px/UWJHVNuy0lMoz/HZcRWAbB6reoaBw7S9vMzYNUnflfL3XA6WDs+dZn3ekHE4Y2uWLGig== -esbuild-netbsd-64@0.13.7: - version "0.13.7" - resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.13.7.tgz#9c9fed5dfc2f3656de024496f10928368a29ea10" - integrity sha512-CfTHeTfJWlwjgfpApXYvECytLD6BzTWovLE0+28KT7bjU5fM4ieDYzRvjWjFAOB2X6DWpaoQnJAlhJirQBW0EQ== +esbuild-netbsd-64@0.13.8: + version "0.13.8" + resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.13.8.tgz#d7879e7123d3b2c04754ece8bd061aa6866deeff" + integrity sha512-gZX4kP7gVvOrvX0ZwgHmbuHczQUwqYppxqtoyC7VNd80t5nBHOFXVhWo2Ad/Lms0E8b+wwgI/WjZFTCpUHOg9Q== esbuild-openbsd-64@0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.13.3.tgz#0cb15bd86d20eb19cb548b530f1a533197532cf9" integrity sha512-HVpkgpn4BQt4BPDAjTOpeMub6mzNWw6Y3gaLQJrpbO24pws6ZwYkY24OI3/Uo3LDCbH6856MM81JxECt92OWjA== -esbuild-openbsd-64@0.13.7: - version "0.13.7" - resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.13.7.tgz#fc039ce363b0ad5617a82dc9d312fccebd950070" - integrity sha512-qfW+f0MQfl72zVwgbV00I1kAP2zty+N031cNnQINcBmzHOSbEbaBQbUM0kawq+wdfgS/Xmppgf7nD1H8GWAvow== +esbuild-openbsd-64@0.13.8: + version "0.13.8" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.13.8.tgz#88b280b6cb0a3f6adb60abf27fc506c506a35cf0" + integrity sha512-afzza308X4WmcebexbTzAgfEWt9MUkdTvwIa8xOu4CM2qGbl2LanqEl8/LUs8jh6Gqw6WsicEK52GPrS9wvkcw== esbuild-sunos-64@0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.13.3.tgz#53a941241f881010969cc8f1acb1ada49c4cd3c2" integrity sha512-XncBVOtnEfUbPV4CaiFBxh38ychnBfwCxuTm9iAqcHzIwkmeNRN5qMzDyfE1jyfJje+Bbt6AvIfz6SdYt8/UEQ== -esbuild-sunos-64@0.13.7: - version "0.13.7" - resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.13.7.tgz#ad85a2f2cd38b6e920f2ad07ebc134cdba92e26d" - integrity sha512-fVRM9mV0wAYLt92IqzudxACMLJZRQFx1oJsNeU4fPFmUxIkYE4C7G7z9vqI2eu9bpDo1fA+3+5djo/T/28Mckg== +esbuild-sunos-64@0.13.8: + version "0.13.8" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.13.8.tgz#229ae7c7703196a58acd0f0291ad9bebda815d63" + integrity sha512-mWPZibmBbuMKD+LDN23LGcOZ2EawMYBONMXXHmbuxeT0XxCNwadbCVwUQ/2p5Dp5Kvf6mhrlIffcnWOiCBpiVw== esbuild-windows-32@0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.13.3.tgz#265dc0d0cdb5374685a851c584857055e12865a4" integrity sha512-ZlgDz7d1nk8wQACi+z8IDzNZVUlN9iprAme+1YSTsfFDlkyI8jeaGWPk9EQFNY7rJzsLVYm6eZ2mhPioc7uT5A== -esbuild-windows-32@0.13.7: - version "0.13.7" - resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.13.7.tgz#146b416c5172a2c252ce29f899c0c8f1a20eac50" - integrity sha512-v3csjeQtlHHWS1q/tE9rTRCSSU/fGvJVh1l7gkS93ysAaIMeC0j9Q0h2PxFpQ6yxuwftuDYfQdnkVGcqjkKM8A== +esbuild-windows-32@0.13.8: + version "0.13.8" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.13.8.tgz#892d093e32a21c0c9135e5a0ffdc380aeb70e763" + integrity sha512-QsZ1HnWIcnIEApETZWw8HlOhDSWqdZX2SylU7IzGxOYyVcX7QI06ety/aDcn437mwyO7Ph4RrbhB+2ntM8kX8A== esbuild-windows-64@0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.13.3.tgz#ae710c0629ec8c39c5ef1f69e86ed5592bb4128f" integrity sha512-YX7KvRez3TR+GudlQm9tND/ssj2FsF9vb8ZWzAoZOLxpPzE3y+3SFJNrfDzzQKPzJ0Pnh9KBP4gsaMwJjKHDhw== -esbuild-windows-64@0.13.7: - version "0.13.7" - resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.13.7.tgz#9eaffae2204263a7b35313ea51a6a6e5a5e0bb48" - integrity sha512-vk+yv/vYpHZP0vxSaxaA4EMaicuxy4E435EXkbsgk5UgpcQgSP0CVlIeaqtgfSM3IwGnpbagOirRVqqZqxyMDQ== +esbuild-windows-64@0.13.8: + version "0.13.8" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.13.8.tgz#7defd8d79ae3bb7e6f53b65a7190be7daf901686" + integrity sha512-76Fb57B9eE/JmJi1QmUW0tRLQZfGo0it+JeYoCDTSlbTn7LV44ecOHIMJSSgZADUtRMWT9z0Kz186bnaB3amSg== esbuild-windows-arm64@0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.13.3.tgz#a236199a26b1205573dcb571f966189326a4c953" integrity sha512-nP7H0Y2a6OJd3Qi1Q8sehhyP4x4JoXK4S5y6FzH2vgaJgiyEurzFxjUufGdMaw+RxtxiwD/uRndUgwaZ2JD8lg== -esbuild-windows-arm64@0.13.7: - version "0.13.7" - resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.13.7.tgz#6937647f05528248b1634027d839ae81ffdde8c2" - integrity sha512-0Fp+IeG5qWLCK+U6d8L9/SnXkI6f3JMtauSQ8HHzw3Fl0pZ+VImUAUWZ3g2fhthNqp+t8dB3n238CJD6XBn15w== +esbuild-windows-arm64@0.13.8: + version "0.13.8" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.13.8.tgz#e59ae004496fd8a5ab67bfc7945a2e47480d6fb9" + integrity sha512-HW6Mtq5eTudllxY2YgT62MrVcn7oq2o8TAoAvDUhyiEmRmDY8tPwAhb1vxw5/cdkbukM3KdMYtksnUhF/ekWeg== -esbuild@0.13.7: - version "0.13.7" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.13.7.tgz#ee6e04da3c0ca34f35a05dea649caa48686c92fb" - integrity sha512-Ok3w+Pc9SNdNVEEJUUx9OvNZHwFyoKS0N+ceytfUB3wh/HxhRkOEc9dO8KR9AjfpFI82/Wg258GRDs1/8SFgKQ== +esbuild@0.13.8: + version "0.13.8" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.13.8.tgz#bd7cc51b881ab067789f88e17baca74724c1ec4f" + integrity sha512-A4af7G7YZLfG5OnARJRMtlpEsCkq/zHZQXewgPA864l9D6VjjbH1SuFYK/OSV6BtHwDGkdwyRrX0qQFLnMfUcw== optionalDependencies: - esbuild-android-arm64 "0.13.7" - esbuild-darwin-64 "0.13.7" - esbuild-darwin-arm64 "0.13.7" - esbuild-freebsd-64 "0.13.7" - esbuild-freebsd-arm64 "0.13.7" - esbuild-linux-32 "0.13.7" - esbuild-linux-64 "0.13.7" - esbuild-linux-arm "0.13.7" - esbuild-linux-arm64 "0.13.7" - esbuild-linux-mips64le "0.13.7" - esbuild-linux-ppc64le "0.13.7" - esbuild-netbsd-64 "0.13.7" - esbuild-openbsd-64 "0.13.7" - esbuild-sunos-64 "0.13.7" - esbuild-windows-32 "0.13.7" - esbuild-windows-64 "0.13.7" - esbuild-windows-arm64 "0.13.7" + esbuild-android-arm64 "0.13.8" + esbuild-darwin-64 "0.13.8" + esbuild-darwin-arm64 "0.13.8" + esbuild-freebsd-64 "0.13.8" + esbuild-freebsd-arm64 "0.13.8" + esbuild-linux-32 "0.13.8" + esbuild-linux-64 "0.13.8" + esbuild-linux-arm "0.13.8" + esbuild-linux-arm64 "0.13.8" + esbuild-linux-mips64le "0.13.8" + esbuild-linux-ppc64le "0.13.8" + esbuild-netbsd-64 "0.13.8" + esbuild-openbsd-64 "0.13.8" + esbuild-sunos-64 "0.13.8" + esbuild-windows-32 "0.13.8" + esbuild-windows-64 "0.13.8" + esbuild-windows-arm64 "0.13.8" esbuild@^0.13.2: version "0.13.3" From 7e29dde7170b51b90d280ef3e02fae73e267c607 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 17 Oct 2021 12:59:25 +0200 Subject: [PATCH 04/12] fix: new tasks were always created in the default list --- src/components/tasks/mixins/createTask.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/tasks/mixins/createTask.js b/src/components/tasks/mixins/createTask.js index 1ac552ba..3395fbd9 100644 --- a/src/components/tasks/mixins/createTask.js +++ b/src/components/tasks/mixins/createTask.js @@ -40,10 +40,10 @@ export default { const list = this.$store.getters['lists/findListByExactname'](parsedTask.list) listId = list === null ? null : list.id } - if (listId == null && lId !== 0) { + if (listId === null && lId !== 0) { listId = lId } - if (listId == null && typeof this.$route.params.listId !== 'undefined') { + if (typeof this.$route.params.listId !== 'undefined') { listId = parseInt(this.$route.params.listId) } From 529b3d2890c9f64862c13526bf5d255ff4576ae0 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 17 Oct 2021 13:20:51 +0200 Subject: [PATCH 05/12] fix: label search in tasks not working --- src/helpers/labels.test.ts | 40 +++++++++++++++++++++++++++++++++++++ src/helpers/labels.ts | 29 +++++++++++++++++++++++++++ src/store/modules/labels.js | 24 ++++------------------ 3 files changed, 73 insertions(+), 20 deletions(-) create mode 100644 src/helpers/labels.test.ts create mode 100644 src/helpers/labels.ts diff --git a/src/helpers/labels.test.ts b/src/helpers/labels.test.ts new file mode 100644 index 00000000..88273c82 --- /dev/null +++ b/src/helpers/labels.test.ts @@ -0,0 +1,40 @@ +import {filterLabelsByQuery} from './labels' + +describe('filter labels', () => { + const state = { + labels: [ + {id: 1, title: 'label1'}, + {id: 2, title: 'label2'}, + {id: 3, title: 'label3'}, + {id: 4, title: 'label4'}, + {id: 5, title: 'label5'}, + {id: 6, title: 'label6'}, + {id: 7, title: 'label7'}, + {id: 8, title: 'label8'}, + {id: 9, title: 'label9'}, + ], + } + + it('should return an empty array for an empty query', () => { + const labels = filterLabelsByQuery(state, [], '') + + expect(labels).toHaveLength(0) + }) + it('should return labels for a query', () => { + const labels = filterLabelsByQuery(state, [], 'label2') + + expect(labels).toHaveLength(1) + expect(labels[0].title).toBe('label2') + }) + it('should not return found but hidden labels', () => { + interface label { + id: number, + title: string, + } + + const labelsToHide: label[] = [{id: 1, title: 'label1'}] + const labels = filterLabelsByQuery(state, labelsToHide, 'label1') + + expect(labels).toHaveLength(0) + }) +}) diff --git a/src/helpers/labels.ts b/src/helpers/labels.ts new file mode 100644 index 00000000..c38a6261 --- /dev/null +++ b/src/helpers/labels.ts @@ -0,0 +1,29 @@ +interface label { + id: number, + title: string, +} + +interface labelState { + labels: label[], +} + +/** + * Checks if a list of labels is available in the store and filters them then query + * @param {Object} state + * @param {Array} labelsToHide + * @param {String} query + * @returns {Array} + */ +export function filterLabelsByQuery(state: labelState, labelsToHide: label[], query: string) { + if (query === '') { + return [] + } + + const labelQuery = query.toLowerCase() + const labelIds = labelsToHide.map(({id}) => id) + return Object + .values(state.labels) + .filter(({id, title}) => { + return !labelIds.includes(id) && title.toLowerCase().includes(labelQuery) + }) +} diff --git a/src/store/modules/labels.js b/src/store/modules/labels.js index 40e4bc22..29fc25de 100644 --- a/src/store/modules/labels.js +++ b/src/store/modules/labels.js @@ -1,34 +1,18 @@ import LabelService from '@/services/label' import Vue from 'vue' import {setLoading} from '@/store/helper' +import {filterLabelsByQuery} from '@/helpers/labels' /** * Returns the labels by id if found - * @param {Object} state - * @param {Array} ids + * @param {Object} state + * @param {Array} ids * @returns {Array} */ function getLabelsByIds(state, ids) { return Object.values(state.labels).filter(({id}) => ids.includes(id)) } -/** - * Checks if a list of labels is available in the store and filters them then query - * @param {Object} state - * @param {Array} labels - * @param {String} query - * @returns {Array} - */ - function filterLabelsByQuery(state, labels, query) { - const labelIds = labels.map(({id}) => id) - const foundLabels = getLabelsByIds(state, labelIds) - const labelQuery = query.toLowerCase() - - return foundLabels.filter(({title}) => { - return !title.toLowerCase().includes(labelQuery) - }) -} - export default { namespaced: true, state: () => ({ @@ -57,7 +41,7 @@ export default { return (ids) => getLabelsByIds(state, ids) }, filterLabelsByQuery(state) { - return (...arr) => filterLabelsByQuery(state, ...arr) + return (labelsToHide, query) => filterLabelsByQuery(state, labelsToHide, query) }, }, actions: { From e52c139c9fde196ac1e6ea521bbddc509611229b Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 17 Oct 2021 13:36:21 +0200 Subject: [PATCH 06/12] fix: task edit pane spacing --- src/styles/components/tasks.scss | 40 ++++++++++++++++++++------------ src/views/list/views/List.vue | 3 +-- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/src/styles/components/tasks.scss b/src/styles/components/tasks.scss index 56829ec6..99e8e3c1 100644 --- a/src/styles/components/tasks.scss +++ b/src/styles/components/tasks.scss @@ -15,8 +15,31 @@ } } + &.has-task-edit-open { + flex-direction: column; + + @media screen and (min-width: $tablet) { + flex-direction: row; + + .tasks { + width: 66%; + } + } + } + .taskedit { - width: 50%; + width: 33%; + margin-right: 1rem; + margin-left: .5rem; + + @media screen and (max-width: $tablet) { + width: 100%; + border-radius: 0; + margin: 0; + border-left: 0; + border-right: 0; + border-bottom: 0; + } } } @@ -25,16 +48,6 @@ padding: 0; text-align: left; - @media screen and (min-width: $tablet) { - &.short { - max-width: 53vw; - } - } - - @media screen and (max-width: $tablet) { - max-width: 100%; - } - &.noborder { margin: 1rem -0.5rem; } @@ -195,7 +208,7 @@ border-bottom-color: $grey-300; } } - + .checklist-summary { padding-left: .5rem; font-size: .9rem; @@ -235,9 +248,6 @@ } .taskedit { - min-height: calc(100% - 1rem); - margin-top: 1rem; - .priority-select { .select, select { width: 100%; diff --git a/src/views/list/views/List.vue b/src/views/list/views/List.vue index c05d953e..4c95d908 100644 --- a/src/views/list/views/List.vue +++ b/src/views/list/views/List.vue @@ -74,9 +74,8 @@ -
+
From f884020c55a9761f2d3cb38d44e87db913fa475e Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 17 Oct 2021 13:46:56 +0200 Subject: [PATCH 07/12] fix: creating a new task while specifying the list in quick add magic --- src/store/modules/tasks.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/store/modules/tasks.js b/src/store/modules/tasks.js index cb5c6633..618b36b5 100644 --- a/src/store/modules/tasks.js +++ b/src/store/modules/tasks.js @@ -264,7 +264,7 @@ export default { // label not found, create it const labelModel = new LabelModel({title: labelTitle}) - return dispatch('labels/createLabel', labelModel).then(() => resolve(label)) + return dispatch('labels/createLabel', labelModel, {root: true}).then(() => resolve(label)) }) .then((label) => addLabelToTask(task, label)) .catch(e => Promise.reject(e)), @@ -274,18 +274,18 @@ export default { return Promise.all(labelAddsToWaitFor).then(() => task) }, - findListId({ rootGetters }, { list, listId }) { + findListId({ rootGetters }, { list: listName, listId }) { let foundListId = null // Uses the following ways to get the list id of the new task: // 1. If specified in quick add magic, look in store if it exists and use it if it does - if (list !== null) { - const list = rootGetters['lists/findListByExactname'](list) + if (listName !== null) { + const list = rootGetters['lists/findListByExactname'](listName) foundListId = list === null ? null : list.id } // 2. Else check if a list was passed as parameter - if (listId !== 0) { + if (foundListId === null && listId !== 0) { foundListId = listId } @@ -334,7 +334,7 @@ export default { return taskService.create(task) .then(task => dispatch('addLabelsToTask', { task, - parsedLabels:parsedTask.labels, + parsedLabels: parsedTask.labels, })) .catch(e => Promise.reject(e)) }, From 74d785d60659f1525f62fad0a122e13886b3501d Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 17 Oct 2021 13:55:25 +0200 Subject: [PATCH 08/12] fix: "TypeError: i18n.setLocaleMessage is not a function" when changing languages --- src/i18n/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/index.js b/src/i18n/index.js index 6b21f2a9..c922846c 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -40,7 +40,7 @@ export const loadLanguageAsync = lang => { // If the language hasn't been loaded yet return import(`./lang/${lang}.json`).then( messages => { - i18n.setLocaleMessage(lang, messages.default) + i18n.global.setLocaleMessage(lang, messages.default) loadedLanguages.push(lang) return setI18nLanguage(lang) }, From 2fc96cb6a7c4231e5513bd4b6832239d3468378f Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 17 Oct 2021 14:01:15 +0200 Subject: [PATCH 09/12] fix: change the ui locale --- src/i18n/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/i18n/index.js b/src/i18n/index.js index c922846c..a6c6ba30 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -21,14 +21,15 @@ export const availableLanguages = { const loadedLanguages = ['en'] // our default language that is preloaded const setI18nLanguage = lang => { - i18n.locale = lang + i18n.global.locale = lang document.querySelector('html').setAttribute('lang', lang) return lang } export const loadLanguageAsync = lang => { + console.log(lang, i18n.global.locale) // If the same language - if (i18n.locale === lang) { + if (i18n.global.locale === lang) { return Promise.resolve(setI18nLanguage(lang)) } From c329c37c7b10549caff1b2b56b73e385427cd696 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 17 Oct 2021 14:01:48 +0200 Subject: [PATCH 10/12] chore: cleanup --- src/i18n/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/i18n/index.js b/src/i18n/index.js index a6c6ba30..60ccde6a 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -27,7 +27,6 @@ const setI18nLanguage = lang => { } export const loadLanguageAsync = lang => { - console.log(lang, i18n.global.locale) // If the same language if (i18n.global.locale === lang) { return Promise.resolve(setI18nLanguage(lang)) From cc32ca244c89f7baf1679343f08216f4224fd3ae Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 17 Oct 2021 14:52:48 +0200 Subject: [PATCH 11/12] feat: don't update the bucket after updating task position --- src/views/list/views/Kanban.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/list/views/Kanban.vue b/src/views/list/views/Kanban.vue index e91c1a2d..7cd74f74 100644 --- a/src/views/list/views/Kanban.vue +++ b/src/views/list/views/Kanban.vue @@ -405,7 +405,7 @@ export default { tasks, } - this.$store.dispatch('kanban/updateBucket', newBucket) + this.$store.commit('kanban/setBucketById', newBucket) }, updateTaskPosition(e) { @@ -428,10 +428,10 @@ export default { } this.$store.dispatch('tasks/update', newTask) - // .finally(() => { + .finally(() => { this.taskUpdating[task.id] = false this.oneTaskUpdating = false - // }) + }) }, toggleShowNewTaskInput(bucketId) { this.showNewTaskInput[bucketId] = !this.showNewTaskInput[bucketId] From 1c8e26bdc615a3477c139f3d8128d71c71027c43 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 17 Oct 2021 15:16:26 +0200 Subject: [PATCH 12/12] fix: set the current list when opening a task --- src/store/index.js | 12 ++++++------ src/views/tasks/TaskDetailView.vue | 5 ++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 9d44d2da..dec5ece0 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -63,6 +63,12 @@ export const store = createStore({ state.online = !!import.meta.env.VITE_IS_ONLINE || online }, [CURRENT_LIST](state, currentList) { + // Server updates don't return the right. Therefore the right is reset after updating the list which is + // confusing because all the buttons will disappear in that case. To prevent this, we're keeping the right + // when updating the list in global state. + if (typeof state.currentList.maxRight !== 'undefined' && (typeof currentList.maxRight === 'undefined' || currentList.maxRight === null)) { + currentList.maxRight = state.currentList.maxRight + } state.currentList = currentList }, [HAS_TASKS](state, hasTasks) { @@ -135,12 +141,6 @@ export const store = createStore({ commit(BACKGROUND, null) } - // Server updates don't return the right. Therefore the right is reset after updating the list which is - // confusing because all the buttons will disappear in that case. To prevent this, we're keeping the right - // when updating the list in global state. - if (typeof state.currentList.maxRight !== 'undefined' && (typeof currentList.maxRight === 'undefined' || currentList.maxRight === null)) { - currentList.maxRight = state.currentList.maxRight - } commit(CURRENT_LIST, currentList) }, }, diff --git a/src/views/tasks/TaskDetailView.vue b/src/views/tasks/TaskDetailView.vue index 4ada14bf..20c9d145 100644 --- a/src/views/tasks/TaskDetailView.vue +++ b/src/views/tasks/TaskDetailView.vue @@ -510,7 +510,10 @@ export default { }, parent: { handler(parent) { - this.$store.commit(CURRENT_LIST, parent !== null ? parent.list : this.currentList) + const parentList = parent !== null ? parent.list : null + if (parentList !== null) { + this.$store.commit(CURRENT_LIST, parentList) + } }, immediate: true, },