feat: ノートの閲覧にログイン必須にする設定 (#14799)
* wip * wip * wip * Update packages/frontend/src/pages/note.vue Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> * wip * Update WebhookTestService.ts * Update privacy.vue * wip * rename * Update locales/ja-JP.yml Co-authored-by: Sayamame-beans <61457993+Sayamame-beans@users.noreply.github.com> * 🎨 * wip --------- Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> Co-authored-by: Sayamame-beans <61457993+Sayamame-beans@users.noreply.github.com>
This commit is contained in:
@@ -44,17 +44,21 @@ export type OpenOnRemoteOptions = {
|
||||
params: Record<string, string>;
|
||||
};
|
||||
|
||||
export function pleaseLogin(path?: string, openOnRemote?: OpenOnRemoteOptions) {
|
||||
export function pleaseLogin(opts: {
|
||||
path?: string;
|
||||
message?: string;
|
||||
openOnRemote?: OpenOnRemoteOptions;
|
||||
} = {}) {
|
||||
if ($i) return;
|
||||
|
||||
const { dispose } = popup(defineAsyncComponent(() => import('@/components/MkSigninDialog.vue')), {
|
||||
autoSet: true,
|
||||
message: openOnRemote ? i18n.ts.signinOrContinueOnRemote : i18n.ts.signinRequired,
|
||||
openOnRemote,
|
||||
message: opts.message ?? (opts.openOnRemote ? i18n.ts.signinOrContinueOnRemote : i18n.ts.signinRequired),
|
||||
openOnRemote: opts.openOnRemote,
|
||||
}, {
|
||||
cancelled: () => {
|
||||
if (path) {
|
||||
window.location.href = path;
|
||||
if (opts.path) {
|
||||
window.location.href = opts.path;
|
||||
}
|
||||
},
|
||||
closed: () => dispose(),
|
||||
|
Reference in New Issue
Block a user