From 54ad905059c95ea68e1ea3f09ca8dcd410f6681c Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Sat, 23 May 2020 22:03:30 +0900 Subject: [PATCH 1/2] refs #1451 Update megalodon version to 3.2.2 --- package-lock.json | 22 ++++++++++++++-------- package.json | 2 +- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index d631de01..dcf975a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20017,9 +20017,9 @@ "dev": true }, "megalodon": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/megalodon/-/megalodon-3.2.1.tgz", - "integrity": "sha512-hAzzg99pkrAkT1Ky56rWXbBFVACKcgziQZ4HcxqrQeyH7FPKz/p35pByVP/1jxSRIkpQKLHqrFAEdGWRxmCB/w==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/megalodon/-/megalodon-3.2.2.tgz", + "integrity": "sha512-cdwswLbE4Vkss4W4vT8hZ/4RnDocP8oqVRBpQsPLsWLywAAmMhSBeFuYlrJLU3Sg2oPdyhCjGJz50UPVhfewtw==", "requires": { "@types/oauth": "^0.9.0", "@types/ws": "^7.2.0", @@ -20028,15 +20028,20 @@ "moment": "^2.24.0", "oauth": "^0.9.15", "socks-proxy-agent": "^5.0.0", - "typescript": "3.8.3", + "typescript": "3.9.3", "uuid": "^8.0.0", "ws": "^7.2.1" }, "dependencies": { + "typescript": { + "version": "3.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.3.tgz", + "integrity": "sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ==" + }, "uuid": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.0.0.tgz", - "integrity": "sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw==" + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.1.0.tgz", + "integrity": "sha512-CI18flHDznR0lq54xBycOVmphdCYnQLKn8abKn7PXUiKUGdEd+/l9LWNJmugXel4hXq7S+RMNl34ecyC9TntWg==" } } }, @@ -27656,7 +27661,8 @@ "typescript": { "version": "3.8.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz", - "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==" + "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==", + "dev": true }, "uglify-js": { "version": "3.4.9", diff --git a/package.json b/package.json index 520f7db5..be07db5d 100644 --- a/package.json +++ b/package.json @@ -184,7 +184,7 @@ "hoek": "^6.1.3", "i18next": "^19.4.1", "lodash": "^4.17.15", - "megalodon": "3.2.1", + "megalodon": "3.2.2", "moment": "^2.24.0", "mousetrap": "^1.6.5", "nedb": "^1.8.0", From ab13cd18920ea01fe0f474a6ad7d0bca05df43be Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Sat, 23 May 2020 22:41:17 +0900 Subject: [PATCH 2/2] refs #1451 Show quoted status notification in notification --- src/config/locales/en/translation.json | 4 + src/main/index.ts | 18 +- .../components/organisms/Notification.vue | 17 +- .../organisms/Notification/Quote.vue | 479 ++++++++++++++++++ 4 files changed, 511 insertions(+), 7 deletions(-) create mode 100644 src/renderer/components/organisms/Notification/Quote.vue diff --git a/src/config/locales/en/translation.json b/src/config/locales/en/translation.json index ef453ae5..e762b070 100644 --- a/src/config/locales/en/translation.json +++ b/src/config/locales/en/translation.json @@ -455,6 +455,10 @@ "title": "Reblog", "body": "{{username}} boosted your status" }, + "quote": { + "title": "Quote", + "body": "{{username}} quoted your status" + }, "reaction": { "title": "Reaction", "body": "{{username}} reacted your status" diff --git a/src/main/index.ts b/src/main/index.ts index 370f7c70..f5bb5c3c 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -1435,11 +1435,19 @@ const createNotification = (notification: Entity.Notification, notifyConfig: Not break case 'reblog': if (notifyConfig.reblog) { - return { - title: i18next.t('notification.reblog.title'), - body: i18next.t('notification.reblog.body', { username: username(notification.account) }), - silent: false - } as NotificationConstructorOptions + if (notification.status && notification.status.quote) { + return { + title: i18next.t('notification.quote.title'), + body: i18next.t('notification.quote.body', { username: username(notification.account) }), + silent: false + } as NotificationConstructorOptions + } else { + return { + title: i18next.t('notification.reblog.title'), + body: i18next.t('notification.reblog.body', { username: username(notification.account) }), + silent: false + } as NotificationConstructorOptions + } } break case 'emoji_reaction': diff --git a/src/renderer/components/organisms/Notification.vue b/src/renderer/components/organisms/Notification.vue index 191e4aee..24d76350 100644 --- a/src/renderer/components/organisms/Notification.vue +++ b/src/renderer/components/organisms/Notification.vue @@ -37,8 +37,20 @@ @select="$emit('selectNotification')" > + + +
+
+ Filtered +
+
+
+
+ +
+
+ {{ $t('notification.quote.body') }} +
+ +
+
+
+ +
+
+
+ + + +
+
+ {{ parseDatetime(message.status.created_at) }} +
+
+
+
+
+ + + {{ $t('cards.toot.show_more') }} + + + {{ $t('cards.toot.hide') }} + +
+
+
+
+ + {{ $t('cards.toot.sensitive') }} + +
+ + + +
+ + GIF + VIDEO +
+
+
+
+ + +
+
+
+
+
+
+ + + + +