replace linkifyjs with linkify-urls

This commit is contained in:
dartcafe 2020-10-26 22:51:56 +01:00
Родитель 327fccc552
Коммит ad4e3b6038
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: CCE73CEF3035D3C8
3 изменённых файлов: 63 добавлений и 24 удалений

79
package-lock.json сгенерированный
Просмотреть файл

@ -2340,27 +2340,6 @@
"@babel/helper-plugin-utils": "^7.10.4"
}
},
"@babel/polyfill": {
"version": "7.2.5",
"resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.2.5.tgz",
"integrity": "sha512-8Y/t3MWThtMLYr0YNC/Q76tqN1w30+b0uQMeFUYauG2UGTR19zyUtFrAzT23zNtBxPp+LbE5E/nwV/q/r3y6ug==",
"requires": {
"core-js": "^2.5.7",
"regenerator-runtime": "^0.12.0"
},
"dependencies": {
"core-js": {
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz",
"integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg=="
},
"regenerator-runtime": {
"version": "0.12.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz",
"integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg=="
}
}
},
"@babel/preset-env": {
"version": "7.12.1",
"resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.1.tgz",
@ -4792,6 +4771,29 @@
"capture-stack-trace": "^1.0.0"
}
},
"create-html-element": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/create-html-element/-/create-html-element-2.1.0.tgz",
"integrity": "sha512-ofbOpJh3GSDsyINuqppupKRUcQHnXSyvwvk0F5DlEtwKwb+thdFoJAtYczy7bIZWdsQjZfADUc38pF4gVd0o+Q==",
"requires": {
"escape-goat": "^1.3.0",
"html-tags": "^2.0.0",
"stringify-attributes": "^1.0.0",
"type-fest": "^0.3.0"
},
"dependencies": {
"html-tags": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz",
"integrity": "sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos="
},
"type-fest": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz",
"integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ=="
}
}
},
"cross-env": {
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.2.tgz",
@ -5296,6 +5298,15 @@
"vue-virtual-scroller": "^1.0.0-rc.2"
},
"dependencies": {
"@babel/polyfill": {
"version": "7.2.5",
"resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.2.5.tgz",
"integrity": "sha512-8Y/t3MWThtMLYr0YNC/Q76tqN1w30+b0uQMeFUYauG2UGTR19zyUtFrAzT23zNtBxPp+LbE5E/nwV/q/r3y6ug==",
"requires": {
"core-js": "^2.5.7",
"regenerator-runtime": "^0.12.0"
}
},
"@babel/runtime": {
"version": "7.3.4",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.3.4.tgz",
@ -5304,6 +5315,11 @@
"regenerator-runtime": "^0.12.0"
}
},
"core-js": {
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz",
"integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg=="
},
"regenerator-runtime": {
"version": "0.12.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz",
@ -5481,6 +5497,11 @@
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.0.2.tgz",
"integrity": "sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ=="
},
"escape-goat": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-1.3.0.tgz",
"integrity": "sha512-E2nU1Y39N5UgfLU8qwMlK0vZrZprIwWLeVmDYN8wd/e37hMtGzu2w1DBiREts0XHfgyZEQlj/hYr0H0izF0HDQ=="
},
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
@ -8508,6 +8529,14 @@
"integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=",
"dev": true
},
"linkify-urls": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/linkify-urls/-/linkify-urls-2.2.0.tgz",
"integrity": "sha512-Zl71ZJPq1BrPmwlyEyZVTgzt1FzbMJnmxR9Oi/BcZLe2XG2UUhScj9TCn62yEfEf0za1t+yLji4jz96gXbb36A==",
"requires": {
"create-html-element": "^2.0.0"
}
},
"linkifyjs": {
"version": "2.1.9",
"resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-2.1.9.tgz",
@ -11294,6 +11323,14 @@
"safe-buffer": "~5.1.0"
}
},
"stringify-attributes": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/stringify-attributes/-/stringify-attributes-1.0.0.tgz",
"integrity": "sha1-nosvmpRn57SAk8shJOvBwX5jgsU=",
"requires": {
"escape-goat": "^1.1.0"
}
},
"stringify-entities": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-3.0.1.tgz",

Просмотреть файл

@ -43,7 +43,7 @@
"@nextcloud/router": "^1.2.0",
"@nextcloud/vue": "^2.7.0",
"core-js": "^3.6.5",
"linkifyjs": "^2.1.9",
"linkify-urls": "^2.2.0",
"lodash": "^4.17.20",
"v-click-outside": "^3.1.2",
"vue": "^2.6.12",

Просмотреть файл

@ -94,7 +94,7 @@
</template>
<script>
import linkifyStr from 'linkifyjs/string'
import linkifyUrls from 'linkify-urls'
import { mapState, mapGetters } from 'vuex'
import { Actions, ActionButton, AppContent, EmptyContent } from '@nextcloud/vue'
import { getCurrentUser } from '@nextcloud/auth'
@ -185,7 +185,9 @@ export default {
},
linkifyDescription() {
return linkifyStr(this.poll.description)
return linkifyUrls(this.poll.description, {
attributes: { class: 'linkified' },
})
},
windowTitle() {