diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2025-04-29 15:37:43 -0400 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2025-04-29 15:54:11 -0400 |
| commit | 9c301fa5aac7e339a2b41feab8d0d247a60f50aa (patch) | |
| tree | 26e1423620a2811a5e9372bcee6858851d9fad3e /packages/frontend-shared | |
| parent | align `docker_example.yml` with `example.yml` (diff) | |
| parent | chore: follow up on fixing Chromatic CI diff strategy (#15912) (diff) | |
| download | sharkey-9c301fa5aac7e339a2b41feab8d0d247a60f50aa.tar.gz sharkey-9c301fa5aac7e339a2b41feab8d0d247a60f50aa.tar.bz2 sharkey-9c301fa5aac7e339a2b41feab8d0d247a60f50aa.zip | |
Merge branch 'misskey-develop' into merge/2025-03-24
# Conflicts:
# .github/workflows/api-misskey-js.yml
# .github/workflows/changelog-check.yml
# .github/workflows/check-misskey-js-autogen.yml
# .github/workflows/get-api-diff.yml
# .github/workflows/lint.yml
# .github/workflows/locale.yml
# .github/workflows/on-release-created.yml
# .github/workflows/storybook.yml
# .github/workflows/test-backend.yml
# .github/workflows/test-federation.yml
# .github/workflows/test-frontend.yml
# .github/workflows/test-misskey-js.yml
# .github/workflows/test-production.yml
# .github/workflows/validate-api-json.yml
# package.json
# packages/backend/package.json
# packages/backend/src/server/api/ApiCallService.ts
# packages/backend/src/server/api/endpoints/drive/files/create.ts
# packages/frontend-shared/js/url.ts
# packages/frontend/package.json
# packages/frontend/src/components/MkFileCaptionEditWindow.vue
# packages/frontend/src/components/MkInfo.vue
# packages/frontend/src/components/MkLink.vue
# packages/frontend/src/components/MkNote.vue
# packages/frontend/src/components/MkNotes.vue
# packages/frontend/src/components/MkPageWindow.vue
# packages/frontend/src/components/MkReactionsViewer.vue
# packages/frontend/src/components/MkTimeline.vue
# packages/frontend/src/components/MkUrlPreview.vue
# packages/frontend/src/components/MkUserPopup.vue
# packages/frontend/src/components/global/MkPageHeader.vue
# packages/frontend/src/components/global/MkUrl.vue
# packages/frontend/src/components/global/PageWithHeader.vue
# packages/frontend/src/pages/about-misskey.vue
# packages/frontend/src/pages/announcements.vue
# packages/frontend/src/pages/antenna-timeline.vue
# packages/frontend/src/pages/channel.vue
# packages/frontend/src/pages/instance-info.vue
# packages/frontend/src/pages/note.vue
# packages/frontend/src/pages/page.vue
# packages/frontend/src/pages/role.vue
# packages/frontend/src/pages/tag.vue
# packages/frontend/src/pages/timeline.vue
# packages/frontend/src/pages/user-list-timeline.vue
# packages/frontend/src/pages/user/followers.vue
# packages/frontend/src/pages/user/following.vue
# packages/frontend/src/pages/user/home.vue
# packages/frontend/src/pages/user/index.vue
# packages/frontend/src/ui/deck.vue
# packages/misskey-js/generator/package.json
# pnpm-lock.yaml
# scripts/changelog-checker/package-lock.json
# scripts/changelog-checker/package.json
Diffstat (limited to 'packages/frontend-shared')
| -rw-r--r-- | packages/frontend-shared/js/collapsed.ts | 37 | ||||
| -rw-r--r-- | packages/frontend-shared/js/const.ts | 1 | ||||
| -rw-r--r-- | packages/frontend-shared/package.json | 10 |
3 files changed, 31 insertions, 17 deletions
diff --git a/packages/frontend-shared/js/collapsed.ts b/packages/frontend-shared/js/collapsed.ts index af1f88cb73..aa24c43bcb 100644 --- a/packages/frontend-shared/js/collapsed.ts +++ b/packages/frontend-shared/js/collapsed.ts @@ -6,17 +6,30 @@ import * as Misskey from 'misskey-js'; export function shouldCollapsed(note: Misskey.entities.Note, urls: string[]): boolean { - const collapsed = note.cw == null && ( - (note.text != null && ( - (note.text.includes('$[x2')) || - (note.text.includes('$[x3')) || - (note.text.includes('$[x4')) || - (note.text.includes('$[scale')) || - (note.text.split('\n').length > 9) || - (note.text.length > 500) || - (urls.length >= 4) - )) || (note.files != null && note.files.length >= 5) - ); + if (note.cw != null) { + return false; + } - return collapsed; + if (note.text != null) { + if ( + note.text.includes('$[x2') || + note.text.includes('$[x3') || + note.text.includes('$[x4') || + note.text.includes('$[scale') || + note.text.split('\n').length > 9 || + note.text.length > 500 + ) { + return true; + } + } + + if (urls.length >= 4) { + return true; + } + + if (note.files != null && note.files.length >= 5) { + return true; + } + + return false; } diff --git a/packages/frontend-shared/js/const.ts b/packages/frontend-shared/js/const.ts index 22e4e36292..0aba2b486e 100644 --- a/packages/frontend-shared/js/const.ts +++ b/packages/frontend-shared/js/const.ts @@ -157,6 +157,7 @@ export const ROLE_POLICIES = [ 'canUseTranslator', 'canHideAds', 'driveCapacityMb', + 'maxFileSizeMb', 'alwaysMarkNsfw', 'canUpdateBioMedia', 'pinLimit', diff --git a/packages/frontend-shared/package.json b/packages/frontend-shared/package.json index a4874b8f77..f129121d19 100644 --- a/packages/frontend-shared/package.json +++ b/packages/frontend-shared/package.json @@ -21,12 +21,12 @@ "lint": "pnpm typecheck && pnpm eslint" }, "devDependencies": { - "@types/node": "22.14.0", - "@typescript-eslint/eslint-plugin": "8.29.1", - "@typescript-eslint/parser": "8.29.1", - "esbuild": "0.25.2", + "@types/node": "22.15.2", + "@typescript-eslint/eslint-plugin": "8.31.0", + "@typescript-eslint/parser": "8.31.0", + "esbuild": "0.25.3", "eslint-plugin-vue": "10.0.0", - "nodemon": "3.1.9", + "nodemon": "3.1.10", "typescript": "5.8.3", "vue-eslint-parser": "10.1.3" }, |