summaryrefslogtreecommitdiffstats
path: root/web_src/js
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2021-08-17 07:32:48 +0200
committerGitHub <noreply@github.com>2021-08-17 01:32:48 -0400
commitea07726dc193c41c60e26c25ad705059bd4f6555 (patch)
tree5d3191bd5a1968893e599eadca279a3f527617b9 /web_src/js
parentcf4328359bb765ebccc592d8fe50cd8190455220 (diff)
downloadgitea-ea07726dc193c41c60e26c25ad705059bd4f6555.tar.gz
gitea-ea07726dc193c41c60e26c25ad705059bd4f6555.zip
Update JS dependencies (#16708)
* Update JS dependencies - Update all JS dependencies - Adapt to recent webpack changes - Add new lint rules and fix issues - Regenerate SVGs and update svgo api usage Fixes: https://github.com/go-gitea/gitea/pull/16492 * adapt jest config and sort keys Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'web_src/js')
-rw-r--r--web_src/js/features/eventsource.sharedworker.js4
-rw-r--r--web_src/js/features/notification.js4
-rw-r--r--web_src/js/features/stopwatch.js4
-rw-r--r--web_src/js/index.js2
4 files changed, 7 insertions, 7 deletions
diff --git a/web_src/js/features/eventsource.sharedworker.js b/web_src/js/features/eventsource.sharedworker.js
index 6f7b2a2e4d..824ccfea79 100644
--- a/web_src/js/features/eventsource.sharedworker.js
+++ b/web_src/js/features/eventsource.sharedworker.js
@@ -67,7 +67,7 @@ class Source {
}
}
-self.onconnect = (e) => {
+self.addEventListener('connect', (e) => {
for (const port of e.ports) {
port.addEventListener('message', (event) => {
if (event.data.type === 'start') {
@@ -131,4 +131,4 @@ self.onconnect = (e) => {
});
port.start();
}
-};
+});
diff --git a/web_src/js/features/notification.js b/web_src/js/features/notification.js
index d964ffa305..d1d829c90b 100644
--- a/web_src/js/features/notification.js
+++ b/web_src/js/features/notification.js
@@ -53,9 +53,9 @@ export async function initNotificationCount() {
worker.addEventListener('error', (event) => {
console.error(event);
});
- worker.port.onmessageerror = () => {
+ worker.port.addEventListener('messageerror', () => {
console.error('Unable to deserialize message');
- };
+ });
worker.port.postMessage({
type: 'start',
url: `${window.location.origin}${AppSubUrl}/user/events`,
diff --git a/web_src/js/features/stopwatch.js b/web_src/js/features/stopwatch.js
index d664f0d5f2..eb59e587a7 100644
--- a/web_src/js/features/stopwatch.js
+++ b/web_src/js/features/stopwatch.js
@@ -31,9 +31,9 @@ export async function initStopwatch() {
worker.addEventListener('error', (event) => {
console.error(event);
});
- worker.port.onmessageerror = () => {
+ worker.port.addEventListener('messageerror', () => {
console.error('Unable to deserialize message');
- };
+ });
worker.port.postMessage({
type: 'start',
url: `${window.location.origin}${AppSubUrl}/user/events`,
diff --git a/web_src/js/index.js b/web_src/js/index.js
index b121807173..d349092717 100644
--- a/web_src/js/index.js
+++ b/web_src/js/index.js
@@ -2756,7 +2756,7 @@ $(document).ready(async () => {
let {action, elementId, url} = this.dataset;
const issueIDs = $('.issue-checkbox').children('input:checked').map((_, el) => {
return el.dataset.issueId;
- }).get().join();
+ }).get().join(',');
if (elementId === '0' && url.substr(-9) === '/assignee') {
elementId = '';
action = 'clear';