From e7fe452f224cccd4999c037eddf097e809fc1ad7 Mon Sep 17 00:00:00 2001 From: yawhn Date: Wed, 26 Apr 2023 21:38:44 +0000 Subject: [PATCH 01/43] Fix: Inline Ads bug (#9922) This PR fixes this issue: https://codeberg.org/calckey/calckey/issues/9747 Co-authored-by: ThatOneCalculator Co-authored-by: yawhn Co-authored-by: Otto Richter Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9922 Co-authored-by: yawhn Co-committed-by: yawhn --- packages/client/src/components/MkDateSeparatedList.vue | 2 +- packages/client/src/pages/gallery/post.vue | 2 +- packages/client/src/pages/page.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/client/src/components/MkDateSeparatedList.vue b/packages/client/src/components/MkDateSeparatedList.vue index 29c7c518a..7ecc91808 100644 --- a/packages/client/src/components/MkDateSeparatedList.vue +++ b/packages/client/src/components/MkDateSeparatedList.vue @@ -95,7 +95,7 @@ export default defineComponent({ h(MkAd, { class: "a", // advertiseの意(ブロッカー対策) key: item.id + ":ad", - prefer: ["horizontal", "horizontal-big"], + prefer: ["inline", "inline-big"], }), el, ]; diff --git a/packages/client/src/pages/gallery/post.vue b/packages/client/src/pages/gallery/post.vue index 8eb104624..9a48a5e67 100644 --- a/packages/client/src/pages/gallery/post.vue +++ b/packages/client/src/pages/gallery/post.vue @@ -111,7 +111,7 @@ /> - + --> - + Date: Wed, 26 Apr 2023 15:10:33 -0700 Subject: [PATCH 02/43] chore: more rpine for server activity widget --- .../client/src/widgets/server-metric/cpu-mem.vue | 8 ++++---- packages/client/src/widgets/server-metric/net.vue | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/client/src/widgets/server-metric/cpu-mem.vue b/packages/client/src/widgets/server-metric/cpu-mem.vue index 76ef290f6..ec2101bd8 100644 --- a/packages/client/src/widgets/server-metric/cpu-mem.vue +++ b/packages/client/src/widgets/server-metric/cpu-mem.vue @@ -3,8 +3,8 @@ - - + + - - + + - + NET rx {{ bytes(inRecent) }} @@ -21,16 +21,16 @@ - + NET tx {{ bytes(outRecent) }} From bef4245753040ac7fa56ee7ac96fb5ce11374d8b Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 26 Apr 2023 15:50:28 -0700 Subject: [PATCH 03/43] chore: update examples --- .config/example.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.config/example.yml b/.config/example.yml index 8e881c187..4b4eea58a 100644 --- a/.config/example.yml +++ b/.config/example.yml @@ -113,14 +113,9 @@ id: 'aid' reservedUsernames: - root - admin + - administrator + - me - system - - test - - proxy - - relay - - mod - - moderator - - info - - information # Whether disable HSTS #disableHsts: true From 0bc72b798bc0c848fa0d621e8c79be62cd12a63f Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 26 Apr 2023 17:20:54 -0700 Subject: [PATCH 04/43] update patrons --- patrons.json | 1 + 1 file changed, 1 insertion(+) diff --git a/patrons.json b/patrons.json index 9e1e5e00b..aedb30ab3 100644 --- a/patrons.json +++ b/patrons.json @@ -23,6 +23,7 @@ "@cody@mk.codingneko.com", "@kate@blahaj.zone", "@emtk@mkkey.net", + "@jovikowi@calckey.social" "Interkosmos Link" ] } From 65f1f5116c5de4600eb503bdc18b4b58678baa17 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 26 Apr 2023 17:24:58 -0700 Subject: [PATCH 05/43] comma! --- patrons.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patrons.json b/patrons.json index aedb30ab3..06eb7f913 100644 --- a/patrons.json +++ b/patrons.json @@ -23,7 +23,7 @@ "@cody@mk.codingneko.com", "@kate@blahaj.zone", "@emtk@mkkey.net", - "@jovikowi@calckey.social" + "@jovikowi@calckey.social", "Interkosmos Link" ] } From f0e76b29f8d4933c15dd6097bf62cccfa4781978 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 26 Apr 2023 17:26:12 -0700 Subject: [PATCH 06/43] more patrons! --- patrons.json | 1 + 1 file changed, 1 insertion(+) diff --git a/patrons.json b/patrons.json index 06eb7f913..bdc09a4d2 100644 --- a/patrons.json +++ b/patrons.json @@ -24,6 +24,7 @@ "@kate@blahaj.zone", "@emtk@mkkey.net", "@jovikowi@calckey.social", + "@padraig@calckey.social", "Interkosmos Link" ] } From b81b932c5fd879efbb88f65a852f25dea3f6554f Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 26 Apr 2023 18:30:25 -0700 Subject: [PATCH 07/43] patrons --- patrons.json | 1 + 1 file changed, 1 insertion(+) diff --git a/patrons.json b/patrons.json index bdc09a4d2..979fa3d8d 100644 --- a/patrons.json +++ b/patrons.json @@ -25,6 +25,7 @@ "@emtk@mkkey.net", "@jovikowi@calckey.social", "@padraig@calckey.social", + "@pancakes@cats.city", "Interkosmos Link" ] } From 868489d5ac0085d595321abcdc90909758ad041a Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 26 Apr 2023 19:02:38 -0700 Subject: [PATCH 08/43] notes -> posts --- packages/client/src/pages/admin/overview.heatmap.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/pages/admin/overview.heatmap.vue b/packages/client/src/pages/admin/overview.heatmap.vue index 1a4984ba7..e926fdc53 100644 --- a/packages/client/src/pages/admin/overview.heatmap.vue +++ b/packages/client/src/pages/admin/overview.heatmap.vue @@ -1,7 +1,7 @@
- +
-
+
+ + +
+
+
+ +
+
+ +
+
+

{{ i18n.ts.notes }}

@@ -110,9 +149,14 @@ let user = $ref(null); let top = $ref(0); let left = $ref(0); + +let isLong = $ref(false); +let collapsed = $ref(!isLong); + onMounted(() => { if (typeof props.q === "object") { user = props.q; + isLong = (user.description.split("\n").length > 9 || user.description.length > 400); } else { const query = props.q.startsWith("@") ? Acct.parse(props.q.substr(1)) @@ -121,8 +165,10 @@ onMounted(() => { os.api("users/show", query).then((res) => { if (!props.showing) return; user = res; + isLong = (user.description.split("\n").length > 9 || user.description.length > 400); }); } + const rect = props.source.getBoundingClientRect(); const x = @@ -219,6 +265,88 @@ onMounted(() => { padding: 0 16px; font-size: 0.8em; color: var(--fg); + &.collapsed { + position: relative; + max-height: calc(9em + 50px); + mask: linear-gradient(black calc(100% - 64px), transparent); + -webkit-mask: linear-gradient( + black calc(100% - 64px), + transparent + ); + } + } + :deep(.fade) { + position: relative; + display: block; + width: 100%; + margin-top: -2.5em; + z-index: 2; + > span { + display: inline-block; + background: var(--panel); + padding: 0.4em 1em; + font-size: 0.8em; + border-radius: 999px; + box-shadow: 0 2px 6px rgb(0 0 0 / 20%); + } + &:hover { + > span { + background: var(--panelHighlight); + } + } + } + :deep(.showLess) { + width: 100%; + margin-top: 1em; + position: sticky; + bottom: var(--stickyBottom); + + > span { + display: inline-block; + background: var(--panel); + padding: 6px 10px; + font-size: 0.8em; + border-radius: 999px; + box-shadow: 0 0 7px 7px var(--bg); + } + } + + > .fields { + padding: 0 16px; + font-size: .8em; + margin-top: 1em; + + > .field { + display: flex; + padding: 0; + margin: 0; + align-items: center; + + &:not(:last-child) { + margin-bottom: 8px; + } + + :deep(span) { + white-space: nowrap !important; + } + + > .name { + width: 30%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + font-weight: bold; + text-align: center; + } + + > .value { + width: 70%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + margin: 0; + } + } } > .status { @@ -237,6 +365,9 @@ onMounted(() => { > span { font-size: 1em; color: var(--accent); + :global(span) { + white-space: nowrap; + } } } } From e5fcde758f29d6e7048e7c5b6f7d00df8de3f613 Mon Sep 17 00:00:00 2001 From: fruye Date: Thu, 27 Apr 2023 21:38:28 +0200 Subject: [PATCH 24/43] fix: Make statusModel `created_at` fields be ISO 8601 strings This makes the 'Reactions to this post' status (seen when viewing a status context) send the correct data type for `created_at` fields. https://docs.joinmastodon.org/entities/Account/#created_at https://docs.joinmastodon.org/entities/Status/#created_at --- packages/backend/src/server/api/mastodon/endpoints/status.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/mastodon/endpoints/status.ts b/packages/backend/src/server/api/mastodon/endpoints/status.ts index fcfbd6aaa..f7589569c 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/status.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/status.ts @@ -388,7 +388,7 @@ export function statusModel( emojis: MastodonEntity.Emoji[], content: string, ) { - const now = Math.floor(new Date().getTime() / 1000); + const now = new Date().toISOString(); return { id: "9atm5frjhb", uri: "https://http.cat/404", // "" From f8178a9535e2cea50a85a39c2bc5a8ea0a126214 Mon Sep 17 00:00:00 2001 From: fruye Date: Thu, 27 Apr 2023 22:31:23 +0200 Subject: [PATCH 25/43] fix: Get list titles from Form data when creating and updating lists This change will actually make it possible for Mastodon clients to create and rename lists, as they send the title in a Form data instead of a query string. https://docs.joinmastodon.org/methods/lists/#form-data-parameters --- .../backend/src/server/api/mastodon/endpoints/timeline.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/server/api/mastodon/endpoints/timeline.ts b/packages/backend/src/server/api/mastodon/endpoints/timeline.ts index ce3a4dc95..57e5d9bb0 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/timeline.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/timeline.ts @@ -211,7 +211,7 @@ export function apiTimelineMastodon(router: Router): void { const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const data = await client.createList((ctx.query as any).title); + const data = await client.createList((ctx.request.body as any).title); ctx.body = data.data; } catch (e: any) { console.error(e); @@ -227,7 +227,7 @@ export function apiTimelineMastodon(router: Router): void { const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const data = await client.updateList(ctx.params.id, ctx.query as any); + const data = await client.updateList(ctx.params.id, (ctx.request.body as any).title); ctx.body = data.data; } catch (e: any) { console.error(e); From 431a08d06e2ccdace1f6948c74c84e0f55ca3a1c Mon Sep 17 00:00:00 2001 From: Kainoa Kanter Date: Thu, 27 Apr 2023 16:25:13 -0700 Subject: [PATCH 26/43] Revert "Merge pull request '[feat] Replace Koa-FavICO with a smaller router' (#9853) from daikei/calckey:modularize-favico into develop" This reverts commit 4f6cae76434d927920ae8eac5fad6b72336f29ac, reversing changes made to 64a737d001ca9781ae8bb6995cad69219cba3831. --- packages/backend/package.json | 1 + packages/backend/src/server/web/index.ts | 12 ++++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/backend/package.json b/packages/backend/package.json index 888eb9740..157f216b2 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -75,6 +75,7 @@ "koa": "2.13.4", "koa-body": "^6.0.1", "koa-bodyparser": "4.3.0", + "koa-favicon": "2.1.0", "koa-json-body": "5.3.0", "koa-logger": "3.2.1", "koa-mount": "4.0.0", diff --git a/packages/backend/src/server/web/index.ts b/packages/backend/src/server/web/index.ts index 028170cd7..642a17d57 100644 --- a/packages/backend/src/server/web/index.ts +++ b/packages/backend/src/server/web/index.ts @@ -8,11 +8,13 @@ import { readFileSync } from "node:fs"; import Koa from "koa"; import Router from "@koa/router"; import send from "koa-send"; +import favicon from "koa-favicon"; import views from "koa-views"; import sharp from "sharp"; import { createBullBoard } from "@bull-board/api"; import { BullAdapter } from "@bull-board/api/bullAdapter.js"; import { KoaAdapter } from "@bull-board/koa"; + import { In, IsNull } from "typeorm"; import { fetchMeta } from "@/misc/fetch-meta.js"; import config from "@/config/index.js"; @@ -96,14 +98,8 @@ app.use( }), ); -// Favicon Router -app.use(async (ctx, next) => { - if (ctx.path != "/favicon.ico") return next(); - const meta = await fetchMeta(); - if (meta.iconUrl === "") - ctx.body = readFileSync(`${_dirname}/../../../assets/favicon.ico`); - else ctx.redirect(meta.iconUrl); -}); +// Serve favicon +app.use(favicon(`${_dirname}/../../../assets/favicon.ico`)); // Common request handler app.use(async (ctx, next) => { From 1865a9c204f219f48b02fb98d321c97cedf77074 Mon Sep 17 00:00:00 2001 From: Kainoa Kanter Date: Thu, 27 Apr 2023 16:32:37 -0700 Subject: [PATCH 27/43] Revert "[Fix] Properly replace koa-fix-trailing-slashes with inhouse script (#9870)" This reverts commit 2cdaad588c82508734d04c2169503782dfe8556a. --- packages/backend/package.json | 1 + packages/backend/src/server/index.ts | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/backend/package.json b/packages/backend/package.json index 157f216b2..7b92b8311 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -79,6 +79,7 @@ "koa-json-body": "5.3.0", "koa-logger": "3.2.1", "koa-mount": "4.0.0", + "koa-remove-trailing-slashes": "2.0.3", "koa-send": "5.0.1", "koa-slow": "2.1.0", "koa-views": "7.0.2", diff --git a/packages/backend/src/server/index.ts b/packages/backend/src/server/index.ts index cd1425d6a..8035dcdd7 100644 --- a/packages/backend/src/server/index.ts +++ b/packages/backend/src/server/index.ts @@ -10,6 +10,7 @@ import Router from "@koa/router"; import mount from "koa-mount"; import koaLogger from "koa-logger"; import * as slow from "koa-slow"; + import { IsNull } from "typeorm"; import config from "@/config/index.js"; import Logger from "@/services/logger.js"; @@ -29,6 +30,7 @@ import proxyServer from "./proxy/index.js"; import webServer from "./web/index.js"; import { initializeStreamingServer } from "./api/streaming.js"; import { koaBody } from "koa-body"; +import removeTrailingSlash from "koa-remove-trailing-slashes"; import { v4 as uuid } from "uuid"; export const serverLogger = new Logger("server", "gray", false); @@ -37,12 +39,7 @@ export const serverLogger = new Logger("server", "gray", false); const app = new Koa(); app.proxy = true; -// Replace trailing slashes -app.use(async (ctx, next) => { - if (ctx.request.path !== "/" && ctx.request.path.endsWith("/")) - return ctx.redirect(ctx.request.path.replace(/\/$/, "")); - else await next(); -}); +app.use(removeTrailingSlash()); if (!["production", "test"].includes(process.env.NODE_ENV || "")) { // Logger From e4d995406ca5a0cedafb9ed83e7d94630651bb20 Mon Sep 17 00:00:00 2001 From: Kainoa Kanter Date: Thu, 27 Apr 2023 16:32:44 -0700 Subject: [PATCH 28/43] revert faulty commits --- pnpm-lock.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ed794b2af..cf4c29c06 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -227,6 +227,9 @@ importers: koa-bodyparser: specifier: 4.3.0 version: 4.3.0 + koa-favicon: + specifier: 2.1.0 + version: 2.1.0 koa-json-body: specifier: 5.3.0 version: 5.3.0 @@ -236,6 +239,9 @@ importers: koa-mount: specifier: 4.0.0 version: 4.0.0 + koa-remove-trailing-slashes: + specifier: 2.0.3 + version: 2.0.3 koa-send: specifier: 5.0.1 version: 5.0.1 @@ -9835,6 +9841,12 @@ packages: koa-compose: 4.1.0 dev: false + /koa-favicon@2.1.0: + resolution: {integrity: sha512-LvukcooYjxKtnZq0RXdBup+JDhaHwLgnLlDHB/xvjwQEjbc4rbp/0WkmOzpOvaHujc+fIwPear0dpKX1V+dHVg==} + dependencies: + mz: 2.7.0 + dev: false + /koa-json-body@5.3.0: resolution: {integrity: sha512-M2P3zLOs2XiYCpJLGSTXOKij4u5vJ8pbAMXXarXQnwsx4DwDav9qn081tYI2RdZ79B159Pdk4bRfvwl/sazL8A==} engines: {node: '>= 4.0.0'} @@ -9862,6 +9874,10 @@ packages: - supports-color dev: false + /koa-remove-trailing-slashes@2.0.3: + resolution: {integrity: sha512-NFFF9Sl1wxFo5h0I3OzrHDINdFPaqG+Hx19590F7PNOcmm7yYeFW71p4XicVuSovbcx75GWGb3fi6N6kI6E/3g==} + dev: false + /koa-router@10.1.1: resolution: {integrity: sha512-z/OzxVjf5NyuNO3t9nJpx7e1oR3FSBAauiwXtMQu4ppcnuNZzTaQ4p21P8A6r2Es8uJJM339oc4oVW+qX7SqnQ==} engines: {node: '>= 8.0.0'} From a18e1cccc6c05a7f413391280a43c5f1e9147cb2 Mon Sep 17 00:00:00 2001 From: fruye Date: Fri, 28 Apr 2023 19:49:34 +0200 Subject: [PATCH 29/43] fix: Declare /api/v1/accounts/relationships before /api/v1/accounts/:id Previously the 'relationships' part was considered to be an account id and was handled by completely different API endpoint. --- .../server/api/mastodon/endpoints/account.ts | 76 +++++++++---------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/packages/backend/src/server/api/mastodon/endpoints/account.ts b/packages/backend/src/server/api/mastodon/endpoints/account.ts index 70bdb74f3..749058193 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/account.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/account.ts @@ -91,6 +91,44 @@ export function apiAccountMastodon(router: Router): void { ctx.body = e.response.data; } }); + router.get("/v1/accounts/relationships", async (ctx) => { + const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; + const accessTokens = ctx.headers.authorization; + const client = getClient(BASE_URL, accessTokens); + let users; + try { + // TODO: this should be body + let ids = ctx.request.query ? ctx.request.query["id[]"] : null; + if (typeof ids === "string") { + ids = [ids]; + } + users = ids; + relationshipModel.id = ids?.toString() || "1"; + if (!ids) { + ctx.body = [relationshipModel]; + return; + } + + let reqIds = []; + for (let i = 0; i < ids.length; i++) { + reqIds.push(convertId(ids[i], IdType.CalckeyId)); + } + + const data = await client.getRelationships(reqIds); + let resp = data.data; + for (let acctIdx = 0; acctIdx < resp.length; acctIdx++) { + resp[acctIdx].id = convertId(resp[acctIdx].id, IdType.MastodonId); + } + ctx.body = resp; + } catch (e: any) { + console.error(e); + let data = e.response.data; + data.users = users; + console.error(data); + ctx.status = 401; + ctx.body = data; + } + }); router.get<{ Params: { id: string } }>("/v1/accounts/:id", async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; @@ -340,44 +378,6 @@ export function apiAccountMastodon(router: Router): void { } }, ); - router.get("/v1/accounts/relationships", async (ctx) => { - const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; - const accessTokens = ctx.headers.authorization; - const client = getClient(BASE_URL, accessTokens); - let users; - try { - // TODO: this should be body - let ids = ctx.request.query ? ctx.request.query["id[]"] : null; - if (typeof ids === "string") { - ids = [ids]; - } - users = ids; - relationshipModel.id = ids?.toString() || "1"; - if (!ids) { - ctx.body = [relationshipModel]; - return; - } - - let reqIds = []; - for (let i = 0; i < ids.length; i++) { - reqIds.push(convertId(ids[i], IdType.CalckeyId)); - } - - const data = await client.getRelationships(reqIds); - let resp = data.data; - for (let acctIdx = 0; acctIdx < resp.length; acctIdx++) { - resp[acctIdx].id = convertId(resp[acctIdx].id, IdType.MastodonId); - } - ctx.body = resp; - } catch (e: any) { - console.error(e); - let data = e.response.data; - data.users = users; - console.error(data); - ctx.status = 401; - ctx.body = data; - } - }); router.get("/v1/bookmarks", async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; From 1de71cd4406d944564a1293bd5c4f4c8cf736bea Mon Sep 17 00:00:00 2001 From: Essem Date: Fri, 28 Apr 2023 13:19:57 -0500 Subject: [PATCH 30/43] Fix dot menu in welcome page --- packages/client/src/pages/welcome.entrance.a.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/client/src/pages/welcome.entrance.a.vue b/packages/client/src/pages/welcome.entrance.a.vue index 286ecdda1..3866b088b 100644 --- a/packages/client/src/pages/welcome.entrance.a.vue +++ b/packages/client/src/pages/welcome.entrance.a.vue @@ -308,6 +308,7 @@ function showMenu(ev) { height: 32px; border-radius: 8px; font-size: 18px; + z-index: 2; } > .fg { From cff9276f2acdf2e5a636326e722545a08cf193d6 Mon Sep 17 00:00:00 2001 From: Gear Date: Fri, 28 Apr 2023 16:01:09 -0400 Subject: [PATCH 31/43] Add documentation for various MFM functions --- locales/en-US.yml | 8 +++ packages/client/src/pages/mfm-cheat-sheet.vue | 54 ++++++++++++++++++- 2 files changed, 61 insertions(+), 1 deletion(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index a11a404d6..2feb2cd94 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1237,6 +1237,14 @@ _mfm: sparkleDescription: "Gives content a sparkling particle effect." rotate: "Rotate" rotateDescription: "Turns content by a specified angle." + position: "Position" + positionDescription: "Move content by a specified amount." + scale: "Scale" + scaleDescription: "Scale content by a specified amount." + foreground: "Foreground color" + foregroundDescription: "Change the foreground color of text." + background: "Background color" + backgroundDescription: "Change the background color of text." plain: "Plain" plainDescription: "Deactivates the effects of all MFM contained within this MFM\ \ effect." diff --git a/packages/client/src/pages/mfm-cheat-sheet.vue b/packages/client/src/pages/mfm-cheat-sheet.vue index 1f3f0bea2..1946d17ce 100644 --- a/packages/client/src/pages/mfm-cheat-sheet.vue +++ b/packages/client/src/pages/mfm-cheat-sheet.vue @@ -341,6 +341,54 @@
+
+
{{ i18n.ts._mfm.position }}
+
+

{{ i18n.ts._mfm.positionDescription }}

+
+ + MFM +
+
+
+
+
{{ i18n.ts._mfm.scale }}
+
+

{{ i18n.ts._mfm.scaleDescription }}

+
+ + MFM +
+
+
+
+
{{ i18n.ts._mfm.foreground }}
+
+

{{ i18n.ts._mfm.foregroundDescription }}

+
+ + MFM +
+
+
+
+
{{ i18n.ts._mfm.background }}
+
+

{{ i18n.ts._mfm.backgroundDescription }}

+
+ + MFM +
+
+
{{ i18n.ts._mfm.plain }}
@@ -402,7 +450,11 @@ let preview_x4 = $ref("$[x4 🍮]"); let preview_blur = $ref(`$[blur ${i18n.ts._mfm.dummy}]`); let preview_rainbow = $ref("$[rainbow 🍮] $[rainbow.speed=5s 🍮]"); let preview_sparkle = $ref("$[sparkle 🍮]"); -let preview_rotate = $ref("$[rotate 🍮]"); +let preview_rotate = $ref("$[rotate 🍮]\n$[rotate.deg=45 🍮]\n$[rotate.x,deg=45 Hello, world!]"); +let preview_position = $ref("$[position.y=-1 Positioning]\n$[position.x=-1 Positioning]"); +let preview_scale = $ref("$[scale.x=1.3 Scaling]\n$[scale.x=1.3,y=2 Scaling]\n$[scale.y=0.3 Tiny scaling]"); +let preview_fg = $ref("$[fg.color=ff0000 Text color]"); +let preview_bg = $ref("$[bg.color=ff0000 Background color]"); let preview_plain = $ref( "**bold** @mention #hashtag `code` $[x2 🍮]" ); From 5ad9c06d212b2a89d73aeabc3a7706e7968271ce Mon Sep 17 00:00:00 2001 From: jolupa Date: Fri, 28 Apr 2023 18:34:42 +0000 Subject: [PATCH 32/43] chore: Translated using Weblate (Catalan) Currently translated at 35.0% (606 of 1727 strings) Translation: Calckey/locales Translate-URL: https://hosted.weblate.org/projects/calckey/locales/ca/ --- locales/ca-ES.yml | 290 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 248 insertions(+), 42 deletions(-) diff --git a/locales/ca-ES.yml b/locales/ca-ES.yml index 3de877dbe..24e4b6d7d 100644 --- a/locales/ca-ES.yml +++ b/locales/ca-ES.yml @@ -1,7 +1,7 @@ _lang_: "Català" headlineMisskey: "Una xarxa social de codi obert, descentralitzada i gratuita per\ \ sempre \U0001F680" -introMisskey: "Benvinguts! Calckey es una plataforma social de codi obert, descentralitzada\ +introMisskey: "Benvinguts! Calckey es una plataforma social de codi obert, descentralitzada\ \ i gratuita per sempre! \U0001F680" monthAndDay: "{day}/{month}" search: "Cercar" @@ -15,43 +15,43 @@ gotIt: "Ho he entès!" cancel: "Cancel·lar" enterUsername: "Introdueix el teu nom d'usuari" renotedBy: "Resignat per {user}" -noNotes: "Cap nota" +noNotes: "Cap publicació" noNotifications: "Cap notificació" -instance: "Instàncies" +instance: "Instància" settings: "Preferències" basicSettings: "Configuració bàsica" -otherSettings: "Configuració avançada" -openInWindow: "Obrir en una nova finestra" +otherSettings: "Altres opcions" +openInWindow: "Obrir en una finestra nova" profile: "Perfil" timeline: "Línia de temps" noAccountDescription: "Aquest usuari encara no ha escrit la seva biografia." login: "Iniciar sessió" -loggingIn: "Identificant-se" -logout: "Tancar la sessió" +loggingIn: "Iniciant sessió" +logout: "Tancar sessió" signup: "Registrar-se" uploading: "Pujant..." save: "Desar" users: "Usuaris" addUser: "Afegir un usuari" -favorite: "Afegir a preferits" +favorite: "Afegir a favorits" favorites: "Favorits" -unfavorite: "Eliminar dels preferits" -favorited: "Afegit als preferits." -alreadyFavorited: "Ja s'ha afegit als preferits." -cantFavorite: "No s'ha pogut afegir als preferits." +unfavorite: "Eliminar de favorits" +favorited: "Afegit a favorits." +alreadyFavorited: "Ja s'ha afegit a favorits." +cantFavorite: "No s'ha pogut afegir a favorits." pin: "Fixar al perfil" -unpin: "Para de fixar del perfil" -copyContent: "Copiar el contingut" -copyLink: "Copiar l'enllaç" -delete: "Eliminar" -deleteAndEdit: "Esborrar i editar" -deleteAndEditConfirm: "Estàs segur que vols suprimir aquesta nota i editar-la? Perdràs\ - \ totes les reaccions, notes i respostes." -addToList: "Afegir a una llista" +unpin: "Deixar de fixar al perfil" +copyContent: "Còpia el contingut" +copyLink: "Còpia l'enllaç" +delete: "Esborra" +deleteAndEdit: "Esborrar i edita" +deleteAndEditConfirm: "Estàs segur que vols esborrar aquesta nota i editar-la? Perdràs\ + \ totes les reaccions, resignats i respostes." +addToList: "Afegir a la llista" sendMessage: "Enviar un missatge" -copyUsername: "Copiar nom d'usuari" -searchUser: "Cercar usuaris" -reply: "Respondre" +copyUsername: "Còpia nom d'usuari" +searchUser: "Cercar un usuari" +reply: "Respon" loadMore: "Carregar més" showMore: "Veure més" youGotNewFollower: "t'ha seguit" @@ -60,21 +60,21 @@ followRequestAccepted: "Sol·licitud de seguiment acceptada" mention: "Menció" mentions: "Mencions" directNotes: "Missatges directes" -importAndExport: "Importar / Exportar" +importAndExport: "Importar / Exportar Dades" import: "Importar" export: "Exportar" files: "Fitxers" -download: "Baixar" -driveFileDeleteConfirm: "Estàs segur que vols suprimir el fitxer \"{name}\"? Les notes\ - \ associades a aquest fitxer adjunt també se suprimiran." +download: "Descarregar" +driveFileDeleteConfirm: "Estàs segur que vols suprimir el fitxer \"{name}\"? Les publicacions\ + \ associades a aquest fitxer adjunt també es suprimiran." unfollowConfirm: "Estàs segur que vols deixar de seguir {name}?" exportRequested: "Has sol·licitat una exportació. Això pot trigar una estona. S'afegirà\ - \ a la teva unitat un cop completat." + \ al teu Disc un cop completada." importRequested: "Has sol·licitat una importació. Això pot trigar una estona." lists: "Llistes" noLists: "No tens cap llista" -note: "Post" -notes: "Posts" +note: "Publicació" +notes: "Publicacions" following: "Seguint" followers: "Seguidors" followsYou: "Et segueix" @@ -83,7 +83,7 @@ manageLists: "Gestionar les llistes" error: "Error" somethingHappened: "S'ha produït un error" retry: "Torna-ho a intentar" -pageLoadError: "S'ha produït un error en carregar la pàgina" +pageLoadError: "Alguna cosa a sortit malament al carregar la pàgina." pageLoadErrorDescription: "Això normalment es deu a errors de xarxa o a la memòria\ \ cau del navegador. Prova d'esborrar la memòria cau i torna-ho a provar després\ \ d'esperar una estona." @@ -100,13 +100,13 @@ followRequests: "Sol·licituds de seguiment" unfollow: "Deixar de seguir" followRequestPending: "Sol·licituds de seguiment pendents" enterEmoji: "Introduir un emoji" -renote: "Renotar" -unrenote: "Anul·lar renota" -renoted: "Renotat." -cantRenote: "Aquesta publicació no pot ser renotada." -cantReRenote: "Impossible renotar una renota." +renote: "Impulsà" +unrenote: "Anul·lar impuls" +renoted: "Impulsat." +cantRenote: "Aquesta publicació no pot ser impulsada." +cantReRenote: "No es pot impulsar un impuls." quote: "Citar" -pinnedNote: "Nota fixada" +pinnedNote: "Publicació fixada" pinned: "Fixar al perfil" you: "Tu" clickToShow: "Fes clic per mostrar" @@ -116,7 +116,7 @@ reaction: "Reaccions" reactionSetting: "Reaccions a mostrar al selector de reaccions" reactionSettingDescription2: "Arrossega per reordenar, fes clic per suprimir, prem\ \ \"+\" per afegir." -rememberNoteVisibility: "Recorda la configuració de visibilitat de les notes" +rememberNoteVisibility: "Recorda la configuració de visibilitat de les publicacions" attachCancel: "Eliminar el fitxer adjunt" markAsSensitive: "Marcar com a NSFW" unmarkAsSensitive: "Deixar de marcar com a sensible" @@ -130,7 +130,7 @@ unsuspend: "Deixa de suspendre" instances: "Instàncies" remove: "Eliminar" nsfw: "NSFW" -pinnedNotes: "Nota fixada" +pinnedNotes: "Publicació fixada" userList: "Llistes" smtpUser: "Nom d'usuari" smtpPass: "Contrasenya" @@ -147,7 +147,7 @@ _mfm: _theme: keys: mention: "Menció" - renote: "Renotar" + renote: "Impulsar" _sfx: note: "Posts" notification: "Notificacions" @@ -191,12 +191,12 @@ _notification: _types: follow: "Seguint" mention: "Menció" - renote: "Renotar" + renote: "Impulsos" quote: "Citar" reaction: "Reaccions" _actions: reply: "Respondre" - renote: "Renotar" + renote: "Impulsos" _deck: _columns: notifications: "Notificacions" @@ -469,3 +469,209 @@ enableLocalTimeline: Activa la línea de temps local enableRecommendedTimeline: Activa la línea de temps de recomanats pinnedClipId: ID del clip que vols fixar hcaptcha: hCaptcha +manageAntennas: Gestiona les Antenes +name: Nom +notesAndReplies: Articles i respostes +silence: Posa en silenci +withFiles: Amb fitxers +popularUsers: Usuaris populars +exploreUsersCount: Hi han {count} usuaris +exploreFediverse: Explora el Fesiverse +popularTags: Etiquetes populars +about: Sobre +recentlyUpdatedUsers: Usuaris actius fa poc +recentlyRegisteredUsers: Usuaris registrats fa poc +recentlyDiscoveredUsers: Nous suaris descoberts +administrator: Administrador +token: Token +registerSecurityKey: Registra una clau de seguretat +securityKeyName: Nom clau +lastUsed: Feta servir per última vegada +unregister: Anul·lar el registre +passwordLessLogin: Identificació sense contrasenya +share: Comparteix +notFound: No s'ha trobat +newPasswordIs: La nova contrasenya és "{password}" +notFoundDescription: No es pot trobar cap pàgina que correspongui a aquesta adreça + URL. +uploadFolder: Carpeta per defecte per pujar arxius +cacheClear: Netejar la memòria cau +markAsReadAllNotifications: Marca totes les notificacions com llegides +markAsReadAllUnreadNotes: Marca totes les publicacions com a llegides +markAsReadAllTalkMessages: Marca tots els missatges com llegits +help: Ajuda +inputMessageHere: Escriu aquí el missatge +close: Tancar +group: Grup +groups: Grups +createGroup: Crea un grup +ownedGroups: Grups que et pertanyen +joinedGroups: Grups als que t'has unit +groupName: Nom del grup +members: Membres +transfer: Transferir +messagingWithUser: Conversa privada +title: Títol +text: Text +enable: Activar +next: Següent +retype: Torna a entrar +noteOf: Publicat per {user} +inviteToGroup: Invitar a un grup +quoteAttached: Cita +quoteQuestion: Adjuntar com a cita? +noMessagesYet: Encara no hi han missatges +signinRequired: Si us plau registrat o inicia sessió per continuar +invitations: Invitacions +invitationCode: Codi d'invitació +checking: Comprovant... +usernameInvalidFormat: Pots fer servir lletres en majúscules o minúscules, nombres + i guions baixos. +tooShort: Massa curt +tooLong: Massa llarg +weakPassword: Contrasenya amb seguretat feble +strongPassword: Contrasenya amb seguretat forta +passwordMatched: Coincidències +signinWith: Inicieu sessió com {x} +signinFailed: No es pot iniciar sessió. El nom d'usuari o la contrasenya són incorrectes. +or: O +language: Idioma +uiLanguage: Idioma de la interfície d'usuari +groupInvited: T'han invitat a un grup +aboutX: Sobre {x} +youHaveNoGroups: No tens grups +disableDrawer: No facis servir els menús amb estil de calaix +noHistory: No ha historial disponible +signinHistory: Historial d'inicis de sessió +disableAnimatedMfm: Desactiva les animacions amb MFM +doing: Processant... +category: Categoría +existingAccount: El compte ja existeix +regenerate: Regenerar +docSource: Font d'aquest document +createAccount: Crear compte +fontSize: Mida del text +noFollowRequests: No tens cap sol·licitud de seguiment per aprovar +openImageInNewTab: Obre les imatges en una pestanya nova +dashboard: Panell +local: Local +remote: Remot +total: Total +weekOverWeekChanges: Canvis d'ençà la passada setmana +dayOverDayChanges: Canvis d'ençà ahir +appearance: Aparença +clientSettings: Configuració del client +accountSettings: Configuració del compte +promotion: Promogut +promote: Promoure +numberOfDays: Nombre de dies +objectStorageBaseUrl: Adreça URL base +hideThisNote: Amaga aquest article +showFeaturedNotesInTimeline: Mostra els articles destacats a la línea de temps +objectStorage: Emmagatzematge d'objectes +useObjectStorage: Fes servir l'emmagatzema d'objectes +expandTweet: Amplia el tuit +themeEditor: Editor de temes +description: Descripció +leaveConfirm: Hi han canvis que no s'han desat. Els vols descartar? +manage: Administració +plugins: Afegits +preferencesBackups: Preferències de còpies de seguretat +undeck: Treure el Deck +useBlurEffectForModal: Fes servir efectes de difuminació en les finestres modals +useFullReactionPicker: Fes servir el selector de reaccions a tamany complert +deck: Deck +width: Amplada +generateAccessToken: Genera un token d'accés +medium: Mitja +small: Petit +permission: Permisos +enableAll: Activa tots +tokenRequested: Garantir accés al compte +pluginTokenRequestedDescription: Aquest afegit podrà fer servir els permisos configurats + aquí. +emailServer: Servidor de correu electrònic +notificationType: Tipus de notificació +edit: Editar +emailAddress: Adreça de Correu electrònic +smtpConfig: Configuració del servidor SMTP +smtpHost: Host +enableEmail: Activa la distribució de correu electrònic +smtpPort: Port +emailConfigInfo: Fet servir per confirmar les adreçats de correu electrònic al registrar-se + o si s'oblida la contrasenya +email: Correu electrònic +smtpSecure: Fes servir SSL/TLS implícit per connectar-se per SMTP +emptyToDisableSmtpAuth: Deixa el nom d'usuari i la contrasenya sense emplenar per + desactivar la verificació SMTP +smtpSecureInfo: Desactiva això quant facis servir STARTTLS +testEmail: Envia un correu electrònic de verificació +wordMute: Silenciar paraules +regexpError: Error a la Expressió Regular +regexpErrorDescription: 'Hi ha un error a la expressió regular a la línea {line} de + la teva {tab} de paraules silenciades:' +userSaysSomething: '{name} va dir alguna cosa' +instanceMute: Silenciar instàncies +logs: Registres +copy: Copiar +delayed: Retardat +metrics: Mètriques +overview: Vista general +database: Base de dades +regenerateLoginToken: Regenera el token d'inici de sessió +reduceUiAnimation: Redueix les animacions de la UI +messagingWithGroup: Conversa en grup +invites: Invitacions +unavailable: No disponible +newMessageExists: Tens nous missatges +onlyOneFileCanBeAttached: Només pots adjuntar un fitxer per missatge +normalPassword: Contrasenya amb seguretat mitjana +passwordNotMatched: No hi han coincidències +useOsNativeEmojis: Fes servir els emojis per defecte del Sistema Operatiu +joinOrCreateGroup: Fes que et convidin a un grup o crea el teu propi. +objectStorageBaseUrlDesc: "Es l'adreça URL que serveix com a referència. Específica\ + \ la adreça URL del CDN o Proxy si fas servir.\nPer fer servir S3 'https://.s3.amazonaws.com'\ + \ i per GCS o serveis semblants 'https://storage.googleapis.com/', etc." +height: Alçada +large: Gran +notificationSetting: Preferències de notificacions +makeActive: Activar +notificationSettingDesc: Tria el tipus de notificació que es veure. +notifyAntenna: Notificar noves articles +withFileAntenna: Només articles amb fitxers +enableServiceworker: Activa les notificacions push per al teu navegador +antennaUsersDescription: Escriu un nom d'usuari per línea +antennaInstancesDescription: Escriu la adreça d'una instància per línea +tags: Etiquetes +antennaSource: Font de la antena +antennaKeywords: Paraules claus a escolta +antennaExcludeKeywords: Paraules clau a excluir +antennaKeywordsDescription: Separades amb espais per fer una condició AND i amb una + línea nova per fer una condició OR. +caseSensitive: Sensible a majúscules i minúscules +withReplies: Inclou respostes +connectedTo: Aquest(s) compte(s) estan connectats +silenceConfirm: Segur que vols posa en silenci aquest usuari? +unsilence: Desfés posar en silenci +unsilenceConfirm: Segur que vols treure el silenci a aquest usuari? +aboutMisskey: Sobre Calckey +twoStepAuthentication: Autentificació de dos factors +moderator: Moderador +moderation: Moderació +available: Disponible +tapSecurityKey: Escriu la teva clau de seguretat +nUsersMentioned: Esmentat per {n} usuari(s) +securityKey: Clau de seguretat +resetPassword: Restablir contrasenya +describeFile: Afegeix un subtítol +enterFileDescription: Entra un subtítol +author: Autor +disableAll: Desactiva tots +userSaysSomethingReason: '{name} va dir {reason}' +display: Visualització +channel: Canals +create: Crear +useGlobalSetting: Fes servir els ajustos globals +useGlobalSettingDesc: Si s'activa, es faran servir els ajustos de notificacions del + teu compte. Si es desactiva , es poden fer configuracions individuals. +other: Altres From e1bda44710c3100ceb67007688ee1b8bfa8f7598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D0=B1=D0=B5=D1=80=20=D0=BE=D0=B3=D1=83=D1=80?= =?UTF-8?q?=D1=87=D0=B8=D0=BA?= Date: Thu, 27 Apr 2023 04:11:37 +0000 Subject: [PATCH 33/43] chore: Translated using Weblate (Russian) Currently translated at 100.0% (1727 of 1727 strings) Translation: Calckey/locales Translate-URL: https://hosted.weblate.org/projects/calckey/locales/ru/ --- locales/ru-RU.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/ru-RU.yml b/locales/ru-RU.yml index 24878686b..91d96fcc5 100644 --- a/locales/ru-RU.yml +++ b/locales/ru-RU.yml @@ -986,7 +986,7 @@ _registry: createKey: "Новый ключ" _aboutMisskey: about: "Calckey это форк Misskey, сделанный ThatOneCalculator, разработка которого\ - \ начал с 2022." + \ началась с 2022." contributors: "Основные соавторы" allContributors: "Все соавторы" source: "Исходный код" From 2307fa11be89805fca4715d014c29f28775b1655 Mon Sep 17 00:00:00 2001 From: Kenny Hui Date: Wed, 26 Apr 2023 09:44:37 +0000 Subject: [PATCH 34/43] chore: Translated using Weblate (Chinese (Traditional)) Currently translated at 97.4% (1683 of 1727 strings) Translation: Calckey/locales Translate-URL: https://hosted.weblate.org/projects/calckey/locales/zh_Hant/ --- locales/zh-TW.yml | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml index 78bf4f34c..eb640b7dd 100644 --- a/locales/zh-TW.yml +++ b/locales/zh-TW.yml @@ -64,7 +64,7 @@ import: "匯入" export: "匯出" files: "檔案" download: "下載" -driveFileDeleteConfirm: "確定要刪除檔案「{name}」嗎?使用此附件的貼文也會跟著消失。\n" +driveFileDeleteConfirm: "確定要刪除檔案「{name}」嗎?使用此附件的貼文也會跟著消失。" unfollowConfirm: "確定要取消追隨{name}嗎?" exportRequested: "已請求匯出。這可能會花一點時間。結束後檔案將會被放到雲端裡。" importRequested: "已請求匯入。這可能會花一點時間" @@ -291,7 +291,7 @@ emptyDrive: "雲端硬碟為空" emptyFolder: "資料夾為空" unableToDelete: "無法刪除" inputNewFileName: "輸入檔案名稱" -inputNewDescription: "請輸入新標題 " +inputNewDescription: "請輸入新標題" inputNewFolderName: "輸入新資料夾的名稱" circularReferenceFolder: "目標文件夾是您要移動的文件夾的子文件夾。" hasChildFilesOrFolders: "此文件夾不是空的,無法刪除。" @@ -324,7 +324,7 @@ yearX: "{year}年" pages: "頁面" integration: "整合" connectService: "己連結" -disconnectService: "己斷開 " +disconnectService: "己斷開" enableLocalTimeline: "開啟本地時間軸" enableGlobalTimeline: "啟用公開時間軸" disablingTimelinesInfo: "即使您關閉了時間線功能,管理員和協調人仍可以繼續使用,以方便您。" @@ -336,7 +336,7 @@ driveCapacityPerRemoteAccount: "每個非本地用戶的雲端容量" inMb: "以Mbps為單位" iconUrl: "圖像URL" bannerUrl: "橫幅圖像URL" -backgroundImageUrl: "背景圖片的來源網址 " +backgroundImageUrl: "背景圖片的來源網址" basicInfo: "基本資訊" pinnedUsers: "置頂用戶" pinnedUsersDescription: "在「發現」頁面中使用換行標記想要置頂的使用者。" @@ -490,7 +490,7 @@ useObjectStorage: "使用Object Storage" objectStorageBaseUrl: "Base URL" objectStorageBaseUrlDesc: "引用時的URL。如果您使用的是CDN或反向代理,请指定其URL,例如S3:“https://.s3.amazonaws.com”,GCS:“https://storage.googleapis.com/”" objectStorageBucket: "儲存空間(Bucket)" -objectStorageBucketDesc: "請指定您正在使用的服務的存儲桶名稱。 " +objectStorageBucketDesc: "請指定您正在使用的服務的存儲桶名稱。" objectStoragePrefix: "前綴" objectStoragePrefixDesc: "它存儲在此前綴目錄下。" objectStorageEndpoint: "端點(Endpoint)" @@ -560,8 +560,8 @@ disablePlayer: "關閉播放器" expandTweet: "展開推文" themeEditor: "主題編輯器" description: "描述" -describeFile: "添加標題 " -enterFileDescription: "輸入標題 " +describeFile: "添加標題" +enterFileDescription: "輸入標題" author: "作者" leaveConfirm: "有未保存的更改。要放棄嗎?" manage: "管理" @@ -865,7 +865,7 @@ driveCapOverrideLabel: "更改這個使用者的雲端硬碟容量上限" driveCapOverrideCaption: "如果指定0以下的值,就會被取消。" requireAdminForView: "必須以管理者帳號登入才可以檢視。" isSystemAccount: "由系統自動建立與管理的帳號。" -typeToConfirm: "要執行這項操作,請輸入 {x} " +typeToConfirm: "要執行這項操作,請輸入 {x}" deleteAccount: "刪除帳號" document: "文件" numberOfPageCache: "快取頁面數" @@ -876,7 +876,7 @@ statusbar: "狀態列" pleaseSelect: "請選擇" reverse: "翻轉" colored: "彩色" -refreshInterval: "更新間隔" +refreshInterval: "更新間隔 " label: "標籤" type: "類型" speed: "速度" @@ -895,7 +895,7 @@ activeEmailValidationDescription: "積極地驗證用戶的電子郵件地址, navbar: "導覽列" shuffle: "隨機" account: "帳戶" -move: "移動 " +move: "移動" customKaTeXMacro: "自定義 KaTeX 宏" customKaTeXMacroDescription: "使用宏來輕鬆的輸入數學表達式吧!宏的用法與 LaTeX 中的命令定義相同。你可以使用 \\newcommand{\\\ name}{content} 或 \\newcommand{\\name}[number of arguments]{content} 來輸入數學表達式。舉個例子,\\\ @@ -933,11 +933,11 @@ _accountDelete: inProgress: "正在刪除" _ad: back: "返回" - reduceFrequencyOfThisAd: "降低此廣告的頻率 " + reduceFrequencyOfThisAd: "降低此廣告的頻率" _forgotPassword: enterEmail: "請輸入您的帳戶註冊的電子郵件地址。 密碼重置連結將被發送到該電子郵件地址。" - ifNoEmail: "如果您還沒有註冊您的電子郵件地址,請聯繫管理員。 " - contactAdmin: "此實例不支持電子郵件,請聯繫您的管理員重置您的密碼。 " + ifNoEmail: "如果您還沒有註冊您的電子郵件地址,請聯繫管理員。" + contactAdmin: "此實例不支持電子郵件,請聯繫您的管理員重置您的密碼。" _gallery: my: "我的貼文" liked: "喜歡的貼文" @@ -1000,7 +1000,7 @@ _mfm: url: "URL" urlDescription: "可以展示URL位址。" link: "鏈接" - linkDescription: "您可以將特定範圍的文章與 URL 相關聯。 " + linkDescription: "您可以將特定範圍的文章與 URL 相關聯。" bold: "粗體" boldDescription: "可以將文字顯示为粗體来強調。" small: "縮小" @@ -1805,3 +1805,6 @@ migration: 遷移 homeTimeline: 主頁時間軸 swipeOnDesktop: 允許在桌面上進行手機式滑動 logoImageUrl: 圖標網址 +addInstance: 增加一個實例 +noInstances: 沒有實例 +flagSpeakAsCat: 像貓一樣地說話 From 3cc7979aad2c03f9eb1712989338c828981cfbb6 Mon Sep 17 00:00:00 2001 From: Freeplay Date: Fri, 28 Apr 2023 18:18:09 -0400 Subject: [PATCH 35/43] Add show more button to notifications + make show more button into its own component --- packages/client/src/components/MkCwButton.vue | 36 ++++++++++ .../client/src/components/MkNotification.vue | 47 +++++++++---- .../src/components/MkShowMoreButton.vue | 68 +++++++++++++++++++ .../src/components/MkSubNoteContent.vue | 54 +-------------- .../client/src/components/MkUserPreview.vue | 16 +---- 5 files changed, 143 insertions(+), 78 deletions(-) create mode 100644 packages/client/src/components/MkShowMoreButton.vue diff --git a/packages/client/src/components/MkCwButton.vue b/packages/client/src/components/MkCwButton.vue index 35af48874..659cb1fbb 100644 --- a/packages/client/src/components/MkCwButton.vue +++ b/packages/client/src/components/MkCwButton.vue @@ -66,5 +66,41 @@ const toggle = () => { background: var(--cwFg) !important; color: var(--cwBg) !important; } + + &.fade { + display: block; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + > span { + display: inline-block; + background: var(--panel); + padding: 0.4em 1em; + font-size: 0.8em; + border-radius: 999px; + box-shadow: 0 2px 6px rgb(0 0 0 / 20%); + } + &:hover { + > span { + background: var(--panelHighlight); + } + } + } + &.showLess { + width: 100%; + margin-top: 1em; + position: sticky; + bottom: var(--stickyBottom); + + > span { + display: inline-block; + background: var(--panel); + padding: 6px 10px; + font-size: 0.8em; + border-radius: 999px; + box-shadow: 0 0 7px 7px var(--bg); + } + } } diff --git a/packages/client/src/components/MkNotification.vue b/packages/client/src/components/MkNotification.vue index c909873a5..2c7281dbe 100644 --- a/packages/client/src/components/MkNotification.vue +++ b/packages/client/src/components/MkNotification.vue @@ -89,7 +89,7 @@ />
-
+
{{ i18n.ts._notification.pollEnded @@ -112,11 +112,11 @@ v-if="notification.type === 'reaction'" class="text" :to="notePage(notification.note)" - :title="getNoteSummary(notification.note)" + :title="summary" > +
@@ -274,6 +275,7 @@ import * as misskey from "calckey-js"; import XReactionIcon from "@/components/MkReactionIcon.vue"; import MkFollowButton from "@/components/MkFollowButton.vue"; import XReactionTooltip from "@/components/MkReactionTooltip.vue"; +import XShowMoreButton from "./MkShowMoreButton.vue"; import { getNoteSummary } from "@/scripts/get-note-summary"; import { notePage } from "@/filters/note"; import { userPage } from "@/filters/user"; @@ -299,12 +301,19 @@ const props = withDefaults( const elRef = ref(null); const reactionRef = ref(null); +const summary = getNoteSummary(props.notification.note); + const showEmojiReactions = defaultStore.state.enableEmojiReactions || defaultStore.state.showEmojisInReactionNotifications; const defaultReaction = ["⭐", "👍", "❤️"].includes(instance.defaultReaction) ? instance.defaultReaction : "⭐"; +const isLong = (summary.split("\n").length > 3 || summary.length > 200); +const collapsed = $ref(isLong); + + + let readObserver: IntersectionObserver | undefined; let connection; @@ -486,6 +495,7 @@ useTooltip(reactionRef, (showing) => { } > .tail { + position: relative; flex: 1; min-width: 0; @@ -526,6 +536,17 @@ useTooltip(reactionRef, (showing) => { margin-left: 4px; } } + &.collapsed > .text { + display: block; + position: relative; + max-height: calc(4em + 50px); + overflow: hidden; + mask: linear-gradient(black calc(100% - 64px), transparent); + -webkit-mask: linear-gradient( + black calc(100% - 64px), + transparent + ); + } } } diff --git a/packages/client/src/components/MkShowMoreButton.vue b/packages/client/src/components/MkShowMoreButton.vue new file mode 100644 index 000000000..3516d6f43 --- /dev/null +++ b/packages/client/src/components/MkShowMoreButton.vue @@ -0,0 +1,68 @@ + + + diff --git a/packages/client/src/components/MkSubNoteContent.vue b/packages/client/src/components/MkSubNoteContent.vue index a345b23f5..a1f7cc1b9 100644 --- a/packages/client/src/components/MkSubNoteContent.vue +++ b/packages/client/src/components/MkSubNoteContent.vue @@ -97,20 +97,7 @@ - - + @@ -124,6 +111,7 @@ import XNoteSimple from "@/components/MkNoteSimple.vue"; import XMediaList from "@/components/MkMediaList.vue"; import XPoll from "@/components/MkPoll.vue"; import MkUrlPreview from "@/components/MkUrlPreview.vue"; +import XShowMoreButton from "./MkShowMoreButton.vue"; import XCwButton from "@/components/MkCwButton.vue"; import { extractUrlFromMfm } from "@/scripts/extract-url-from-mfm"; import { i18n } from "@/i18n"; @@ -146,6 +134,7 @@ const isLong = props.note.text != null && (props.note.text.split("\n").length > 9 || props.note.text.length > 500); const collapsed = $ref(props.note.cw == null && isLong); + const urls = props.note.text ? extractUrlFromMfm(mfm.parse(props.note.text)).slice(0, 5) : null; @@ -264,43 +253,6 @@ let showContent = $ref(false); top: 40px; } } - - :deep(.fade) { - display: block; - position: absolute; - bottom: 0; - left: 0; - width: 100%; - > span { - display: inline-block; - background: var(--panel); - padding: 0.4em 1em; - font-size: 0.8em; - border-radius: 999px; - box-shadow: 0 2px 6px rgb(0 0 0 / 20%); - } - &:hover { - > span { - background: var(--panelHighlight); - } - } - } - } - - :deep(.showLess) { - width: 100%; - margin-top: 1em; - position: sticky; - bottom: var(--stickyBottom); - - > span { - display: inline-block; - background: var(--panel); - padding: 6px 10px; - font-size: 0.8em; - border-radius: 999px; - box-shadow: 0 0 7px 7px var(--bg); - } } } } diff --git a/packages/client/src/components/MkUserPreview.vue b/packages/client/src/components/MkUserPreview.vue index 1e6db1442..ddfd39f14 100644 --- a/packages/client/src/components/MkUserPreview.vue +++ b/packages/client/src/components/MkUserPreview.vue @@ -55,20 +55,7 @@ :custom-emojis="user.emojis" /> - - +
Date: Sat, 29 Apr 2023 14:08:11 +0900 Subject: [PATCH 36/43] chore: update icons on post form --- packages/client/src/components/MkPostForm.vue | 2 +- packages/client/src/components/MkPostFormAttaches.vue | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/client/src/components/MkPostForm.vue b/packages/client/src/components/MkPostForm.vue index ff63b77d8..f16d1775a 100644 --- a/packages/client/src/components/MkPostForm.vue +++ b/packages/client/src/components/MkPostForm.vue @@ -55,7 +55,7 @@ :class="{ active: showPreview }" @click="showPreview = !showPreview" > - +