fix some (all?) Misskey references

This commit is contained in:
dakkar 2024-10-11 09:59:21 +01:00
parent 2da85e1163
commit a12815eabe
6 changed files with 15 additions and 15 deletions

View File

@ -491,7 +491,7 @@ export class ClientServerService {
return await reply.view('base', { return await reply.view('base', {
img: this.meta.bannerUrl, img: this.meta.bannerUrl,
url: this.config.url, url: this.config.url,
title: this.meta.name ?? 'Misskey', title: this.meta.name ?? 'Sharkey',
desc: this.meta.description, desc: this.meta.description,
...await this.generateCommonPugData(this.meta), ...await this.generateCommonPugData(this.meta),
...data, ...data,
@ -817,7 +817,7 @@ export class ClientServerService {
reply.header('Cache-Control', 'public, max-age=3600'); reply.header('Cache-Control', 'public, max-age=3600');
return await reply.view('base-embed', { return await reply.view('base-embed', {
title: this.meta.name ?? 'Misskey', title: this.meta.name ?? 'Sharkey',
...await this.generateCommonPugData(this.meta), ...await this.generateCommonPugData(this.meta),
embedCtx: htmlSafeJsonStringify({ embedCtx: htmlSafeJsonStringify({
user: _user, user: _user,
@ -840,7 +840,7 @@ export class ClientServerService {
reply.header('Cache-Control', 'public, max-age=3600'); reply.header('Cache-Control', 'public, max-age=3600');
return await reply.view('base-embed', { return await reply.view('base-embed', {
title: this.meta.name ?? 'Misskey', title: this.meta.name ?? 'Sharkey',
...await this.generateCommonPugData(this.meta), ...await this.generateCommonPugData(this.meta),
embedCtx: htmlSafeJsonStringify({ embedCtx: htmlSafeJsonStringify({
note: _note, note: _note,
@ -861,7 +861,7 @@ export class ClientServerService {
reply.header('Cache-Control', 'public, max-age=3600'); reply.header('Cache-Control', 'public, max-age=3600');
return await reply.view('base-embed', { return await reply.view('base-embed', {
title: this.meta.name ?? 'Misskey', title: this.meta.name ?? 'Sharkey',
...await this.generateCommonPugData(this.meta), ...await this.generateCommonPugData(this.meta),
embedCtx: htmlSafeJsonStringify({ embedCtx: htmlSafeJsonStringify({
clip: _clip, clip: _clip,
@ -874,7 +874,7 @@ export class ClientServerService {
reply.header('Cache-Control', 'public, max-age=3600'); reply.header('Cache-Control', 'public, max-age=3600');
return await reply.view('base-embed', { return await reply.view('base-embed', {
title: this.meta.name ?? 'Misskey', title: this.meta.name ?? 'Sharkey',
...await this.generateCommonPugData(this.meta), ...await this.generateCommonPugData(this.meta),
}); });
}); });

View File

@ -116,14 +116,14 @@
} }
document.body.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /><path d="M12 9v4" /><path d="M12 16v.01" /></svg> document.body.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /><path d="M12 9v4" /><path d="M12 16v.01" /></svg>
<div class="message">読み込みに失敗しました</div> <div class="message">読み込みに失敗しました</div>
<div class="submessage">Failed to initialize Misskey</div> <div class="submessage">Failed to initialize Sharkey</div>
<div class="submessage">Error Code: ${code}</div> <div class="submessage">Error Code: ${code}</div>
<button onclick="location.reload(!0)"> <button onclick="location.reload(!0)">
<div>リロード</div> <div>リロード</div>
<div><small>Reload</small></div> <div><small>Reload</small></div>
</button>`; </button>`;
addStyle(` addStyle(`
#misskey_app, #sharkey_app,
#splash { #splash {
display: none !important; display: none !important;
} }

View File

@ -9,11 +9,11 @@ html(class='embed')
head head
meta(charset='utf-8') meta(charset='utf-8')
meta(name='application-name' content='Misskey') meta(name='application-name' content='Sharkey')
meta(name='referrer' content='origin') meta(name='referrer' content='origin')
meta(name='theme-color' content= themeColor || '#86b300') meta(name='theme-color' content= themeColor || '#86b300')
meta(name='theme-color-orig' content= themeColor || '#86b300') meta(name='theme-color-orig' content= themeColor || '#86b300')
meta(property='og:site_name' content= instanceName || 'Misskey') meta(property='og:site_name' content= instanceName || 'Sharkey')
meta(property='instance_url' content= instanceUrl) meta(property='instance_url' content= instanceUrl)
meta(name='viewport' content='width=device-width, initial-scale=1') meta(name='viewport' content='width=device-width, initial-scale=1')
meta(name='format-detection' content='telephone=no,date=no,address=no,email=no,url=no') meta(name='format-detection' content='telephone=no,date=no,address=no,email=no,url=no')
@ -32,7 +32,7 @@ html(class='embed')
title title
block title block title
= title || 'Misskey' = title || 'Sharkey'
block meta block meta
meta(name='robots' content='noindex') meta(name='robots' content='noindex')

View File

@ -22,7 +22,7 @@ import { serverContext } from '@/server-context.js';
import type { Theme } from '@/theme.js'; import type { Theme } from '@/theme.js';
console.log('Misskey Embed'); console.log('Sharkey Embed');
//#region Embedパラメータの取得・パース //#region Embedパラメータの取得・パース
const params = new URLSearchParams(location.search); const params = new URLSearchParams(location.search);
@ -100,7 +100,7 @@ app.provide(DI.embedParams, embedParams);
// https://github.com/misskey-dev/misskey/pull/8575#issuecomment-1114239210 // https://github.com/misskey-dev/misskey/pull/8575#issuecomment-1114239210
// なぜか2回実行されることがあるため、mountするdivを1つに制限する // なぜか2回実行されることがあるため、mountするdivを1つに制限する
const rootEl = ((): HTMLElement => { const rootEl = ((): HTMLElement => {
const MISSKEY_MOUNT_DIV_ID = 'misskey_app'; const MISSKEY_MOUNT_DIV_ID = 'sharkey_app';
const currentRoot = document.getElementById(MISSKEY_MOUNT_DIV_ID); const currentRoot = document.getElementById(MISSKEY_MOUNT_DIV_ID);

View File

@ -25,12 +25,12 @@
connect-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000 https://newassets.hcaptcha.com; connect-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000 https://newassets.hcaptcha.com;
frame-src *;" frame-src *;"
/> />
<meta property="og:site_name" content="[DEV BUILD] Misskey" /> <meta property="og:site_name" content="[DEV BUILD] Sharkey" />
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
</head> </head>
<body> <body>
<div id="misskey_app"></div> <div id="sharkey_app"></div>
<script type="module" src="./boot.ts"></script> <script type="module" src="./boot.ts"></script>
</body> </body>
</html> </html>

View File

@ -63,7 +63,7 @@ html, body {
scroll-behavior: smooth; scroll-behavior: smooth;
} }
#misskey_app { #sharkey_app {
height: 100%; height: 100%;
} }