diff --git a/locales/en-US.yml b/locales/en-US.yml index 4321c9b5fe..4b949b705a 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -143,8 +143,10 @@ markAsSensitive: "Mark as sensitive" unmarkAsSensitive: "Unmark as sensitive" enterFileName: "Enter filename" mute: "Mute" +muted: "Muted" unmute: "Unmute" renoteMute: "Mute Boosts" +renoteMuted: "Boosts muted" renoteUnmute: "Unmute Boosts" block: "Block" unblock: "Unblock" diff --git a/locales/index.d.ts b/locales/index.d.ts index 530c5008e3..c1001125a0 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -588,6 +588,10 @@ export interface Locale extends ILocale { * ミュート */ "mute": string; + /** + * Muted + */ + "muted": string; /** * ミュート解除 */ @@ -596,6 +600,10 @@ export interface Locale extends ILocale { * ブーストをミュート */ "renoteMute": string; + /** + * Boosts muted + */ + "renoteMuted": string; /** * ブーストのミュートを解除 */ diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index ab70767925..d6a8faf1e7 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -143,8 +143,10 @@ markAsSensitive: "センシティブとして設定" unmarkAsSensitive: "センシティブを解除する" enterFileName: "ファイル名を入力" mute: "ミュート" +muted: "Muted" unmute: "ミュート解除" renoteMute: "ブーストをミュート" +renoteMuted: "Boosts muted" renoteUnmute: "ブーストのミュートを解除" block: "ブロック" unblock: "ブロック解除" diff --git a/packages/backend/src/core/activitypub/ApRendererService.ts b/packages/backend/src/core/activitypub/ApRendererService.ts index 55d1054de9..499a163d6c 100644 --- a/packages/backend/src/core/activitypub/ApRendererService.ts +++ b/packages/backend/src/core/activitypub/ApRendererService.ts @@ -526,6 +526,7 @@ export class ApRendererService { publicKey: this.renderKey(user, keypair, '#main-key'), isCat: user.isCat, noindex: user.noindex, + indexable: !user.noindex, speakAsCat: user.speakAsCat, attachment: attachment.length ? attachment : undefined, }; diff --git a/packages/backend/src/core/activitypub/misc/contexts.ts b/packages/backend/src/core/activitypub/misc/contexts.ts index 815b20b910..86a665732a 100644 --- a/packages/backend/src/core/activitypub/misc/contexts.ts +++ b/packages/backend/src/core/activitypub/misc/contexts.ts @@ -545,6 +545,7 @@ const extension_context_definition = { Emoji: 'toot:Emoji', featured: 'toot:featured', discoverable: 'toot:discoverable', + indexable: 'toot:indexable', // schema schema: 'http://schema.org#', PropertyValue: 'schema:PropertyValue', diff --git a/packages/backend/src/core/activitypub/models/ApNoteService.ts b/packages/backend/src/core/activitypub/models/ApNoteService.ts index 7b7a7921fb..382cda301f 100644 --- a/packages/backend/src/core/activitypub/models/ApNoteService.ts +++ b/packages/backend/src/core/activitypub/models/ApNoteService.ts @@ -587,7 +587,7 @@ export class ApNoteService { // ここでuriの代わりに添付されてきたNote Objectが指定されていると、サーバーフェッチを経ずにノートが生成されるが // 添付されてきたNote Objectは偽装されている可能性があるため、常にuriを指定してサーバーフェッチを行う。 const createFrom = options.sentFrom?.origin === new URL(uri).origin ? value : uri; - return await this.createNote(createFrom, options.resolver, true); + return await this.createNote(createFrom, options.resolver, false); } finally { unlock(); } diff --git a/packages/backend/src/server/web/ClientServerService.ts b/packages/backend/src/server/web/ClientServerService.ts index 0af90a844b..e20707977f 100644 --- a/packages/backend/src/server/web/ClientServerService.ts +++ b/packages/backend/src/server/web/ClientServerService.ts @@ -193,9 +193,9 @@ export class ClientServerService { icon: meta.iconUrl, appleTouchIcon: meta.app512IconUrl, themeColor: meta.themeColor, - serverErrorImageUrl: meta.serverErrorImageUrl ?? 'https://launcher.moe/error.png', - infoImageUrl: meta.infoImageUrl ?? 'https://launcher.moe/nothinghere.png', - notFoundImageUrl: meta.notFoundImageUrl ?? 'https://launcher.moe/missingpage.webp', + serverErrorImageUrl: meta.serverErrorImageUrl ?? '/status/error.png', + infoImageUrl: meta.infoImageUrl ?? '/status/nothinghere.png', + notFoundImageUrl: meta.notFoundImageUrl ?? '/status/missingpage.webp', instanceUrl: this.config.url, randomMOTD: this.config.customMOTD ? this.config.customMOTD[Math.floor(Math.random() * this.config.customMOTD.length)] : undefined, metaJson: htmlSafeJsonStringify(await this.metaEntityService.packDetailed(meta)), diff --git a/packages/frontend/assets/status/error.png b/packages/frontend/assets/status/error.png new file mode 100644 index 0000000000..9f21236c39 Binary files /dev/null and b/packages/frontend/assets/status/error.png differ diff --git a/packages/frontend/assets/status/missingpage.webp b/packages/frontend/assets/status/missingpage.webp new file mode 100644 index 0000000000..3ac83b3110 Binary files /dev/null and b/packages/frontend/assets/status/missingpage.webp differ diff --git a/packages/frontend/assets/status/nothinghere.png b/packages/frontend/assets/status/nothinghere.png new file mode 100644 index 0000000000..5ebe210acd Binary files /dev/null and b/packages/frontend/assets/status/nothinghere.png differ diff --git a/packages/frontend/src/boot/main-boot.ts b/packages/frontend/src/boot/main-boot.ts index c10930a038..5ff998fac4 100644 --- a/packages/frontend/src/boot/main-boot.ts +++ b/packages/frontend/src/boot/main-boot.ts @@ -216,19 +216,25 @@ export async function mainBoot() { claimAchievement('collectAchievements30'); } - window.setInterval(() => { - if (Math.floor(Math.random() * 20000) === 0) { - claimAchievement('justPlainLucky'); - } - }, 1000 * 10); + if (!claimedAchievements.includes('justPlainLucky')) { + window.setInterval(() => { + if (Math.floor(Math.random() * 20000) === 0) { + claimAchievement('justPlainLucky'); + } + }, 1000 * 10); + } - window.setTimeout(() => { - claimAchievement('client30min'); - }, 1000 * 60 * 30); + if (!claimedAchievements.includes('client30min')) { + window.setTimeout(() => { + claimAchievement('client30min'); + }, 1000 * 60 * 30); + } - window.setTimeout(() => { - claimAchievement('client60min'); - }, 1000 * 60 * 60); + if (!claimedAchievements.includes('client60min')) { + window.setTimeout(() => { + claimAchievement('client60min'); + }, 1000 * 60 * 60); + } // 邪魔 //const lastUsed = miLocalStorage.getItem('lastUsed'); diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue index dc3f3aa94c..add5296f0a 100644 --- a/packages/frontend/src/components/MkPostForm.vue +++ b/packages/frontend/src/components/MkPostForm.vue @@ -630,11 +630,22 @@ async function onPaste(ev: ClipboardEvent) { if (paste.length > 1000) { ev.preventDefault(); - os.confirm({ - type: 'info', + os.actions({ + type: 'question', text: i18n.ts.attachAsFileQuestion, - }).then(({ canceled }) => { - if (canceled) { + actions: [ + { + value: 'yes', + text: i18n.ts.yes, + primary: true, + }, + { + value: 'no', + text: i18n.ts.no, + }, + ], + }).then(({ result }) => { + if (result !== 'yes') { insertTextAtCursor(textareaEl.value, paste); return; } diff --git a/packages/frontend/src/const.ts b/packages/frontend/src/const.ts index c94c0d4408..058db9b981 100644 --- a/packages/frontend/src/const.ts +++ b/packages/frontend/src/const.ts @@ -160,9 +160,9 @@ export const ROLE_POLICIES = [ export const CURRENT_STICKY_TOP = 'CURRENT_STICKY_TOP'; export const CURRENT_STICKY_BOTTOM = 'CURRENT_STICKY_BOTTOM'; -export const DEFAULT_SERVER_ERROR_IMAGE_URL = 'https://launcher.moe/error.png'; -export const DEFAULT_NOT_FOUND_IMAGE_URL = 'https://launcher.moe/missingpage.webp'; -export const DEFAULT_INFO_IMAGE_URL = 'https://launcher.moe/nothinghere.png'; +export const DEFAULT_SERVER_ERROR_IMAGE_URL = '/status/error.png'; +export const DEFAULT_NOT_FOUND_IMAGE_URL = '/status/missingpage.webp'; +export const DEFAULT_INFO_IMAGE_URL = '/status/nothinghere.png'; export const MFM_TAGS = ['tada', 'jelly', 'twitch', 'shake', 'spin', 'jump', 'bounce', 'flip', 'x2', 'x3', 'x4', 'scale', 'position', 'fg', 'bg', 'border', 'font', 'blur', 'rainbow', 'sparkle', 'rotate', 'ruby', 'unixtime', 'crop', 'fade', 'followmouse']; export const MFM_PARAMS: Record = { diff --git a/packages/frontend/src/index.html b/packages/frontend/src/index.html index 733116b75f..fdeb642c70 100644 --- a/packages/frontend/src/index.html +++ b/packages/frontend/src/index.html @@ -20,7 +20,7 @@ worker-src 'self'; script-src 'self' 'unsafe-eval' https://*.hcaptcha.com https://challenges.cloudflare.com https://esm.sh; style-src 'self' 'unsafe-inline'; - img-src 'self' data: blob: www.google.com xn--931a.moe launcher.moe localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000 activitypub.software secure.gravatar.com avatars.githubusercontent.com; + img-src 'self' data: blob: www.google.com xn--931a.moe localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000 activitypub.software secure.gravatar.com avatars.githubusercontent.com; media-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000; connect-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000 https://newassets.hcaptcha.com https://api.listenbrainz.org; frame-src *;" diff --git a/packages/frontend/src/pages/user/home.vue b/packages/frontend/src/pages/user/home.vue index b997fe1c3f..e82ec0cb97 100644 --- a/packages/frontend/src/pages/user/home.vue +++ b/packages/frontend/src/pages/user/home.vue @@ -30,7 +30,12 @@ SPDX-License-Identifier: AGPL-3.0-only - {{ i18n.ts.followsYou }} +
+ {{ i18n.ts.followsYou }} + {{ i18n.ts.muted }} + {{ i18n.ts.renoteMuted }} + {{ i18n.ts.blocked }} +
@@ -445,15 +450,25 @@ onUnmounted(() => { background: linear-gradient(transparent, rgba(#000, 0.7)); } - > .followed { + > .info-badges { position: absolute; top: 12px; left: 12px; - padding: 4px 8px; - color: #fff; - background: rgba(0, 0, 0, 0.7); - font-size: 0.7em; - border-radius: var(--radius-sm); + + display: flex; + flex-direction: row; + + > * { + padding: 4px 8px; + color: #fff; + background: rgba(0, 0, 0, 0.7); + font-size: 0.7em; + border-radius: var(--radius-sm); + } + + > :not(:first-child) { + margin-left: 8px; + } } > .actions {