Merge branch 'develop' into feat/scylladb
This commit is contained in:
commit
b7f9cf132f
140 changed files with 460 additions and 3127 deletions
|
@ -267,6 +267,7 @@ pm2 start "NODE_ENV=production pnpm run start" --name Firefish
|
||||||
- When editing the config file, please don't fill out the settings at the bottom. They're designed *only* for managed hosting, not self hosting. Those settings are much better off being set in Firefish's control panel.
|
- When editing the config file, please don't fill out the settings at the bottom. They're designed *only* for managed hosting, not self hosting. Those settings are much better off being set in Firefish's control panel.
|
||||||
- Port 3000 (used in the default config) might be already used on your server for something else. To find an open port for Firefish, run `for p in {3000..4000}; do ss -tlnH | tr -s ' ' | cut -d" " -sf4 | grep -q "${p}$" || echo "${p}"; done | head -n 1`. Replace 3000 with the minimum port and 4000 with the maximum port if you need it.
|
- Port 3000 (used in the default config) might be already used on your server for something else. To find an open port for Firefish, run `for p in {3000..4000}; do ss -tlnH | tr -s ' ' | cut -d" " -sf4 | grep -q "${p}$" || echo "${p}"; done | head -n 1`. Replace 3000 with the minimum port and 4000 with the maximum port if you need it.
|
||||||
- I'd recommend you use a S3 Bucket/CDN for Object Storage, especially if you use Docker.
|
- I'd recommend you use a S3 Bucket/CDN for Object Storage, especially if you use Docker.
|
||||||
|
- When using object storage, setting a proper `Access-Control-Allow-Origin` response header is highly recommended.
|
||||||
- I'd ***strongly*** recommend against using CloudFlare, but if you do, make sure to turn code minification off.
|
- I'd ***strongly*** recommend against using CloudFlare, but if you do, make sure to turn code minification off.
|
||||||
- For push notifications, run `npx web-push generate-vapid-keys`, then put the public and private keys into Control Panel > General > ServiceWorker.
|
- For push notifications, run `npx web-push generate-vapid-keys`, then put the public and private keys into Control Panel > General > ServiceWorker.
|
||||||
- For translations, make a [DeepL](https://deepl.com) account and generate an API key, then put it into Control Panel > General > DeepL Translation.
|
- For translations, make a [DeepL](https://deepl.com) account and generate an API key, then put it into Control Panel > General > DeepL Translation.
|
||||||
|
|
BIN
custom/assets/badges/error.avif
Normal file
BIN
custom/assets/badges/error.avif
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 40 KiB |
BIN
custom/assets/badges/info.avif
Normal file
BIN
custom/assets/badges/info.avif
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 9.9 KiB |
BIN
custom/assets/badges/not-found.avif
Normal file
BIN
custom/assets/badges/not-found.avif
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 9.1 KiB |
|
@ -103,4 +103,4 @@ NODE_ENV=production pnpm run migrate
|
||||||
|
|
||||||
## Reverse
|
## Reverse
|
||||||
|
|
||||||
You ***cannot*** migrate back to Misskey from Firefish due to re-hashing passwords on signin with argon2. You can migrate from Firefish to FoundKey, although this is not recommended due to FoundKey being end-of-life, and may have some problems with alt-text.
|
You ***cannot*** migrate back to Misskey from Firefish due to re-hashing passwords on signin with argon2. You can migrate to [Sharkey](https://github.com/transfem-org/Sharkey), a soft fork of Misskey that uses argon2 though. You can also migrate from Firefish to FoundKey, although this is not recommended due to FoundKey being end-of-life, and may have some problems with alt-text.
|
||||||
|
|
|
@ -2200,3 +2200,4 @@ languageForTranslation: Idioma de traducció d'articles
|
||||||
openServerInfo: Mostra la informació del servidor fent clic al símbol del servidor
|
openServerInfo: Mostra la informació del servidor fent clic al símbol del servidor
|
||||||
en un missatge
|
en un missatge
|
||||||
vibrate: Activar vibracions
|
vibrate: Activar vibracions
|
||||||
|
clickToShowPatterns: Fes clic per veure patrons de mòduls
|
||||||
|
|
|
@ -1186,7 +1186,8 @@ _accountDelete:
|
||||||
inProgress: "Deletion is currently in progress"
|
inProgress: "Deletion is currently in progress"
|
||||||
_ad:
|
_ad:
|
||||||
back: "Back"
|
back: "Back"
|
||||||
reduceFrequencyOfThisAd: "Show this ad less"
|
adsBy: "Community banner by {by}"
|
||||||
|
reduceFrequencyOfThisAd: "Show this banner less"
|
||||||
_forgotPassword:
|
_forgotPassword:
|
||||||
enterEmail: "Enter the email address you used to register. A link with which you
|
enterEmail: "Enter the email address you used to register. A link with which you
|
||||||
can reset your password will then be sent to it."
|
can reset your password will then be sent to it."
|
||||||
|
|
1
locales/hi.yml
Normal file
1
locales/hi.yml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{}
|
|
@ -626,7 +626,7 @@ emptyToDisableSmtpAuth: "Lasciare username e password vuoti per disabilitare la
|
||||||
smtpSecure: "Usa la porta SSL/TLS predefinita per le connessioni SMTP"
|
smtpSecure: "Usa la porta SSL/TLS predefinita per le connessioni SMTP"
|
||||||
smtpSecureInfo: "Disabilita quando è attivo STARTTLS"
|
smtpSecureInfo: "Disabilita quando è attivo STARTTLS"
|
||||||
testEmail: "Test di consegna email"
|
testEmail: "Test di consegna email"
|
||||||
wordMute: "Filtro parole"
|
wordMute: "Filtro parole e lingua"
|
||||||
instanceMute: "Server silenziati"
|
instanceMute: "Server silenziati"
|
||||||
userSaysSomething: "{name} ha detto qualcosa"
|
userSaysSomething: "{name} ha detto qualcosa"
|
||||||
makeActive: "Attiva"
|
makeActive: "Attiva"
|
||||||
|
@ -1084,6 +1084,11 @@ _wordMute:
|
||||||
soft: "Moderato"
|
soft: "Moderato"
|
||||||
hard: "Severo"
|
hard: "Severo"
|
||||||
mutedNotes: "Post silenziati"
|
mutedNotes: "Post silenziati"
|
||||||
|
muteLangsDescription2: 'Usa il codice lingua, esempio: en, fr, ja, zh.'
|
||||||
|
lang: Lingua
|
||||||
|
langDescription: Nascondi dalla timeline i post in quest'insieme di lingue.
|
||||||
|
muteLangs: Lingue da non mostrare
|
||||||
|
muteLangsDescription: Separa andando a capo o con spazi per la condizione OR.
|
||||||
_theme:
|
_theme:
|
||||||
explore: "Esplora temi"
|
explore: "Esplora temi"
|
||||||
install: "Installa un tema"
|
install: "Installa un tema"
|
||||||
|
@ -2164,3 +2169,4 @@ indexable: Indicizzabile
|
||||||
languageForTranslation: Linguaggio di traduzione dei post
|
languageForTranslation: Linguaggio di traduzione dei post
|
||||||
openServerInfo: Mostra informazioni sul server cliccando sul riquadro del server in
|
openServerInfo: Mostra informazioni sul server cliccando sul riquadro del server in
|
||||||
un post
|
un post
|
||||||
|
vibrate: Abilita la vibrazione
|
||||||
|
|
|
@ -1022,7 +1022,8 @@ _accountDelete:
|
||||||
inProgress: "削除が進行中"
|
inProgress: "削除が進行中"
|
||||||
_ad:
|
_ad:
|
||||||
back: "戻る"
|
back: "戻る"
|
||||||
reduceFrequencyOfThisAd: "この広告の表示頻度を下げる"
|
adsBy: "バナーで{by}"
|
||||||
|
reduceFrequencyOfThisAd: "このバナーの表示頻度を下げる"
|
||||||
_forgotPassword:
|
_forgotPassword:
|
||||||
enterEmail: "アカウントに登録したメールアドレスを入力してください。そのアドレス宛てに、パスワードリセット用のリンクが送信されます。"
|
enterEmail: "アカウントに登録したメールアドレスを入力してください。そのアドレス宛てに、パスワードリセット用のリンクが送信されます。"
|
||||||
ifNoEmail: "メールアドレスを登録していない場合は、管理者までお問い合わせください。"
|
ifNoEmail: "メールアドレスを登録していない場合は、管理者までお問い合わせください。"
|
||||||
|
|
|
@ -12,7 +12,7 @@ ok: "好"
|
||||||
gotIt: "知道了!"
|
gotIt: "知道了!"
|
||||||
cancel: "取消"
|
cancel: "取消"
|
||||||
enterUsername: "输入用户名"
|
enterUsername: "输入用户名"
|
||||||
renotedBy: "转发自 {user}"
|
renotedBy: "{user} 转发了"
|
||||||
noNotes: "没有帖子"
|
noNotes: "没有帖子"
|
||||||
noNotifications: "没有通知"
|
noNotifications: "没有通知"
|
||||||
instance: "服务器"
|
instance: "服务器"
|
||||||
|
@ -69,7 +69,7 @@ exportRequested: "导出请求已提交,这可能需要花一些时间,导
|
||||||
importRequested: "导入请求已提交,这可能需要花一点时间。"
|
importRequested: "导入请求已提交,这可能需要花一点时间。"
|
||||||
lists: "列表"
|
lists: "列表"
|
||||||
noLists: "列表为空"
|
noLists: "列表为空"
|
||||||
note: "帖子"
|
note: "发帖"
|
||||||
notes: "帖子"
|
notes: "帖子"
|
||||||
following: "关注中"
|
following: "关注中"
|
||||||
followers: "关注者"
|
followers: "关注者"
|
||||||
|
@ -243,7 +243,7 @@ saved: "已保存"
|
||||||
messaging: "聊天"
|
messaging: "聊天"
|
||||||
upload: "本地上传"
|
upload: "本地上传"
|
||||||
keepOriginalUploading: "保留原图"
|
keepOriginalUploading: "保留原图"
|
||||||
keepOriginalUploadingDescription: "上传图片时保留原始图片。如果关闭,会在上传时生成一张用于 web 发布的图片。"
|
keepOriginalUploadingDescription: "上传图片时保留原始图片。如果关闭,会在上传时生成一张用于 Web 发布的图片。"
|
||||||
fromDrive: "从网盘中"
|
fromDrive: "从网盘中"
|
||||||
fromUrl: "从 URL"
|
fromUrl: "从 URL"
|
||||||
uploadFromUrl: "从 URL 上传"
|
uploadFromUrl: "从 URL 上传"
|
||||||
|
@ -690,8 +690,8 @@ useSystemFont: "使用系统默认字体"
|
||||||
clips: "便签"
|
clips: "便签"
|
||||||
experimentalFeatures: "实验性功能"
|
experimentalFeatures: "实验性功能"
|
||||||
developer: "开发者"
|
developer: "开发者"
|
||||||
makeExplorable: "使账号在“发现”中可见"
|
makeExplorable: "使账号在「发现」中可见"
|
||||||
makeExplorableDescription: "关闭时,账号不会显示在\"发现\"中。"
|
makeExplorableDescription: "关闭时,账号不会显示在「发现」中。"
|
||||||
showGapBetweenNotesInTimeline: "时间线上的帖子分开显示"
|
showGapBetweenNotesInTimeline: "时间线上的帖子分开显示"
|
||||||
duplicate: "复制"
|
duplicate: "复制"
|
||||||
left: "左"
|
left: "左"
|
||||||
|
@ -922,7 +922,7 @@ _emailUnavailable:
|
||||||
_ffVisibility:
|
_ffVisibility:
|
||||||
public: "公开"
|
public: "公开"
|
||||||
followers: "仅对关注者可见"
|
followers: "仅对关注者可见"
|
||||||
private: "私信"
|
private: "私密"
|
||||||
_signup:
|
_signup:
|
||||||
almostThere: "即将完成"
|
almostThere: "即将完成"
|
||||||
emailAddressInfo: "请输入您所使用的电子邮件地址,它不会公开显示。"
|
emailAddressInfo: "请输入您所使用的电子邮件地址,它不会公开显示。"
|
||||||
|
@ -1237,11 +1237,11 @@ _tutorial:
|
||||||
step4_2: "对于第一条帖子,可以做一个 {introduction} 或一个简单的 \"hello world!\""
|
step4_2: "对于第一条帖子,可以做一个 {introduction} 或一个简单的 \"hello world!\""
|
||||||
step5_1: "时间线,无处不在的时间线!"
|
step5_1: "时间线,无处不在的时间线!"
|
||||||
step5_2: "您的服务器已启用 {timelines} 种不同的时间线。"
|
step5_2: "您的服务器已启用 {timelines} 种不同的时间线。"
|
||||||
step5_3: "主页 {icon} 时间线是您可以看到您关注账号的帖子的时间线。"
|
step5_3: "首页{icon}时间线是您可以看到您关注账号的帖子的时间线。"
|
||||||
step5_4: "本地{icon}时间线是您可以看到此服务器上其它用户的帖子的时间线。"
|
step5_4: "本地{icon}时间线是您可以看到此服务器上其它用户的帖子的时间线。"
|
||||||
step5_5: "社交{icon}时间线是主页和本地时间线的结合。"
|
step5_5: "社交{icon}时间线是主页和本地时间线的结合。"
|
||||||
step5_6: "推荐{icon}时间线是您可以看到管理员推荐服务器的帖子的时间线。"
|
step5_6: "推荐{icon}时间线是您可以看到管理员推荐服务器的帖子的时间线。"
|
||||||
step5_7: "全球{icon}时间线是您可以看到来自其它所有互联服务器的帖子的时间线。"
|
step5_7: "全局{icon}时间线是您可以看到来自其它所有互联服务器的帖子的时间线。"
|
||||||
step6_1: "那么,这里是什么地方?"
|
step6_1: "那么,这里是什么地方?"
|
||||||
step6_2: "好吧,您不只是加入 Firefish。您已经加入了 Fediverse 的一个门户,这是一个由成千上万台服务器组成的互联网络。"
|
step6_2: "好吧,您不只是加入 Firefish。您已经加入了 Fediverse 的一个门户,这是一个由成千上万台服务器组成的互联网络。"
|
||||||
step6_3: "每个服务器的工作方式不同,并不是所有的服务器都运行 Firefish。但这个服务器是的! 这有点复杂,但您很快就会明白的。"
|
step6_3: "每个服务器的工作方式不同,并不是所有的服务器都运行 Firefish。但这个服务器是的! 这有点复杂,但您很快就会明白的。"
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
"packageManager": "pnpm@8.7.6",
|
"packageManager": "pnpm@8.7.6",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"rebuild": "pnpm run clean && ./scripts/build-greet.sh && pnpm -r --parallel run build && pnpm run gulp",
|
"rebuild": "pnpm run clean && ./scripts/build-greet.sh && pnpm --filter !sw -r --parallel run build && pnpm --filter sw run build && pnpm run gulp",
|
||||||
"build": "./scripts/build-greet.sh && pnpm -r --parallel run build && pnpm run gulp",
|
"build": "./scripts/build-greet.sh && pnpm --filter !sw -r --parallel run build && pnpm --filter sw run build && pnpm run gulp",
|
||||||
"start": "pnpm --filter backend run start",
|
"start": "pnpm --filter backend run start",
|
||||||
"start:test": "pnpm --filter backend run start:test",
|
"start:test": "pnpm --filter backend run start:test",
|
||||||
"init": "pnpm run migrate",
|
"init": "pnpm run migrate",
|
||||||
|
|
BIN
packages/backend/assets/badges/error.avif
Normal file
BIN
packages/backend/assets/badges/error.avif
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 40 KiB |
BIN
packages/backend/assets/badges/info.avif
Normal file
BIN
packages/backend/assets/badges/info.avif
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 9.9 KiB |
BIN
packages/backend/assets/badges/not-found.avif
Normal file
BIN
packages/backend/assets/badges/not-found.avif
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 9.1 KiB |
|
@ -220,7 +220,7 @@ export class Init1000000000000 {
|
||||||
`CREATE INDEX "IDX_3c601b70a1066d2c8b517094cb" ON "notification" ("notifieeId") `,
|
`CREATE INDEX "IDX_3c601b70a1066d2c8b517094cb" ON "notification" ("notifieeId") `,
|
||||||
);
|
);
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TABLE "meta" ("id" character varying(32) NOT NULL, "name" character varying(128), "description" character varying(1024), "maintainerName" character varying(128), "maintainerEmail" character varying(128), "announcements" jsonb NOT NULL DEFAULT '[]', "disableRegistration" boolean NOT NULL DEFAULT false, "disableLocalTimeline" boolean NOT NULL DEFAULT false, "disableGlobalTimeline" boolean NOT NULL DEFAULT false, "enableEmojiReaction" boolean NOT NULL DEFAULT true, "useStarForReactionFallback" boolean NOT NULL DEFAULT false, "langs" character varying(64) array NOT NULL DEFAULT '{}'::varchar[], "hiddenTags" character varying(256) array NOT NULL DEFAULT '{}'::varchar[], "blockedHosts" character varying(256) array NOT NULL DEFAULT '{}'::varchar[], "mascotImageUrl" character varying(512) DEFAULT '/static-assets/badges/info.png', "bannerUrl" character varying(512), "errorImageUrl" character varying(512) DEFAULT '/static-assets/badges/error.png', "iconUrl" character varying(512), "cacheRemoteFiles" boolean NOT NULL DEFAULT false, "proxyAccount" character varying(128), "enableRecaptcha" boolean NOT NULL DEFAULT false, "recaptchaSiteKey" character varying(64), "recaptchaSecretKey" character varying(64), "localDriveCapacityMb" integer NOT NULL DEFAULT 1024, "remoteDriveCapacityMb" integer NOT NULL DEFAULT 32, "maxNoteTextLength" integer NOT NULL DEFAULT 500, "summalyProxy" character varying(128), "enableEmail" boolean NOT NULL DEFAULT false, "email" character varying(128), "smtpSecure" boolean NOT NULL DEFAULT false, "smtpHost" character varying(128), "smtpPort" integer, "smtpUser" character varying(128), "smtpPass" character varying(128), "enableServiceWorker" boolean NOT NULL DEFAULT false, "swPublicKey" character varying(128), "swPrivateKey" character varying(128), "enableTwitterIntegration" boolean NOT NULL DEFAULT false, "twitterConsumerKey" character varying(128), "twitterConsumerSecret" character varying(128), "enableGithubIntegration" boolean NOT NULL DEFAULT false, "githubClientId" character varying(128), "githubClientSecret" character varying(128), "enableDiscordIntegration" boolean NOT NULL DEFAULT false, "discordClientId" character varying(128), "discordClientSecret" character varying(128), CONSTRAINT "PK_c4c17a6c2bd7651338b60fc590b" PRIMARY KEY ("id"))`,
|
`CREATE TABLE "meta" ("id" character varying(32) NOT NULL, "name" character varying(128), "description" character varying(1024), "maintainerName" character varying(128), "maintainerEmail" character varying(128), "announcements" jsonb NOT NULL DEFAULT '[]', "disableRegistration" boolean NOT NULL DEFAULT false, "disableLocalTimeline" boolean NOT NULL DEFAULT false, "disableGlobalTimeline" boolean NOT NULL DEFAULT false, "enableEmojiReaction" boolean NOT NULL DEFAULT true, "useStarForReactionFallback" boolean NOT NULL DEFAULT false, "langs" character varying(64) array NOT NULL DEFAULT '{}'::varchar[], "hiddenTags" character varying(256) array NOT NULL DEFAULT '{}'::varchar[], "blockedHosts" character varying(256) array NOT NULL DEFAULT '{}'::varchar[], "mascotImageUrl" character varying(512) DEFAULT '/static-assets/badges/info.avif', "bannerUrl" character varying(512), "errorImageUrl" character varying(512) DEFAULT '/static-assets/badges/error.avif', "iconUrl" character varying(512), "cacheRemoteFiles" boolean NOT NULL DEFAULT false, "proxyAccount" character varying(128), "enableRecaptcha" boolean NOT NULL DEFAULT false, "recaptchaSiteKey" character varying(64), "recaptchaSecretKey" character varying(64), "localDriveCapacityMb" integer NOT NULL DEFAULT 1024, "remoteDriveCapacityMb" integer NOT NULL DEFAULT 32, "maxNoteTextLength" integer NOT NULL DEFAULT 500, "summalyProxy" character varying(128), "enableEmail" boolean NOT NULL DEFAULT false, "email" character varying(128), "smtpSecure" boolean NOT NULL DEFAULT false, "smtpHost" character varying(128), "smtpPort" integer, "smtpUser" character varying(128), "smtpPass" character varying(128), "enableServiceWorker" boolean NOT NULL DEFAULT false, "swPublicKey" character varying(128), "swPrivateKey" character varying(128), "enableTwitterIntegration" boolean NOT NULL DEFAULT false, "twitterConsumerKey" character varying(128), "twitterConsumerSecret" character varying(128), "enableGithubIntegration" boolean NOT NULL DEFAULT false, "githubClientId" character varying(128), "githubClientSecret" character varying(128), "enableDiscordIntegration" boolean NOT NULL DEFAULT false, "discordClientId" character varying(128), "discordClientSecret" character varying(128), CONSTRAINT "PK_c4c17a6c2bd7651338b60fc590b" PRIMARY KEY ("id"))`,
|
||||||
);
|
);
|
||||||
await queryRunner.query(
|
await queryRunner.query(
|
||||||
`CREATE TABLE "following" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "followeeId" character varying(32) NOT NULL, "followerId" character varying(32) NOT NULL, "followerHost" character varying(128), "followerInbox" character varying(512), "followerSharedInbox" character varying(512), "followeeHost" character varying(128), "followeeInbox" character varying(512), "followeeSharedInbox" character varying(512), CONSTRAINT "PK_c76c6e044bdf76ecf8bfb82a645" PRIMARY KEY ("id"))`,
|
`CREATE TABLE "following" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "followeeId" character varying(32) NOT NULL, "followerId" character varying(32) NOT NULL, "followerHost" character varying(128), "followerInbox" character varying(512), "followerSharedInbox" character varying(512), "followeeHost" character varying(128), "followeeInbox" character varying(512), "followeeSharedInbox" character varying(512), CONSTRAINT "PK_c76c6e044bdf76ecf8bfb82a645" PRIMARY KEY ("id"))`,
|
||||||
|
|
11
packages/backend/src/misc/detect-language.ts
Normal file
11
packages/backend/src/misc/detect-language.ts
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
import { detect } from "tinyld";
|
||||||
|
import * as mfm from "mfm-js";
|
||||||
|
|
||||||
|
export default function detectLanguage(text: string): string {
|
||||||
|
const nodes = mfm.parse(text);
|
||||||
|
const filtered = mfm.extract(nodes, (node) => {
|
||||||
|
return node.type === "text" || node.type === "quote";
|
||||||
|
});
|
||||||
|
const purified = mfm.toString(filtered);
|
||||||
|
return detect(purified);
|
||||||
|
}
|
|
@ -1,6 +1,5 @@
|
||||||
export function nyaize(text: string): string {
|
export function nyaize(text: string, lang?: string): string {
|
||||||
return (
|
text = text
|
||||||
text
|
|
||||||
// ja-JP
|
// ja-JP
|
||||||
.replaceAll("な", "にゃ")
|
.replaceAll("な", "にゃ")
|
||||||
.replaceAll("ナ", "ニャ")
|
.replaceAll("ナ", "ニャ")
|
||||||
|
@ -23,6 +22,10 @@ export function nyaize(text: string): string {
|
||||||
// el-GR
|
// el-GR
|
||||||
.replaceAll("να", "νια")
|
.replaceAll("να", "νια")
|
||||||
.replaceAll("ΝΑ", "ΝΙΑ")
|
.replaceAll("ΝΑ", "ΝΙΑ")
|
||||||
.replaceAll("Να", "Νια")
|
.replaceAll("Να", "Νια");
|
||||||
);
|
|
||||||
|
// zh-CN, zh-TW
|
||||||
|
if (lang === "zh") text = text.replace(/(妙|庙|描|渺|瞄|秒|苗|藐|廟)/g, "喵");
|
||||||
|
|
||||||
|
return text;
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,7 +162,7 @@ export class Meta {
|
||||||
@Column("varchar", {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
default: "/static-assets/badges/info.png",
|
default: "/static-assets/badges/info.avif",
|
||||||
})
|
})
|
||||||
public mascotImageUrl: string | null;
|
public mascotImageUrl: string | null;
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ export class Meta {
|
||||||
@Column("varchar", {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
default: "/static-assets/badges/error.png",
|
default: "/static-assets/badges/error.avif",
|
||||||
})
|
})
|
||||||
public errorImageUrl: string | null;
|
public errorImageUrl: string | null;
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ import {
|
||||||
} from "@/db/scylla.js";
|
} from "@/db/scylla.js";
|
||||||
import { LocalFollowingsCache } from "@/misc/cache.js";
|
import { LocalFollowingsCache } from "@/misc/cache.js";
|
||||||
import { userByIdCache } from "@/services/user-cache.js";
|
import { userByIdCache } from "@/services/user-cache.js";
|
||||||
import { detect as detectLanguage } from "tinyld";
|
// import detectLanguage from "@/misc/detect-language.js";
|
||||||
|
|
||||||
export async function populatePoll(
|
export async function populatePoll(
|
||||||
note: Note | ScyllaNote,
|
note: Note | ScyllaNote,
|
||||||
|
@ -279,7 +279,7 @@ export const NoteRepository = db.getRepository(Note).extend({
|
||||||
let text = note.text;
|
let text = note.text;
|
||||||
|
|
||||||
if (note.name && (note.url ?? note.uri)) {
|
if (note.name && (note.url ?? note.uri)) {
|
||||||
text = `【${note.name}】\n${(note.text || "").trim()}\n\n${
|
text = `${note.name}\n${(note.text || "").trim()}\n\n${
|
||||||
note.url ?? note.uri
|
note.url ?? note.uri
|
||||||
}`;
|
}`;
|
||||||
}
|
}
|
||||||
|
@ -381,7 +381,8 @@ export const NoteRepository = db.getRepository(Note).extend({
|
||||||
const tokens = packed.text ? mfm.parse(packed.text) : [];
|
const tokens = packed.text ? mfm.parse(packed.text) : [];
|
||||||
function nyaizeNode(node: mfm.MfmNode) {
|
function nyaizeNode(node: mfm.MfmNode) {
|
||||||
if (node.type === "quote") return;
|
if (node.type === "quote") return;
|
||||||
if (node.type === "text") node.props.text = nyaize(node.props.text);
|
if (node.type === "text")
|
||||||
|
node.props.text = nyaize(node.props.text, packed.lang);
|
||||||
|
|
||||||
if (node.children) {
|
if (node.children) {
|
||||||
for (const child of node.children) {
|
for (const child of node.children) {
|
||||||
|
|
|
@ -24,7 +24,7 @@ export const packedUserLiteSchema = {
|
||||||
type: "string",
|
type: "string",
|
||||||
nullable: true,
|
nullable: true,
|
||||||
optional: false,
|
optional: false,
|
||||||
example: "misskey.example.com",
|
example: "firefish.example.com",
|
||||||
description: "The local host is represented with `null`.",
|
description: "The local host is represented with `null`.",
|
||||||
},
|
},
|
||||||
avatarUrl: {
|
avatarUrl: {
|
||||||
|
|
|
@ -306,7 +306,10 @@ export async function createPerson(
|
||||||
tags,
|
tags,
|
||||||
isBot,
|
isBot,
|
||||||
isCat: (person as any).isCat === true,
|
isCat: (person as any).isCat === true,
|
||||||
speakAsCat: (person as any).speakAsCat === true,
|
speakAsCat:
|
||||||
|
person.speakAsCat != null
|
||||||
|
? person.speakAsCat === true
|
||||||
|
: (person as any).isCat === true,
|
||||||
isIndexable: person.indexable,
|
isIndexable: person.indexable,
|
||||||
}),
|
}),
|
||||||
)) as IRemoteUser;
|
)) as IRemoteUser;
|
||||||
|
@ -557,7 +560,10 @@ export async function updatePerson(
|
||||||
tags,
|
tags,
|
||||||
isBot: getApType(object) !== "Person",
|
isBot: getApType(object) !== "Person",
|
||||||
isCat: (person as any).isCat === true,
|
isCat: (person as any).isCat === true,
|
||||||
speakAsCat: (person as any).speakAsCat === true,
|
speakAsCat:
|
||||||
|
person.speakAsCat != null
|
||||||
|
? person.speakAsCat === true
|
||||||
|
: (person as any).isCat === true,
|
||||||
isIndexable: person.indexable,
|
isIndexable: person.indexable,
|
||||||
isLocked: !!person.manuallyApprovesFollowers,
|
isLocked: !!person.manuallyApprovesFollowers,
|
||||||
movedToUri: person.movedTo || null,
|
movedToUri: person.movedTo || null,
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { In, IsNull } from "typeorm";
|
import { In, IsNull } from "typeorm";
|
||||||
import { detect as detectLanguage } from "tinyld";
|
|
||||||
import config from "@/config/index.js";
|
import config from "@/config/index.js";
|
||||||
import type { Note, IMentionedRemoteUsers } from "@/models/entities/note.js";
|
import type { Note, IMentionedRemoteUsers } from "@/models/entities/note.js";
|
||||||
import type { DriveFile } from "@/models/entities/drive-file.js";
|
import type { DriveFile } from "@/models/entities/drive-file.js";
|
||||||
import { DriveFiles, Notes, Users, Emojis, Polls } from "@/models/index.js";
|
import { DriveFiles, Notes, Users, Emojis, Polls } from "@/models/index.js";
|
||||||
import type { Emoji } from "@/models/entities/emoji.js";
|
import type { Emoji } from "@/models/entities/emoji.js";
|
||||||
import type { Poll } from "@/models/entities/poll.js";
|
import type { Poll } from "@/models/entities/poll.js";
|
||||||
import toHtml from "../misc/get-note-html.js";
|
import toHtml from "@/remote/activitypub/misc/get-note-html.js";
|
||||||
|
import detectLanguage from "@/misc/detect-language.js";
|
||||||
import renderEmoji from "./emoji.js";
|
import renderEmoji from "./emoji.js";
|
||||||
import renderMention from "./mention.js";
|
import renderMention from "./mention.js";
|
||||||
import renderHashtag from "./hashtag.js";
|
import renderHashtag from "./hashtag.js";
|
||||||
|
|
|
@ -64,7 +64,7 @@ export const meta = {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: false,
|
optional: false,
|
||||||
nullable: false,
|
nullable: false,
|
||||||
default: "/static-assets/badges/info.png",
|
default: "/static-assets/badges/info.avif",
|
||||||
},
|
},
|
||||||
bannerUrl: {
|
bannerUrl: {
|
||||||
type: "string",
|
type: "string",
|
||||||
|
@ -75,7 +75,7 @@ export const meta = {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: false,
|
optional: false,
|
||||||
nullable: false,
|
nullable: false,
|
||||||
default: "/static-assets/badges/error.png",
|
default: "/static-assets/badges/error.avif",
|
||||||
},
|
},
|
||||||
iconUrl: {
|
iconUrl: {
|
||||||
type: "string",
|
type: "string",
|
||||||
|
|
|
@ -49,7 +49,7 @@ export default define(meta, paramDef, async (ps) => {
|
||||||
createNotification(user.id, "app", {
|
createNotification(user.id, "app", {
|
||||||
customBody: ps.comment,
|
customBody: ps.comment,
|
||||||
customHeader: "Moderation Notice",
|
customHeader: "Moderation Notice",
|
||||||
customIcon: "/static-assets/badges/info.png",
|
customIcon: "/static-assets/badges/info.avif",
|
||||||
});
|
});
|
||||||
|
|
||||||
setImmediate(async () => {
|
setImmediate(async () => {
|
||||||
|
|
|
@ -155,7 +155,7 @@ export const meta = {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: false,
|
optional: false,
|
||||||
nullable: false,
|
nullable: false,
|
||||||
default: "/static-assets/badges/info.png",
|
default: "/static-assets/badges/info.avif",
|
||||||
},
|
},
|
||||||
bannerUrl: {
|
bannerUrl: {
|
||||||
type: "string",
|
type: "string",
|
||||||
|
@ -166,7 +166,7 @@ export const meta = {
|
||||||
type: "string",
|
type: "string",
|
||||||
optional: false,
|
optional: false,
|
||||||
nullable: false,
|
nullable: false,
|
||||||
default: "/static-assets/badges/error.png",
|
default: "/static-assets/badges/error.avif",
|
||||||
},
|
},
|
||||||
iconUrl: {
|
iconUrl: {
|
||||||
type: "string",
|
type: "string",
|
||||||
|
|
|
@ -44,8 +44,10 @@ import {
|
||||||
parseHomeTimeline,
|
parseHomeTimeline,
|
||||||
} from "@/db/scylla.js";
|
} from "@/db/scylla.js";
|
||||||
import type { Client } from "cassandra-driver";
|
import type { Client } from "cassandra-driver";
|
||||||
import { detect as detectLanguage } from "tinyld";
|
// import { deliverQuestionUpdate } from "@/services/note/polls/update.js";
|
||||||
|
import { fetchMeta } from "@/misc/fetch-meta.js";
|
||||||
import { langmap } from "@/misc/langmap.js";
|
import { langmap } from "@/misc/langmap.js";
|
||||||
|
import detectLanguage from "@/misc/detect-language.js";
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ["notes"],
|
tags: ["notes"],
|
||||||
|
|
|
@ -12,6 +12,7 @@ import {
|
||||||
convertPoll,
|
convertPoll,
|
||||||
convertStatus,
|
convertStatus,
|
||||||
} from "../converters.js";
|
} from "../converters.js";
|
||||||
|
import { fetchMeta } from "@/misc/fetch-meta.js";
|
||||||
|
|
||||||
function normalizeQuery(data: any) {
|
function normalizeQuery(data: any) {
|
||||||
const str = querystring.stringify(data);
|
const str = querystring.stringify(data);
|
||||||
|
@ -216,10 +217,11 @@ export function apiStatusMastodon(router: Router): void {
|
||||||
router.post<{ Params: { id: string } }>(
|
router.post<{ Params: { id: string } }>(
|
||||||
"/v1/statuses/:id/favourite",
|
"/v1/statuses/:id/favourite",
|
||||||
async (ctx) => {
|
async (ctx) => {
|
||||||
|
const meta = await fetchMeta();
|
||||||
const BASE_URL = `${ctx.protocol}://${ctx.hostname}`;
|
const BASE_URL = `${ctx.protocol}://${ctx.hostname}`;
|
||||||
const accessTokens = ctx.headers.authorization;
|
const accessTokens = ctx.headers.authorization;
|
||||||
const client = getClient(BASE_URL, accessTokens);
|
const client = getClient(BASE_URL, accessTokens);
|
||||||
const react = await getFirstReaction(BASE_URL, accessTokens);
|
const react = meta.defaultReaction;
|
||||||
try {
|
try {
|
||||||
const a = (await client.createEmojiReaction(
|
const a = (await client.createEmojiReaction(
|
||||||
convertId(ctx.params.id, IdType.FirefishId),
|
convertId(ctx.params.id, IdType.FirefishId),
|
||||||
|
@ -238,10 +240,11 @@ export function apiStatusMastodon(router: Router): void {
|
||||||
router.post<{ Params: { id: string } }>(
|
router.post<{ Params: { id: string } }>(
|
||||||
"/v1/statuses/:id/unfavourite",
|
"/v1/statuses/:id/unfavourite",
|
||||||
async (ctx) => {
|
async (ctx) => {
|
||||||
|
const meta = await fetchMeta();
|
||||||
const BASE_URL = `${ctx.protocol}://${ctx.hostname}`;
|
const BASE_URL = `${ctx.protocol}://${ctx.hostname}`;
|
||||||
const accessTokens = ctx.headers.authorization;
|
const accessTokens = ctx.headers.authorization;
|
||||||
const client = getClient(BASE_URL, accessTokens);
|
const client = getClient(BASE_URL, accessTokens);
|
||||||
const react = await getFirstReaction(BASE_URL, accessTokens);
|
const react = meta.defaultReaction;
|
||||||
try {
|
try {
|
||||||
const data = await client.deleteEmojiReaction(
|
const data = await client.deleteEmojiReaction(
|
||||||
convertId(ctx.params.id, IdType.FirefishId),
|
convertId(ctx.params.id, IdType.FirefishId),
|
||||||
|
@ -476,25 +479,3 @@ export function apiStatusMastodon(router: Router): void {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getFirstReaction(
|
|
||||||
BASE_URL: string,
|
|
||||||
accessTokens: string | undefined,
|
|
||||||
) {
|
|
||||||
const accessTokenArr = accessTokens?.split(" ") ?? [null];
|
|
||||||
const accessToken = accessTokenArr[accessTokenArr.length - 1];
|
|
||||||
let react = "⭐";
|
|
||||||
try {
|
|
||||||
const api = await axios.post(`${BASE_URL}/api/i/registry/get-unsecure`, {
|
|
||||||
scope: ["client", "base"],
|
|
||||||
key: "reactions",
|
|
||||||
i: accessToken,
|
|
||||||
});
|
|
||||||
const reactRaw = api.data;
|
|
||||||
react = Array.isArray(reactRaw) ? api.data[0] : "⭐";
|
|
||||||
console.log(api.data);
|
|
||||||
return react;
|
|
||||||
} catch (e) {
|
|
||||||
return react;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -36,9 +36,9 @@ html
|
||||||
link(rel='icon' href= icon || `/favicon.ico?${ timestamp }`)
|
link(rel='icon' href= icon || `/favicon.ico?${ timestamp }`)
|
||||||
link(rel='apple-touch-icon' href= icon || `/apple-touch-icon.png?${ timestamp }`)
|
link(rel='apple-touch-icon' href= icon || `/apple-touch-icon.png?${ timestamp }`)
|
||||||
link(rel='manifest' href='/manifest.json')
|
link(rel='manifest' href='/manifest.json')
|
||||||
link(rel='prefetch' href=`/static-assets/badges/info.png?${ timestamp }`)
|
link(rel='prefetch' href=`/static-assets/badges/info.avif?${ timestamp }`)
|
||||||
link(rel='prefetch' href=`/static-assets/badges/not-found.png?${ timestamp }`)
|
link(rel='prefetch' href=`/static-assets/badges/not-found.avif?${ timestamp }`)
|
||||||
link(rel='prefetch' href=`/static-assets/badges/error.png?${ timestamp }`)
|
link(rel='prefetch' href=`/static-assets/badges/error.avif?${ timestamp }`)
|
||||||
link(rel='stylesheet' href=`/static-assets/instance.css?${ timestamp }`)
|
link(rel='stylesheet' href=`/static-assets/instance.css?${ timestamp }`)
|
||||||
link(rel='modulepreload' href=`/assets/${clientEntry.file}`)
|
link(rel='modulepreload' href=`/assets/${clientEntry.file}`)
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ import type { UserProfile } from "@/models/entities/user-profile.js";
|
||||||
import { db } from "@/db/postgre.js";
|
import { db } from "@/db/postgre.js";
|
||||||
import { getActiveWebhooks } from "@/misc/webhook-cache.js";
|
import { getActiveWebhooks } from "@/misc/webhook-cache.js";
|
||||||
import { shouldSilenceInstance } from "@/misc/should-block-instance.js";
|
import { shouldSilenceInstance } from "@/misc/should-block-instance.js";
|
||||||
import meilisearch from "../../db/meilisearch.js";
|
import meilisearch from "@/db/meilisearch.js";
|
||||||
import { redisClient } from "@/db/redis.js";
|
import { redisClient } from "@/db/redis.js";
|
||||||
import { Mutex } from "redis-semaphore";
|
import { Mutex } from "redis-semaphore";
|
||||||
import {
|
import {
|
||||||
|
@ -81,8 +81,8 @@ import {
|
||||||
ScyllaPoll,
|
ScyllaPoll,
|
||||||
} from "@/db/scylla.js";
|
} from "@/db/scylla.js";
|
||||||
import { userByIdCache, userDenormalizedCache } from "../user-cache.js";
|
import { userByIdCache, userDenormalizedCache } from "../user-cache.js";
|
||||||
import { detect as detectLanguage } from "tinyld";
|
|
||||||
import { langmap } from "@/misc/langmap.js";
|
import { langmap } from "@/misc/langmap.js";
|
||||||
|
import detectLanguage from "@/misc/detect-language.js";
|
||||||
|
|
||||||
export const mutedWordsCache = new Cache<
|
export const mutedWordsCache = new Cache<
|
||||||
{ userId: UserProfile["userId"]; mutedWords: UserProfile["mutedWords"] }[]
|
{ userId: UserProfile["userId"]; mutedWords: UserProfile["mutedWords"] }[]
|
||||||
|
|
|
@ -15,7 +15,7 @@ import {
|
||||||
failedApiCall,
|
failedApiCall,
|
||||||
uploadFile,
|
uploadFile,
|
||||||
} from "../utils.js";
|
} from "../utils.js";
|
||||||
import type * as misskey from "misskey-js";
|
import type * as firefish from "firefish-js";
|
||||||
import type { INestApplicationContext } from "@nestjs/common";
|
import type { INestApplicationContext } from "@nestjs/common";
|
||||||
|
|
||||||
describe("ユーザー", () => {
|
describe("ユーザー", () => {
|
||||||
|
@ -34,16 +34,16 @@ describe("ユーザー", () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// BUG misskey-jsとjson-schemaと実際に返ってくるデータが全部違う
|
// BUG misskey-jsとjson-schemaと実際に返ってくるデータが全部違う
|
||||||
type UserLite = misskey.entities.UserLite & {
|
type UserLite = firefish.entities.UserLite & {
|
||||||
badgeRoles: any[];
|
badgeRoles: any[];
|
||||||
};
|
};
|
||||||
|
|
||||||
type UserDetailedNotMe = UserLite &
|
type UserDetailedNotMe = UserLite &
|
||||||
misskey.entities.UserDetailed & {
|
firefish.entities.UserDetailed & {
|
||||||
roles: any[];
|
roles: any[];
|
||||||
};
|
};
|
||||||
|
|
||||||
type MeDetailed = UserDetailedNotMe & misskey.entities.MeDetailed;
|
type MeDetailed = UserDetailedNotMe & firefish.entities.MeDetailed;
|
||||||
|
|
||||||
type User = MeDetailed & { token: string };
|
type User = MeDetailed & { token: string };
|
||||||
|
|
||||||
|
@ -183,12 +183,12 @@ describe("ユーザー", () => {
|
||||||
|
|
||||||
let root: User;
|
let root: User;
|
||||||
let alice: User;
|
let alice: User;
|
||||||
let aliceNote: misskey.entities.Note;
|
let aliceNote: firefish.entities.Note;
|
||||||
let alicePage: misskey.entities.Page;
|
let alicePage: firefish.entities.Page;
|
||||||
let aliceList: misskey.entities.UserList;
|
let aliceList: firefish.entities.UserList;
|
||||||
|
|
||||||
let bob: User;
|
let bob: User;
|
||||||
let bobNote: misskey.entities.Note;
|
let bobNote: firefish.entities.Note;
|
||||||
|
|
||||||
let carol: User;
|
let carol: User;
|
||||||
let dave: User;
|
let dave: User;
|
||||||
|
|
|
@ -6,7 +6,7 @@ import * as childProcess from "child_process";
|
||||||
import * as http from "node:http";
|
import * as http from "node:http";
|
||||||
import { SIGKILL } from "constants";
|
import { SIGKILL } from "constants";
|
||||||
import WebSocket from "ws";
|
import WebSocket from "ws";
|
||||||
import * as misskey from "firefish-js";
|
import * as firefish from "firefish-js";
|
||||||
import fetch from "node-fetch";
|
import fetch from "node-fetch";
|
||||||
import FormData from "form-data";
|
import FormData from "form-data";
|
||||||
import { DataSource } from "typeorm";
|
import { DataSource } from "typeorm";
|
||||||
|
@ -113,8 +113,8 @@ export const signup = async (params?: any): Promise<any> => {
|
||||||
|
|
||||||
export const post = async (
|
export const post = async (
|
||||||
user: any,
|
user: any,
|
||||||
params?: misskey.Endpoints["notes/create"]["req"],
|
params?: firefish.Endpoints["notes/create"]["req"],
|
||||||
): Promise<misskey.entities.Note> => {
|
): Promise<firefish.entities.Note> => {
|
||||||
const q = Object.assign(
|
const q = Object.assign(
|
||||||
{
|
{
|
||||||
text: "test",
|
text: "test",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { defineAsyncComponent, reactive } from "vue";
|
import { defineAsyncComponent, reactive } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import { i18n } from "./i18n";
|
import { i18n } from "./i18n";
|
||||||
import { del, get, set } from "@/scripts/idb-proxy";
|
import { del, get, set } from "@/scripts/idb-proxy";
|
||||||
import { apiUrl } from "@/config";
|
import { apiUrl } from "@/config";
|
||||||
|
@ -8,7 +8,7 @@ import { reloadChannel, unisonReload } from "@/scripts/unison-reload";
|
||||||
|
|
||||||
// TODO: 他のタブと永続化されたstateを同期
|
// TODO: 他のタブと永続化されたstateを同期
|
||||||
|
|
||||||
type Account = misskey.entities.MeDetailed;
|
type Account = firefish.entities.MeDetailed;
|
||||||
|
|
||||||
const accountData = localStorage.getItem("account");
|
const accountData = localStorage.getItem("account");
|
||||||
|
|
||||||
|
@ -150,8 +150,8 @@ export async function openAccountMenu(
|
||||||
opts: {
|
opts: {
|
||||||
includeCurrentAccount?: boolean;
|
includeCurrentAccount?: boolean;
|
||||||
withExtraOperation: boolean;
|
withExtraOperation: boolean;
|
||||||
active?: misskey.entities.UserDetailed["id"];
|
active?: firefish.entities.UserDetailed["id"];
|
||||||
onChoose?: (account: misskey.entities.UserDetailed) => void;
|
onChoose?: (account: firefish.entities.UserDetailed) => void;
|
||||||
},
|
},
|
||||||
ev: MouseEvent,
|
ev: MouseEvent,
|
||||||
) {
|
) {
|
||||||
|
@ -183,7 +183,7 @@ export async function openAccountMenu(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function switchAccount(account: misskey.entities.UserDetailed) {
|
async function switchAccount(account: firefish.entities.UserDetailed) {
|
||||||
const storedAccounts = await getAccounts();
|
const storedAccounts = await getAccounts();
|
||||||
const token = storedAccounts.find((x) => x.id === account.id).token;
|
const token = storedAccounts.find((x) => x.id === account.id).token;
|
||||||
switchAccountWithToken(token);
|
switchAccountWithToken(token);
|
||||||
|
@ -200,7 +200,7 @@ export async function openAccountMenu(
|
||||||
userIds: storedAccounts.map((x) => x.id),
|
userIds: storedAccounts.map((x) => x.id),
|
||||||
});
|
});
|
||||||
|
|
||||||
function createItem(account: misskey.entities.UserDetailed) {
|
function createItem(account: firefish.entities.UserDetailed) {
|
||||||
return {
|
return {
|
||||||
type: "user",
|
type: "user",
|
||||||
user: account,
|
user: account,
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import type * as Misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import XWindow from "@/components/MkWindow.vue";
|
import XWindow from "@/components/MkWindow.vue";
|
||||||
import MkTextarea from "@/components/form/textarea.vue";
|
import MkTextarea from "@/components/form/textarea.vue";
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
|
@ -49,7 +49,7 @@ import * as os from "@/os";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: Misskey.entities.User;
|
user: firefish.entities.User;
|
||||||
initialComment?: string;
|
initialComment?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<div class="_fullinfo">
|
<div class="_fullinfo">
|
||||||
<img
|
<img
|
||||||
src="/static-assets/badges/not-found.png"
|
src="/static-assets/badges/not-found.avif"
|
||||||
class="_ghost"
|
class="_ghost"
|
||||||
:alt="i18n.ts.notFound"
|
:alt="i18n.ts.notFound"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import Cropper from "cropperjs";
|
import Cropper from "cropperjs";
|
||||||
import tinycolor from "tinycolor2";
|
import tinycolor from "tinycolor2";
|
||||||
import XModalWindow from "@/components/MkModalWindow.vue";
|
import XModalWindow from "@/components/MkModalWindow.vue";
|
||||||
|
@ -49,13 +49,13 @@ import { query } from "@/scripts/url";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: "ok", cropped: misskey.entities.DriveFile): void;
|
(ev: "ok", cropped: firefish.entities.DriveFile): void;
|
||||||
(ev: "cancel"): void;
|
(ev: "cancel"): void;
|
||||||
(ev: "closed"): void;
|
(ev: "closed"): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
file: misskey.entities.DriveFile;
|
file: firefish.entities.DriveFile;
|
||||||
aspectRatio: number;
|
aspectRatio: number;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ let cropper: Cropper | null = null,
|
||||||
loading = ref(true);
|
loading = ref(true);
|
||||||
|
|
||||||
const ok = async () => {
|
const ok = async () => {
|
||||||
const promise = new Promise<misskey.entities.DriveFile>(async (res) => {
|
const promise = new Promise<firefish.entities.DriveFile>(async (res) => {
|
||||||
const croppedCanvas = await cropper?.getCropperSelection()?.$toCanvas();
|
const croppedCanvas = await cropper?.getCropperSelection()?.$toCanvas();
|
||||||
croppedCanvas.toBlob((blob) => {
|
croppedCanvas.toBlob((blob) => {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
|
|
|
@ -15,13 +15,13 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import { length } from "stringz";
|
import { length } from "stringz";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import { concat } from "@/scripts/array";
|
import { concat } from "@/scripts/array";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue: boolean;
|
modelValue: boolean;
|
||||||
note: misskey.entities.Note;
|
note: firefish.entities.Note;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineAsyncComponent, ref } from "vue";
|
import { computed, defineAsyncComponent, ref } from "vue";
|
||||||
import type * as Misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import copyToClipboard from "@/scripts/copy-to-clipboard";
|
import copyToClipboard from "@/scripts/copy-to-clipboard";
|
||||||
import MkDriveFileThumbnail from "@/components/MkDriveFileThumbnail.vue";
|
import MkDriveFileThumbnail from "@/components/MkDriveFileThumbnail.vue";
|
||||||
import bytes from "@/filters/bytes";
|
import bytes from "@/filters/bytes";
|
||||||
|
@ -49,7 +49,7 @@ import { $i } from "@/account";
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
file: Misskey.entities.DriveFile;
|
file: firefish.entities.DriveFile;
|
||||||
isSelected?: boolean;
|
isSelected?: boolean;
|
||||||
selectMode?: boolean;
|
selectMode?: boolean;
|
||||||
}>(),
|
}>(),
|
||||||
|
@ -60,7 +60,7 @@ const props = withDefaults(
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: "chosen", r: Misskey.entities.DriveFile): void;
|
(ev: "chosen", r: firefish.entities.DriveFile): void;
|
||||||
(ev: "dragstart"): void;
|
(ev: "dragstart"): void;
|
||||||
(ev: "dragend"): void;
|
(ev: "dragend"): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
|
@ -38,14 +38,14 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineAsyncComponent, ref } from "vue";
|
import { computed, defineAsyncComponent, ref } from "vue";
|
||||||
import type * as Misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
folder: Misskey.entities.DriveFolder;
|
folder: firefish.entities.DriveFolder;
|
||||||
isSelected?: boolean;
|
isSelected?: boolean;
|
||||||
selectMode?: boolean;
|
selectMode?: boolean;
|
||||||
}>(),
|
}>(),
|
||||||
|
@ -56,11 +56,11 @@ const props = withDefaults(
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: "chosen", v: Misskey.entities.DriveFolder): void;
|
(ev: "chosen", v: firefish.entities.DriveFolder): void;
|
||||||
(ev: "move", v: Misskey.entities.DriveFolder): void;
|
(ev: "move", v: firefish.entities.DriveFolder): void;
|
||||||
(ev: "upload", file: File, folder: Misskey.entities.DriveFolder);
|
(ev: "upload", file: File, folder: firefish.entities.DriveFolder);
|
||||||
(ev: "removeFile", v: Misskey.entities.DriveFile["id"]): void;
|
(ev: "removeFile", v: firefish.entities.DriveFile["id"]): void;
|
||||||
(ev: "removeFolder", v: Misskey.entities.DriveFolder["id"]): void;
|
(ev: "removeFolder", v: firefish.entities.DriveFolder["id"]): void;
|
||||||
(ev: "dragstart"): void;
|
(ev: "dragstart"): void;
|
||||||
(ev: "dragend"): void;
|
(ev: "dragend"): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
|
@ -15,24 +15,24 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import type * as Misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
folder?: Misskey.entities.DriveFolder;
|
folder?: firefish.entities.DriveFolder;
|
||||||
parentFolder: Misskey.entities.DriveFolder | null;
|
parentFolder: firefish.entities.DriveFolder | null;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: "move", v?: Misskey.entities.DriveFolder): void;
|
(ev: "move", v?: firefish.entities.DriveFolder): void;
|
||||||
(
|
(
|
||||||
ev: "upload",
|
ev: "upload",
|
||||||
file: File,
|
file: File,
|
||||||
folder?: Misskey.entities.DriveFolder | null,
|
folder?: firefish.entities.DriveFolder | null,
|
||||||
): void;
|
): void;
|
||||||
(ev: "removeFile", v: Misskey.entities.DriveFile["id"]): void;
|
(ev: "removeFile", v: firefish.entities.DriveFile["id"]): void;
|
||||||
(ev: "removeFolder", v: Misskey.entities.DriveFolder["id"]): void;
|
(ev: "removeFolder", v: firefish.entities.DriveFolder["id"]): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const hover = ref(false);
|
const hover = ref(false);
|
||||||
|
|
|
@ -139,7 +139,7 @@ import {
|
||||||
ref,
|
ref,
|
||||||
watch,
|
watch,
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import type * as Misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import MkButton from "./MkButton.vue";
|
import MkButton from "./MkButton.vue";
|
||||||
import XNavFolder from "@/components/MkDrive.navFolder.vue";
|
import XNavFolder from "@/components/MkDrive.navFolder.vue";
|
||||||
import XFolder from "@/components/MkDrive.folder.vue";
|
import XFolder from "@/components/MkDrive.folder.vue";
|
||||||
|
@ -152,7 +152,7 @@ import { uploadFile, uploads } from "@/scripts/upload";
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
initialFolder?: Misskey.entities.DriveFolder;
|
initialFolder?: firefish.entities.DriveFolder;
|
||||||
type?: string;
|
type?: string;
|
||||||
multiple?: boolean;
|
multiple?: boolean;
|
||||||
select?: "file" | "folder" | null;
|
select?: "file" | "folder" | null;
|
||||||
|
@ -166,28 +166,28 @@ const props = withDefaults(
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(
|
(
|
||||||
ev: "selected",
|
ev: "selected",
|
||||||
v: Misskey.entities.DriveFile | Misskey.entities.DriveFolder,
|
v: firefish.entities.DriveFile | firefish.entities.DriveFolder,
|
||||||
): void;
|
): void;
|
||||||
(
|
(
|
||||||
ev: "change-selection",
|
ev: "change-selection",
|
||||||
v: Misskey.entities.DriveFile[] | Misskey.entities.DriveFolder[],
|
v: firefish.entities.DriveFile[] | firefish.entities.DriveFolder[],
|
||||||
): void;
|
): void;
|
||||||
(ev: "move-root"): void;
|
(ev: "move-root"): void;
|
||||||
(ev: "cd", v: Misskey.entities.DriveFolder | null): void;
|
(ev: "cd", v: firefish.entities.DriveFolder | null): void;
|
||||||
(ev: "open-folder", v: Misskey.entities.DriveFolder): void;
|
(ev: "open-folder", v: firefish.entities.DriveFolder): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const loadMoreFiles = ref<InstanceType<typeof MkButton>>();
|
const loadMoreFiles = ref<InstanceType<typeof MkButton>>();
|
||||||
const fileInput = ref<HTMLInputElement>();
|
const fileInput = ref<HTMLInputElement>();
|
||||||
|
|
||||||
const folder = ref<Misskey.entities.DriveFolder | null>(null);
|
const folder = ref<firefish.entities.DriveFolder | null>(null);
|
||||||
const files = ref<Misskey.entities.DriveFile[]>([]);
|
const files = ref<firefish.entities.DriveFile[]>([]);
|
||||||
const folders = ref<Misskey.entities.DriveFolder[]>([]);
|
const folders = ref<firefish.entities.DriveFolder[]>([]);
|
||||||
const moreFiles = ref(false);
|
const moreFiles = ref(false);
|
||||||
const moreFolders = ref(false);
|
const moreFolders = ref(false);
|
||||||
const hierarchyFolders = ref<Misskey.entities.DriveFolder[]>([]);
|
const hierarchyFolders = ref<firefish.entities.DriveFolder[]>([]);
|
||||||
const selectedFiles = ref<Misskey.entities.DriveFile[]>([]);
|
const selectedFiles = ref<firefish.entities.DriveFile[]>([]);
|
||||||
const selectedFolders = ref<Misskey.entities.DriveFolder[]>([]);
|
const selectedFolders = ref<firefish.entities.DriveFolder[]>([]);
|
||||||
const uploadings = uploads;
|
const uploadings = uploads;
|
||||||
const connection = stream.useChannel("drive");
|
const connection = stream.useChannel("drive");
|
||||||
const keepOriginal = ref<boolean>(defaultStore.state.keepOriginalUploading); // 外部渡しが多いので$refは使わないほうがよい
|
const keepOriginal = ref<boolean>(defaultStore.state.keepOriginalUploading); // 外部渡しが多いので$refは使わないほうがよい
|
||||||
|
@ -211,11 +211,11 @@ const ilFilesObserver = new IntersectionObserver(
|
||||||
|
|
||||||
watch(folder, () => emit("cd", folder.value));
|
watch(folder, () => emit("cd", folder.value));
|
||||||
|
|
||||||
function onStreamDriveFileCreated(file: Misskey.entities.DriveFile) {
|
function onStreamDriveFileCreated(file: firefish.entities.DriveFile) {
|
||||||
addFile(file, true);
|
addFile(file, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onStreamDriveFileUpdated(file: Misskey.entities.DriveFile) {
|
function onStreamDriveFileUpdated(file: firefish.entities.DriveFile) {
|
||||||
const current = folder.value ? folder.value.id : null;
|
const current = folder.value ? folder.value.id : null;
|
||||||
if (current !== file.folderId) {
|
if (current !== file.folderId) {
|
||||||
removeFile(file);
|
removeFile(file);
|
||||||
|
@ -229,13 +229,13 @@ function onStreamDriveFileDeleted(fileId: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onStreamDriveFolderCreated(
|
function onStreamDriveFolderCreated(
|
||||||
createdFolder: Misskey.entities.DriveFolder,
|
createdFolder: firefish.entities.DriveFolder,
|
||||||
) {
|
) {
|
||||||
addFolder(createdFolder, true);
|
addFolder(createdFolder, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onStreamDriveFolderUpdated(
|
function onStreamDriveFolderUpdated(
|
||||||
updatedFolder: Misskey.entities.DriveFolder,
|
updatedFolder: firefish.entities.DriveFolder,
|
||||||
) {
|
) {
|
||||||
const current = folder.value ? folder.value.id : null;
|
const current = folder.value ? folder.value.id : null;
|
||||||
if (current !== updatedFolder.parentId) {
|
if (current !== updatedFolder.parentId) {
|
||||||
|
@ -380,7 +380,7 @@ function createFolder() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function renameFolder(folderToRename: Misskey.entities.DriveFolder) {
|
function renameFolder(folderToRename: firefish.entities.DriveFolder) {
|
||||||
os.inputText({
|
os.inputText({
|
||||||
title: i18n.ts.renameFolder,
|
title: i18n.ts.renameFolder,
|
||||||
placeholder: i18n.ts.inputNewFolderName,
|
placeholder: i18n.ts.inputNewFolderName,
|
||||||
|
@ -397,7 +397,7 @@ function renameFolder(folderToRename: Misskey.entities.DriveFolder) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteFolder(folderToDelete: Misskey.entities.DriveFolder) {
|
function deleteFolder(folderToDelete: firefish.entities.DriveFolder) {
|
||||||
os.api("drive/folders/delete", {
|
os.api("drive/folders/delete", {
|
||||||
folderId: folderToDelete.id,
|
folderId: folderToDelete.id,
|
||||||
})
|
})
|
||||||
|
@ -432,7 +432,7 @@ function onChangeFileInput() {
|
||||||
|
|
||||||
function upload(
|
function upload(
|
||||||
file: File,
|
file: File,
|
||||||
folderToUpload?: Misskey.entities.DriveFolder | null,
|
folderToUpload?: firefish.entities.DriveFolder | null,
|
||||||
) {
|
) {
|
||||||
uploadFile(
|
uploadFile(
|
||||||
file,
|
file,
|
||||||
|
@ -446,7 +446,7 @@ function upload(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function chooseFile(file: Misskey.entities.DriveFile) {
|
function chooseFile(file: firefish.entities.DriveFile) {
|
||||||
const isAlreadySelected = selectedFiles.value.some((f) => f.id === file.id);
|
const isAlreadySelected = selectedFiles.value.some((f) => f.id === file.id);
|
||||||
if (props.multiple) {
|
if (props.multiple) {
|
||||||
if (isAlreadySelected) {
|
if (isAlreadySelected) {
|
||||||
|
@ -467,7 +467,7 @@ function chooseFile(file: Misskey.entities.DriveFile) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function chooseFolder(folderToChoose: Misskey.entities.DriveFolder) {
|
function chooseFolder(folderToChoose: firefish.entities.DriveFolder) {
|
||||||
const isAlreadySelected = selectedFolders.value.some(
|
const isAlreadySelected = selectedFolders.value.some(
|
||||||
(f) => f.id === folderToChoose.id,
|
(f) => f.id === folderToChoose.id,
|
||||||
);
|
);
|
||||||
|
@ -490,7 +490,7 @@ function chooseFolder(folderToChoose: Misskey.entities.DriveFolder) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function move(target?: Misskey.entities.DriveFolder) {
|
function move(target?: firefish.entities.DriveFolder) {
|
||||||
if (!target) {
|
if (!target) {
|
||||||
goRoot();
|
goRoot();
|
||||||
return;
|
return;
|
||||||
|
@ -518,7 +518,10 @@ function move(target?: Misskey.entities.DriveFolder) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function addFolder(folderToAdd: Misskey.entities.DriveFolder, unshift = false) {
|
function addFolder(
|
||||||
|
folderToAdd: firefish.entities.DriveFolder,
|
||||||
|
unshift = false,
|
||||||
|
) {
|
||||||
const current = folder.value ? folder.value.id : null;
|
const current = folder.value ? folder.value.id : null;
|
||||||
if (current !== folderToAdd.parentId) return;
|
if (current !== folderToAdd.parentId) return;
|
||||||
|
|
||||||
|
@ -535,7 +538,7 @@ function addFolder(folderToAdd: Misskey.entities.DriveFolder, unshift = false) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function addFile(fileToAdd: Misskey.entities.DriveFile, unshift = false) {
|
function addFile(fileToAdd: firefish.entities.DriveFile, unshift = false) {
|
||||||
const current = folder.value ? folder.value.id : null;
|
const current = folder.value ? folder.value.id : null;
|
||||||
if (current !== fileToAdd.folderId) return;
|
if (current !== fileToAdd.folderId) return;
|
||||||
|
|
||||||
|
@ -552,30 +555,30 @@ function addFile(fileToAdd: Misskey.entities.DriveFile, unshift = false) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeFolder(folderToRemove: Misskey.entities.DriveFolder | string) {
|
function removeFolder(folderToRemove: firefish.entities.DriveFolder | string) {
|
||||||
const folderIdToRemove =
|
const folderIdToRemove =
|
||||||
typeof folderToRemove === "object" ? folderToRemove.id : folderToRemove;
|
typeof folderToRemove === "object" ? folderToRemove.id : folderToRemove;
|
||||||
folders.value = folders.value.filter((f) => f.id !== folderIdToRemove);
|
folders.value = folders.value.filter((f) => f.id !== folderIdToRemove);
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeFile(file: Misskey.entities.DriveFile | string) {
|
function removeFile(file: firefish.entities.DriveFile | string) {
|
||||||
const fileId = typeof file === "object" ? file.id : file;
|
const fileId = typeof file === "object" ? file.id : file;
|
||||||
files.value = files.value.filter((f) => f.id !== fileId);
|
files.value = files.value.filter((f) => f.id !== fileId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function appendFile(file: Misskey.entities.DriveFile) {
|
function appendFile(file: firefish.entities.DriveFile) {
|
||||||
addFile(file);
|
addFile(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
function appendFolder(folderToAppend: Misskey.entities.DriveFolder) {
|
function appendFolder(folderToAppend: firefish.entities.DriveFolder) {
|
||||||
addFolder(folderToAppend);
|
addFolder(folderToAppend);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
function prependFile(file: Misskey.entities.DriveFile) {
|
function prependFile(file: firefish.entities.DriveFile) {
|
||||||
addFile(file, true);
|
addFile(file, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function prependFolder(folderToPrepend: Misskey.entities.DriveFolder) {
|
function prependFolder(folderToPrepend: firefish.entities.DriveFolder) {
|
||||||
addFolder(folderToPrepend, true);
|
addFolder(folderToPrepend, true);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
@ -706,7 +709,7 @@ function getMenu() {
|
||||||
icon: "ph-trash ph-bold ph-lg",
|
icon: "ph-trash ph-bold ph-lg",
|
||||||
action: () => {
|
action: () => {
|
||||||
deleteFolder(
|
deleteFolder(
|
||||||
folder.value as Misskey.entities.DriveFolder,
|
folder.value as firefish.entities.DriveFolder,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,11 +41,11 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
import type * as Misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import ImgWithBlurhash from "@/components/MkImgWithBlurhash.vue";
|
import ImgWithBlurhash from "@/components/MkImgWithBlurhash.vue";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
file: Misskey.entities.DriveFile;
|
file: firefish.entities.DriveFile;
|
||||||
fit: string;
|
fit: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import type * as Misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import XDrive from "@/components/MkDrive.vue";
|
import XDrive from "@/components/MkDrive.vue";
|
||||||
import XModalWindow from "@/components/MkModalWindow.vue";
|
import XModalWindow from "@/components/MkModalWindow.vue";
|
||||||
import number from "@/filters/number";
|
import number from "@/filters/number";
|
||||||
|
@ -54,13 +54,13 @@ withDefaults(
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: "done", r?: Misskey.entities.DriveFile[]): void;
|
(ev: "done", r?: firefish.entities.DriveFile[]): void;
|
||||||
(ev: "closed"): void;
|
(ev: "closed"): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const dialog = ref<InstanceType<typeof XModalWindow>>();
|
const dialog = ref<InstanceType<typeof XModalWindow>>();
|
||||||
|
|
||||||
const selected = ref<Misskey.entities.DriveFile[]>([]);
|
const selected = ref<firefish.entities.DriveFile[]>([]);
|
||||||
|
|
||||||
function ok() {
|
function ok() {
|
||||||
emit("done", selected.value);
|
emit("done", selected.value);
|
||||||
|
@ -72,7 +72,7 @@ function cancel() {
|
||||||
dialog.value?.close();
|
dialog.value?.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onChangeSelection(files: Misskey.entities.DriveFile[]) {
|
function onChangeSelection(files: firefish.entities.DriveFile[]) {
|
||||||
selected.value = files;
|
selected.value = files;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -15,13 +15,13 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {} from "vue";
|
import {} from "vue";
|
||||||
import type * as Misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import XDrive from "@/components/MkDrive.vue";
|
import XDrive from "@/components/MkDrive.vue";
|
||||||
import XWindow from "@/components/MkWindow.vue";
|
import XWindow from "@/components/MkWindow.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
initialFolder?: Misskey.entities.DriveFolder;
|
initialFolder?: firefish.entities.DriveFolder;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
|
@ -165,7 +165,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, onMounted, ref, watch } from "vue";
|
import { computed, onMounted, ref, watch } from "vue";
|
||||||
import type * as Misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import { FocusTrap } from "focus-trap-vue";
|
import { FocusTrap } from "focus-trap-vue";
|
||||||
import XSection from "@/components/MkEmojiPicker.section.vue";
|
import XSection from "@/components/MkEmojiPicker.section.vue";
|
||||||
import type { UnicodeEmojiDef } from "@/scripts/emojilist";
|
import type { UnicodeEmojiDef } from "@/scripts/emojilist";
|
||||||
|
@ -241,7 +241,7 @@ const height = computed(() =>
|
||||||
const customEmojiCategories = emojiCategories;
|
const customEmojiCategories = emojiCategories;
|
||||||
const customEmojis = instance.emojis;
|
const customEmojis = instance.emojis;
|
||||||
const q = ref<string | null>(null);
|
const q = ref<string | null>(null);
|
||||||
const searchResultCustom = ref<Misskey.entities.CustomEmoji[]>([]);
|
const searchResultCustom = ref<firefish.entities.CustomEmoji[]>([]);
|
||||||
const searchResultUnicode = ref<UnicodeEmojiDef[]>([]);
|
const searchResultUnicode = ref<UnicodeEmojiDef[]>([]);
|
||||||
const tab = ref<"index" | "custom" | "unicode" | "tags">("index");
|
const tab = ref<"index" | "custom" | "unicode" | "tags">("index");
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ watch(q, () => {
|
||||||
const searchCustom = () => {
|
const searchCustom = () => {
|
||||||
const max = 16;
|
const max = 16;
|
||||||
const emojis = customEmojis;
|
const emojis = customEmojis;
|
||||||
const matches = new Set<Misskey.entities.CustomEmoji>();
|
const matches = new Set<firefish.entities.CustomEmoji>();
|
||||||
|
|
||||||
const exactMatch = emojis.find((emoji) => emoji.name === newQ);
|
const exactMatch = emojis.find((emoji) => emoji.name === newQ);
|
||||||
if (exactMatch) matches.add(exactMatch);
|
if (exactMatch) matches.add(exactMatch);
|
||||||
|
@ -420,7 +420,7 @@ function reset() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getKey(
|
function getKey(
|
||||||
emoji: string | Misskey.entities.CustomEmoji | UnicodeEmojiDef,
|
emoji: string | firefish.entities.CustomEmoji | UnicodeEmojiDef,
|
||||||
): string {
|
): string {
|
||||||
return typeof emoji === "string" ? emoji : emoji.emoji || `:${emoji.name}:`;
|
return typeof emoji === "string" ? emoji : emoji.emoji || `:${emoji.name}:`;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import type * as Misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
|
|
||||||
const meta = ref<Misskey.entities.DetailedInstanceMetadata>();
|
const meta = ref<firefish.entities.DetailedInstanceMetadata>();
|
||||||
|
|
||||||
os.api("meta", { detail: true }).then((gotMeta) => {
|
os.api("meta", { detail: true }).then((gotMeta) => {
|
||||||
meta.value = gotMeta;
|
meta.value = gotMeta;
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, onBeforeUnmount, onMounted, ref } from "vue";
|
import { computed, onBeforeUnmount, onMounted, ref } from "vue";
|
||||||
import type * as Misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { stream } from "@/stream";
|
import { stream } from "@/stream";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
@ -76,7 +76,7 @@ const router = useRouter();
|
||||||
const emit = defineEmits(["refresh"]);
|
const emit = defineEmits(["refresh"]);
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
user: Misskey.entities.UserDetailed;
|
user: firefish.entities.UserDetailed;
|
||||||
full?: boolean;
|
full?: boolean;
|
||||||
large?: boolean;
|
large?: boolean;
|
||||||
hideMenu?: boolean;
|
hideMenu?: boolean;
|
||||||
|
@ -104,7 +104,7 @@ if (props.user.isFollowing == null) {
|
||||||
}).then(onFollowChange);
|
}).then(onFollowChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onFollowChange(user: Misskey.entities.UserDetailed) {
|
function onFollowChange(user: firefish.entities.UserDetailed) {
|
||||||
if (user.id === props.user.id) {
|
if (user.id === props.user.id) {
|
||||||
isFollowing.value = user.isFollowing;
|
isFollowing.value = user.isFollowing;
|
||||||
hasPendingFollowRequestFromYou.value =
|
hasPendingFollowRequestFromYou.value =
|
||||||
|
|
|
@ -28,14 +28,14 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import bytes from "@/filters/bytes";
|
import bytes from "@/filters/bytes";
|
||||||
import number from "@/filters/number";
|
import number from "@/filters/number";
|
||||||
import MkModal from "@/components/MkModal.vue";
|
import MkModal from "@/components/MkModal.vue";
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
image: misskey.entities.DriveFile;
|
image: firefish.entities.DriveFile;
|
||||||
}>(),
|
}>(),
|
||||||
{},
|
{},
|
||||||
);
|
);
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
import { computed, ref, watch } from "vue";
|
import { computed, ref, watch } from "vue";
|
||||||
import VuePlyr from "vue-plyr";
|
import VuePlyr from "vue-plyr";
|
||||||
import "vue-plyr/dist/vue-plyr.css";
|
import "vue-plyr/dist/vue-plyr.css";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import { getStaticImageUrl } from "@/scripts/get-static-image-url";
|
import { getStaticImageUrl } from "@/scripts/get-static-image-url";
|
||||||
import ImgWithBlurhash from "@/components/MkImgWithBlurhash.vue";
|
import ImgWithBlurhash from "@/components/MkImgWithBlurhash.vue";
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
|
@ -100,7 +100,7 @@ import { i18n } from "@/i18n";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
media: misskey.entities.DriveFile;
|
media: firefish.entities.DriveFile;
|
||||||
raw?: boolean;
|
raw?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
@ -58,14 +58,14 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import VuePlyr from "vue-plyr";
|
import VuePlyr from "vue-plyr";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import { ColdDeviceStorage } from "@/store";
|
import { ColdDeviceStorage } from "@/store";
|
||||||
import "vue-plyr/dist/vue-plyr.css";
|
import "vue-plyr/dist/vue-plyr.css";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
media: misskey.entities.DriveFile;
|
media: firefish.entities.DriveFile;
|
||||||
}>(),
|
}>(),
|
||||||
{},
|
{},
|
||||||
);
|
);
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import PhotoSwipeLightbox from "photoswipe/lightbox";
|
import PhotoSwipeLightbox from "photoswipe/lightbox";
|
||||||
import PhotoSwipe from "photoswipe";
|
import PhotoSwipe from "photoswipe";
|
||||||
import "photoswipe/style.css";
|
import "photoswipe/style.css";
|
||||||
|
@ -56,7 +56,7 @@ import {
|
||||||
} from "@/const";
|
} from "@/const";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
mediaList: misskey.entities.DriveFile[];
|
mediaList: firefish.entities.DriveFile[];
|
||||||
raw?: boolean;
|
raw?: boolean;
|
||||||
inDm?: boolean;
|
inDm?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
@ -184,7 +184,7 @@ onMounted(() => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const previewable = (file: misskey.entities.DriveFile): boolean => {
|
const previewable = (file: firefish.entities.DriveFile): boolean => {
|
||||||
if (file.type === "image/svg+xml") return true; // svgのwebpublic/thumbnailはpngなのでtrue
|
if (file.type === "image/svg+xml") return true; // svgのwebpublic/thumbnailはpngなのでtrue
|
||||||
// FILE_TYPE_BROWSERSAFEに適合しないものはブラウザで表示するのに不適切
|
// FILE_TYPE_BROWSERSAFEに適合しないものはブラウザで表示するのに不適切
|
||||||
if (isModule(file)) return true;
|
if (isModule(file)) return true;
|
||||||
|
@ -194,7 +194,7 @@ const previewable = (file: misskey.entities.DriveFile): boolean => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const isModule = (file: misskey.entities.DriveFile): boolean => {
|
const isModule = (file: firefish.entities.DriveFile): boolean => {
|
||||||
return (
|
return (
|
||||||
FILE_TYPE_TRACKER_MODULES.some((type) => {
|
FILE_TYPE_TRACKER_MODULES.some((type) => {
|
||||||
return file.type === type;
|
return file.type === type;
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
>{{ i18n.ts.pinnedNote }}
|
>{{ i18n.ts.pinnedNote }}
|
||||||
</div>
|
</div>
|
||||||
<div v-if="isRenote" class="renote">
|
<div v-if="isRenote" class="renote">
|
||||||
<i class="ph-repeat ph-bold ph-lg"></i>
|
<i class="ph-rocket-launch ph-bold ph-lg"></i>
|
||||||
<I18n :src="i18n.ts.renotedBy" tag="span">
|
<I18n :src="i18n.ts.renotedBy" tag="span">
|
||||||
<template #user>
|
<template #user>
|
||||||
<MkA
|
<MkA
|
||||||
|
@ -275,8 +275,7 @@
|
||||||
import { computed, inject, onMounted, ref } from "vue";
|
import { computed, inject, onMounted, ref } from "vue";
|
||||||
import * as mfm from "mfm-js";
|
import * as mfm from "mfm-js";
|
||||||
import type { Ref } from "vue";
|
import type { Ref } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import { detect as detectLanguage_ } from "tinyld";
|
|
||||||
import MkSubNoteContent from "./MkSubNoteContent.vue";
|
import MkSubNoteContent from "./MkSubNoteContent.vue";
|
||||||
import MkNoteSub from "@/components/MkNoteSub.vue";
|
import MkNoteSub from "@/components/MkNoteSub.vue";
|
||||||
import XNoteHeader from "@/components/MkNoteHeader.vue";
|
import XNoteHeader from "@/components/MkNoteHeader.vue";
|
||||||
|
@ -287,6 +286,7 @@ import XStarButtonNoEmoji from "@/components/MkStarButtonNoEmoji.vue";
|
||||||
import XQuoteButton from "@/components/MkQuoteButton.vue";
|
import XQuoteButton from "@/components/MkQuoteButton.vue";
|
||||||
import MkVisibility from "@/components/MkVisibility.vue";
|
import MkVisibility from "@/components/MkVisibility.vue";
|
||||||
import copyToClipboard from "@/scripts/copy-to-clipboard";
|
import copyToClipboard from "@/scripts/copy-to-clipboard";
|
||||||
|
import detectLanguage from "@/scripts/detect-language";
|
||||||
import { url } from "@/config";
|
import { url } from "@/config";
|
||||||
import { pleaseLogin } from "@/scripts/please-login";
|
import { pleaseLogin } from "@/scripts/please-login";
|
||||||
import { focusNext, focusPrev } from "@/scripts/focus";
|
import { focusNext, focusPrev } from "@/scripts/focus";
|
||||||
|
@ -307,7 +307,7 @@ import { getNoteSummary } from "@/scripts/get-note-summary";
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: firefish.entities.Note;
|
||||||
pinned?: boolean;
|
pinned?: boolean;
|
||||||
detailedView?: boolean;
|
detailedView?: boolean;
|
||||||
collapsedReply?: boolean;
|
collapsedReply?: boolean;
|
||||||
|
@ -352,7 +352,7 @@ const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
|
||||||
const renoteTime = ref<HTMLElement>();
|
const renoteTime = ref<HTMLElement>();
|
||||||
const reactButton = ref<HTMLElement>();
|
const reactButton = ref<HTMLElement>();
|
||||||
const appearNote = computed(() =>
|
const appearNote = computed(() =>
|
||||||
isRenote ? (note.value.renote as misskey.entities.Note) : note.value,
|
isRenote ? (note.value.renote as firefish.entities.Note) : note.value,
|
||||||
);
|
);
|
||||||
const isMyRenote = $i && $i.id === note.value.userId;
|
const isMyRenote = $i && $i.id === note.value.userId;
|
||||||
const showContent = ref(false);
|
const showContent = ref(false);
|
||||||
|
@ -372,15 +372,6 @@ const expandOnNoteClick = defaultStore.state.expandOnNoteClick;
|
||||||
const lang = localStorage.getItem("lang");
|
const lang = localStorage.getItem("lang");
|
||||||
const translateLang = localStorage.getItem("translateLang");
|
const translateLang = localStorage.getItem("translateLang");
|
||||||
|
|
||||||
function detectLanguage(text: string) {
|
|
||||||
const nodes = mfm.parse(text);
|
|
||||||
const filtered = mfm.extract(nodes, (node) => {
|
|
||||||
return node.type === "text" || node.type === "quote";
|
|
||||||
});
|
|
||||||
const purified = mfm.toString(filtered);
|
|
||||||
return detectLanguage_(purified);
|
|
||||||
}
|
|
||||||
|
|
||||||
const isForeignLanguage: boolean =
|
const isForeignLanguage: boolean =
|
||||||
defaultStore.state.detectPostLanguage &&
|
defaultStore.state.detectPostLanguage &&
|
||||||
appearNote.value.text != null &&
|
appearNote.value.text != null &&
|
||||||
|
@ -476,7 +467,7 @@ function undoReact(note): void {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentClipPage = inject<Ref<misskey.entities.Clip> | null>(
|
const currentClipPage = inject<Ref<firefish.entities.Clip> | null>(
|
||||||
"currentClipPage",
|
"currentClipPage",
|
||||||
null,
|
null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
{{ i18n.ts._notification._types.reply }}
|
{{ i18n.ts._notification._types.reply }}
|
||||||
</option>
|
</option>
|
||||||
<option v-if="note.renoteCount > 0" value="renotes">
|
<option v-if="note.renoteCount > 0" value="renotes">
|
||||||
<!-- <i class="ph-repeat ph-bold ph-lg"></i> -->
|
<!-- <i class="ph-rocket-launch ph-bold ph-lg"></i> -->
|
||||||
<span class="count">{{ note.renoteCount }}</span>
|
<span class="count">{{ note.renoteCount }}</span>
|
||||||
{{ i18n.ts._notification._types.renote }}
|
{{ i18n.ts._notification._types.renote }}
|
||||||
</option>
|
</option>
|
||||||
|
@ -151,7 +151,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, onUnmounted, onUpdated, ref } from "vue";
|
import { onMounted, onUnmounted, onUpdated, ref } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import type { NoteUpdatedEvent } from "firefish-js/built/streaming.types";
|
import type { NoteUpdatedEvent } from "firefish-js/built/streaming.types";
|
||||||
import MkTab from "@/components/MkTab.vue";
|
import MkTab from "@/components/MkTab.vue";
|
||||||
import MkNote from "@/components/MkNote.vue";
|
import MkNote from "@/components/MkNote.vue";
|
||||||
|
@ -173,7 +173,7 @@ import { deepClone } from "@/scripts/clone";
|
||||||
import { stream } from "@/stream";
|
import { stream } from "@/stream";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: firefish.entities.Note;
|
||||||
pinned?: boolean;
|
pinned?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
@ -219,10 +219,10 @@ const muted = ref(
|
||||||
);
|
);
|
||||||
const translation = ref(null);
|
const translation = ref(null);
|
||||||
const translating = ref(false);
|
const translating = ref(false);
|
||||||
const conversation = ref<null | misskey.entities.Note[]>([]);
|
const conversation = ref<null | firefish.entities.Note[]>([]);
|
||||||
const replies = ref<misskey.entities.Note[]>([]);
|
const replies = ref<firefish.entities.Note[]>([]);
|
||||||
const directReplies = ref<null | misskey.entities.Note[]>([]);
|
const directReplies = ref<null | firefish.entities.Note[]>([]);
|
||||||
const directQuotes = ref<null | misskey.entities.Note[]>([]);
|
const directQuotes = ref<null | firefish.entities.Note[]>([]);
|
||||||
const clips = ref();
|
const clips = ref();
|
||||||
const renotes = ref();
|
const renotes = ref();
|
||||||
let isScrolling;
|
let isScrolling;
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
import MkVisibility from "@/components/MkVisibility.vue";
|
import MkVisibility from "@/components/MkVisibility.vue";
|
||||||
import MkInstanceTicker from "@/components/MkInstanceTicker.vue";
|
import MkInstanceTicker from "@/components/MkInstanceTicker.vue";
|
||||||
|
@ -60,7 +60,7 @@ import { i18n } from "@/i18n";
|
||||||
import { pageWindow } from "@/os";
|
import { pageWindow } from "@/os";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: firefish.entities.Note;
|
||||||
pinned?: boolean;
|
pinned?: boolean;
|
||||||
canOpenServerInfo?: boolean;
|
canOpenServerInfo?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
|
@ -20,8 +20,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {} from "vue";
|
import preprocess from "@/scripts/preprocess";
|
||||||
import { preprocess } from "@/scripts/preprocess";
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
text: string;
|
text: string;
|
||||||
|
|
|
@ -11,12 +11,12 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import XNoteHeader from "@/components/MkNoteHeader.vue";
|
import XNoteHeader from "@/components/MkNoteHeader.vue";
|
||||||
import MkSubNoteContent from "@/components/MkSubNoteContent.vue";
|
import MkSubNoteContent from "@/components/MkSubNoteContent.vue";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: firefish.entities.Note;
|
||||||
pinned?: boolean;
|
pinned?: boolean;
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -191,9 +191,8 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, inject, ref } from "vue";
|
import { computed, inject, ref } from "vue";
|
||||||
import type { Ref } from "vue";
|
import type { Ref } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import * as mfm from "mfm-js";
|
import * as mfm from "mfm-js";
|
||||||
import { detect as detectLanguage_ } from "tinyld";
|
|
||||||
import XNoteHeader from "@/components/MkNoteHeader.vue";
|
import XNoteHeader from "@/components/MkNoteHeader.vue";
|
||||||
import MkSubNoteContent from "@/components/MkSubNoteContent.vue";
|
import MkSubNoteContent from "@/components/MkSubNoteContent.vue";
|
||||||
import XReactionsViewer from "@/components/MkReactionsViewer.vue";
|
import XReactionsViewer from "@/components/MkReactionsViewer.vue";
|
||||||
|
@ -202,6 +201,7 @@ import XStarButtonNoEmoji from "@/components/MkStarButtonNoEmoji.vue";
|
||||||
import XRenoteButton from "@/components/MkRenoteButton.vue";
|
import XRenoteButton from "@/components/MkRenoteButton.vue";
|
||||||
import XQuoteButton from "@/components/MkQuoteButton.vue";
|
import XQuoteButton from "@/components/MkQuoteButton.vue";
|
||||||
import copyToClipboard from "@/scripts/copy-to-clipboard";
|
import copyToClipboard from "@/scripts/copy-to-clipboard";
|
||||||
|
import detectLanguage from "@/scripts/detect-language";
|
||||||
import { url } from "@/config";
|
import { url } from "@/config";
|
||||||
import { pleaseLogin } from "@/scripts/please-login";
|
import { pleaseLogin } from "@/scripts/please-login";
|
||||||
import { getNoteMenu } from "@/scripts/get-note-menu";
|
import { getNoteMenu } from "@/scripts/get-note-menu";
|
||||||
|
@ -221,8 +221,8 @@ const router = useRouter();
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: firefish.entities.Note;
|
||||||
conversation?: misskey.entities.Note[];
|
conversation?: firefish.entities.Note[];
|
||||||
parentId?;
|
parentId?;
|
||||||
detailedView?;
|
detailedView?;
|
||||||
|
|
||||||
|
@ -262,7 +262,7 @@ const starButton = ref<InstanceType<typeof XStarButton>>();
|
||||||
const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
|
const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
|
||||||
const reactButton = ref<HTMLElement>();
|
const reactButton = ref<HTMLElement>();
|
||||||
const appearNote = computed(() =>
|
const appearNote = computed(() =>
|
||||||
isRenote ? (note.value.renote as misskey.entities.Note) : note.value,
|
isRenote ? (note.value.renote as firefish.entities.Note) : note.value,
|
||||||
);
|
);
|
||||||
const isDeleted = ref(false);
|
const isDeleted = ref(false);
|
||||||
const muted = ref(
|
const muted = ref(
|
||||||
|
@ -275,7 +275,7 @@ const muted = ref(
|
||||||
);
|
);
|
||||||
const translation = ref(null);
|
const translation = ref(null);
|
||||||
const translating = ref(false);
|
const translating = ref(false);
|
||||||
const replies: misskey.entities.Note[] =
|
const replies: firefish.entities.Note[] =
|
||||||
props.conversation
|
props.conversation
|
||||||
?.filter(
|
?.filter(
|
||||||
(item) =>
|
(item) =>
|
||||||
|
@ -288,15 +288,6 @@ const expandOnNoteClick = defaultStore.state.expandOnNoteClick;
|
||||||
const lang = localStorage.getItem("lang");
|
const lang = localStorage.getItem("lang");
|
||||||
const translateLang = localStorage.getItem("translateLang");
|
const translateLang = localStorage.getItem("translateLang");
|
||||||
|
|
||||||
function detectLanguage(text: string) {
|
|
||||||
const nodes = mfm.parse(text);
|
|
||||||
const filtered = mfm.extract(nodes, (node) => {
|
|
||||||
return node.type === "text" || node.type === "quote";
|
|
||||||
});
|
|
||||||
const purified = mfm.toString(filtered);
|
|
||||||
return detectLanguage_(purified);
|
|
||||||
}
|
|
||||||
|
|
||||||
const isForeignLanguage: boolean =
|
const isForeignLanguage: boolean =
|
||||||
defaultStore.state.detectPostLanguage &&
|
defaultStore.state.detectPostLanguage &&
|
||||||
appearNote.value.text != null &&
|
appearNote.value.text != null &&
|
||||||
|
@ -378,7 +369,7 @@ function undoReact(note): void {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentClipPage = inject<Ref<misskey.entities.Clip> | null>(
|
const currentClipPage = inject<Ref<firefish.entities.Clip> | null>(
|
||||||
"currentClipPage",
|
"currentClipPage",
|
||||||
null,
|
null,
|
||||||
);
|
);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<div class="_fullinfo">
|
<div class="_fullinfo">
|
||||||
<img
|
<img
|
||||||
src="/static-assets/badges/info.png"
|
src="/static-assets/badges/info.avif"
|
||||||
class="_ghost"
|
class="_ghost"
|
||||||
alt="Info"
|
alt="Info"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
></i>
|
></i>
|
||||||
<i
|
<i
|
||||||
v-else-if="notification.type === 'renote'"
|
v-else-if="notification.type === 'renote'"
|
||||||
class="ph-repeat ph-bold"
|
class="ph-rocket-launch ph-bold"
|
||||||
></i>
|
></i>
|
||||||
<i
|
<i
|
||||||
v-else-if="notification.type === 'reply'"
|
v-else-if="notification.type === 'reply'"
|
||||||
|
@ -274,7 +274,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, onUnmounted, ref, watch } from "vue";
|
import { onMounted, onUnmounted, ref, watch } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import XReactionIcon from "@/components/MkReactionIcon.vue";
|
import XReactionIcon from "@/components/MkReactionIcon.vue";
|
||||||
import MkFollowButton from "@/components/MkFollowButton.vue";
|
import MkFollowButton from "@/components/MkFollowButton.vue";
|
||||||
import XReactionTooltip from "@/components/MkReactionTooltip.vue";
|
import XReactionTooltip from "@/components/MkReactionTooltip.vue";
|
||||||
|
@ -290,7 +290,7 @@ import { instance } from "@/instance";
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
notification: misskey.entities.Notification;
|
notification: firefish.entities.Notification;
|
||||||
withTime?: boolean;
|
withTime?: boolean;
|
||||||
full?: boolean;
|
full?: boolean;
|
||||||
}>(),
|
}>(),
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<div class="_fullinfo">
|
<div class="_fullinfo">
|
||||||
<img
|
<img
|
||||||
src="/static-assets/badges/info.png"
|
src="/static-assets/badges/info.avif"
|
||||||
class="_ghost"
|
class="_ghost"
|
||||||
alt="Info"
|
alt="Info"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<slot name="empty">
|
<slot name="empty">
|
||||||
<div class="_fullinfo">
|
<div class="_fullinfo">
|
||||||
<img
|
<img
|
||||||
src="/static-assets/badges/info.png"
|
src="/static-assets/badges/info.avif"
|
||||||
class="_ghost"
|
class="_ghost"
|
||||||
alt="Error"
|
alt="Error"
|
||||||
/>
|
/>
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { ComputedRef } from "vue";
|
import type { ComputedRef } from "vue";
|
||||||
import { computed, isRef, onActivated, onDeactivated, ref, watch } from "vue";
|
import { computed, isRef, onActivated, onDeactivated, ref, watch } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import {
|
import {
|
||||||
getScrollContainer,
|
getScrollContainer,
|
||||||
|
@ -77,13 +77,13 @@ import MkButton from "@/components/MkButton.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
export interface Paging<
|
export interface Paging<
|
||||||
E extends keyof misskey.Endpoints = keyof misskey.Endpoints,
|
E extends keyof firefish.Endpoints = keyof firefish.Endpoints,
|
||||||
> {
|
> {
|
||||||
endpoint: E;
|
endpoint: E;
|
||||||
limit: number;
|
limit: number;
|
||||||
params?:
|
params?:
|
||||||
| misskey.Endpoints[E]["req"]
|
| firefish.Endpoints[E]["req"]
|
||||||
| ComputedRef<misskey.Endpoints[E]["req"]>;
|
| ComputedRef<firefish.Endpoints[E]["req"]>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 検索APIのような、ページング不可なエンドポイントを利用する場合
|
* 検索APIのような、ページング不可なエンドポイントを利用する場合
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import { sum } from "@/scripts/array";
|
import { sum } from "@/scripts/array";
|
||||||
import { pleaseLogin } from "@/scripts/please-login";
|
import { pleaseLogin } from "@/scripts/please-login";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
|
@ -61,7 +61,7 @@ import { i18n } from "@/i18n";
|
||||||
import { useInterval } from "@/scripts/use-interval";
|
import { useInterval } from "@/scripts/use-interval";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: firefish.entities.Note;
|
||||||
readOnly?: boolean;
|
readOnly?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
@ -243,7 +243,7 @@ import {
|
||||||
watch,
|
watch,
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import * as mfm from "mfm-js";
|
import * as mfm from "mfm-js";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import autosize from "autosize";
|
import autosize from "autosize";
|
||||||
import insertTextAtCursor from "insert-text-at-cursor";
|
import insertTextAtCursor from "insert-text-at-cursor";
|
||||||
import { length } from "stringz";
|
import { length } from "stringz";
|
||||||
|
@ -274,29 +274,29 @@ import {
|
||||||
import { uploadFile } from "@/scripts/upload";
|
import { uploadFile } from "@/scripts/upload";
|
||||||
import { deepClone } from "@/scripts/clone";
|
import { deepClone } from "@/scripts/clone";
|
||||||
import XCheatSheet from "@/components/MkCheatSheetDialog.vue";
|
import XCheatSheet from "@/components/MkCheatSheetDialog.vue";
|
||||||
import { preprocess } from "@/scripts/preprocess";
|
import preprocess from "@/scripts/preprocess";
|
||||||
import { vibrate } from "@/scripts/vibrate";
|
import { vibrate } from "@/scripts/vibrate";
|
||||||
|
|
||||||
const modal = inject("modal");
|
const modal = inject("modal");
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
reply?: misskey.entities.Note;
|
reply?: firefish.entities.Note;
|
||||||
renote?: misskey.entities.Note;
|
renote?: firefish.entities.Note;
|
||||||
channel?: any; // TODO
|
channel?: any; // TODO
|
||||||
mention?: misskey.entities.User;
|
mention?: firefish.entities.User;
|
||||||
specified?: misskey.entities.User;
|
specified?: firefish.entities.User;
|
||||||
initialText?: string;
|
initialText?: string;
|
||||||
initialVisibility?: typeof misskey.noteVisibilities;
|
initialVisibility?: typeof firefish.noteVisibilities;
|
||||||
initialFiles?: misskey.entities.DriveFile[];
|
initialFiles?: firefish.entities.DriveFile[];
|
||||||
initialLocalOnly?: boolean;
|
initialLocalOnly?: boolean;
|
||||||
initialVisibleUsers?: misskey.entities.User[];
|
initialVisibleUsers?: firefish.entities.User[];
|
||||||
initialNote?: misskey.entities.Note;
|
initialNote?: firefish.entities.Note;
|
||||||
instant?: boolean;
|
instant?: boolean;
|
||||||
fixed?: boolean;
|
fixed?: boolean;
|
||||||
autofocus?: boolean;
|
autofocus?: boolean;
|
||||||
showMfmCheatSheet?: boolean;
|
showMfmCheatSheet?: boolean;
|
||||||
editId?: misskey.entities.Note["id"];
|
editId?: firefish.entities.Note["id"];
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
initialVisibleUsers: () => [],
|
initialVisibleUsers: () => [],
|
||||||
|
@ -338,7 +338,7 @@ const visibility = ref(
|
||||||
((defaultStore.state.rememberNoteVisibility
|
((defaultStore.state.rememberNoteVisibility
|
||||||
? defaultStore.state.visibility
|
? defaultStore.state.visibility
|
||||||
: defaultStore.state
|
: defaultStore.state
|
||||||
.defaultNoteVisibility) as (typeof misskey.noteVisibilities)[number]),
|
.defaultNoteVisibility) as (typeof firefish.noteVisibilities)[number]),
|
||||||
);
|
);
|
||||||
const visibleUsers = ref([]);
|
const visibleUsers = ref([]);
|
||||||
if (props.initialVisibleUsers) {
|
if (props.initialVisibleUsers) {
|
||||||
|
@ -980,7 +980,7 @@ function showActions(ev) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const postAccount = ref<misskey.entities.UserDetailed | null>(null);
|
const postAccount = ref<firefish.entities.UserDetailed | null>(null);
|
||||||
|
|
||||||
function openAccountMenu(ev: MouseEvent) {
|
function openAccountMenu(ev: MouseEvent) {
|
||||||
openAccountMenu_(
|
openAccountMenu_(
|
||||||
|
|
|
@ -21,26 +21,26 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { shallowRef } from "vue";
|
import { shallowRef } from "vue";
|
||||||
|
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import MkModal from "@/components/MkModal.vue";
|
import MkModal from "@/components/MkModal.vue";
|
||||||
import MkPostForm from "@/components/MkPostForm.vue";
|
import MkPostForm from "@/components/MkPostForm.vue";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
reply?: misskey.entities.Note;
|
reply?: firefish.entities.Note;
|
||||||
renote?: misskey.entities.Note;
|
renote?: firefish.entities.Note;
|
||||||
channel?: any; // TODO
|
channel?: any; // TODO
|
||||||
mention?: misskey.entities.User;
|
mention?: firefish.entities.User;
|
||||||
specified?: misskey.entities.User;
|
specified?: firefish.entities.User;
|
||||||
initialText?: string;
|
initialText?: string;
|
||||||
initialVisibility?: typeof misskey.noteVisibilities;
|
initialVisibility?: typeof firefish.noteVisibilities;
|
||||||
initialFiles?: misskey.entities.DriveFile[];
|
initialFiles?: firefish.entities.DriveFile[];
|
||||||
initialLocalOnly?: boolean;
|
initialLocalOnly?: boolean;
|
||||||
initialVisibleUsers?: misskey.entities.User[];
|
initialVisibleUsers?: firefish.entities.User[];
|
||||||
initialNote?: misskey.entities.Note;
|
initialNote?: firefish.entities.Note;
|
||||||
instant?: boolean;
|
instant?: boolean;
|
||||||
fixed?: boolean;
|
fixed?: boolean;
|
||||||
autofocus?: boolean;
|
autofocus?: boolean;
|
||||||
editId?: misskey.entities.Note["id"];
|
editId?: firefish.entities.Note["id"];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
|
@ -37,16 +37,16 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref, watch } from "vue";
|
import { onMounted, ref, watch } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import MkReactionIcon from "@/components/MkReactionIcon.vue";
|
import MkReactionIcon from "@/components/MkReactionIcon.vue";
|
||||||
import MkUserCardMini from "@/components/MkUserCardMini.vue";
|
import MkUserCardMini from "@/components/MkUserCardMini.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
noteId: misskey.entities.Note["id"];
|
noteId: firefish.entities.Note["id"];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const note = ref<misskey.entities.Note>();
|
const note = ref<firefish.entities.Note>();
|
||||||
const tab = ref<string>();
|
const tab = ref<string>();
|
||||||
const reactions = ref<string[]>();
|
const reactions = ref<string[]>();
|
||||||
const users = ref();
|
const users = ref();
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import XDetails from "@/components/MkReactionsViewer.details.vue";
|
import XDetails from "@/components/MkReactionsViewer.details.vue";
|
||||||
import XReactionIcon from "@/components/MkReactionIcon.vue";
|
import XReactionIcon from "@/components/MkReactionIcon.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
|
@ -34,7 +34,7 @@ const props = defineProps<{
|
||||||
reaction: string;
|
reaction: string;
|
||||||
count: number;
|
count: number;
|
||||||
isInitial: boolean;
|
isInitial: boolean;
|
||||||
note: misskey.entities.Note;
|
note: firefish.entities.Note;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import { $i } from "@/account";
|
import { $i } from "@/account";
|
||||||
import XReaction from "@/components/MkReactionsViewer.reaction.vue";
|
import XReaction from "@/components/MkReactionsViewer.reaction.vue";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: firefish.entities.Note;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const reactionsEl = ref<HTMLElement>();
|
const reactionsEl = ref<HTMLElement>();
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
:class="{ renoted: hasRenotedBefore }"
|
:class="{ renoted: hasRenotedBefore }"
|
||||||
@click.stop="renote(false, $event)"
|
@click.stop="renote(false, $event)"
|
||||||
>
|
>
|
||||||
<i class="ph-repeat ph-bold ph-lg"></i>
|
<i class="ph-rocket-launch ph-bold ph-lg"></i>
|
||||||
<p v-if="count > 0 && !detailedView" class="count">{{ count }}</p>
|
<p v-if="count > 0 && !detailedView" class="count">{{ count }}</p>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
|
@ -16,13 +16,13 @@
|
||||||
class="eddddedb _button"
|
class="eddddedb _button"
|
||||||
disabled="true"
|
disabled="true"
|
||||||
>
|
>
|
||||||
<i class="ph-repeat ph-bold ph-lg"></i>
|
<i class="ph-rocket-launch ph-bold ph-lg"></i>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import Ripple from "@/components/MkRipple.vue";
|
import Ripple from "@/components/MkRipple.vue";
|
||||||
import XDetails from "@/components/MkUsersTooltip.vue";
|
import XDetails from "@/components/MkUsersTooltip.vue";
|
||||||
import { pleaseLogin } from "@/scripts/please-login";
|
import { pleaseLogin } from "@/scripts/please-login";
|
||||||
|
@ -35,7 +35,7 @@ import type { MenuItem } from "@/types/menu";
|
||||||
import { vibrate } from "@/scripts/vibrate";
|
import { vibrate } from "@/scripts/vibrate";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: firefish.entities.Note;
|
||||||
count: number;
|
count: number;
|
||||||
detailedView?;
|
detailedView?;
|
||||||
}>();
|
}>();
|
||||||
|
@ -88,7 +88,7 @@ const renote = (viaKeyboard = false, ev?: MouseEvent) => {
|
||||||
if (props.note.visibility === "public") {
|
if (props.note.visibility === "public") {
|
||||||
buttonActions.push({
|
buttonActions.push({
|
||||||
text: i18n.ts.renote,
|
text: i18n.ts.renote,
|
||||||
icon: "ph-repeat ph-bold ph-lg",
|
icon: "ph-rocket-launch ph-bold ph-lg",
|
||||||
danger: false,
|
danger: false,
|
||||||
action: () => {
|
action: () => {
|
||||||
os.api("notes/create", {
|
os.api("notes/create", {
|
||||||
|
|
|
@ -177,7 +177,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import * as mfm from "mfm-js";
|
import * as mfm from "mfm-js";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import XNoteSimple from "@/components/MkNoteSimple.vue";
|
import XNoteSimple from "@/components/MkNoteSimple.vue";
|
||||||
|
@ -194,7 +194,7 @@ import { i18n } from "@/i18n";
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: firefish.entities.Note;
|
||||||
parentId?;
|
parentId?;
|
||||||
conversation?;
|
conversation?;
|
||||||
detailed?: boolean;
|
detailed?: boolean;
|
||||||
|
|
|
@ -26,14 +26,14 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import MkMiniChart from "@/components/MkMiniChart.vue";
|
import MkMiniChart from "@/components/MkMiniChart.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { acct, userPage } from "@/filters/user";
|
import { acct, userPage } from "@/filters/user";
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
user: misskey.entities.User;
|
user: firefish.entities.User;
|
||||||
withChart?: boolean;
|
withChart?: boolean;
|
||||||
showAboutPage?: boolean;
|
showAboutPage?: boolean;
|
||||||
}>(),
|
}>(),
|
||||||
|
|
|
@ -88,7 +88,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import MkFollowButton from "@/components/MkFollowButton.vue";
|
import MkFollowButton from "@/components/MkFollowButton.vue";
|
||||||
import XShowMoreButton from "@/components/MkShowMoreButton.vue";
|
import XShowMoreButton from "@/components/MkShowMoreButton.vue";
|
||||||
import MkNumber from "@/components/MkNumber.vue";
|
import MkNumber from "@/components/MkNumber.vue";
|
||||||
|
@ -96,7 +96,7 @@ import { userPage } from "@/filters/user";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.UserDetailed;
|
user: firefish.entities.UserDetailed;
|
||||||
detailed?: boolean;
|
detailed?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<div class="_fullinfo">
|
<div class="_fullinfo">
|
||||||
<img
|
<img
|
||||||
src="/static-assets/badges/info.png"
|
src="/static-assets/badges/info.avif"
|
||||||
class="_ghost"
|
class="_ghost"
|
||||||
alt="Info"
|
alt="Info"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
|
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.User;
|
user: firefish.entities.User;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const text = computed(() => {
|
const text = computed(() => {
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import * as Acct from "firefish-js/built/acct";
|
import * as Acct from "firefish-js/built/acct";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import MkUserInfo from "@/components/MkUserInfo.vue";
|
import MkUserInfo from "@/components/MkUserInfo.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ const emit = defineEmits<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const zIndex = os.claimZIndex("middle");
|
const zIndex = os.claimZIndex("middle");
|
||||||
const user = ref<misskey.entities.UserDetailed | null>(null);
|
const user = ref<firefish.entities.UserDetailed | null>(null);
|
||||||
const top = ref(0);
|
const top = ref(0);
|
||||||
const left = ref(0);
|
const left = ref(0);
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
import FormSplit from "@/components/form/split.vue";
|
import FormSplit from "@/components/form/split.vue";
|
||||||
import XModalWindow from "@/components/MkModalWindow.vue";
|
import XModalWindow from "@/components/MkModalWindow.vue";
|
||||||
|
@ -98,16 +98,16 @@ import { defaultStore } from "@/store";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: "ok", selected: misskey.entities.UserDetailed): void;
|
(ev: "ok", selected: firefish.entities.UserDetailed): void;
|
||||||
(ev: "cancel"): void;
|
(ev: "cancel"): void;
|
||||||
(ev: "closed"): void;
|
(ev: "closed"): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const username = ref("");
|
const username = ref("");
|
||||||
const host = ref("");
|
const host = ref("");
|
||||||
const users: misskey.entities.UserDetailed[] = ref([]);
|
const users: firefish.entities.UserDetailed[] = ref([]);
|
||||||
const recentUsers: misskey.entities.UserDetailed[] = ref([]);
|
const recentUsers: firefish.entities.UserDetailed[] = ref([]);
|
||||||
const selected: misskey.entities.UserDetailed | null = ref(null);
|
const selected: firefish.entities.UserDetailed | null = ref(null);
|
||||||
const dialogEl = ref();
|
const dialogEl = ref();
|
||||||
|
|
||||||
const search = () => {
|
const search = () => {
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
import FormSplit from "@/components/form/split.vue";
|
import FormSplit from "@/components/form/split.vue";
|
||||||
import XModalWindow from "@/components/MkModalWindow.vue";
|
import XModalWindow from "@/components/MkModalWindow.vue";
|
||||||
|
@ -94,15 +94,15 @@ import { defaultStore } from "@/store";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: "ok", selected: misskey.entities.UserDetailed): void;
|
(ev: "ok", selected: firefish.entities.UserDetailed): void;
|
||||||
(ev: "cancel"): void;
|
(ev: "cancel"): void;
|
||||||
(ev: "closed"): void;
|
(ev: "closed"): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const username = ref("");
|
const username = ref("");
|
||||||
const users: misskey.entities.UserDetailed[] = ref([]);
|
const users: firefish.entities.UserDetailed[] = ref([]);
|
||||||
const recentUsers: misskey.entities.UserDetailed[] = ref([]);
|
const recentUsers: firefish.entities.UserDetailed[] = ref([]);
|
||||||
const selected: misskey.entities.UserDetailed | null = ref(null);
|
const selected: firefish.entities.UserDetailed | null = ref(null);
|
||||||
const dialogEl = ref();
|
const dialogEl = ref();
|
||||||
|
|
||||||
const search = () => {
|
const search = () => {
|
||||||
|
|
|
@ -123,7 +123,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { nextTick, ref, shallowRef, watch } from "vue";
|
import { nextTick, ref, shallowRef, watch } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import MkModal from "@/components/MkModal.vue";
|
import MkModal from "@/components/MkModal.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ const modal = shallowRef<InstanceType<typeof MkModal>>();
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
currentVisibility: (typeof misskey.noteVisibilities)[number];
|
currentVisibility: (typeof firefish.noteVisibilities)[number];
|
||||||
currentLocalOnly: boolean;
|
currentLocalOnly: boolean;
|
||||||
src?: HTMLElement;
|
src?: HTMLElement;
|
||||||
}>(),
|
}>(),
|
||||||
|
@ -141,7 +141,7 @@ const props = withDefaults(
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(
|
(
|
||||||
ev: "changeVisibility",
|
ev: "changeVisibility",
|
||||||
v: (typeof misskey.noteVisibilities)[number],
|
v: (typeof firefish.noteVisibilities)[number],
|
||||||
): void;
|
): void;
|
||||||
(ev: "changeLocalOnly", v: boolean): void;
|
(ev: "changeLocalOnly", v: boolean): void;
|
||||||
(ev: "closed"): void;
|
(ev: "closed"): void;
|
||||||
|
@ -154,7 +154,7 @@ watch(localOnly, () => {
|
||||||
emit("changeLocalOnly", localOnly.value);
|
emit("changeLocalOnly", localOnly.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
function choose(visibility: (typeof misskey.noteVisibilities)[number]): void {
|
function choose(visibility: (typeof firefish.noteVisibilities)[number]): void {
|
||||||
v.value = visibility;
|
v.value = visibility;
|
||||||
emit("changeVisibility", visibility);
|
emit("changeVisibility", visibility);
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
|
|
@ -10,12 +10,12 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import { toUnicode } from "punycode/";
|
import { toUnicode } from "punycode/";
|
||||||
import { host as hostRaw } from "@/config";
|
import { host as hostRaw } from "@/config";
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
user: misskey.entities.UserDetailed;
|
user: firefish.entities.UserDetailed;
|
||||||
detail?: boolean;
|
detail?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="menu">
|
<div v-else class="menu">
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div>Ads by {{ host }}</div>
|
<div>{{ i18n.t("_ad.adsBy", { by: host }) }}</div>
|
||||||
<!--<MkButton class="button" primary>{{ i18n.ts._ad.like }}</MkButton>-->
|
<!--<MkButton class="button" primary>{{ i18n.ts._ad.like }}</MkButton>-->
|
||||||
<MkButton
|
<MkButton
|
||||||
v-if="chosen.ratio !== 0"
|
v-if="chosen.ratio !== 0"
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref, watch } from "vue";
|
import { computed, ref, watch } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import { getStaticImageUrl } from "@/scripts/get-static-image-url";
|
import { getStaticImageUrl } from "@/scripts/get-static-image-url";
|
||||||
import { extractAvgColorFromBlurhash } from "@/scripts/extract-avg-color-from-blurhash";
|
import { extractAvgColorFromBlurhash } from "@/scripts/extract-avg-color-from-blurhash";
|
||||||
import { acct, userPage } from "@/filters/user";
|
import { acct, userPage } from "@/filters/user";
|
||||||
|
@ -46,7 +46,7 @@ import { defaultStore } from "@/store";
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
user: misskey.entities.User;
|
user: firefish.entities.User;
|
||||||
target?: string | null;
|
target?: string | null;
|
||||||
disableLink?: boolean;
|
disableLink?: boolean;
|
||||||
disablePreview?: boolean;
|
disablePreview?: boolean;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<transition :name="$store.state.animation ? 'zoom' : ''" appear>
|
<transition :name="$store.state.animation ? 'zoom' : ''" appear>
|
||||||
<div class="mjndxjcg">
|
<div class="mjndxjcg">
|
||||||
<img
|
<img
|
||||||
src="/static-assets/badges/error.png"
|
src="/static-assets/badges/error.avif"
|
||||||
class="_ghost"
|
class="_ghost"
|
||||||
alt="Error"
|
alt="Error"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -9,11 +9,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
user: misskey.entities.User;
|
user: firefish.entities.User;
|
||||||
nowrap?: boolean;
|
nowrap?: boolean;
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import * as Acct from "firefish-js/built/acct";
|
import * as Acct from "firefish-js/built/acct";
|
||||||
import { url } from "@/config";
|
import { url } from "@/config";
|
||||||
|
|
||||||
export const acct = (user: misskey.Acct) => {
|
export const acct = (user: firefish.Acct) => {
|
||||||
return Acct.toString(user);
|
return Acct.toString(user);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const userName = (user: misskey.entities.User) => {
|
export const userName = (user: firefish.entities.User) => {
|
||||||
return user.name || user.username;
|
return user.name || user.username;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const userPage = (user: misskey.Acct, path?, absolute = false) => {
|
export const userPage = (user: firefish.Acct, path?, absolute = false) => {
|
||||||
return `${absolute ? url : ""}/@${acct(user)}${path ? `/${path}` : ""}`;
|
return `${absolute ? url : ""}/@${acct(user)}${path ? `/${path}` : ""}`;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { computed, reactive } from "vue";
|
import { computed, reactive } from "vue";
|
||||||
import type * as Misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import { api } from "./os";
|
import { api } from "./os";
|
||||||
|
|
||||||
// TODO: 他のタブと永続化されたstateを同期
|
// TODO: 他のタブと永続化されたstateを同期
|
||||||
|
@ -7,7 +7,7 @@ import { api } from "./os";
|
||||||
const instanceData = localStorage.getItem("instance");
|
const instanceData = localStorage.getItem("instance");
|
||||||
// TODO: instanceをリアクティブにするかは再考の余地あり
|
// TODO: instanceをリアクティブにするかは再考の余地あり
|
||||||
|
|
||||||
export const instance: Misskey.entities.DetailedInstanceMetadata = reactive(
|
export const instance: firefish.entities.DetailedInstanceMetadata = reactive(
|
||||||
instanceData
|
instanceData
|
||||||
? JSON.parse(instanceData)
|
? JSON.parse(instanceData)
|
||||||
: {
|
: {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import type { Component, Ref } from "vue";
|
||||||
import { defineAsyncComponent, markRaw, ref } from "vue";
|
import { defineAsyncComponent, markRaw, ref } from "vue";
|
||||||
import { EventEmitter } from "eventemitter3";
|
import { EventEmitter } from "eventemitter3";
|
||||||
import insertTextAtCursor from "insert-text-at-cursor";
|
import insertTextAtCursor from "insert-text-at-cursor";
|
||||||
import * as Misskey from "firefish-js";
|
import * as firefish from "firefish-js";
|
||||||
import { i18n } from "./i18n";
|
import { i18n } from "./i18n";
|
||||||
import { apiUrl, url } from "@/config";
|
import { apiUrl, url } from "@/config";
|
||||||
import MkPostFormDialog from "@/components/MkPostFormDialog.vue";
|
import MkPostFormDialog from "@/components/MkPostFormDialog.vue";
|
||||||
|
@ -16,7 +16,7 @@ import { $i } from "@/account";
|
||||||
|
|
||||||
export const pendingApiRequestsCount = ref(0);
|
export const pendingApiRequestsCount = ref(0);
|
||||||
|
|
||||||
const apiClient = new Misskey.api.APIClient({
|
const apiClient = new firefish.api.APIClient({
|
||||||
origin: url,
|
origin: url,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -651,7 +651,7 @@ export async function selectLocalUser() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function selectInstance(): Promise<Misskey.entities.Instance> {
|
export async function selectInstance(): Promise<firefish.entities.Instance> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
popup(
|
popup(
|
||||||
defineAsyncComponent({
|
defineAsyncComponent({
|
||||||
|
@ -741,11 +741,11 @@ export async function pickEmoji(src: HTMLElement | null, opts) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function cropImage(
|
export async function cropImage(
|
||||||
image: Misskey.entities.DriveFile,
|
image: firefish.entities.DriveFile,
|
||||||
options: {
|
options: {
|
||||||
aspectRatio: number;
|
aspectRatio: number;
|
||||||
},
|
},
|
||||||
): Promise<Misskey.entities.DriveFile> {
|
): Promise<firefish.entities.DriveFile> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
popup(
|
popup(
|
||||||
defineAsyncComponent({
|
defineAsyncComponent({
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<transition :name="$store.state.animation ? 'zoom' : ''" appear>
|
<transition :name="$store.state.animation ? 'zoom' : ''" appear>
|
||||||
<div v-show="loaded" class="mjndxjch">
|
<div v-show="loaded" class="mjndxjch">
|
||||||
<img
|
<img
|
||||||
src="/static-assets/badges/error.png"
|
src="/static-assets/badges/error.avif"
|
||||||
class="_ghost"
|
class="_ghost"
|
||||||
alt="Error"
|
alt="Error"
|
||||||
/>
|
/>
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
import { version } from "@/config";
|
import { version } from "@/config";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
|
@ -54,7 +54,7 @@ const props = withDefaults(
|
||||||
|
|
||||||
const loaded = ref(false);
|
const loaded = ref(false);
|
||||||
const serverIsDead = ref(false);
|
const serverIsDead = ref(false);
|
||||||
const meta = ref<misskey.entities.LiteInstanceMetadata | null>(null);
|
const meta = ref<firefish.entities.LiteInstanceMetadata | null>(null);
|
||||||
|
|
||||||
os.api("meta", {
|
os.api("meta", {
|
||||||
detail: false,
|
detail: false,
|
||||||
|
|
|
@ -111,11 +111,15 @@
|
||||||
/></FormLink>
|
/></FormLink>
|
||||||
<FormLink to="/@panos@firefish.social"
|
<FormLink to="/@panos@firefish.social"
|
||||||
><Mfm
|
><Mfm
|
||||||
:text="'@panos@firefish.social (Project Coordinator)'"
|
:text="'@panos@firefish.social (Project coordinator)'"
|
||||||
/></FormLink>
|
/></FormLink>
|
||||||
<FormLink to="/@blackspike@mastodon.cloud"
|
<FormLink to="/@blackspike@mastodon.cloud"
|
||||||
><Mfm
|
><Mfm
|
||||||
:text="'@blackspike@mastodon.cloud (Logo Design)'"
|
:text="'@blackspike@mastodon.cloud (Logo design)'"
|
||||||
|
/></FormLink>
|
||||||
|
<FormLink to="/@magi@minazukey.uk"
|
||||||
|
><Mfm
|
||||||
|
:text="'@magi@minazukey.uk (Error images)'"
|
||||||
/></FormLink>
|
/></FormLink>
|
||||||
</div>
|
</div>
|
||||||
<h3
|
<h3
|
||||||
|
|
|
@ -19,13 +19,13 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import MkMiniChart from "@/components/MkMiniChart.vue";
|
import MkMiniChart from "@/components/MkMiniChart.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { acct } from "@/filters/user";
|
import { acct } from "@/filters/user";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.User;
|
user: firefish.entities.User;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const chart = ref(null);
|
const chart = ref(null);
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, provide, ref, watch } from "vue";
|
import { computed, provide, ref, watch } from "vue";
|
||||||
import type * as misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import XNotes from "@/components/MkNotes.vue";
|
import XNotes from "@/components/MkNotes.vue";
|
||||||
import { $i } from "@/account";
|
import { $i } from "@/account";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
@ -40,7 +40,7 @@ const props = defineProps<{
|
||||||
clipId: string;
|
clipId: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const clip = ref<misskey.entities.Clip>();
|
const clip = ref<firefish.entities.Clip>();
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: "clips/notes" as const,
|
endpoint: "clips/notes" as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<div class="_fullinfo">
|
<div class="_fullinfo">
|
||||||
<img
|
<img
|
||||||
src="/static-assets/badges/info.png"
|
src="/static-assets/badges/info.avif"
|
||||||
class="_ghost"
|
class="_ghost"
|
||||||
alt="Info"
|
alt="Info"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<div class="_fullinfo">
|
<div class="_fullinfo">
|
||||||
<img
|
<img
|
||||||
src="/static-assets/badges/info.png"
|
src="/static-assets/badges/info.avif"
|
||||||
aria-label="none"
|
aria-label="none"
|
||||||
class="_ghost"
|
class="_ghost"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
@click="shareWithNote"
|
@click="shareWithNote"
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
class="ph-repeat ph-bold ph-lg ph-fw ph-lg"
|
class="ph-rocket-launch ph-bold ph-lg ph-fw ph-lg"
|
||||||
></i>
|
></i>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, onMounted, ref, watch } from "vue";
|
import { computed, onMounted, ref, watch } from "vue";
|
||||||
import type * as Misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import autosize from "autosize";
|
import autosize from "autosize";
|
||||||
// import insertTextAtCursor from 'insert-text-at-cursor';
|
// import insertTextAtCursor from 'insert-text-at-cursor';
|
||||||
import { throttle } from "throttle-debounce";
|
import { throttle } from "throttle-debounce";
|
||||||
|
@ -70,15 +70,15 @@ import { i18n } from "@/i18n";
|
||||||
import { uploadFile } from "@/scripts/upload";
|
import { uploadFile } from "@/scripts/upload";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user?: Misskey.entities.UserDetailed | null;
|
user?: firefish.entities.UserDetailed | null;
|
||||||
group?: Misskey.entities.UserGroup | null;
|
group?: firefish.entities.UserGroup | null;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const textEl = ref<HTMLTextAreaElement>();
|
const textEl = ref<HTMLTextAreaElement>();
|
||||||
const fileEl = ref<HTMLInputElement>();
|
const fileEl = ref<HTMLInputElement>();
|
||||||
|
|
||||||
const text = ref<string>("");
|
const text = ref<string>("");
|
||||||
const file = ref<Misskey.entities.DriveFile | null>(null);
|
const file = ref<firefish.entities.DriveFile | null>(null);
|
||||||
const sending = ref(false);
|
const sending = ref(false);
|
||||||
const typing = throttle(3000, () => {
|
const typing = throttle(3000, () => {
|
||||||
stream.send(
|
stream.send(
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
|
|
||||||
import * as mfm from "mfm-js";
|
import * as mfm from "mfm-js";
|
||||||
import type * as Misskey from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import XMediaList from "@/components/MkMediaList.vue";
|
import XMediaList from "@/components/MkMediaList.vue";
|
||||||
import { extractUrlFromMfm } from "@/scripts/extract-url-from-mfm";
|
import { extractUrlFromMfm } from "@/scripts/extract-url-from-mfm";
|
||||||
import MkUrlPreview from "@/components/MkUrlPreview.vue";
|
import MkUrlPreview from "@/components/MkUrlPreview.vue";
|
||||||
|
@ -94,7 +94,7 @@ import { $i } from "@/account";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
message: Misskey.entities.MessagingMessage;
|
message: firefish.entities.MessagingMessage;
|
||||||
isGroup?: boolean;
|
isGroup?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue