1
0
Fork 1
mirror of https://example.com synced 2024-11-22 11:26:38 +09:00

Firefish v1.0.3

This commit is contained in:
naskya 2023-07-22 09:54:24 +00:00
parent f517bbf227
commit 91ec065a87
Signed by: naskya
GPG key ID: 164DFF24E2D40139
31 changed files with 149 additions and 79 deletions

3
.gitignore vendored
View file

@ -72,3 +72,6 @@ yarn*
# Cargo cache for Docker # Cargo cache for Docker
/.cargo-cache /.cargo-cache
/.cargo-target /.cargo-target
issue_template
pull_request_template.yml

View file

@ -61,7 +61,7 @@ representative at an online or offline event.
Instances of abusive, harassing, or otherwise unacceptable behavior may be Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at reported to the community leaders responsible for enforcement at
@t1c on Prometheus Gitlab, @thatonecalculator on Codeberg,
`@kainoa@firefish.social` on the Fediverse, `@kainoa@firefish.social` on the Fediverse,
or kainoa@t1c.dev via email. or kainoa@t1c.dev via email.
All complaints will be reviewed and investigated promptly and fairly. All complaints will be reviewed and investigated promptly and fairly.

View file

@ -1,7 +1,7 @@
# All the changes to Firefish from stock Misskey # All the changes to Firefish from stock Misskey
> **Warning** > **Warning**
> This list is incomplete. Please check the [Releases](https://gitlab.prometheus.systems/firefish/firefish/releases) and [Changelog](https://gitlab.prometheus.systems/firefish/firefish/src/branch/develop/CHANGELOG.md) for a more complete list of changes. There have been [>4000 commits (laggy link)](https://gitlab.prometheus.systems/firefish/firefish/compare/700a7110f7e34f314b070987aa761c451ec34efc...develop) since we forked Misskey! > This list is incomplete. Please check the [Releases](https://git.joinfirefish.org/firefish/firefish/releases) and [Changelog](https://git.joinfirefish.org/firefish/firefish/src/branch/develop/CHANGELOG.md) for a more complete list of changes. There have been [>4000 commits (laggy link)](https://git.joinfirefish.org/firefish/firefish/compare/700a7110f7e34f314b070987aa761c451ec34efc...develop) since we forked Misskey!
## Planned ## Planned
@ -85,7 +85,7 @@
- Undo renote button inside original note - Undo renote button inside original note
- Custom locales - Custom locales
- Obliteration of Ai-chan - Obliteration of Ai-chan
- Switch to [Firefish.js](https://gitlab.prometheus.systems/firefish/firefish.js) - Switch to [Firefish.js](https://git.joinfirefish.org/firefish/firefish.js)
- Woozy mode 🥴 - Woozy mode 🥴
- Improve blocking servers - Improve blocking servers
- Release notes - Release notes

View file

@ -1,7 +1,3 @@
# :warning: Repo has moved!
https://gitlab.prometheus.systems/firefish/firefish/
<div align="center"> <div align="center">
<a href="https://joinfirefish.org/"> <a href="https://joinfirefish.org/">
<img src="./title.svg" alt="Firefish logo" style="border-radius:50%" width="400"/> <img src="./title.svg" alt="Firefish logo" style="border-radius:50%" width="400"/>
@ -95,8 +91,8 @@ If you have access to a server that supports one of the sources below, I recomme
## 🛳️ Containerization ## 🛳️ Containerization
- [🐳 How to run Firefish with Docker](https://gitlab.prometheus.systems/firefish/firefish/src/branch/develop/docs/docker.md) - [🐳 How to run Firefish with Docker](https://git.joinfirefish.org/firefish/firefish/-/blob/develop/docs/docker.md)
- [🛞 How to run Firefish with Kubernetes/Helm](https://gitlab.prometheus.systems/firefish/firefish/src/branch/develop/docs/kubernetes.md) - [🛞 How to run Firefish with Kubernetes/Helm](https://git.joinfirefish.org/firefish/firefish/-/blob/develop/docs/kubernetes.md)
## 🧑‍💻 Dependencies ## 🧑‍💻 Dependencies
@ -132,7 +128,7 @@ If you have access to a server that supports one of the sources below, I recomme
## 👀 Get folder ready ## 👀 Get folder ready
```sh ```sh
git clone https://gitlab.prometheus.systems/firefish/firefish.git git clone https://git.joinfirefish.org/firefish/firefish.git
cd firefish/ cd firefish/
``` ```
@ -223,7 +219,7 @@ Please don't use ElasticSearch unless you already have an ElasticSearch setup an
## 🚚 Migrating from Misskey/FoundKey to Firefish ## 🚚 Migrating from Misskey/FoundKey to Firefish
For migrating from Misskey v13, Misskey v12, and FoundKey, read [this document](https://gitlab.prometheus.systems/firefish/firefish/src/branch/develop/docs/migrate.md). For migrating from Misskey v13, Misskey v12, and FoundKey, read [this document](https://git.joinfirefish.org/firefish/firefish/-/blob/develop/docs/migrate.md).
## 🌐 Web proxy ## 🌐 Web proxy

View file

@ -2,13 +2,13 @@
Welcome to the new era of FIREFISH! Welcome to the new era of FIREFISH!
<img src="https://gitlab.prometheus.systems/firefish/firefish/-/raw/develop/animated.svg" height="320px"/> <img src="https://git.joinfirefish.org/firefish/firefish/-/raw/develop/animated.svg" height="320px"/>
# Changelog # Changelog
## Major changes from last release candidate ## Major changes from last release candidate
- Firefish branding and [new repo](https://gitlab.prometheus.systems/firefish/firefish)! - Firefish branding and [new repo](https://git.joinfirefish.org/firefish/firefish)!
- Far better Mastodon API support - Far better Mastodon API support
- Edits are now non-experimental - Edits are now non-experimental
- Support for secondary cache server - Support for secondary cache server
@ -64,7 +64,7 @@ All of the above, plus:
## Set new repo and pull ## Set new repo and pull
```sh ```sh
git remote set-url origin https://gitlab.prometheus.systems/firefish/firefish.git git remote set-url origin https://git.joinfirefish.org/firefish/firefish.git
git pull --ff git pull --ff
``` ```
@ -79,6 +79,7 @@ Aborting
Run: Run:
```sh ```sh
rm ./packages/backend/assets/LICENSE rm ./packages/backend/assets/LICENSE
git reset --hard origin/develop
git pull --ff git pull --ff
``` ```

View file

@ -11,6 +11,6 @@ If you discover a security issue, which is so high risk, that too much is affect
This will allow us to assess the risk, and make a fix available before we add a This will allow us to assess the risk, and make a fix available before we add a
bug report to the Gitlab repository. bug report to the Codeberg repository.
Thanks for helping make Firefish safe for everyone. Thanks for helping make Firefish safe for everyone.

View file

@ -60,5 +60,5 @@ describe("After user signed in", () => {
buildWidgetTest("jobQueue"); buildWidgetTest("jobQueue");
buildWidgetTest("button"); buildWidgetTest("button");
buildWidgetTest("aiscript"); buildWidgetTest("aiscript");
buildWidgetTest('aichan'); buildWidgetTest("aichan");
}); });

View file

@ -14,8 +14,8 @@ Tested with Misskey v13.11.3.
If your Misskey v13 is older, we recommend updating your Misskey to v13.11.3. If your Misskey v13 is older, we recommend updating your Misskey to v13.11.3.
```sh ```sh
wget -O mkv13.patch https://gitlab.prometheus.systems/firefish/firefish/-/raw/develop/docs/mkv13.patch wget -O mkv13.patch https://git.joinfirefish.org/firefish/firefish/-/raw/develop/docs/mkv13.patch
wget -O mkv13_restore.patch https://gitlab.prometheus.systems/firefish/firefish/-/raw/develop/docs/mkv13_restore.patch wget -O mkv13_restore.patch https://git.joinfirefish.org/firefish/firefish/-/raw/develop/docs/mkv13_restore.patch
git apply mkv13.patch mkv13_restore.patch git apply mkv13.patch mkv13_restore.patch
cd packages/backend cd packages/backend
@ -27,13 +27,13 @@ for i in $(seq 1 $NUM_MIGRATIONS); do pnpm typeorm migration:revert -d ormconfig
cd ../../ cd ../../
git remote set-url origin https://gitlab.prometheus.systems/firefish/firefish.git git remote set-url origin https://git.joinfirefish.org/firefish/firefish.git
git fetch origin git fetch origin
git stash push git stash push
rm -rf fluent-emojis misskey-assets rm -rf fluent-emojis misskey-assets
git switch main # or beta or develop git switch main # or beta or develop
git pull --ff git pull --ff
wget -O renote_muting.patch https://gitlab.prometheus.systems/firefish/firefish/-/raw/develop/docs/renote_muting.patch wget -O renote_muting.patch https://git.joinfirefish.org/firefish/firefish/-/raw/develop/docs/renote_muting.patch
git apply renote_muting.patch git apply renote_muting.patch
pnpm install pnpm install
@ -69,7 +69,7 @@ If no other errors happened, your Firefish is ready to launch!
## Misskey v12.119 and before ## Misskey v12.119 and before
```sh ```sh
git remote set-url origin https://gitlab.prometheus.systems/firefish/firefish.git git remote set-url origin https://git.joinfirefish.org/firefish/firefish.git
git fetch git fetch
git checkout main # or beta or develop git checkout main # or beta or develop
git pull --ff git pull --ff
@ -81,7 +81,7 @@ NODE_ENV=production pnpm run migrate
## FoundKey ## FoundKey
```sh ```sh
wget -O fk.patch https://gitlab.prometheus.systems/firefish/firefish/-/raw/develop/docs/fk.patch wget -O fk.patch https://git.joinfirefish.org/firefish/firefish/-/raw/develop/docs/fk.patch
git apply fk.patch git apply fk.patch
cd packages/backend cd packages/backend
@ -92,7 +92,7 @@ for i in $(seq 1 $NUM_MIGRATIONS); do
npx typeorm migration:revert -d ormconfig.js npx typeorm migration:revert -d ormconfig.js
done done
git remote set-url origin https://gitlab.prometheus.systems/firefish/firefish.git git remote set-url origin https://git.joinfirefish.org/firefish/firefish.git
git fetch git fetch
git checkout main # or beta or develop git checkout main # or beta or develop
git pull --ff git pull --ff

View file

@ -1,10 +1,10 @@
{ {
"name": "firefish", "name": "firefish",
"version": "1.0.0", "version": "1.0.3",
"codename": "aqua", "codename": "aqua",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://gitlab.prometheus.systems/firefish/firefish.git" "url": "https://git.joinfirefish.org/firefish/firefish.git"
}, },
"packageManager": "pnpm@8.6.9", "packageManager": "pnpm@8.6.9",
"private": true, "private": true,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 473 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 84 KiB

View file

@ -143,11 +143,11 @@
fill="url(#firefish-logo-linear-gradient-5)" /> fill="url(#firefish-logo-linear-gradient-5)" />
</g> </g>
<g id="firefish-logo-eye-l"> <g id="firefish-logo-eye-l">
<circle cx="256" cy="1408.11" r="128" fill="#fff" /> <circle cx="256" cy="1408.11" r="128" fill="var(--bg)" />
</g> </g>
<g id="firefish-logo-eye-r"> <g id="firefish-logo-eye-r">
<circle cx="576" cy="1408.11" r="128" fill="#fff" /> <circle cx="576" cy="1408.11" r="128" fill="var(--bg)" />
</g> </g>
</g> </g>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 5 KiB

View file

@ -2,9 +2,6 @@ export class calckey1658203170545 {
name = "calckey1658203170545"; name = "calckey1658203170545";
async up(queryRunner) { async up(queryRunner) {
await queryRunner.query(
`UPDATE meta SET "useStarForReactionFallback" = TRUE;`,
);
await queryRunner.query( await queryRunner.query(
`UPDATE meta SET "repositoryUrl" = 'https://codeberg/firefish/firefish'`, `UPDATE meta SET "repositoryUrl" = 'https://codeberg/firefish/firefish'`,
); );
@ -14,9 +11,6 @@ export class calckey1658203170545 {
} }
async down(queryRunner) { async down(queryRunner) {
await queryRunner.query(
`UPDATE meta SET "useStarForReactionFallback" = FALSE;`,
);
await queryRunner.query( await queryRunner.query(
`UPDATE meta SET "repositoryUrl" = 'https://codeberg/firefish/firefish'`, `UPDATE meta SET "repositoryUrl" = 'https://codeberg/firefish/firefish'`,
); );

View file

@ -3,10 +3,10 @@ export class FirefishRepo1689739513827 {
async up(queryRunner) { async up(queryRunner) {
await queryRunner.query( await queryRunner.query(
`UPDATE meta SET "repositoryUrl" = 'https://gitlab.prometheus.systems/firefish/firefish'`, `UPDATE meta SET "repositoryUrl" = 'https://codeberg.org/firefish/firefish'`,
); );
await queryRunner.query( await queryRunner.query(
`UPDATE meta SET "feedbackUrl" = 'https://gitlab.prometheus.systems/firefish/firefish/issues'`, `UPDATE meta SET "feedbackUrl" = 'https://codeberg.org/firefish/firefish/issues'`,
); );
} }

View file

@ -0,0 +1,21 @@
export class FirefishRepo1689957674000 {
name = "FirefishRepo1689957674000";
async up(queryRunner) {
await queryRunner.query(
`UPDATE meta SET "repositoryUrl" = 'https://git.joinfirefish.org/firefish/firefish'`,
);
await queryRunner.query(
`UPDATE meta SET "feedbackUrl" = 'https://git.joinfirefish.org/firefish/firefish/issues'`,
);
}
async down(queryRunner) {
await queryRunner.query(
`UPDATE meta SET "repositoryUrl" = 'https://codeberg.org/firefish/firefish'`,
);
await queryRunner.query(
`UPDATE meta SET "feedbackUrl" = 'https://codeberg.org/firefish/firefish/issues'`,
);
}
}

View file

@ -31,13 +31,41 @@ function greet() {
if (!envOption.quiet) { if (!envOption.quiet) {
//#region Firefish logo //#region Firefish logo
const v = `v${meta.version}`; const v = `v${meta.version}`;
console.log(themeColor(" ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄ ▄▄ ▄▄ ◯ ")); console.log(
console.log(themeColor("█ █ █ ▄ █ █ █ █ █ █ █ █ █ ○ ▄ ▄")); themeColor(
console.log(themeColor("█ ▄▄▄█ █ █ █ █ █ ▄▄▄█ ▄▄▄█ █ ▄▄▄▄▄█ █▄█ █ ⚬ █▄▄ █▄▄ ")); " ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄ ▄▄ ▄▄ ◯ ",
console.log(themeColor("█ █▄▄▄█ █ █▄▄█▄█ █▄▄▄█ █▄▄▄█ █ █▄▄▄▄▄█ █ ▄▄▄▄▄▄ ▄")); ),
console.log(themeColor("█ ▄▄▄█ █ ▄▄ █ ▄▄▄█ ▄▄▄█ █▄▄▄▄▄ █ ▄ █ █ █ █▄▄")); );
console.log(themeColor("█ █ █ █ █ █ █ █▄▄▄█ █ █ █▄▄▄▄▄█ █ █ █ █ █ ● ● █")); console.log(
console.log(themeColor("█▄▄▄█ █▄▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█▄▄▄█ █▄▄▄█▄▄▄▄▄▄▄█▄▄█ █▄▄█ ▀▄▄▄▄▄▄▀")); themeColor(
"█ █ █ ▄ █ █ █ █ █ █ █ █ █ ○ ▄ ▄",
),
);
console.log(
themeColor(
"█ ▄▄▄█ █ █ █ █ █ ▄▄▄█ ▄▄▄█ █ ▄▄▄▄▄█ █▄█ █ ⚬ █▄▄ █▄▄ ",
),
);
console.log(
themeColor(
"█ █▄▄▄█ █ █▄▄█▄█ █▄▄▄█ █▄▄▄█ █ █▄▄▄▄▄█ █ ▄▄▄▄▄▄ ▄",
),
);
console.log(
themeColor(
"█ ▄▄▄█ █ ▄▄ █ ▄▄▄█ ▄▄▄█ █▄▄▄▄▄ █ ▄ █ █ █ █▄▄",
),
);
console.log(
themeColor(
"█ █ █ █ █ █ █ █▄▄▄█ █ █ █▄▄▄▄▄█ █ █ █ █ █ ● ● █",
),
);
console.log(
themeColor(
"█▄▄▄█ █▄▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█▄▄▄█ █▄▄▄█▄▄▄▄▄▄▄█▄▄█ █▄▄█ ▀▄▄▄▄▄▄▀",
),
);
//#endregion //#endregion
console.log( console.log(
@ -49,7 +77,7 @@ function greet() {
136, 136,
0, 0,
)( )(
" If you like Firefish, please consider starring or contributing to the repo. https://gitlab.prometheus.systems/firefish/firefish", " If you like Firefish, please consider starring or contributing to the repo. https://git.joinfirefish.org/firefish/firefish",
), ),
); );

View file

@ -436,14 +436,14 @@ export class Meta {
@Column("varchar", { @Column("varchar", {
length: 512, length: 512,
default: "https://gitlab.prometheus.systems/firefish/firefish", default: "https://git.joinfirefish.org/firefish/firefish",
nullable: false, nullable: false,
}) })
public repositoryUrl: string; public repositoryUrl: string;
@Column("varchar", { @Column("varchar", {
length: 512, length: 512,
default: "https://gitlab.prometheus.systems/firefish/firefish/issues/new", default: "https://git.joinfirefish.org/firefish/firefish/issues/new",
nullable: true, nullable: true,
}) })
public feedbackUrl: string | null; public feedbackUrl: string | null;

View file

@ -3,7 +3,7 @@ import { DriveFiles } from "@/models/index.js";
import { DB_MAX_IMAGE_COMMENT_LENGTH } from "@/misc/hard-limits.js"; import { DB_MAX_IMAGE_COMMENT_LENGTH } from "@/misc/hard-limits.js";
import { IdentifiableError } from "@/misc/identifiable-error.js"; import { IdentifiableError } from "@/misc/identifiable-error.js";
import { fetchMeta } from "@/misc/fetch-meta.js"; import { fetchMeta } from "@/misc/fetch-meta.js";
import { HOUR } from "@/const.js"; import { MINUTE } from "@/const.js";
import define from "../../../define.js"; import define from "../../../define.js";
import { apiLogger } from "../../../logger.js"; import { apiLogger } from "../../../logger.js";
import { ApiError } from "../../../error.js"; import { ApiError } from "../../../error.js";
@ -14,8 +14,8 @@ export const meta = {
requireCredential: true, requireCredential: true,
limit: { limit: {
duration: HOUR, duration: MINUTE * 10,
max: 120, max: 250,
}, },
requireFile: true, requireFile: true,
@ -40,7 +40,7 @@ export const meta = {
inappropriate: { inappropriate: {
message: message:
"Cannot upload the file because it has been determined that it possibly contains inappropriate content.", "Cannot upload due to the file possibly containing inappropriate content.",
code: "INAPPROPRIATE", code: "INAPPROPRIATE",
id: "bec5bd69-fba3-43c9-b4fb-2894b66ad5d2", id: "bec5bd69-fba3-43c9-b4fb-2894b66ad5d2",
}, },
@ -95,7 +95,7 @@ export default define(
name = null; name = null;
} }
const meta = await fetchMeta(); const instanceMeta = await fetchMeta();
try { try {
// Create file // Create file
@ -107,8 +107,8 @@ export default define(
folderId: ps.folderId, folderId: ps.folderId,
force: ps.force, force: ps.force,
sensitive: ps.isSensitive, sensitive: ps.isSensitive,
requestIp: meta.enableIpLogging ? ip : null, requestIp: instanceMeta.enableIpLogging ? ip : null,
requestHeaders: meta.enableIpLogging ? headers : null, requestHeaders: instanceMeta.enableIpLogging ? headers : null,
}); });
return await DriveFiles.pack(driveFile, { self: true }); return await DriveFiles.pack(driveFile, { self: true });
} catch (e) { } catch (e) {
@ -123,7 +123,9 @@ export default define(
} }
throw new ApiError(); throw new ApiError();
} finally { } finally {
cleanup!(); if (cleanup !== undefined) {
cleanup();
}
} }
}, },
); );

View file

@ -16,7 +16,7 @@ export const paramDef = {
export default define(meta, paramDef, async () => { export default define(meta, paramDef, async () => {
let tag_name; let tag_name;
await fetch( await fetch(
"https://codeberg.org/api/v1/repos/calckey/calckey/releases?draft=false&pre-release=false&page=1&limit=1", "https://codeberg.org/api/v1/repos/firefish/firefish/releases?draft=false&pre-release=false&page=1&limit=1",
) )
.then((response) => response.json()) .then((response) => response.json())
.then((data) => { .then((data) => {

View file

@ -68,13 +68,13 @@ export const meta = {
type: "string", type: "string",
optional: false, optional: false,
nullable: false, nullable: false,
default: "https://gitlab.prometheus.systems/firefish/firefish", default: "https://git.joinfirefish.org/firefish/firefish",
}, },
feedbackUrl: { feedbackUrl: {
type: "string", type: "string",
optional: false, optional: false,
nullable: false, nullable: false,
default: "https://gitlab.prometheus.systems/firefish/firefish/issues", default: "https://git.joinfirefish.org/firefish/firefish/issues",
}, },
defaultDarkTheme: { defaultDarkTheme: {
type: "string", type: "string",

View file

@ -18,7 +18,7 @@ export default define(meta, paramDef, async () => {
let release; let release;
await fetch( await fetch(
"https://gitlab.prometheus.systems/firefish/firefish/-/raw/develop/release.json", "https://git.joinfirefish.org/firefish/firefish/-/raw/develop/release.json",
) )
.then((response) => response.json()) .then((response) => response.json())
.then((data) => { .then((data) => {

View file

@ -15,7 +15,7 @@ export function genOpenapiSpec() {
externalDocs: { externalDocs: {
description: "Repository", description: "Repository",
url: "https://gitlab.prometheus.systems/firefish/firefish", url: "https://git.joinfirefish.org/firefish/firefish",
}, },
servers: [ servers: [
@ -106,7 +106,7 @@ export function genOpenapiSpec() {
description: desc, description: desc,
externalDocs: { externalDocs: {
description: "Source code", description: "Source code",
url: `https://gitlab.prometheus.systems/firefish/firefish/src/branch/develop/packages/backend/src/server/api/endpoints/${endpoint.name}.ts`, url: `https://git.joinfirefish.org/firefish/firefish/src/branch/develop/packages/backend/src/server/api/endpoints/${endpoint.name}.ts`,
}, },
tags: endpoint.meta.tags || undefined, tags: endpoint.meta.tags || undefined,
security, security,

View file

@ -44,14 +44,14 @@
"screenshots": [ "screenshots": [
{ {
"src": "/static-assets/screenshots/1.webp", "src": "/static-assets/screenshots/1.webp",
"sizes": "1195x579", "sizes": "1080x2340",
"type": "image/webp", "type": "image/webp",
"platform": "narrow", "platform": "narrow",
"label": "Profile page" "label": "Profile page"
}, },
{ {
"src": "/static-assets/screenshots/2.webp", "src": "/static-assets/screenshots/2.webp",
"sizes": "1195x579", "sizes": "1080x2340",
"type": "image/webp", "type": "image/webp",
"platform": "narrow", "platform": "narrow",
"label": "Posts" "label": "Posts"

View file

@ -1,5 +1,6 @@
import type Koa from "koa"; import type Koa from "koa";
import { fetchMeta } from "@/misc/fetch-meta.js"; import { fetchMeta } from "@/misc/fetch-meta.js";
import config from "@/config/index.js";
import manifest from "./manifest.json" assert { type: "json" }; import manifest from "./manifest.json" assert { type: "json" };
export const manifestHandler = async (ctx: Koa.Context) => { export const manifestHandler = async (ctx: Koa.Context) => {
@ -12,7 +13,15 @@ export const manifestHandler = async (ctx: Koa.Context) => {
res.short_name = instance.name || "Firefish"; res.short_name = instance.name || "Firefish";
res.name = instance.name || "Firefish"; res.name = instance.name || "Firefish";
if (instance.themeColor) res.theme_color = instance.themeColor; if (instance.themeColor) res.theme_color = instance.themeColor;
for (const icon of res.icons) {
icon.src = `${icon.src}?v=${config.version.replace(/[^0-9]/g, "")}`;
}
for (const screenshot of res.screenshots) {
screenshot.src = `${screenshot.src}?v=${config.version.replace(
/[^0-9]/g,
"",
)}`;
}
ctx.set("Cache-Control", "max-age=300"); ctx.set("Cache-Control", "max-age=300");
ctx.body = res; ctx.body = res;
}; };

View file

@ -17,7 +17,7 @@ doctype html
Thank you for using Firefish! Thank you for using Firefish!
If you are reading this message... how about joining the development? If you are reading this message... how about joining the development?
https://gitlab.prometheus.systems/firefish/firefish https://git.joinfirefish.org/firefish/firefish
html html

View file

@ -3,7 +3,10 @@
v-if="disableLink" v-if="disableLink"
v-user-preview="disablePreview ? undefined : user.id" v-user-preview="disablePreview ? undefined : user.id"
class="eiwwqkts _noSelect" class="eiwwqkts _noSelect"
:class="{ cat: user.isCat, square: user.isCat ? false : $store.state.squareAvatars }" :class="{
cat: user.isCat,
square: user.isCat ? false : $store.state.squareAvatars,
}"
:style="{ color }" :style="{ color }"
:title="acct(user)" :title="acct(user)"
@click="onClick" @click="onClick"
@ -19,7 +22,10 @@
v-else v-else
v-user-preview="disablePreview ? undefined : user.id" v-user-preview="disablePreview ? undefined : user.id"
class="eiwwqkts _noSelect" class="eiwwqkts _noSelect"
:class="{ cat: user.isCat, square: user.isCat ? false : $store.state.squareAvatars }" :class="{
cat: user.isCat,
square: user.isCat ? false : $store.state.squareAvatars,
}"
:style="{ color }" :style="{ color }"
:to="userPage(user)" :to="userPage(user)"
:title="acct(user)" :title="acct(user)"

View file

@ -1,5 +1,5 @@
<template> <template>
<div ref="rootEl"> <div class="sticky-container">
<div ref="headerEl"> <div ref="headerEl">
<slot name="header"></slot> <slot name="header"></slot>
</div> </div>
@ -19,7 +19,6 @@ const CURRENT_STICKY_TOP = "CURRENT_STICKY_TOP";
import type { Ref } from "vue"; import type { Ref } from "vue";
import { inject, onMounted, onUnmounted, provide, ref, watch } from "vue"; import { inject, onMounted, onUnmounted, provide, ref, watch } from "vue";
const rootEl = $ref<HTMLElement>();
const headerEl = $ref<HTMLElement>(); const headerEl = $ref<HTMLElement>();
const bodyEl = $ref<HTMLElement>(); const bodyEl = $ref<HTMLElement>();
@ -54,10 +53,6 @@ onMounted(() => {
}, },
); );
headerEl.style.position = "sticky";
headerEl.style.top = "var(--stickyTop, 0)";
headerEl.style.zIndex = "1000";
observer.observe(headerEl); observer.observe(headerEl);
}); });
@ -66,4 +61,19 @@ onUnmounted(() => {
}); });
</script> </script>
<style lang="scss" module></style> <style lang="scss">
.sticky-container {
display: flex;
flex-direction: column;
> div:first-child {
position: sticky;
top: var(--stickyTop, 0);
z-index: 1000;
}
> div:last-child {
display: flex;
flex-direction: column;
flex-grow: 1;
}
}
</style>

View file

@ -57,14 +57,14 @@
<FormSection> <FormSection>
<div class="_formLinks"> <div class="_formLinks">
<FormLink <FormLink
to="https://gitlab.prometheus.systems/firefish/firefish" to="https://git.joinfirefish.org/firefish/firefish"
external external
> >
<template #icon <template #icon
><i class="ph-code ph-bold ph-lg"></i ><i class="ph-code ph-bold ph-lg"></i
></template> ></template>
{{ i18n.ts._aboutFirefish.source }} {{ i18n.ts._aboutFirefish.source }}
<template #suffix>Prometheus Gitlab</template> <template #suffix>GitLab</template>
</FormLink> </FormLink>
<FormLink <FormLink
to="https://opencollective.com/firefish" to="https://opencollective.com/firefish"
@ -120,7 +120,7 @@
</div> </div>
<template #caption <template #caption
><MkLink ><MkLink
url="https://gitlab.prometheus.systems/firefish/firefish/activity" url="https://git.joinfirefish.org/firefish/firefish/activity"
>{{ >{{
i18n.ts._aboutFirefish.allContributors i18n.ts._aboutFirefish.allContributors
}}</MkLink }}</MkLink
@ -300,7 +300,7 @@ definePageMetadata({
display: block; display: block;
width: 100px; width: 100px;
margin: 0 auto; margin: 0 auto;
border-radius: 16px; border-radius: 3px;
} }
> .misskey { > .misskey {

View file

@ -41,7 +41,7 @@
<MkInfo v-if="updateAvailable" warn class="info" <MkInfo v-if="updateAvailable" warn class="info"
>{{ i18n.ts.updateAvailable }} >{{ i18n.ts.updateAvailable }}
<a <a
href="https://gitlab.prometheus.systems/firefish/firefish/releases" href="https://git.joinfirefish.org/firefish/firefish/releases"
target="_bank" target="_bank"
class="_link" class="_link"
>{{ i18n.ts.check }}</a >{{ i18n.ts.check }}</a

View file

@ -18,7 +18,7 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://gitlab.prometheus.systems/firefish/firefish.git" "url": "https://git.joinfirefish.org/firefish/firefish.git"
}, },
"devDependencies": { "devDependencies": {
"@microsoft/api-extractor": "^7.36.0", "@microsoft/api-extractor": "^7.36.0",