Compare commits

..

5 Commits

Author SHA1 Message Date
865414f432 chore(deps): update dev-dependencies
Some checks failed
continuous-integration/drone/pr Build is failing
2024-02-18 02:06:01 +00:00
ff1730e323
fix: lint
All checks were successful
continuous-integration/drone/push Build is passing
2024-02-17 23:25:09 +01:00
f120d72211
fix(editor): revert task list dependence on ids
Some checks failed
continuous-integration/drone/push Build is failing
This partially reverts 3969f6ae66. Adding ids to task list items is not as simple and actually made it worse in some cases. Hence we stick to comparing the content of nodes for now, until this is properly fixed in tiptap.

Related #2091 (comment)
2024-02-17 23:13:51 +01:00
a2951570a7 fix(deps): update module github.com/arran4/golang-ical to v0.2.6
Some checks failed
continuous-integration/drone/push Build is failing
2024-02-17 20:08:08 +00:00
f4efdaa5de
fix(password): don't validate password min length on login page
Some checks failed
continuous-integration/drone/push Build is failing
This would cause the login to fail when the actual password was shorter than 8 characters.
2024-02-17 21:07:35 +01:00
7 changed files with 20 additions and 27 deletions

View File

@ -151,7 +151,7 @@
"@vue/tsconfig": "0.5.1",
"autoprefixer": "10.4.17",
"browserslist": "4.23.0",
"caniuse-lite": "1.0.30001587",
"caniuse-lite": "1.0.30001588",
"css-has-pseudo": "6.0.1",
"csstype": "3.1.3",
"cypress": "13.6.4",

View File

@ -313,8 +313,8 @@ devDependencies:
specifier: 4.23.0
version: 4.23.0
caniuse-lite:
specifier: 1.0.30001587
version: 1.0.30001587
specifier: 1.0.30001588
version: 1.0.30001588
css-has-pseudo:
specifier: 6.0.1
version: 6.0.1(postcss@8.4.35)
@ -5738,7 +5738,7 @@ packages:
postcss: ^8.1.0
dependencies:
browserslist: 4.23.0
caniuse-lite: 1.0.30001587
caniuse-lite: 1.0.30001588
fraction.js: 4.3.7
normalize-range: 0.1.2
picocolors: 1.0.0
@ -5919,7 +5919,7 @@ packages:
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
dependencies:
caniuse-lite: 1.0.30001587
caniuse-lite: 1.0.30001588
electron-to-chromium: 1.4.673
node-releases: 2.0.14
update-browserslist-db: 1.0.13(browserslist@4.23.0)
@ -6005,8 +6005,8 @@ packages:
engines: {node: '>=6'}
dev: true
/caniuse-lite@1.0.30001587:
resolution: {integrity: sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA==}
/caniuse-lite@1.0.30001588:
resolution: {integrity: sha512-+hVY9jE44uKLkH0SrUTqxjxqNTOWHsbnQDIKjwkZ3lNTzUUVdBLBGXtj/q5Mp5u98r3droaZAewQuEDzjQdZlQ==}
dev: true
/capital-case@1.0.4:

View File

@ -193,7 +193,6 @@ import {mergeAttributes} from '@tiptap/core'
import {isEditorContentEmpty} from '@/helpers/editorContentEmpty'
import inputPrompt from '@/helpers/inputPrompt'
import {setLinkInEditor} from '@/components/input/editor/setLinkInEditor'
import {createRandomID} from '@/helpers/randomId'
const {
modelValue,
@ -389,20 +388,7 @@ const editor = useEditor({
CustomImage,
TaskList,
TaskItem.extend({
addAttributes() {
return {
...this.parent?.(),
id: {
default: () => createRandomID(),
parseHTML: element => element.getAttribute('data-id'),
renderHTML: attributes => ({
'data-id': attributes.id,
}),
},
}
},
}).configure({
TaskItem.configure({
nested: true,
onReadOnlyChecked: (node: Node, checked: boolean): boolean => {
if (!isEditEnabled) {
@ -414,7 +400,7 @@ const editor = useEditor({
// https://github.com/ueberdosis/tiptap/issues/3676
editor.value!.state.doc.descendants((subnode, pos) => {
if (node.attrs.id === subnode.attrs.id) {
if (node.eq(subnode)) {
const {tr} = editor.value!.state
tr.setNodeMarkup(pos, undefined, {
...node.attrs,
@ -422,10 +408,10 @@ const editor = useEditor({
})
editor.value!.view.dispatch(tr)
bubbleSave()
return true
}
})
return true
},
}),

View File

@ -42,6 +42,10 @@ const props = defineProps({
modelValue: String,
// This prop is a workaround to trigger validation from the outside when the user never had focus in the input.
validateInitially: Boolean,
validateMinLength: {
type: Boolean,
default: true,
},
})
const emit = defineEmits(['submit', 'update:modelValue'])
const {t} = useI18n()
@ -62,12 +66,12 @@ const validate = useDebounceFn(() => {
return
}
if (password.value.length < 8) {
if (props.validateMinLength && password.value.length < 8) {
isValid.value = t('user.auth.passwordNotMin')
return
}
if (password.value.length > 250) {
if (props.validateMinLength && password.value.length > 250) {
isValid.value = t('user.auth.passwordNotMax')
return
}

View File

@ -66,6 +66,7 @@
v-model="password"
tabindex="2"
:validate-initially="validatePasswordInitially"
:validate-min-length="false"
@submit="submit"
/>
</div>

2
go.mod
View File

@ -21,7 +21,7 @@ require (
dario.cat/mergo v1.0.0
github.com/ThreeDotsLabs/watermill v1.3.5
github.com/adlio/trello v1.10.0
github.com/arran4/golang-ical v0.2.5
github.com/arran4/golang-ical v0.2.6
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
github.com/bbrks/go-blurhash v1.1.1
github.com/c2h5oh/datasize v0.0.0-20231215233829-aa82cc1e6500

2
go.sum
View File

@ -35,6 +35,8 @@ github.com/arran4/golang-ical v0.2.4 h1:0/rTXn2qqEekLKec3SzRRy+z7pCLtniMb0KD/dPo
github.com/arran4/golang-ical v0.2.4/go.mod h1:RqMuPGmwRRwjkb07hmm+JBqcWa1vF1LvVmPtSZN2OhQ=
github.com/arran4/golang-ical v0.2.5 h1:zaAdee/cOnOCeSuxUSgkWnF9jZl/oYq2ZgDk+LU3wGs=
github.com/arran4/golang-ical v0.2.5/go.mod h1:RqMuPGmwRRwjkb07hmm+JBqcWa1vF1LvVmPtSZN2OhQ=
github.com/arran4/golang-ical v0.2.6 h1:WRpbLKSIMjujycCNKGAjOALyj6evvklVpWXH+Hp72G4=
github.com/arran4/golang-ical v0.2.6/go.mod h1:RqMuPGmwRRwjkb07hmm+JBqcWa1vF1LvVmPtSZN2OhQ=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
github.com/bbrks/go-blurhash v1.1.1 h1:uoXOxRPDca9zHYabUTwvS4KnY++KKUbwFo+Yxb8ME4M=