This commit is contained in:
tamaina
2021-01-21 21:17:22 +09:00
parent 3762cdc8c0
commit 08c2086167
9 changed files with 150 additions and 67 deletions

View File

@@ -1,8 +1,12 @@
import { getNoteSummary } from '../../misc/get-note-summary';
import getUserName from '../../misc/get-user-name';
import { i18n } from '@/sw/i18n';
export default async function(type, data): Promise<[string, NotificationOptions]> {
export default async function(type, data, i18n): Promise<[string, NotificationOptions] | null> {
if (!i18n) {
console.log('no i18n')
return null
};
switch (type) {
case 'driveFileCreated': // TODO (Server Side)
return [i18n.t('_notification.fileUploaded'), {