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:
parent
bc0c53b92b
commit
5c79d8db20
28 changed files with 167 additions and 35 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue