diff options
| author | tamaina <tamaina@hotmail.co.jp> | 2023-04-10 12:10:06 +0000 |
|---|---|---|
| committer | tamaina <tamaina@hotmail.co.jp> | 2023-04-10 12:10:06 +0000 |
| commit | da64273b4321769aa2d0e1c13ab3ebaa1d491d19 (patch) | |
| tree | 736d139d3c1aa27c351e16c469c09bb4ecafda9e /packages/sw/src/scripts | |
| parent | swのesbuildの更新とビルドスクリプトの更新 (#10549) (diff) | |
| download | sharkey-da64273b4321769aa2d0e1c13ab3ebaa1d491d19.tar.gz sharkey-da64273b4321769aa2d0e1c13ab3ebaa1d491d19.tar.bz2 sharkey-da64273b4321769aa2d0e1c13ab3ebaa1d491d19.zip | |
chore(sw): use PascalCase
Diffstat (limited to 'packages/sw/src/scripts')
| -rw-r--r-- | packages/sw/src/scripts/create-notification.ts | 8 | ||||
| -rw-r--r-- | packages/sw/src/scripts/operations.ts | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/packages/sw/src/scripts/create-notification.ts b/packages/sw/src/scripts/create-notification.ts index 6286d076c7..8e214c9850 100644 --- a/packages/sw/src/scripts/create-notification.ts +++ b/packages/sw/src/scripts/create-notification.ts @@ -3,7 +3,7 @@ */ import { swLang } from '@/scripts/lang'; import { cli } from '@/scripts/operations'; -import { badgeNames, pushNotificationDataMap } from '@/types'; +import { BadgeNames, PushNotificationDataMap } from '@/types'; import getUserName from '@/scripts/get-user-name'; import { I18n } from '@/scripts/i18n'; import { getAccountFromId } from '@/scripts/get-account-from-id'; @@ -16,7 +16,7 @@ const closeNotificationsByTags = async (tags: string[]) => { } }; -const iconUrl = (name: badgeNames) => `/static-assets/tabler-badges/${name}.png`; +const iconUrl = (name: BadgeNames) => `/static-assets/tabler-badges/${name}.png`; /* How to add a new badge: * 1. Find the icon and download png from https://tabler-icons.io/ * 2. vips resize ~/Downloads/icon-name.png vipswork.png 0.4; vips scRGB2BW vipswork.png ~/icon-name.png"[compression=9,strip]"; rm vipswork.png; @@ -25,7 +25,7 @@ const iconUrl = (name: badgeNames) => `/static-assets/tabler-badges/${name}.png` * 5. Add `badge: iconUrl('icon-name'),` */ -export async function createNotification<K extends keyof pushNotificationDataMap>(data: pushNotificationDataMap[K]) { +export async function createNotification<K extends keyof PushNotificationDataMap>(data: PushNotificationDataMap[K]) { const n = await composeNotification(data); if (n) { @@ -36,7 +36,7 @@ export async function createNotification<K extends keyof pushNotificationDataMap } } -async function composeNotification(data: pushNotificationDataMap[keyof pushNotificationDataMap]): Promise<[string, NotificationOptions] | null> { +async function composeNotification(data: PushNotificationDataMap[keyof PushNotificationDataMap]): Promise<[string, NotificationOptions] | null> { if (!swLang.i18n) swLang.fetchLocale(); const i18n = await swLang.i18n as I18n<any>; const { t } = i18n; diff --git a/packages/sw/src/scripts/operations.ts b/packages/sw/src/scripts/operations.ts index 02217ed74e..0978cf9a31 100644 --- a/packages/sw/src/scripts/operations.ts +++ b/packages/sw/src/scripts/operations.ts @@ -3,7 +3,7 @@ * 各種操作 */ import * as Misskey from 'misskey-js'; -import { SwMessage, swMessageOrderType } from '@/types'; +import { SwMessage, SwMessageOrderType } from '@/types'; import { acct as getAcct } from '@/filters/user'; import { getAccountFromId } from '@/scripts/get-account-from-id'; import { getUrlWithLoginId } from '@/scripts/login-id'; @@ -43,7 +43,7 @@ export async function openPost(options: any, loginId: string) { return openClient('post', url, loginId, { options }); } -export async function openClient(order: swMessageOrderType, url: string, loginId: string, query: any = {}) { +export async function openClient(order: SwMessageOrderType, url: string, loginId: string, query: any = {}) { const client = await findClient(); if (client) { |