1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-24 15:16:25 +09:00

feat: (friendly) Remove logout button from account management popup

This commit is contained in:
NoriDev 2023-05-17 17:43:18 +09:00
parent 1ab09e6464
commit 342e2d2f08
3 changed files with 28 additions and 3 deletions

View File

@ -12,13 +12,12 @@
## 13.x.x-cp-3.x.x (unreleased)
### Improvements
- 클라이언트: (friendly) 모바일에서 스크롤 시 각종 요소들의 유동적인 높이 조절을 변경된 헤더 디자인에 대응
- 클라이언트: (friendly) 모바일에서 하단 바를 길게 눌러 나오는 계정 관리 팝업에서 로그아웃 버튼 제거
- 클라이언트: 채팅 및 그룹 기능 유지 (revert: [misskey-dev#9919](https://github.com/misskey-dev/misskey/pull/9919), [misskey-dev#9942](https://github.com/misskey-dev/misskey/pull/9942))
- 클라이언트: 클라이언트에서 사용되는 폰트의 확장자를 ttf에서 woff2 및 woff로 변경 ([@mk-castella](https://github.com/libnare/mk-castella/commit/f439b3e007618c02da7a352016b3d0f397311f54))
- 클라이언트: about-misskey 페이지에 CherryPick 관련 정보 추가 및 Misskey 문단 구분명 추가
- 클라이언트: 노트 수식 삽입 기능 복원
### Bugfixes
---
## 13.5.6-cp-3.1.0 (2023/02/10)

View File

@ -245,6 +245,7 @@ export async function login(token: Account['token'], redirect?: string) {
export async function openAccountMenu(opts: {
includeCurrentAccount?: boolean;
withExtraOperation: boolean;
withExtraOperationFriendly: boolean;
active?: misskey.entities.UserDetailed['id'];
onChoose?: (account: misskey.entities.UserDetailed) => void;
}, ev: MouseEvent) {
@ -350,6 +351,31 @@ export async function openAccountMenu(opts: {
}]], ev.currentTarget ?? ev.target, {
align: 'left',
});
} else if (opts.withExtraOperationFriendly) {
popupMenu([...[{
type: 'link' as const,
text: i18n.ts.profile,
to: `/@${ $i.username }`,
avatar: $i,
}, null, ...(opts.includeCurrentAccount ? [createItem($i)] : []), ...accountItemPromises, {
type: 'parent' as const,
icon: 'ti ti-plus',
text: i18n.ts.addAccount,
children: [{
text: i18n.ts.existingAccount,
action: () => { showSigninDialog(); },
}, {
text: i18n.ts.createAccount,
action: () => { createAccount(); },
}],
}, {
type: 'link' as const,
icon: 'ti ti-users',
text: i18n.ts.manageAccounts,
to: '/settings/accounts',
}]], ev.currentTarget ?? ev.target, {
align: 'left',
});
} else {
popupMenu([...(opts.includeCurrentAccount ? [createItem($i)] : []), ...accountItemPromises], ev.currentTarget ?? ev.target, {
align: 'left',

View File

@ -259,7 +259,7 @@ function openAccountMenu(ev: MouseEvent) {
setTimeout(() => {
if (longTouchNavHome === true) {
openAccountMenu_({
withExtraOperation: true,
withExtraOperationFriendly: true,
}, ev);
}
}, 500);