mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-11-23 22:56:53 +09:00
Merge remote-branch 'misskey/develop'
This commit is contained in:
commit
0344aad405
@ -21,6 +21,7 @@
|
||||
- 最大でも黄色いエリア内にデコレーションを収めることを推奨します。
|
||||
- 画像は512x512pxを推奨します。
|
||||
- Enhance: すでにフォローしたすべての人の返信をTLに追加できるように
|
||||
- Enhance: 未読の通知数を表示できるように
|
||||
- Enhance: ローカリゼーションの更新
|
||||
- Enhance: 依存関係の更新
|
||||
|
||||
@ -53,6 +54,7 @@
|
||||
- Enhance: フォローしているチャンネルをフォロー解除した時(またはその逆)、タイムラインに反映される間隔を改善
|
||||
- Enhance: プロフィールの自己紹介欄のMFMが連合するようになりました
|
||||
- 相手がMisskey v2023.11.0以降である必要があります
|
||||
- Enhance: チャンネル取得時のパフォーマンスを向上
|
||||
- Fix: リストTLに自分のフォロワー限定投稿が含まれない問題を修正
|
||||
- Fix: ローカルタイムラインに投稿者自身の投稿への返信が含まれない問題を修正
|
||||
- Fix: 自分のフォローしているユーザーの自分のフォローしていないユーザーの visibility: followers な投稿への返信がストリーミングで流れてくる問題を修正
|
||||
@ -63,6 +65,7 @@
|
||||
- Fix: リノートをリノートできるのを修正
|
||||
- Fix: アクセストークンを削除すると、通知が取得できなくなる場合がある問題を修正
|
||||
- Fix: 自身の宛先なしダイレクト投稿がストリーミングで流れてこない問題を修正
|
||||
- Fix: サーバーサイドからのテスト通知を正しく行えるように修正
|
||||
|
||||
## 2023.10.2
|
||||
|
||||
|
@ -1240,7 +1240,7 @@ releaseToRefresh: "Release to refresh"
|
||||
refreshing: "Loading..."
|
||||
pullDownToRefresh: "Pull down to refresh"
|
||||
disableStreamingTimeline: "タイムラインのリアルタイム更新を無効にする"
|
||||
showUnreadNotificationCount: "Show the number of unread notifications"
|
||||
showUnreadNotificationsCount: "Show the number of unread notifications"
|
||||
showCatOnly: "Show only cats"
|
||||
additionalPermissionsForFlash: "Allow to add permission to Play"
|
||||
thisFlashRequiresTheFollowingPermissions: "This Play requires the following permissions"
|
||||
|
2
locales/index.d.ts
vendored
2
locales/index.d.ts
vendored
@ -1245,7 +1245,7 @@ export interface Locale {
|
||||
"refreshing": string;
|
||||
"pullDownToRefresh": string;
|
||||
"disableStreamingTimeline": string;
|
||||
"showUnreadNotificationCount": string;
|
||||
"showUnreadNotificationsCount": string;
|
||||
"showCatOnly": string;
|
||||
"additionalPermissionsForFlash": string;
|
||||
"thisFlashRequiresTheFollowingPermissions": string;
|
||||
|
@ -1242,7 +1242,7 @@ releaseToRefresh: "離してリロード"
|
||||
refreshing: "リロード中"
|
||||
pullDownToRefresh: "引っ張ってリロード"
|
||||
disableStreamingTimeline: "タイムラインのリアルタイム更新を無効にする"
|
||||
showUnreadNotificationCount: "未読の通知の数を表示する"
|
||||
showUnreadNotificationsCount: "未読の通知の数を表示する"
|
||||
showCatOnly: "キャット付きのみ"
|
||||
additionalPermissionsForFlash: "Playへの追加許可"
|
||||
thisFlashRequiresTheFollowingPermissions: "このPlayは以下の権限を要求しています"
|
||||
|
@ -1217,7 +1217,7 @@ releaseToRefresh: "놓아서 새로 고침"
|
||||
refreshing: "새로 고침 중"
|
||||
pullDownToRefresh: "당겨서 새로 고침"
|
||||
disableStreamingTimeline: "타임라인 실시간 업데이트 비활성화"
|
||||
showUnreadNotificationCount: "읽지 않은 알림 수 표시"
|
||||
showUnreadNotificationsCount: "읽지 않은 알림 수 표시"
|
||||
showCatOnly: "고양이만 보기"
|
||||
additionalPermissionsForFlash: "Play에 대한 추가 권한"
|
||||
thisFlashRequiresTheFollowingPermissions: "이 Play는 다음 권한을 요구해요"
|
||||
|
@ -52,14 +52,14 @@
|
||||
"cssnano": "6.0.1",
|
||||
"js-yaml": "4.1.0",
|
||||
"postcss": "8.4.31",
|
||||
"terser": "5.22.0",
|
||||
"terser": "5.24.0",
|
||||
"typescript": "5.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "6.9.0",
|
||||
"@typescript-eslint/parser": "6.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "6.9.1",
|
||||
"@typescript-eslint/parser": "6.9.1",
|
||||
"cross-env": "7.0.3",
|
||||
"cypress": "13.3.3",
|
||||
"cypress": "13.4.0",
|
||||
"eslint": "8.52.0",
|
||||
"start-server-and-test": "2.0.1"
|
||||
},
|
||||
|
@ -67,11 +67,11 @@
|
||||
"@discordapp/twemoji": "14.1.2",
|
||||
"@fastify/accepts": "4.2.0",
|
||||
"@fastify/cookie": "9.1.0",
|
||||
"@fastify/cors": "8.4.0",
|
||||
"@fastify/cors": "8.4.1",
|
||||
"@fastify/express": "2.3.0",
|
||||
"@fastify/http-proxy": "9.2.1",
|
||||
"@fastify/multipart": "8.0.0",
|
||||
"@fastify/static": "6.11.2",
|
||||
"@fastify/static": "6.12.0",
|
||||
"@fastify/view": "8.2.0",
|
||||
"@google-cloud/logging": "^10.5.0",
|
||||
"@google-cloud/translate": "^7.2.1",
|
||||
@ -79,7 +79,7 @@
|
||||
"@nestjs/core": "10.2.7",
|
||||
"@nestjs/testing": "10.2.7",
|
||||
"@peertube/http-signature": "1.7.0",
|
||||
"@simplewebauthn/server": "8.3.4",
|
||||
"@simplewebauthn/server": "8.3.5",
|
||||
"@sinonjs/fake-timers": "11.2.2",
|
||||
"@swc/cli": "0.1.62",
|
||||
"@swc/core": "1.3.95",
|
||||
@ -91,7 +91,7 @@
|
||||
"bcryptjs": "2.4.3",
|
||||
"blurhash": "2.0.5",
|
||||
"body-parser": "1.20.2",
|
||||
"bullmq": "4.12.6",
|
||||
"bullmq": "4.12.7",
|
||||
"cacheable-lookup": "7.0.0",
|
||||
"cbor": "9.0.1",
|
||||
"chalk": "5.3.0",
|
||||
@ -142,7 +142,7 @@
|
||||
"probe-image-size": "7.2.3",
|
||||
"promise-limit": "2.7.0",
|
||||
"pug": "3.0.2",
|
||||
"punycode": "2.3.0",
|
||||
"punycode": "2.3.1",
|
||||
"pureimage": "0.3.17",
|
||||
"qrcode": "1.5.3",
|
||||
"random-seed": "0.3.0",
|
||||
@ -180,7 +180,7 @@
|
||||
"@simplewebauthn/typescript-types": "8.3.4",
|
||||
"@swc/jest": "0.2.29",
|
||||
"@types/accepts": "1.3.6",
|
||||
"@types/archiver": "5.3.4",
|
||||
"@types/archiver": "6.0.0",
|
||||
"@types/bcryptjs": "2.4.5",
|
||||
"@types/body-parser": "1.19.4",
|
||||
"@types/cbor": "6.0.0",
|
||||
@ -188,14 +188,14 @@
|
||||
"@types/content-disposition": "0.5.7",
|
||||
"@types/fluent-ffmpeg": "2.1.23",
|
||||
"@types/http-link-header": "1.0.4",
|
||||
"@types/jest": "29.5.6",
|
||||
"@types/jest": "29.5.7",
|
||||
"@types/js-yaml": "4.0.8",
|
||||
"@types/jsdom": "21.1.4",
|
||||
"@types/jsonld": "1.5.11",
|
||||
"@types/jsrsasign": "10.5.11",
|
||||
"@types/mime-types": "2.1.3",
|
||||
"@types/ms": "0.7.33",
|
||||
"@types/node": "20.8.9",
|
||||
"@types/node": "20.8.10",
|
||||
"@types/node-fetch": "3.0.3",
|
||||
"@types/nodemailer": "6.4.13",
|
||||
"@types/oauth": "0.9.3",
|
||||
@ -218,8 +218,8 @@
|
||||
"@types/vary": "1.1.2",
|
||||
"@types/web-push": "3.6.2",
|
||||
"@types/ws": "8.5.8",
|
||||
"@typescript-eslint/eslint-plugin": "6.9.0",
|
||||
"@typescript-eslint/parser": "6.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "6.9.1",
|
||||
"@typescript-eslint/parser": "6.9.1",
|
||||
"aws-sdk-client-mock": "3.0.0",
|
||||
"cross-env": "7.0.3",
|
||||
"eslint": "8.52.0",
|
||||
|
@ -278,7 +278,7 @@ export function loadConfig(): Config {
|
||||
clientEntry: clientManifest['src/_boot_.ts'],
|
||||
clientManifestExists: clientManifestExists,
|
||||
perChannelMaxNoteCacheCount: config.perChannelMaxNoteCacheCount ?? 1000,
|
||||
perUserNotificationsMaxCount: config.perUserNotificationsMaxCount ?? 300,
|
||||
perUserNotificationsMaxCount: config.perUserNotificationsMaxCount ?? 500,
|
||||
deactivateAntennaThreshold: config.deactivateAntennaThreshold ?? (1000 * 60 * 60 * 24 * 7),
|
||||
pidFile: config.pidFile,
|
||||
};
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import type { ChannelFavoritesRepository, ChannelFollowingsRepository, ChannelsRepository, DriveFilesRepository, NoteUnreadsRepository, NotesRepository } from '@/models/_.js';
|
||||
import type { ChannelFavoritesRepository, ChannelFollowingsRepository, ChannelsRepository, DriveFilesRepository, NotesRepository } from '@/models/_.js';
|
||||
import type { Packed } from '@/misc/json-schema.js';
|
||||
import type { } from '@/models/Blocking.js';
|
||||
import type { MiUser } from '@/models/User.js';
|
||||
@ -31,9 +31,6 @@ export class ChannelEntityService {
|
||||
@Inject(DI.notesRepository)
|
||||
private notesRepository: NotesRepository,
|
||||
|
||||
@Inject(DI.noteUnreadsRepository)
|
||||
private noteUnreadsRepository: NoteUnreadsRepository,
|
||||
|
||||
@Inject(DI.driveFilesRepository)
|
||||
private driveFilesRepository: DriveFilesRepository,
|
||||
|
||||
@ -54,13 +51,6 @@ export class ChannelEntityService {
|
||||
|
||||
const banner = channel.bannerId ? await this.driveFilesRepository.findOneBy({ id: channel.bannerId }) : null;
|
||||
|
||||
const hasUnreadNote = meId ? await this.noteUnreadsRepository.exist({
|
||||
where: {
|
||||
noteChannelId: channel.id,
|
||||
userId: meId,
|
||||
},
|
||||
}) : undefined;
|
||||
|
||||
const isFollowing = meId ? await this.channelFollowingsRepository.exist({
|
||||
where: {
|
||||
followerId: meId,
|
||||
@ -99,7 +89,7 @@ export class ChannelEntityService {
|
||||
...(me ? {
|
||||
isFollowing,
|
||||
isFavorited,
|
||||
hasUnreadNote,
|
||||
hasUnreadNote: false, // 後方互換性のため
|
||||
} : {}),
|
||||
|
||||
...(detailed ? {
|
||||
|
@ -506,9 +506,9 @@ export class UserEntityService implements OnModuleInit {
|
||||
hasUnreadAntenna: this.getHasUnreadAntenna(user.id),
|
||||
hasUnreadChannel: false, // 後方互換性のため
|
||||
hasUnreadMessagingMessage: this.getHasUnreadMessagingMessage(user.id),
|
||||
hasUnreadNotification: notificationsInfo?.hasUnread,
|
||||
hasUnreadNotification: notificationsInfo?.hasUnread, // 後方互換性のため
|
||||
hasPendingReceivedFollowRequest: this.getHasPendingReceivedFollowRequest(user.id),
|
||||
unreadNotificationCount: notificationsInfo?.unreadCount,
|
||||
unreadNotificationsCount: notificationsInfo?.unreadCount,
|
||||
mutedWords: profile!.mutedWords,
|
||||
mutedInstances: profile!.mutedInstances,
|
||||
mutingNotificationTypes: [], // 後方互換性のため
|
||||
|
@ -403,7 +403,7 @@ export const packedMeDetailedOnlySchema = {
|
||||
type: 'boolean',
|
||||
nullable: false, optional: false,
|
||||
},
|
||||
unreadNotificationCount: {
|
||||
unreadNotificationsCount: {
|
||||
type: 'number',
|
||||
nullable: false, optional: false,
|
||||
},
|
||||
|
@ -720,7 +720,7 @@ describe('クリップ', () => {
|
||||
test('を追加できる。', async () => {
|
||||
await addNote({ clipId: aliceClip.id, noteId: aliceNote.id });
|
||||
const res = await show({ clipId: aliceClip.id });
|
||||
assert.strictEqual(res.lastClippedAt, new Date(res.lastClippedAt ?? '').toISOString());
|
||||
assert.strictEqual(res.lastClippedAt, res.lastClippedAt ? new Date(res.lastClippedAt).toISOString() : null);
|
||||
assert.deepStrictEqual((await notes({ clipId: aliceClip.id })).map(x => x.id), [aliceNote.id]);
|
||||
|
||||
// 他人の非公開ノートも突っ込める
|
||||
|
@ -165,7 +165,7 @@ describe('ユーザー', () => {
|
||||
hasUnreadAntenna: user.hasUnreadAntenna,
|
||||
hasUnreadChannel: user.hasUnreadChannel,
|
||||
hasUnreadNotification: user.hasUnreadNotification,
|
||||
unreadNotificationCount: user.unreadNotificationCount,
|
||||
unreadNotificationsCount: user.unreadNotificationsCount,
|
||||
hasPendingReceivedFollowRequest: user.hasPendingReceivedFollowRequest,
|
||||
unreadAnnouncements: user.unreadAnnouncements,
|
||||
mutedWords: user.mutedWords,
|
||||
@ -417,7 +417,7 @@ describe('ユーザー', () => {
|
||||
assert.strictEqual(response.hasUnreadAntenna, false);
|
||||
assert.strictEqual(response.hasUnreadChannel, false);
|
||||
assert.strictEqual(response.hasUnreadNotification, false);
|
||||
assert.strictEqual(response.unreadNotificationCount, 0);
|
||||
assert.strictEqual(response.unreadNotificationsCount, 0);
|
||||
assert.strictEqual(response.hasPendingReceivedFollowRequest, false);
|
||||
assert.deepStrictEqual(response.unreadAnnouncements, []);
|
||||
assert.deepStrictEqual(response.mutedWords, []);
|
||||
|
@ -2553,7 +2553,7 @@ type MeDetailed = UserDetailed & {
|
||||
hasUnreadMessagingMessage: boolean;
|
||||
hasUnreadNotification: boolean;
|
||||
hasUnreadSpecifiedNotes: boolean;
|
||||
unreadNotificationCount: number;
|
||||
unreadNotificationsCount: number;
|
||||
hideOnlineStatus: boolean;
|
||||
injectFeaturedNote: boolean;
|
||||
integrations: Record<string, any>;
|
||||
|
@ -20,12 +20,12 @@
|
||||
"url": "git+https://github.com/misskey-dev/misskey.js.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@microsoft/api-extractor": "7.38.0",
|
||||
"@microsoft/api-extractor": "7.38.1",
|
||||
"@swc/jest": "0.2.29",
|
||||
"@types/jest": "29.5.6",
|
||||
"@types/node": "20.8.9",
|
||||
"@typescript-eslint/eslint-plugin": "6.9.0",
|
||||
"@typescript-eslint/parser": "6.9.0",
|
||||
"@types/jest": "29.5.7",
|
||||
"@types/node": "20.8.10",
|
||||
"@typescript-eslint/eslint-plugin": "6.9.1",
|
||||
"@typescript-eslint/parser": "6.9.1",
|
||||
"eslint": "8.52.0",
|
||||
"jest": "29.7.0",
|
||||
"jest-fetch-mock": "3.0.3",
|
||||
|
@ -106,7 +106,7 @@ export type MeDetailed = UserDetailed & {
|
||||
hasUnreadMessagingMessage: boolean;
|
||||
hasUnreadNotification: boolean;
|
||||
hasUnreadSpecifiedNotes: boolean;
|
||||
unreadNotificationCount: number;
|
||||
unreadNotificationsCount: number;
|
||||
hideOnlineStatus: boolean;
|
||||
injectFeaturedNote: boolean;
|
||||
integrations: Record<string, any>;
|
||||
|
@ -10,7 +10,7 @@
|
||||
"build-storybook": "pnpm build-storybook-pre && storybook build",
|
||||
"chromatic": "chromatic",
|
||||
"test": "vitest --run",
|
||||
"test-and-coverage": "vitest --run --coverage",
|
||||
"test-and-coverage": "vitest --run --coverage --globals",
|
||||
"typecheck": "vue-tsc --noEmit",
|
||||
"eslint": "eslint --quiet \"src/**/*.{ts,vue}\"",
|
||||
"lint": "pnpm typecheck && pnpm eslint"
|
||||
@ -21,7 +21,7 @@
|
||||
"@github/webauthn-json": "2.1.1",
|
||||
"@rollup/plugin-alias": "5.0.1",
|
||||
"@rollup/plugin-json": "6.0.1",
|
||||
"@rollup/plugin-replace": "5.0.4",
|
||||
"@rollup/plugin-replace": "5.0.5",
|
||||
"@rollup/pluginutils": "5.0.5",
|
||||
"@syuilo/aiscript": "0.16.0",
|
||||
"@tabler/icons-webfont": "2.37.0",
|
||||
@ -31,7 +31,7 @@
|
||||
"astring": "1.8.6",
|
||||
"autosize": "6.0.1",
|
||||
"aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.0.5",
|
||||
"broadcast-channel": "5.5.1",
|
||||
"broadcast-channel": "6.0.0",
|
||||
"browser-image-resizer": "github:misskey-dev/browser-image-resizer#v2.2.1-misskey.3",
|
||||
"buraha": "0.0.1",
|
||||
"canvas-confetti": "1.6.1",
|
||||
@ -42,7 +42,7 @@
|
||||
"chartjs-plugin-zoom": "2.0.1",
|
||||
"cherrypick-js": "workspace:*",
|
||||
"cherrypick-mfm-js": "github:kokonect-link/mfm.js",
|
||||
"chromatic": "7.5.4",
|
||||
"chromatic": "7.6.0",
|
||||
"compare-versions": "6.1.0",
|
||||
"cropperjs": "2.0.0-beta.4",
|
||||
"date-fns": "2.30.0",
|
||||
@ -59,9 +59,9 @@
|
||||
"pretendard": "^1.3.8",
|
||||
"pretendard-jp": "^1.3.8",
|
||||
"prismjs": "1.29.0",
|
||||
"punycode": "2.3.0",
|
||||
"punycode": "2.3.1",
|
||||
"querystring": "0.2.1",
|
||||
"rollup": "4.1.4",
|
||||
"rollup": "4.2.0",
|
||||
"sanitize-html": "2.11.0",
|
||||
"shiki": "^0.14.5",
|
||||
"sass": "1.69.5",
|
||||
@ -84,31 +84,31 @@
|
||||
"vuedraggable": "next"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-actions": "7.5.1",
|
||||
"@storybook/addon-essentials": "7.5.1",
|
||||
"@storybook/addon-interactions": "7.5.1",
|
||||
"@storybook/addon-links": "7.5.1",
|
||||
"@storybook/addon-storysource": "7.5.1",
|
||||
"@storybook/addons": "7.5.1",
|
||||
"@storybook/blocks": "7.5.1",
|
||||
"@storybook/core-events": "7.5.1",
|
||||
"@storybook/addon-actions": "7.5.2",
|
||||
"@storybook/addon-essentials": "7.5.2",
|
||||
"@storybook/addon-interactions": "7.5.2",
|
||||
"@storybook/addon-links": "7.5.2",
|
||||
"@storybook/addon-storysource": "7.5.2",
|
||||
"@storybook/addons": "7.5.2",
|
||||
"@storybook/blocks": "7.5.2",
|
||||
"@storybook/core-events": "7.5.2",
|
||||
"@storybook/jest": "0.2.3",
|
||||
"@storybook/manager-api": "7.5.1",
|
||||
"@storybook/preview-api": "7.5.1",
|
||||
"@storybook/react": "7.5.1",
|
||||
"@storybook/react-vite": "7.5.1",
|
||||
"@storybook/manager-api": "7.5.2",
|
||||
"@storybook/preview-api": "7.5.2",
|
||||
"@storybook/react": "7.5.2",
|
||||
"@storybook/react-vite": "7.5.2",
|
||||
"@storybook/testing-library": "0.2.2",
|
||||
"@storybook/theming": "7.5.1",
|
||||
"@storybook/types": "7.5.1",
|
||||
"@storybook/vue3": "7.5.1",
|
||||
"@storybook/vue3-vite": "7.5.1",
|
||||
"@testing-library/vue": "7.0.0",
|
||||
"@storybook/theming": "7.5.2",
|
||||
"@storybook/types": "7.5.2",
|
||||
"@storybook/vue3": "7.5.2",
|
||||
"@storybook/vue3-vite": "7.5.2",
|
||||
"@testing-library/vue": "8.0.0",
|
||||
"@types/autosize": "^4.0.1",
|
||||
"@types/escape-regexp": "0.0.2",
|
||||
"@types/estree": "1.0.3",
|
||||
"@types/estree": "1.0.4",
|
||||
"@types/matter-js": "0.19.2",
|
||||
"@types/micromatch": "4.0.4",
|
||||
"@types/node": "20.8.9",
|
||||
"@types/node": "20.8.10",
|
||||
"@types/prismjs": "^1.26.0",
|
||||
"@types/punycode": "2.1.1",
|
||||
"@types/sanitize-html": "2.9.3",
|
||||
@ -117,13 +117,13 @@
|
||||
"@types/uuid": "9.0.6",
|
||||
"@types/websocket": "1.0.8",
|
||||
"@types/ws": "8.5.8",
|
||||
"@typescript-eslint/eslint-plugin": "6.9.0",
|
||||
"@typescript-eslint/parser": "6.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "6.9.1",
|
||||
"@typescript-eslint/parser": "6.9.1",
|
||||
"@vitest/coverage-v8": "0.34.6",
|
||||
"@vue/runtime-core": "3.3.7",
|
||||
"acorn": "8.11.2",
|
||||
"cross-env": "7.0.3",
|
||||
"cypress": "13.3.3",
|
||||
"cypress": "13.4.0",
|
||||
"eslint": "8.52.0",
|
||||
"eslint-plugin-import": "2.29.0",
|
||||
"eslint-plugin-storybook": "^0.6.13",
|
||||
@ -138,7 +138,7 @@
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"start-server-and-test": "2.0.1",
|
||||
"storybook": "7.5.1",
|
||||
"storybook": "7.5.2",
|
||||
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
|
||||
"summaly": "github:misskey-dev/summaly",
|
||||
"vite-plugin-turbosnap": "1.0.3",
|
||||
|
@ -231,15 +231,15 @@ export async function mainBoot() {
|
||||
main.on('readAllNotifications', () => {
|
||||
updateAccount({
|
||||
hasUnreadNotification: false,
|
||||
unreadNotificationCount: 0,
|
||||
unreadNotificationsCount: 0,
|
||||
});
|
||||
});
|
||||
|
||||
main.on('unreadNotification', () => {
|
||||
const unreadNotificationCount = ($i?.unreadNotificationCount ?? 0) + 1;
|
||||
const unreadNotificationsCount = ($i?.unreadNotificationsCount ?? 0) + 1;
|
||||
updateAccount({
|
||||
hasUnreadNotification: true,
|
||||
unreadNotificationCount,
|
||||
unreadNotificationsCount,
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -7,17 +7,17 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<MkModal ref="modal" v-slot="{ type, maxHeight }" :preferType="preferedModalType" :anchor="anchor" :transparentBg="true" :src="src" @click="modal.close()" @closed="emit('closed')">
|
||||
<div class="szkkfdyq _shadow" :class="{ asDrawer: type === 'drawer', _popup: !defaultStore.state.useBlurEffect || !defaultStore.state.useBlurEffectForModal || !defaultStore.state.removeModalBgColorForBlur, _popupAcrylic: defaultStore.state.useBlurEffect && defaultStore.state.useBlurEffectForModal && defaultStore.state.removeModalBgColorForBlur }" :style="{ maxHeight: maxHeight ? maxHeight + 'px' : '' }">
|
||||
<div class="main">
|
||||
<template v-for="item in items">
|
||||
<button v-if="item.action" :key="item.text" v-click-anime class="_button item" @click="$event => { item.action($event); close(); }">
|
||||
<template v-for="item in items" :key="item.text">
|
||||
<button v-if="item.action" v-click-anime class="_button item" @click="$event => { item.action($event); close(); }">
|
||||
<i class="icon" :class="item.icon"></i>
|
||||
<div class="text">{{ item.text }}</div>
|
||||
<span v-if="item.indicate && item.indicateValue && defaultStore.state.showUnreadNotificationCount" class="indicatorWithValue"><span>{{ item.indicateValue }}</span></span>
|
||||
<span v-if="item.indicate && item.indicateValue" class="_indicateCounter indicatorWithValue">{{ item.indicateValue }}</span>
|
||||
<span v-else-if="item.indicate" class="indicator"><i class="_indicatorCircle"></i></span>
|
||||
</button>
|
||||
<MkA v-else :key="item.text" v-click-anime :to="item.to" class="item" @click.passive="close()">
|
||||
<i class="icon" :class="item.icon"></i>
|
||||
<div class="text">{{ item.text }}</div>
|
||||
<span v-if="item.indicate && item.indicateValue && defaultStore.state.showUnreadNotificationCount" class="indicatorWithValue"><span>{{ item.indicateValue }}</span></span>
|
||||
<span v-if="item.indicate && item.indicateValue" class="_indicateCounter indicatorWithValue">{{ item.indicateValue }}</span>
|
||||
<span v-else-if="item.indicate" class="indicator"><i class="_indicatorCircle"></i></span>
|
||||
</MkA>
|
||||
</template>
|
||||
@ -29,7 +29,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<script lang="ts" setup>
|
||||
import { } from 'vue';
|
||||
import MkModal from '@/components/MkModal.vue';
|
||||
import { navbarItemDef } from '@/navbar';
|
||||
import { navbarItemDef } from '@/navbar.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import { deviceKind } from '@/scripts/device-kind.js';
|
||||
|
||||
@ -123,27 +123,11 @@ function close() {
|
||||
position: absolute;
|
||||
top: 32px;
|
||||
left: 16px;
|
||||
font-size: 8px;
|
||||
display: inline-flex;
|
||||
color: var(--fgOnAccent);
|
||||
font-weight: 700;
|
||||
background: var(--indicator);
|
||||
height: 1.5em;
|
||||
min-width: 1.5em;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 99rem;
|
||||
|
||||
@media (max-width: 500px) {
|
||||
top: 16px;
|
||||
left: 8px;
|
||||
}
|
||||
|
||||
> span {
|
||||
display: inline-block;
|
||||
padding: 0 .25em;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
}
|
||||
|
||||
> .indicator {
|
||||
|
@ -76,7 +76,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<div :class="$style.text">
|
||||
<span v-if="appearNote.isHidden" style="opacity: 0.5">({{ i18n.ts._ffVisibility.private }})</span>
|
||||
<MkA v-if="appearNote.replyId" :class="$style.replyIcon" :to="`/notes/${appearNote.replyId}`"><i class="ti ti-arrow-back-up"></i></MkA>
|
||||
<Mfm v-if="appearNote.text" :text="appearNote.text" :author="appearNote.user" :nyaize="'account'" :i="$i" :emojiUrls="appearNote.emojis"/>
|
||||
<Mfm v-if="appearNote.text" :parsedNodes="parsed" :text="appearNote.text" :author="appearNote.user" :nyaize="'account'" :i="$i" :emojiUrls="appearNote.emojis"/>
|
||||
<div v-if="defaultStore.state.showTranslateButtonInNote && instance.translatorAvailable && appearNote.text" style="padding-top: 5px; color: var(--accent);">
|
||||
<button v-if="!(translating || translation)" ref="translateButton" class="_button" @mousedown="translate()">{{ i18n.ts.translateNote }}</button>
|
||||
<button v-else class="_button" @mousedown="translation = null">{{ i18n.ts.close }}</button>
|
||||
@ -113,7 +113,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</div>
|
||||
<div v-if="appearNote.renote" :class="$style.quote"><MkNoteSimple :note="appearNote.renote" :class="$style.quoteNote"/></div>
|
||||
<div>
|
||||
<MkReactionsViewer :note="appearNote" :maxNumber="16">
|
||||
<MkReactionsViewer v-show="appearNote.cw == null || showContent" :note="appearNote" :maxNumber="16">
|
||||
<template #more>
|
||||
<div :class="$style.reactionOmitted">{{ i18n.ts.more }}</div>
|
||||
</template>
|
||||
@ -261,8 +261,9 @@ const clipButton = shallowRef<HTMLElement>();
|
||||
let appearNote = $computed(() => isRenote ? note.renote as Misskey.entities.Note : note);
|
||||
const isMyRenote = $i && ($i.id === note.userId);
|
||||
const showContent = ref(false);
|
||||
const urls = appearNote.text ? extractUrlFromMfm(mfm.parse(appearNote.text)) : null;
|
||||
const isLong = shouldCollapsed(appearNote);
|
||||
const parsed = appearNote.text ? mfm.parse(appearNote.text) : null;
|
||||
const urls = parsed ? extractUrlFromMfm(parsed) : null;
|
||||
const isLong = shouldCollapsed(appearNote, urls ?? []);
|
||||
const isMFM = shouldMfmCollapsed(appearNote);
|
||||
const collapsed = ref(appearNote.cw == null && (isLong || (isMFM && defaultStore.state.collapseDefault) || defaultStore.state.allMediaNoteCollapse));
|
||||
const isDeleted = ref(false);
|
||||
|
@ -95,7 +95,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<div v-show="appearNote.cw == null || showContent">
|
||||
<span v-if="appearNote.isHidden" style="opacity: 0.5">({{ i18n.ts._ffVisibility.private }})</span>
|
||||
<MkA v-if="appearNote.replyId" :class="$style.noteReplyTarget" :to="`/notes/${appearNote.replyId}`"><i class="ti ti-arrow-back-up"></i></MkA>
|
||||
<Mfm v-if="appearNote.text" :text="appearNote.text" :author="appearNote.user" :nyaize="'account'" :i="$i" :emojiUrls="appearNote.emojis"/>
|
||||
<Mfm v-if="appearNote.text" :parsedNodes="parsed" :text="appearNote.text" :author="appearNote.user" :nyaize="'account'" :i="$i" :emojiUrls="appearNote.emojis"/>
|
||||
<a v-if="appearNote.renote != null" :class="$style.rn">RN:</a>
|
||||
<div v-if="defaultStore.state.showTranslateButtonInNote && instance.translatorAvailable && appearNote.text" style="padding-top: 5px; color: var(--accent);">
|
||||
<button v-if="!(translating || translation)" ref="translateButton" class="_button" @mousedown="translate()">{{ i18n.ts.translateNote }}</button>
|
||||
@ -344,7 +344,8 @@ const isDeleted = ref(false);
|
||||
const muted = ref($i ? checkWordMute(appearNote, $i, $i.mutedWords) : false);
|
||||
const translation = ref(null);
|
||||
const translating = ref(false);
|
||||
const urls = appearNote.text ? extractUrlFromMfm(mfm.parse(appearNote.text)) : null;
|
||||
const parsed = appearNote.text ? mfm.parse(appearNote.text) : null;
|
||||
const urls = parsed ? extractUrlFromMfm(parsed) : null;
|
||||
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.user.instance);
|
||||
const conversation = ref<Misskey.entities.Note[]>([]);
|
||||
const replies = ref<Misskey.entities.Note[]>([]);
|
||||
|
@ -154,8 +154,8 @@ const props = defineProps<{
|
||||
|
||||
let note = $ref(deepClone(props.note));
|
||||
|
||||
const isLong = shouldCollapsed(props.note);
|
||||
const isMFM = shouldMfmCollapsed(props.note);
|
||||
const isLong = shouldCollapsed(props.note, []);
|
||||
const isMFM = shouldMfmCollapsed(props.note, []);
|
||||
|
||||
const collapsed = $ref(isLong || (isMFM && defaultStore.state.collapseDefault) || defaultStore.state.allMediaNoteCollapse || note.files.length > 0 || note.poll);
|
||||
|
||||
|
@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div :class="[$style.spacer, defaultStore.reactiveState.darkMode ? $style.dark : $style.light]"></div>
|
||||
<div :class="[$style.spacer, defaultStore.reactiveState.darkMode.value ? $style.dark : $style.light]"></div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
@ -22,7 +22,7 @@ import { defaultStore } from '@/store.js';
|
||||
background-color: rgba(255, 255, 255, 0);
|
||||
|
||||
&.light {
|
||||
background-image: repeating-linear-gradient(135deg, transparent, transparent 16px, #00000026 16px, #00000026 20px );
|
||||
background-image: repeating-linear-gradient(135deg, transparent, transparent 16px, #00000010 16px, #00000010 20px );
|
||||
}
|
||||
|
||||
&.dark {
|
||||
|
@ -39,6 +39,7 @@ type MfmProps = {
|
||||
emojiUrls?: string[];
|
||||
rootScale?: number;
|
||||
nyaize: boolean | 'account';
|
||||
parsedNodes?: mfm.MfmNode[] | null;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
@ -49,7 +50,7 @@ export default function(props: MfmProps) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||
if (props.text == null || props.text === '') return;
|
||||
|
||||
const rootAst = (props.plain ? mfm.parseSimple : mfm.parse)(props.text);
|
||||
const rootAst = props.parsedNodes ?? (props.plain ? mfm.parseSimple : mfm.parse)(props.text);
|
||||
|
||||
const validTime = (t: string | null | undefined) => {
|
||||
if (t == null) return null;
|
||||
|
@ -21,12 +21,12 @@ export const navbarItemDef = reactive({
|
||||
show: computed(() => $i != null),
|
||||
indicated: computed(() => $i != null && $i.hasUnreadNotification),
|
||||
indicateValue: computed(() => {
|
||||
if (!$i || $i.unreadNotificationCount === 0) return '';
|
||||
if (!$i || $i.unreadNotificationsCount === 0) return '';
|
||||
|
||||
if ($i.unreadNotificationCount > 99) {
|
||||
if ($i.unreadNotificationsCount > 99) {
|
||||
return '99+';
|
||||
} else {
|
||||
return $i.unreadNotificationCount.toString();
|
||||
return $i.unreadNotificationsCount.toString();
|
||||
}
|
||||
}),
|
||||
to: '/my/notifications',
|
||||
|
@ -147,7 +147,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<MkSwitch v-model="useSystemFont">{{ i18n.ts.useSystemFont }}</MkSwitch>
|
||||
<MkSwitch v-model="disableDrawer">{{ i18n.ts.disableDrawer }}</MkSwitch>
|
||||
<MkSwitch v-model="forceShowAds">{{ i18n.ts.forceShowAds }}</MkSwitch>
|
||||
<MkSwitch v-model="showUnreadNotificationCount">{{ i18n.ts.showUnreadNotificationCount }}</MkSwitch>
|
||||
<MkSwitch v-model="showUnreadNotificationsCount">{{ i18n.ts.showUnreadNotificationsCount }}</MkSwitch>
|
||||
<MkSwitch v-model="enableDataSaverMode">{{ i18n.ts.dataSaver }}</MkSwitch>
|
||||
</div>
|
||||
<div>
|
||||
@ -362,7 +362,7 @@ const notificationStackAxis = computed(defaultStore.makeGetterSetter('notificati
|
||||
const keepScreenOn = computed(defaultStore.makeGetterSetter('keepScreenOn'));
|
||||
const defaultWithReplies = computed(defaultStore.makeGetterSetter('defaultWithReplies'));
|
||||
const disableStreamingTimeline = computed(defaultStore.makeGetterSetter('disableStreamingTimeline'));
|
||||
const showUnreadNotificationCount = computed(defaultStore.makeGetterSetter('showUnreadNotificationCount'));
|
||||
const showUnreadNotificationsCount = computed(defaultStore.makeGetterSetter('showUnreadNotificationsCount'));
|
||||
const newNoteReceivedNotificationBehavior = computed(defaultStore.makeGetterSetter('newNoteReceivedNotificationBehavior'));
|
||||
const fontSize = computed(defaultStore.makeGetterSetter('fontSize'));
|
||||
const collapseDefault = computed(defaultStore.makeGetterSetter('collapseDefault'));
|
||||
@ -428,7 +428,7 @@ watch([
|
||||
highlightSensitiveMedia,
|
||||
keepScreenOn,
|
||||
disableStreamingTimeline,
|
||||
showUnreadNotificationCount,
|
||||
showUnreadNotificationsCount,
|
||||
enableDataSaverMode,
|
||||
enableAbsoluteTime,
|
||||
enableMarkByDate,
|
||||
|
@ -3,17 +3,14 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import * as mfm from 'cherrypick-mfm-js';
|
||||
import * as Misskey from 'cherrypick-js';
|
||||
import { extractUrlFromMfm } from './extract-url-from-mfm.js';
|
||||
|
||||
export function shouldCollapsed(note: Misskey.entities.Note): boolean {
|
||||
const urls = note.text ? extractUrlFromMfm(mfm.parse(note.text)) : null;
|
||||
export function shouldCollapsed(note: Misskey.entities.Note, urls: string[]): boolean {
|
||||
return note.cw == null && note.text != null && (
|
||||
(note.text.split('\n').length > 9) ||
|
||||
(note.text.length > 500) ||
|
||||
(note.files.length >= 5) ||
|
||||
(!!urls && urls.length >= 4)
|
||||
(urls.length >= 4)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -406,7 +406,7 @@ export const defaultStore = markRaw(new Storage('base', {
|
||||
where: 'device',
|
||||
default: false,
|
||||
},
|
||||
showUnreadNotificationCount: {
|
||||
showUnreadNotificationsCount: {
|
||||
where: 'deviceAccount',
|
||||
default: false,
|
||||
},
|
||||
|
@ -257,6 +257,19 @@ hr {
|
||||
background: currentColor;
|
||||
}
|
||||
|
||||
._indicateCounter {
|
||||
display: inline-flex;
|
||||
color: var(--fgOnAccent);
|
||||
font-weight: 700;
|
||||
background: var(--indicator);
|
||||
height: 1.5em;
|
||||
min-width: 1.5em;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 99rem;
|
||||
padding: 0.3em 0.5em;
|
||||
}
|
||||
|
||||
._noSelect {
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
|
@ -21,7 +21,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<component :is="navbarItemDef[item].to ? 'MkA' : 'button'" v-else-if="navbarItemDef[item] && (navbarItemDef[item].show !== false)" v-vibrate="ColdDeviceStorage.get('vibrateSystem') ? 5 : ''" class="_button" :class="[$style.item, { [$style.active]: navbarItemDef[item].active }]" :activeClass="$style.active" :to="navbarItemDef[item].to" v-on="navbarItemDef[item].action ? { click: navbarItemDef[item].action } : {}">
|
||||
<i class="ti-fw" :class="[$style.itemIcon, navbarItemDef[item].icon]"></i><span :class="$style.itemText">{{ navbarItemDef[item].title }}</span>
|
||||
<span v-if="navbarItemDef[item].indicated" :class="$style.itemIndicator">
|
||||
<span v-if="navbarItemDef[item].indicateValue && defaultStore.state.showUnreadNotificationCount" :class="$style.itemIndicateValueIcon"><span>{{ navbarItemDef[item].indicateValue }}</span></span>
|
||||
<span v-if="navbarItemDef[item].indicateValue && defaultStore.state.showUnreadNotificationsCount" class="_indicateCounter" :class="$style.itemIndicateValueIcon">{{ navbarItemDef[item].indicateValue }}</span>
|
||||
<i v-else class="_indicatorCircle"></i>
|
||||
</span>
|
||||
</component>
|
||||
@ -310,24 +310,6 @@ function more() {
|
||||
}
|
||||
}
|
||||
|
||||
.itemIndicateValueIcon {
|
||||
display: inline-flex;
|
||||
color: var(--fgOnAccent);
|
||||
font-weight: 700;
|
||||
background: var(--navIndicator);
|
||||
height: 1.5em;
|
||||
min-width: 1.5em;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 99rem;
|
||||
|
||||
& > span {
|
||||
display: inline-block;
|
||||
padding: 0 .25em;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
}
|
||||
|
||||
.itemText {
|
||||
position: relative;
|
||||
font-size: 0.9em;
|
||||
|
@ -32,7 +32,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
>
|
||||
<i class="ti-fw" :class="[$style.itemIcon, navbarItemDef[item].icon]"></i><span :class="$style.itemText">{{ navbarItemDef[item].title }}</span>
|
||||
<span v-if="navbarItemDef[item].indicated" :class="$style.itemIndicator">
|
||||
<span v-if="navbarItemDef[item].indicateValue && defaultStore.state.showUnreadNotificationCount" :class="$style.itemIndicateValueIcon"><span>{{ navbarItemDef[item].indicateValue }}</span></span>
|
||||
<span v-if="navbarItemDef[item].indicateValue && defaultStore.state.showUnreadNotificationsCount" class="_indicateCounter" :class="$style.itemIndicateValueIcon">{{ navbarItemDef[item].indicateValue }}</span>
|
||||
<i v-else class="_indicatorCircle"></i>
|
||||
</span>
|
||||
</component>
|
||||
@ -135,7 +135,7 @@ function more(ev: MouseEvent) {
|
||||
<style lang="scss" module>
|
||||
.root {
|
||||
--nav-width: 250px;
|
||||
--nav-icon-only-width: 72px;
|
||||
--nav-icon-only-width: 80px;
|
||||
|
||||
flex: 0 0 var(--nav-width);
|
||||
width: var(--nav-width);
|
||||
@ -159,24 +159,6 @@ function more(ev: MouseEvent) {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.itemIndicateValueIcon {
|
||||
display: inline-flex;
|
||||
color: var(--fgOnAccent);
|
||||
font-weight: 700;
|
||||
background: var(--navIndicator);
|
||||
height: 1.5em;
|
||||
min-width: 1.5em;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 99rem;
|
||||
|
||||
& > span {
|
||||
display: inline-block;
|
||||
padding: 0 .25em;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
}
|
||||
|
||||
.root:not(.iconOnly) {
|
||||
.body {
|
||||
width: var(--nav-width);
|
||||
@ -379,6 +361,7 @@ function more(ev: MouseEvent) {
|
||||
animation: none;
|
||||
left: auto;
|
||||
right: 40px;
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -543,6 +526,14 @@ function more(ev: MouseEvent) {
|
||||
color: var(--navIndicator);
|
||||
font-size: 8px;
|
||||
animation: blink 1s infinite;
|
||||
|
||||
&:has(.itemIndicateValueIcon) {
|
||||
animation: none;
|
||||
top: 4px;
|
||||
left: auto;
|
||||
right: 4px;
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -22,7 +22,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<component :is="navbarItemDef[item].to ? 'MkA' : 'button'" v-else-if="navbarItemDef[item] && (navbarItemDef[item].show !== false)" v-click-anime v-vibrate="ColdDeviceStorage.get('vibrateSystem') ? 5 : ''" class="item _button" :class="item" activeClass="active" :to="navbarItemDef[item].to" v-on="navbarItemDef[item].action ? { click: navbarItemDef[item].action } : {}">
|
||||
<i class="ti-fw" :class="navbarItemDef[item].icon"></i><span class="text">{{ navbarItemDef[item].title }}</span>
|
||||
<span v-if="navbarItemDef[item].indicated" class="indicator">
|
||||
<span v-if="navbarItemDef[item].indicateValue && defaultStore.state.showUnreadNotificationCount" class="itemIndicateValueIcon"><span>{{ navbarItemDef[item].indicateValue }}</span></span>
|
||||
<span v-if="navbarItemDef[item].indicateValue && defaultStore.state.showUnreadNotificationsCount" class="_indicateCounter itemIndicateValueIcon">{{ navbarItemDef[item].indicateValue }}</span>
|
||||
<i v-else class="_indicatorCircle"></i>
|
||||
</span>
|
||||
</component>
|
||||
@ -250,24 +250,6 @@ watch(defaultStore.reactiveState.menuDisplay, () => {
|
||||
left: auto;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
& > .itemIndicateValueIcon {
|
||||
display: inline-flex;
|
||||
color: var(--fgOnAccent);
|
||||
font-weight: 700;
|
||||
background: var(--navIndicator);
|
||||
height: 1.5em;
|
||||
min-width: 1.5em;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 99rem;
|
||||
|
||||
& > span {
|
||||
display: inline-block;
|
||||
padding: 0 .25em;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
|
@ -55,7 +55,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<button v-vibrate="ColdDeviceStorage.get('vibrateSystem') ? 5 : ''" :class="$style.navButton" class="_button" @click="mainRouter.push('/my/notifications')">
|
||||
<i :class="$style.navButtonIcon" class="ti ti-bell"></i>
|
||||
<span v-if="$i?.hasUnreadNotification" :class="$style.navButtonIndicator">
|
||||
<span v-if="$i?.unreadNotificationCount && defaultStore.state.showUnreadNotificationCount" :class="$style.navButtonIndicateValueIcon"><span>{{ $i.unreadNotificationCount > 99 ? '99+' : $i.unreadNotificationCount }}</span></span>
|
||||
<span v-if="defaultStore.state.showUnreadNotificationsCount" class="_indicateCounter" :class="$style.itemIndicateValueIcon">{{ $i.unreadNotificationsCount > 99 ? '99+' : $i.unreadNotificationsCount }}</span>
|
||||
<i v-else class="_indicatorCircle"></i>
|
||||
</span>
|
||||
</button>
|
||||
@ -491,24 +491,10 @@ body {
|
||||
color: var(--indicator);
|
||||
font-size: 16px;
|
||||
animation: blink 1s infinite;
|
||||
}
|
||||
|
||||
.navButtonIndicateValueIcon {
|
||||
display: inline-flex;
|
||||
color: var(--fgOnAccent);
|
||||
font-weight: 700;
|
||||
background: var(--navIndicator);
|
||||
height: 1em;
|
||||
min-width: 1em;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 99rem;
|
||||
|
||||
& > span {
|
||||
display: inline-block;
|
||||
padding: 0 .25em;
|
||||
font-size: .75em;
|
||||
line-height: 1em;
|
||||
&:has(.itemIndicateValueIcon) {
|
||||
animation: none;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -39,7 +39,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<button v-vibrate="ColdDeviceStorage.get('vibrateSystem') ? 5 : ''" :class="[$style.navButton, { [$style.active]: mainRouter.currentRoute.value.name === 'my-notifications' }]" class="_button" @click="mainRouter.currentRoute.value.name === 'my-notifications' ? top() : mainRouter.push('/my/notifications')">
|
||||
<i :class="$style.navButtonIcon" class="ti ti-bell"></i>
|
||||
<span v-if="$i?.hasUnreadNotification" :class="$style.navButtonIndicator">
|
||||
<span v-if="$i?.unreadNotificationCount && defaultStore.state.showUnreadNotificationCount" :class="$style.navButtonIndicateValueIcon"><span>{{ $i.unreadNotificationCount > 99 ? '99+' : $i.unreadNotificationCount }}</span></span>
|
||||
<span v-if="defaultStore.state.showUnreadNotificationsCount" class="_indicateCounter" :class="$style.itemIndicateValueIcon">{{ $i.unreadNotificationsCount > 99 ? '99+' : $i.unreadNotificationsCount }}</span>
|
||||
<i v-else class="_indicatorCircle"></i>
|
||||
</span>
|
||||
</button>
|
||||
@ -657,6 +657,11 @@ $float-button-size: 65px;
|
||||
color: var(--indicator);
|
||||
font-size: 8px;
|
||||
animation: blink 1s infinite;
|
||||
|
||||
&:has(.itemIndicateValueIcon) {
|
||||
animation: none;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.navButtonIndicatorHome {
|
||||
@ -664,25 +669,6 @@ $float-button-size: 65px;
|
||||
animation: none;
|
||||
}
|
||||
|
||||
.navButtonIndicateValueIcon {
|
||||
display: inline-flex;
|
||||
color: var(--fgOnAccent);
|
||||
font-weight: 700;
|
||||
background: var(--navIndicator);
|
||||
height: 1em;
|
||||
min-width: 1em;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 99rem;
|
||||
|
||||
& > span {
|
||||
display: inline-block;
|
||||
padding: 0 .25em;
|
||||
font-size: .75em;
|
||||
line-height: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
.menuDrawerBg {
|
||||
z-index: 1001;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<component :is="navbarItemDef[item].to ? 'MkA' : 'button'" v-else-if="navbarItemDef[item] && (navbarItemDef[item].show !== false)" v-vibrate="ColdDeviceStorage.get('vibrateSystem') ? 5 : ''" class="_button" :class="[$style.item, { [$style.active]: navbarItemDef[item].active }]" :activeClass="$style.active" :to="navbarItemDef[item].to" v-on="navbarItemDef[item].action ? { click: navbarItemDef[item].action } : {}">
|
||||
<i class="ti-fw" :class="[$style.itemIcon, navbarItemDef[item].icon]"></i><span :class="$style.itemText">{{ navbarItemDef[item].title }}</span>
|
||||
<span v-if="navbarItemDef[item].indicated" :class="$style.itemIndicator">
|
||||
<span v-if="navbarItemDef[item].indicateValue && defaultStore.state.showUnreadNotificationCount" :class="$style.itemIndicateValueIcon"><span>{{ navbarItemDef[item].indicateValue }}</span></span>
|
||||
<span v-if="navbarItemDef[item].indicateValue && defaultStore.state.showUnreadNotificationsCount" class="_indicateCounter" :class="$style.itemIndicateValueIcon">{{ navbarItemDef[item].indicateValue }}</span>
|
||||
<i v-else class="_indicatorCircle"></i>
|
||||
</span>
|
||||
</component>
|
||||
@ -330,24 +330,6 @@ function openProfile() {
|
||||
}
|
||||
}
|
||||
|
||||
.itemIndicateValueIcon {
|
||||
display: inline-flex;
|
||||
color: var(--fgOnAccent);
|
||||
font-weight: 700;
|
||||
background: var(--navIndicator);
|
||||
height: 1.5em;
|
||||
min-width: 1.5em;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 99rem;
|
||||
|
||||
& > span {
|
||||
display: inline-block;
|
||||
padding: 0 .25em;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
}
|
||||
|
||||
.itemText {
|
||||
position: relative;
|
||||
font-size: 0.9em;
|
||||
|
@ -32,7 +32,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
>
|
||||
<i class="ti-fw" :class="[$style.itemIcon, navbarItemDef[item].icon]"></i><span :class="$style.itemText">{{ navbarItemDef[item].title }}</span>
|
||||
<span v-if="navbarItemDef[item].indicated" :class="$style.itemIndicator">
|
||||
<span v-if="navbarItemDef[item].indicateValue && defaultStore.state.showUnreadNotificationCount" :class="$style.itemIndicateValueIcon"><span>{{ navbarItemDef[item].indicateValue }}</span></span>
|
||||
<span v-if="navbarItemDef[item].indicateValue && defaultStore.state.showUnreadNotificationsCount" class="_indicateCounter" :class="$style.itemIndicateValueIcon">{{ navbarItemDef[item].indicateValue }}</span>
|
||||
<i v-else class="_indicatorCircle"></i>
|
||||
</span>
|
||||
</component>
|
||||
@ -146,7 +146,7 @@ function openProfile() {
|
||||
<style lang="scss" module>
|
||||
.root {
|
||||
--nav-width: 250px;
|
||||
--nav-icon-only-width: 72px;
|
||||
--nav-icon-only-width: 80px;
|
||||
|
||||
flex: 0 0 var(--nav-width);
|
||||
width: var(--nav-width);
|
||||
@ -170,24 +170,6 @@ function openProfile() {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.itemIndicateValueIcon {
|
||||
display: inline-flex;
|
||||
color: var(--fgOnAccent);
|
||||
font-weight: 700;
|
||||
background: var(--navIndicator);
|
||||
height: 1.5em;
|
||||
min-width: 1.5em;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 99rem;
|
||||
|
||||
& > span {
|
||||
display: inline-block;
|
||||
padding: 0 .25em;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
}
|
||||
|
||||
.root:not(.iconOnly) {
|
||||
.body {
|
||||
width: var(--nav-width);
|
||||
@ -407,6 +389,7 @@ function openProfile() {
|
||||
animation: none;
|
||||
left: auto;
|
||||
right: 40px;
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -570,6 +553,14 @@ function openProfile() {
|
||||
color: var(--navIndicator);
|
||||
font-size: 8px;
|
||||
animation: blink 1s infinite;
|
||||
|
||||
&:has(.itemIndicateValueIcon) {
|
||||
animation: none;
|
||||
top: 4px;
|
||||
left: auto;
|
||||
right: 4px;
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -30,7 +30,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<button v-vibrate="ColdDeviceStorage.get('vibrateSystem') ? 5 : ''" :class="$style.navButton" class="_button" @click="mainRouter.push('/my/notifications')">
|
||||
<i :class="$style.navButtonIcon" class="ti ti-bell"></i>
|
||||
<span v-if="$i?.hasUnreadNotification" :class="$style.navButtonIndicator">
|
||||
<span v-if="$i?.unreadNotificationCount && defaultStore.state.showUnreadNotificationCount" :class="$style.navButtonIndicateValueIcon"><span>{{ $i.unreadNotificationCount > 99 ? '99+' : $i.unreadNotificationCount }}</span></span>
|
||||
<span v-if="defaultStore.state.showUnreadNotificationsCount" class="_indicateCounter" :class="$style.itemIndicateValueIcon">{{ $i.unreadNotificationsCount > 99 ? '99+' : $i.unreadNotificationsCount }}</span>
|
||||
<i v-else class="_indicatorCircle"></i>
|
||||
</span>
|
||||
</button>
|
||||
@ -494,24 +494,10 @@ $widgets-hide-threshold: 1090px;
|
||||
color: var(--indicator);
|
||||
font-size: 16px;
|
||||
animation: blink 1s infinite;
|
||||
}
|
||||
|
||||
.navButtonIndicateValueIcon {
|
||||
display: inline-flex;
|
||||
color: var(--fgOnAccent);
|
||||
font-weight: 700;
|
||||
background: var(--navIndicator);
|
||||
height: 1em;
|
||||
min-width: 1em;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 99rem;
|
||||
|
||||
& > span {
|
||||
display: inline-block;
|
||||
padding: 0 .25em;
|
||||
font-size: .75em;
|
||||
line-height: 1em;
|
||||
&:has(.itemIndicateValueIcon) {
|
||||
animation: none;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,6 +73,7 @@ module.exports = {
|
||||
{ 'blankLine': 'always', 'prev': '*', 'next': 'function' },
|
||||
],
|
||||
"lines-between-class-members": "off",
|
||||
/* typescript-eslint では enforce に対応してないっぽい
|
||||
'@typescript-eslint/lines-between-class-members': ['error', {
|
||||
enforce: [{
|
||||
blankLine: 'always',
|
||||
@ -80,6 +81,7 @@ module.exports = {
|
||||
next: '*',
|
||||
}]
|
||||
}],
|
||||
*/
|
||||
'@typescript-eslint/func-call-spacing': ['error', 'never'],
|
||||
'@typescript-eslint/no-explicit-any': ['warn'],
|
||||
'@typescript-eslint/no-unused-vars': ['warn'],
|
||||
|
@ -14,7 +14,7 @@
|
||||
"cherrypick-js": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/parser": "6.9.0",
|
||||
"@typescript-eslint/parser": "6.9.1",
|
||||
"@typescript/lib-webworker": "npm:@types/serviceworker@0.0.67",
|
||||
"eslint": "8.52.0",
|
||||
"eslint-plugin-import": "2.29.0",
|
||||
|
1476
pnpm-lock.yaml
1476
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user