diff --git a/CALCKEY.md b/CALCKEY.md index dfcb191e41..8dc0ebce3e 100644 --- a/CALCKEY.md +++ b/CALCKEY.md @@ -3,6 +3,9 @@ ## Planned - MFM button +- Sonic search support +- Use Cassandra for storing notes +- Federate with note edits - Classic mode make instance icon bring up new context menu - Exclude self from antenna - Backfill remote users @@ -19,17 +22,14 @@ ## Work in progress +- Account migration +- Link verification - Better Messaging UI - Better API Documentation - Remote follow button - Admin custom CSS - Add back time machine (jump to date) -- Improve accesibility score -
Current Misskey score is 57/100 - -![accesibility score](https://pool.jortage.com/voringme/misskey/8ff18aae-4dc6-4b08-9e05-a4c9d051a9e3.png) - -
+- Improve accesibility ## Implemented @@ -88,8 +88,9 @@ - Page drafts - Patron list - Animations respect reduced motion -- Obliteration of Ai-chan - Undo renote button inside original note +- Custom locales +- Obliteration of Ai-chan - MissV: [fix Misskey Forkbomb](https://code.vtopia.live/Vtopia/MissV/commit/40b23c070bd4adbb3188c73546c6c625138fb3c1) - [Make showing ads optional](https://github.com/misskey-dev/misskey/pull/8996) - [Tapping avatar in mobile opens account modal](https://github.com/misskey-dev/misskey/pull/9056) @@ -131,3 +132,4 @@ - 4c5aa9e53887cca5561fcec6ab0754e018f589a5: server: allow to like own pages - 923c93da1228458dd65be47483c198a1a9191bcf: use await for notes.countBy - ca90cedba0a0704b503c2778694230f5a7dfbace: server: reduce dead instance detection to 7 days + - e9ab42c10afb4e27516c2d2b5e3e06630efe9edd: Alt text in image viewer diff --git a/README.md b/README.md index 8e4b03be94..835b991dfc 100644 --- a/README.md +++ b/README.md @@ -49,10 +49,10 @@ This guide will work for both **starting from scratch** and **migrating from Mis ## 📦 Dependencies -- 🐢 At least [NodeJS](https://nodejs.org/en/) v18.12.1 (v19.1.0 recommended) +- 🐢 At least [NodeJS](https://nodejs.org/en/) v18.12.1 (v19 recommended) - Install with [nvm](https://github.com/nvm-sh/nvm) - 🐘 At least [PostgreSQL](https://www.postgresql.org/) v12 -- 🍱 At least [Redis](https://redis.io/) v6 (v7 recommended) +- 🍱 At least [Redis](https://redis.io/) v6 (v7 recommended) or [Titan](https://github.com/distributedio/titan) ### 😗 Optional dependencies diff --git a/packages/backend/src/misc/skipped-instances.ts b/packages/backend/src/misc/skipped-instances.ts index 36367b2e56..a89ca2e3fb 100644 --- a/packages/backend/src/misc/skipped-instances.ts +++ b/packages/backend/src/misc/skipped-instances.ts @@ -33,7 +33,6 @@ export async function skippedInstances(hosts: Array): Array { qb .where('instance.isSuspended') - .orWhere('instance.lastCommunicatedAt < :deadTime', { deadTime }); })) .select('host') .getRawMany() diff --git a/packages/backend/src/server/api/endpoints.ts b/packages/backend/src/server/api/endpoints.ts index d662d53aff..d56dd316e8 100644 --- a/packages/backend/src/server/api/endpoints.ts +++ b/packages/backend/src/server/api/endpoints.ts @@ -306,6 +306,7 @@ import * as ep___users_groups_transfer from './endpoints/users/groups/transfer.j import * as ep___users_groups_update from './endpoints/users/groups/update.js'; import * as ep___users_lists_create from './endpoints/users/lists/create.js'; import * as ep___users_lists_delete from './endpoints/users/lists/delete.js'; +import * as ep___users_lists_delete_all from './endpoints/users/lists/delete-all.js'; import * as ep___users_lists_list from './endpoints/users/lists/list.js'; import * as ep___users_lists_pull from './endpoints/users/lists/pull.js'; import * as ep___users_lists_push from './endpoints/users/lists/push.js'; @@ -631,6 +632,7 @@ const eps = [ ['users/groups/update', ep___users_groups_update], ['users/lists/create', ep___users_lists_create], ['users/lists/delete', ep___users_lists_delete], + ['users/lists/delete-all', ep___users_lists_delete_all], ['users/lists/list', ep___users_lists_list], ['users/lists/pull', ep___users_lists_pull], ['users/lists/push', ep___users_lists_push], diff --git a/packages/backend/src/server/api/endpoints/users/lists/delete-all.ts b/packages/backend/src/server/api/endpoints/users/lists/delete-all.ts new file mode 100644 index 0000000000..9bea5c1640 --- /dev/null +++ b/packages/backend/src/server/api/endpoints/users/lists/delete-all.ts @@ -0,0 +1,36 @@ +import { UserLists } from '@/models/index.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; + +export const meta = { + tags: ['lists'], + + requireCredential: true, + + kind: 'write:account', + + description: 'Delete all lists of users.', + + errors: { + noSuchList: { + message: 'No such list.', + code: 'NO_SUCH_LIST', + id: '78436795-db79-42f5-b1e2-55ea2cf19166', + }, + }, +} as const; + +export const paramDef = { + type: 'object', +} as const; + +// eslint-disable-next-line import/no-default-export +export default define(meta, paramDef, async (ps, user) => { + while (await UserLists.findOneBy({ userId: user.id }) != null) { + const userList = await UserLists.findOneBy({ userId: user.id }); + if (userList == null) { + throw new ApiError(meta.errors.noSuchList); + } + await UserLists.delete(userList.id); + } +}); diff --git a/packages/client/src/components/MkFolder.vue b/packages/client/src/components/MkFolder.vue index a8480bebb0..b2b309aa22 100644 --- a/packages/client/src/components/MkFolder.vue +++ b/packages/client/src/components/MkFolder.vue @@ -8,7 +8,8 @@ - diff --git a/packages/client/src/components/MkMediaList.vue b/packages/client/src/components/MkMediaList.vue index 17a039e720..b9eb679131 100644 --- a/packages/client/src/components/MkMediaList.vue +++ b/packages/client/src/components/MkMediaList.vue @@ -46,7 +46,7 @@ onMounted(() => { src: media.url, w: media.properties.width, h: media.properties.height, - alt: media.name, + alt: media.comment, }; if (media.properties.orientation != null && media.properties.orientation >= 5) { [item.w, item.h] = [item.h, item.w]; @@ -89,9 +89,38 @@ onMounted(() => { [itemData.w, itemData.h] = [itemData.h, itemData.w]; } itemData.msrc = file.thumbnailUrl; + itemData.alt = file.comment; itemData.thumbCropped = true; }); + lightbox.on('uiRegister', () => { + lightbox.pswp.ui.registerElement({ + name: 'altText', + className: 'pwsp__alt-text-container', + appendTo: 'wrapper', + onInit: (el, pwsp) => { + let textBox = document.createElement('p'); + textBox.className = 'pwsp__alt-text'; + el.appendChild(textBox); + + let preventProp = function(ev: Event): void { + ev.stopPropagation(); + }; + + // Allow scrolling/text selection + el.onwheel = preventProp; + el.onclick = preventProp; + el.onpointerdown = preventProp; + el.onpointercancel = preventProp; + el.onpointermove = preventProp; + + pwsp.on('change', () => { + textBox.textContent = pwsp.currSlide.data.alt?.trim(); + }); + }, + }); + }); + lightbox.init(); }); @@ -193,4 +222,35 @@ const previewable = (file: misskey.entities.DriveFile): boolean => { //z-index: v-bind(pswpZIndex); z-index: 2000000; } +.pwsp__alt-text-container { + display: flex; + flex-direction: row; + align-items: center; + + position: absolute; + bottom: 30px; + left: 50%; + transform: translateX(-50%); + + width: 75%; +} + +.pwsp__alt-text { + color: white; + margin: 0 auto; + text-align: center; + padding: 10px; + background: rgba(0, 0, 0, 0.5); + border-radius: 5px; + + max-height: 10vh; + overflow-x: clip; + overflow-y: auto; + overscroll-behavior: contain; +} + +.pwsp__alt-text:empty { + display: none; +} + diff --git a/packages/client/src/components/MkSigninDialog.vue b/packages/client/src/components/MkSigninDialog.vue index fd27244516..7e35e45c5a 100644 --- a/packages/client/src/components/MkSigninDialog.vue +++ b/packages/client/src/components/MkSigninDialog.vue @@ -1,8 +1,7 @@