diff --git a/README.md b/README.md index 79bd8f86cb..6fd004e01d 100644 --- a/README.md +++ b/README.md @@ -82,8 +82,8 @@ If you have access to a server that supports one of the sources below, I recomme - 🍱 At least [Redis](https://redis.io/) v6 (v7 recommend) - Web Proxy (one of the following) - 🍀 Nginx (recommended) - - 🪶 Apache - 🦦 Caddy + - 🪶 Apache ### 😗 Optional dependencies @@ -107,7 +107,8 @@ git clone --depth 1 https://codeberg.org/calckey/calckey.git cd calckey/ ``` -By default, you're on the development branch. Run `git checkout beta` or `git checkout main` to switch to the Beta/Main branches. +> **Note** +> By default, you're on the main branch. Run `git checkout beta` or `git checkout develop` to switch to the Beta/Develop branches. ## 📩 Install dependencies @@ -128,11 +129,18 @@ npm i -g pm2 pm2 install pm2-logrotate ``` -[`pm2-logrotate`](https://github.com/keymetrics/pm2-logrotate/blob/master/README.md) ensures that log files don't infinitely gather size, as Calckey produces a lot of logs. +> **Note** +> [`pm2-logrotate`](https://github.com/keymetrics/pm2-logrotate/blob/master/README.md) ensures that log files don't infinitely gather size, as Calckey produces a lot of logs. ## 🐘 Create database -Assuming you set up PostgreSQL correctly, all you have to run is: +In PostgreSQL (`psql`), run the following command: + +```sql +CREATE DATABASE calckey WITH encoding = 'UTF8'; +``` + +or run the following from the command line: ```sh psql postgres -c "create database calckey with encoding = 'UTF8';" @@ -144,7 +152,8 @@ In Calckey's directory, fill out the `db` section of `.config/default.yml` with Follow sonic's [installation guide](https://github.com/valeriansaliou/sonic#installation) -If you use IPv4: in Sonic's directory, edit the `config.cfg` file to change `inet` to `"0.0.0.0:1491"`. +> **Note** +> If you use IPv4: in Sonic's directory, edit the `config.cfg` file to change `inet` to `"0.0.0.0:1491"`. In Calckey's directory, fill out the `sonic` section of `.config/default.yml` with the correct information. @@ -177,13 +186,6 @@ For migrating from Misskey v13, Misskey v12, and Foundkey, read [this document]( - Run `sudo ln -s ./calckey.nginx.conf ../sites-enabled/calckey.nginx.conf` - Run `sudo nginx -t` to validate that the config is valid, then restart the NGINX service. -### 🪶 Apache - -- Run `sudo cp ./calckey.apache.conf /etc/apache2/sites-available/ && cd /etc/apache2/sites-available/` -- Edit `calckey.apache.conf` to reflect your instance properly -- Run `sudo a2ensite calckey.apache` to enable the site -- Run `sudo service apache2 restart` to reload apache2 configuration - ### 🦦 Caddy - Add the following block to your `Caddyfile`, replacing `example.tld` with your own domain: @@ -194,6 +196,15 @@ example.tld { ``` - Reload your caddy configuration +### 🪶 Apache + +> **Warning** +> Apache has some known problems with Calckey. Only use it if you have to. + +- Run `sudo cp ./calckey.apache.conf /etc/apache2/sites-available/ && cd /etc/apache2/sites-available/` +- Edit `calckey.apache.conf` to reflect your instance properly +- Run `sudo a2ensite calckey.apache` to enable the site +- Run `sudo service apache2 restart` to reload apache2 configuration ## 🚀 Build and launch! ### 🐢 NodeJS + pm2 diff --git a/locales/ca-ES.yml b/locales/ca-ES.yml index cce91104a1..91cccb5eeb 100644 --- a/locales/ca-ES.yml +++ b/locales/ca-ES.yml @@ -1290,7 +1290,7 @@ loadRawImages: Carregar les imatges originals en comptes de mostrar les miniatur noteFavoritesCount: Nombre de notes afegides a favorits useSystemFont: Fes servir la font per defecte del sistema contact: Contacte -clips: Clips +clips: Retalls experimentalFeatures: Característiques experimentals developer: Desenvolupador makeExplorableDescription: Si desactives aquesta funció el teu compte no sortirà a @@ -1496,7 +1496,7 @@ gallery: Galeria popularPosts: Pàgines populars shareWithNote: Comparteix amb una publicació expiration: Data límit -memo: Memo +memo: Recordatori priority: Prioritat high: Alta middle: Mitjana @@ -1537,7 +1537,7 @@ incorrectPassword: Contrasenya incorrecta. clickToFinishEmailVerification: Feu clic a [{ok}] per completar la verificació del correu electrònic. overridedDeviceKind: Tipus de dispositiu -smartphone: Smartphone +smartphone: Telèfon intel·ligent tablet: Tauleta auto: Automàtic recentNHours: Últimes {n} hores @@ -1625,7 +1625,7 @@ customKaTeXMacroDescription: "Configura macros per escriure expressions matemàt objectStorageRegion: Regió objectStoragePrefix: Prefix objectStoragePrefixDesc: Els fitxers es guardaran dins de carpetes amb aquest prefix. -objectStorageEndpoint: Endpoint +objectStorageEndpoint: Extrem newNoteRecived: Hi han notes noves sounds: Sons listen: Escoltar @@ -1704,7 +1704,9 @@ oneWeek: Una setmana reflectMayTakeTime: Pot trigar una mica a reflectir-se. thereIsUnresolvedAbuseReportWarning: Hi ha informes sense resoldre. driveCapOverrideLabel: Canvieu la capacitat del disc per a aquest usuari -isSystemAccount: Un compte creat i operat automàticament pel sistema. +isSystemAccount: Aquest compte és creat i operat automàticament pel sistema. Si us + plau, no modereu, editeu, suprimiu o modifiqueu aquest compte de cap forma, o podria + trencar el vostre servidor. typeToConfirm: Introduïu {x} per confirmar deleteAccount: Suprimeix el compte document: Documentació @@ -1746,7 +1748,7 @@ reverse: Revés objectStorageBucket: Cubell objectStorageBucketDesc: Si us plau específica el nom del cubell que faràs servir al teu proveïdor. -clip: Clip +clip: Retall createNew: Crear una nova optional: Opcional jumpToSpecifiedDate: Vés a una data concreta @@ -2056,3 +2058,5 @@ newer: Més nou older: Més antic silencedWarning: S'està mostrant aquesta pàgina per què aquest usuari és d'un servidor que l'administrador a silenciat, així que pot ser spam. +jumpToPrevious: Vés a l'anterior +cw: Avís de contingut diff --git a/locales/de-DE.yml b/locales/de-DE.yml index ed5a7334b3..259eb8dc1f 100644 --- a/locales/de-DE.yml +++ b/locales/de-DE.yml @@ -1171,6 +1171,8 @@ _mfm: sparkleDescription: "Verleiht Inhalt einen glitzernden Partikeleffekt." rotate: "Drehen" rotateDescription: "Dreht den Inhalt um einen angegebenen Winkel." + fade: "Ein-/Ausblenden" + fadeDescription: "Blended Inhalt ein and aus." plain: "Schlicht" plainDescription: "Deaktiviert jegliche MFM-Syntax, die sich innerhalb dieses MFM-Effekts\ \ befindet." diff --git a/locales/en-US.yml b/locales/en-US.yml index 9d7b399cc3..601d99ed02 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -57,7 +57,7 @@ sendMessage: "Send a message" copyUsername: "Copy username" searchUser: "Search for a user" reply: "Reply" -jumpToReply: "Jump to Reply" +jumpToPrevious: "Jump to previous" loadMore: "Load more" showMore: "Show more" newer: "newer" @@ -69,6 +69,7 @@ followRequestAccepted: "Follow request accepted" mention: "Mention" mentions: "Mentions" directNotes: "Direct messages" +cw: "Content warning" importAndExport: "Import/Export Data" import: "Import" export: "Export" @@ -971,7 +972,7 @@ driveCapOverrideLabel: "Change the drive capacity for this user" driveCapOverrideCaption: "Reset the capacity to default by inputting a value of 0\ \ or lower." requireAdminForView: "You must log in with an administrator account to view this." -isSystemAccount: "An account created and automatically operated by the system." +isSystemAccount: "This account is created and automatically operated by the system. Please do not moderate, edit, delete, or otherwise tamper with this account, or it may break your server." typeToConfirm: "Please enter {x} to confirm" deleteAccount: "Delete account" document: "Documentation" @@ -1266,6 +1267,8 @@ _mfm: sparkleDescription: "Gives content a sparkling particle effect." rotate: "Rotate" rotateDescription: "Turns content by a specified angle." + fade: "Fade" + fadeDescription: "Fades content in and out." position: "Position" positionDescription: "Move content by a specified amount." scale: "Scale" diff --git a/locales/fr-FR.yml b/locales/fr-FR.yml index 33201d820a..e7416f5775 100644 --- a/locales/fr-FR.yml +++ b/locales/fr-FR.yml @@ -1077,6 +1077,8 @@ _mfm: sparkle: "Paillettes" sparkleDescription: "Ajoute un effet scintillant au contenu." rotate: "Pivoter" + fade: "Apparaître/Disparaître" + fadeDescription: "Fait apparaître et disparaître le contenu." plainDescription: Désactiver les effets de tous les MFM contenus dans cet effet MFM. rotateDescription: Pivoter le contenu d'un angle spécifique. diff --git a/locales/it-IT.yml b/locales/it-IT.yml index f526cac19e..6dc4b68b56 100644 --- a/locales/it-IT.yml +++ b/locales/it-IT.yml @@ -910,6 +910,8 @@ _mfm: fontDescription: "Puoi scegliere il tipo di carattere per il contenuto." rainbow: "Arcobaleno" rotate: "Ruota" + fade: "Dissolvenza" + fadeDescription: "Dissolvenza in entrata e in uscita del contenuto." _instanceTicker: none: "Nascondi" remote: "Mostra solo per gli/le utenti remotə" diff --git a/locales/nl-NL.yml b/locales/nl-NL.yml index da447aa6f8..6837f1e864 100644 --- a/locales/nl-NL.yml +++ b/locales/nl-NL.yml @@ -13,7 +13,7 @@ password: "Wachtwoord" forgotPassword: "Wachtwoord vergeten" fetchingAsApObject: "Ophalen vanuit de Fediverse" ok: "Ok" -gotIt: "Begrepen" +gotIt: "Begrepen!" cancel: "Annuleren" enterUsername: "Voer een gebruikersnaam in" renotedBy: "Hergedeeld door {user}" @@ -47,12 +47,12 @@ copyContent: "Kopiëren inhoud" copyLink: "Kopiëren link" delete: "Verwijderen" deleteAndEdit: "Verwijderen en bewerken" -deleteAndEditConfirm: "Weet je zeker dat je deze notitie wilt verwijderen en dan bewerken? - Je verliest alle reacties, herdelingen en antwoorden erop." +deleteAndEditConfirm: "Weet je zeker dat je deze post wilt verwijderen en dan bewerken? + Je verliest alle reacties, boosts en antwoorden erop." addToList: "Aan lijst toevoegen" sendMessage: "Verstuur bericht" -copyUsername: "Kopiëren gebruikersnaam " -searchUser: "Zoeken een gebruiker" +copyUsername: "Gebruikersnaam kopiëren" +searchUser: "Zoek een gebruiker" reply: "Antwoord" loadMore: "Laad meer" showMore: "Toon meer" @@ -68,7 +68,7 @@ export: "Export" files: "Bestanden" download: "Downloaden" driveFileDeleteConfirm: "Weet je zeker dat je het bestand \"{name}\" wilt verwijderen? - Notities met dit bestand als bijlage worden ook verwijderd." + Posts met dit bestand als bijlage worden ook verwijderd." unfollowConfirm: "Weet je zeker dat je {name} wilt ontvolgen?" exportRequested: "Je hebt een export aangevraagd. Dit kan een tijdje duren. Het wordt toegevoegd aan je Drive zodra het is voltooid." @@ -101,13 +101,13 @@ followRequests: "Volgverzoeken" unfollow: "Ontvolgen" followRequestPending: "Wachten op goedkeuring volgverzoek" enterEmoji: "Voer een emoji in" -renote: "Herdelen" +renote: "Boost" unrenote: "Stop herdelen" -renoted: "Herdeeld" -cantRenote: "Dit bericht kan niet worden herdeeld" -cantReRenote: "Een herdeling kan niet worden herdeeld" +renoted: "Boosted." +cantRenote: "Dit bericht kan niet worden geboost." +cantReRenote: "Een boost kan niet worden geboost." quote: "Quote" -pinnedNote: "Vastgemaakte notitie" +pinnedNote: "Vastgemaakte post" pinned: "Vastmaken aan profielpagina" you: "Jij" clickToShow: "Klik om te bekijken" @@ -116,7 +116,7 @@ add: "Toevoegen" reaction: "Reacties" reactionSettingDescription2: "Sleep om opnieuw te ordenen, Klik om te verwijderen, Druk op \"+\" om toe te voegen" -rememberNoteVisibility: "Vergeet niet de notitie zichtbaarheidsinstellingen" +rememberNoteVisibility: "Onthoud post zichtbaarheidsinstellingen" attachCancel: "Verwijder bijlage" markAsSensitive: "Markeren als NSFW" unmarkAsSensitive: "Geen NSFW" @@ -139,8 +139,8 @@ flagAsCat: "Markeer dit account als een kat." flagAsCatDescription: "Zet deze vlag aan als je wilt aangeven dat dit account een kat is." flagShowTimelineReplies: "Toon antwoorden op de tijdlijn" -flagShowTimelineRepliesDescription: "Als je dit vlag aanzet, toont de tijdlijn ook - antwoorden op andere en niet alleen jouw eigen notities." +flagShowTimelineRepliesDescription: "Als je deze vlag aanzet, toont de tijdlijn ook + antwoorden op andere en niet alleen jouw eigen post." autoAcceptFollowed: "Accepteer verzoeken om jezelf te volgen vanzelf als je de verzoeker al volgt" addAccount: "Account toevoegen" @@ -203,8 +203,8 @@ mutedUsers: "Gedempte gebruikers" blockedUsers: "Geblokkeerde gebruikers" noUsers: "Er zijn geen gebruikers." editProfile: "Bewerk Profiel" -noteDeleteConfirm: "Ben je zeker dat je dit bericht wil verwijderen?" -pinLimitExceeded: "Je kunt geen berichten meer vastprikken" +noteDeleteConfirm: "Ben je zeker dat je deze post wil verwijderen?" +pinLimitExceeded: "Je kunt geen posts meer vastprikken" intro: "Installatie van Calckey geëindigd! Maak nu een beheerder aan." done: "Klaar" processing: "Bezig met verwerken" @@ -499,3 +499,23 @@ manageGroups: Beheer groepen subscribePushNotification: Pushmeldingen inschakelen unsubscribePushNotification: Pushmeldingen uitschakelen pushNotificationAlreadySubscribed: Pushmeldingen zijn al ingeschakeld +antennaSource: Antenne bron +antennaKeywords: Trefwoorden om naar te luisteren +antennaExcludeKeywords: Trefwoorden om te negeren +driveCapacityPerRemoteAccount: Schijfruimte per externe gebruiker +backgroundImageUrl: Achtergrondafbeelding URL +basicInfo: Basis informatie +pinnedUsers: Vastgezette gebruikers +pinnedPages: Vastgezette Pagina's +driveCapacityPerLocalAccount: Schijfruimte per lokale gebruiker +iconUrl: Icoon URL +bannerUrl: Banner afbeelding URL +manageAntennas: Beheer Antennes +name: Naam +notifyAntenna: Meld nieuwe posts +withFileAntenna: Alleen posts met bestanden +enableServiceworker: Schakel pushmeldingen voor je browser in +renoteUnmute: Ontdemp boosts +jumpToPrevious: Spring naar vorige +caseSensitive: Hoofdlettergevoelig +cw: Inhoudswaarschuwing diff --git a/package.json b/package.json index 3b525b9211..236e6cc79f 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "name": "calckey", - "version": "14.0.0-dev14", + "version": "14.0.0-dev18", "codename": "aqua", "repository": { "type": "git", "url": "https://codeberg.org/calckey/calckey.git" }, - "packageManager": "pnpm@8.5.0", + "packageManager": "pnpm@8.5.1", "private": true, "scripts": { "rebuild": "pnpm run clean && pnpm -r run build && pnpm run gulp", diff --git a/packages/backend/package.json b/packages/backend/package.json index e38e531f34..96edb7f026 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -85,7 +85,7 @@ "koa-send": "5.0.1", "koa-slow": "2.1.0", "koa-views": "7.0.2", - "mfm-js": "0.23.2", + "mfm-js": "0.23.3", "mime-types": "2.1.35", "multer": "1.4.4-lts.1", "native-utils": "link:native-utils", diff --git a/packages/backend/src/misc/nyaize.ts b/packages/backend/src/misc/nyaize.ts index b85f1d918e..dd0c5bbdff 100644 --- a/packages/backend/src/misc/nyaize.ts +++ b/packages/backend/src/misc/nyaize.ts @@ -9,6 +9,9 @@ export function nyaize(text: string): string { .replace(/(?<=n)a/gi, (x) => (x === "A" ? "YA" : "ya")) .replace(/(?<=morn)ing/gi, (x) => (x === "ING" ? "YAN" : "yan")) .replace(/(?<=every)one/gi, (x) => (x === "ONE" ? "NYAN" : "nyan")) + .replace(/non(?=[bcdfghjklmnpqrstvwxyz])/gi, (x) => + x === "NON" ? "NYAN" : "nyan", + ) // ko-KR .replace(/[나-낳]/g, (match) => String.fromCharCode( diff --git a/packages/backend/src/server/api/endpoints/notes/renotes.ts b/packages/backend/src/server/api/endpoints/notes/renotes.ts index f313616be2..df801c7fc4 100644 --- a/packages/backend/src/server/api/endpoints/notes/renotes.ts +++ b/packages/backend/src/server/api/endpoints/notes/renotes.ts @@ -38,6 +38,7 @@ export const paramDef = { type: "object", properties: { noteId: { type: "string", format: "misskey:id" }, + userId: { type: "string", format: "misskey:id" }, limit: { type: "integer", minimum: 1, maximum: 100, default: 10 }, sinceId: { type: "string", format: "misskey:id" }, untilId: { type: "string", format: "misskey:id" }, @@ -52,13 +53,19 @@ export default define(meta, paramDef, async (ps, user) => { throw err; }); - const query = makePaginationQuery( + let query = makePaginationQuery( Notes.createQueryBuilder("note"), ps.sinceId, ps.untilId, ) .andWhere("note.renoteId = :renoteId", { renoteId: note.id }) - .innerJoinAndSelect("note.user", "user") + .innerJoinAndSelect("note.user", "user"); + + if (ps.userId) { + query.andWhere("user.id = :userId", { userId: ps.userId }); + } + + query .leftJoinAndSelect("user.avatar", "avatar") .leftJoinAndSelect("user.banner", "banner") .leftJoinAndSelect("note.reply", "reply") diff --git a/packages/backend/src/server/index.ts b/packages/backend/src/server/index.ts index 8035dcdd7a..95d570eb3d 100644 --- a/packages/backend/src/server/index.ts +++ b/packages/backend/src/server/index.ts @@ -7,6 +7,7 @@ import * as fs from "node:fs"; import * as http from "node:http"; import Koa from "koa"; import Router from "@koa/router"; +import cors from "@koa/cors"; import mount from "koa-mount"; import koaLogger from "koa-logger"; import * as slow from "koa-slow"; @@ -41,6 +42,12 @@ app.proxy = true; app.use(removeTrailingSlash()); +app.use( + cors({ + origin: "*", + }), +); + if (!["production", "test"].includes(process.env.NODE_ENV || "")) { // Logger app.use( diff --git a/packages/client/package.json b/packages/client/package.json index 69346651d8..1af31dd099 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -67,7 +67,7 @@ "start-server-and-test": "1.15.2", "strict-event-emitter-types": "2.0.0", "stringz": "2.1.0", - "swiper": "^8.4.5", + "swiper": "9.3.2", "syuilo-password-strength": "0.0.1", "textarea-caret": "3.1.0", "three": "0.146.0", diff --git a/packages/client/src/components/MkButton.vue b/packages/client/src/components/MkButton.vue index 140b8ddb03..682072f4cb 100644 --- a/packages/client/src/components/MkButton.vue +++ b/packages/client/src/components/MkButton.vue @@ -111,11 +111,12 @@ function onMousedown(evt: MouseEvent): void { z-index: 1; // 他コンポーネントのbox-shadowに隠されないようにするため display: block; min-width: 100px; + min-height: 35px; width: max-content; padding: 8px 16px; text-align: center; font-weight: normal; - font-size: 1em; + font-size: max(12px, 1em); box-shadow: none; text-decoration: none; background: var(--buttonBg); @@ -193,7 +194,7 @@ function onMousedown(evt: MouseEvent): void { &.mini { padding: 4px 8px; - font-size: 0.9em; + font-size: max(12px, 0.9em); border-radius: 100px; } diff --git a/packages/client/src/components/MkFollowButton.vue b/packages/client/src/components/MkFollowButton.vue index 12491f6ad6..5481568c7e 100644 --- a/packages/client/src/components/MkFollowButton.vue +++ b/packages/client/src/components/MkFollowButton.vue @@ -1,6 +1,7 @@