sync: update from private repo (f6d625db)
CI / build-and-test (push) Has been cancelled

This commit is contained in:
oss-sync
2026-06-26 03:35:45 +00:00
parent 29ccaf1e92
commit b857c33ef6
371 changed files with 31312 additions and 8172 deletions
+8
View File
@@ -0,0 +1,8 @@
// 公開アプリ共有リンクの表示 URL 組み立て(純関数)。
//
// サーバの share API は shareUrl を相対パス(/ui/app/:token)で返す。表示・コピーの
// ためにブラウザの origin を前置する。既に絶対 URL(scheme 付き)ならそのまま返す。
export function buildAppShareDisplayUrl(origin: string, shareUrl: string): string {
if (/^[a-z][a-z0-9+.-]*:\/\//i.test(shareUrl)) return shareUrl; // already absolute
return `${origin.replace(/\/+$/, '')}${shareUrl.startsWith('/') ? '' : '/'}${shareUrl}`;
}