chore (client, locale): log in/out -> sign in/out
This commit is contained in:
parent
5fb3253069
commit
47bc534b1f
13 changed files with 36 additions and 36 deletions
|
@ -462,7 +462,7 @@ securityKeyName: "Key name"
|
|||
registerSecurityKey: "Register a security key"
|
||||
lastUsed: "Last used"
|
||||
unregister: "Unregister"
|
||||
passwordLessLogin: "Password-less login"
|
||||
passwordLessLogin: "Password-less sign in"
|
||||
resetPassword: "Reset password"
|
||||
newPasswordIs: "The new password is \"{password}\""
|
||||
reduceUiAnimation: "Reduce UI animations"
|
||||
|
@ -527,7 +527,7 @@ disableDrawer: "Don't use drawer-style menus"
|
|||
youHaveNoGroups: "You have no groups"
|
||||
joinOrCreateGroup: "Get invited to a group or create your own."
|
||||
noHistory: "No history available"
|
||||
signinHistory: "Login history"
|
||||
signinHistory: "Sign in history"
|
||||
disableAnimatedMfm: "Disable MFM with animation"
|
||||
doing: "Processing..."
|
||||
category: "Category"
|
||||
|
@ -717,8 +717,8 @@ useGlobalSetting: "Use global settings"
|
|||
useGlobalSettingDesc: "If turned on, your account's notification settings will be
|
||||
used. If turned off, individual configurations can be made."
|
||||
other: "Other"
|
||||
regenerateLoginToken: "Regenerate login token"
|
||||
regenerateLoginTokenDescription: "Regenerates the token used internally during login.
|
||||
regenerateLoginToken: "Regenerate sign in token"
|
||||
regenerateLoginTokenDescription: "Regenerates the token used internally during sign in.
|
||||
Normally this action is not necessary. If regenerated, all devices will be logged
|
||||
out."
|
||||
setMultipleBySeparatingWithSpace: "Separate multiple entries with spaces."
|
||||
|
@ -1001,7 +1001,7 @@ check: "Check"
|
|||
driveCapOverrideLabel: "Change the drive capacity for this user"
|
||||
driveCapOverrideCaption: "Reset the capacity to default by inputting a value of 0
|
||||
or lower."
|
||||
requireAdminForView: "You must log in with an administrator account to view this."
|
||||
requireAdminForView: "You must sign in with an administrator account to view this."
|
||||
isSystemAccount: "This account is created and automatically operated by the system.
|
||||
Please do not moderate, edit, delete, or otherwise tamper with this account, or
|
||||
it may break your server."
|
||||
|
@ -1011,7 +1011,7 @@ document: "Documentation"
|
|||
numberOfPageCache: "Number of cached pages"
|
||||
numberOfPageCacheDescription: "Increasing this number will improve convenience for
|
||||
users but cause more server load as well as more memory to be used."
|
||||
logoutConfirm: "Really log out?"
|
||||
logoutConfirm: "Really sign out?"
|
||||
lastActiveDate: "Last used at"
|
||||
statusbar: "Status bar"
|
||||
pleaseSelect: "Select an option"
|
||||
|
@ -1627,7 +1627,7 @@ _2fa:
|
|||
step2Url: "You can also enter this URL if you're using a desktop program:"
|
||||
step3Title: "Enter an authentication code"
|
||||
step3: "Enter the token provided by your app to finish setup."
|
||||
step4: "From now on, any future login attempts will ask for such a login token."
|
||||
step4: "From now on, any future sign in attempts will ask for such a token."
|
||||
securityKeyNotSupported: "Your browser does not support security keys."
|
||||
securityKeyInfo: "Besides fingerprint or PIN authentication, you can also setup
|
||||
authentication via hardware security keys that support FIDO2 to further secure
|
||||
|
|
|
@ -11,7 +11,7 @@ import { reloadChannel, unisonReload } from "@/scripts/unison-reload";
|
|||
|
||||
export type Account = entities.MeDetailed;
|
||||
|
||||
export async function signout() {
|
||||
export async function signOut() {
|
||||
waiting();
|
||||
localStorage.removeItem("account");
|
||||
|
||||
|
@ -47,7 +47,7 @@ export async function signout() {
|
|||
|
||||
document.cookie = "igi=; path=/";
|
||||
|
||||
if (accounts.length > 0) login(accounts[0].token);
|
||||
if (accounts.length > 0) signIn(accounts[0].token);
|
||||
else unisonReload("/");
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ function fetchAccount(token: string): Promise<Account> {
|
|||
if (res.error) {
|
||||
if (res.error.id === "a8c724b3-6e9c-4b46-b1a8-bc3ed6258370") {
|
||||
showSuspendedDialog();
|
||||
signout();
|
||||
signOut();
|
||||
} else {
|
||||
alert({
|
||||
type: "error",
|
||||
|
@ -126,7 +126,7 @@ export async function refreshAccount() {
|
|||
return updateAccount(accountData);
|
||||
}
|
||||
|
||||
export async function login(token: Account["token"], redirect?: string) {
|
||||
export async function signIn(token: Account["token"], redirect?: string) {
|
||||
waiting();
|
||||
if (_DEV_) console.log("logging as token ", token);
|
||||
const newAccount = await fetchAccount(token);
|
||||
|
@ -190,7 +190,7 @@ export async function openAccountMenu(
|
|||
}
|
||||
|
||||
function switchAccountWithToken(token: string) {
|
||||
login(token);
|
||||
signIn(token);
|
||||
}
|
||||
|
||||
const storedAccounts = await getAccounts().then((accounts) =>
|
||||
|
|
|
@ -142,7 +142,7 @@ import MkInfo from "@/components/MkInfo.vue";
|
|||
import { host as configHost } from "@/config";
|
||||
import { byteify, hexify } from "@/scripts/2fa";
|
||||
import * as os from "@/os";
|
||||
import { login } from "@/account";
|
||||
import { signIn } from "@/account";
|
||||
import { i18n } from "@/i18n";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
|
@ -195,7 +195,7 @@ function onUsernameChange() {
|
|||
|
||||
function onLogin(res) {
|
||||
if (props.autoSet) {
|
||||
return login(res.i);
|
||||
return signIn(res.i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -281,7 +281,7 @@ import MkSwitch from "./form/switch.vue";
|
|||
import MkCaptcha from "@/components/MkCaptcha.vue";
|
||||
import * as config from "@/config";
|
||||
import * as os from "@/os";
|
||||
import { login } from "@/account";
|
||||
import { signIn } from "@/account";
|
||||
import { instance } from "@/instance";
|
||||
import { i18n } from "@/i18n";
|
||||
import icon from "@/scripts/icon";
|
||||
|
@ -470,7 +470,7 @@ function onSubmit(): void {
|
|||
emit("signup", res);
|
||||
|
||||
if (props.autoSet) {
|
||||
login(res.i);
|
||||
signIn(res.i);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ import {
|
|||
} from "vue";
|
||||
import { set } from "@/scripts/idb-proxy";
|
||||
|
||||
import { login, refreshAccount, signout, updateAccount } from "@/account";
|
||||
import { signIn, refreshAccount, signOut, updateAccount } from "@/account";
|
||||
import components from "@/components";
|
||||
import { lang, ui, version } from "@/config";
|
||||
import directives from "@/directives";
|
||||
|
@ -133,7 +133,7 @@ function checkForSplash() {
|
|||
if (!me || me.id !== loginId) {
|
||||
const account = await getAccountFromId(loginId);
|
||||
if (account) {
|
||||
await login(account.token, target);
|
||||
await signIn(account.token, target);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ function checkForSplash() {
|
|||
|
||||
try {
|
||||
document.body.innerHTML = "<div>Please wait...</div>";
|
||||
await login(i);
|
||||
await signIn(i);
|
||||
} catch (err) {
|
||||
// Render the error screen
|
||||
// TODO: ちゃんとしたコンポーネントをレンダリングする(v10とかのトラブルシューティングゲーム付きのやつみたいな)
|
||||
|
@ -542,7 +542,7 @@ function checkForSplash() {
|
|||
// トークンが再生成されたとき
|
||||
// このままではMisskeyが利用できないので強制的にサインアウトさせる
|
||||
main.on("myTokenRegenerated", () => {
|
||||
signout();
|
||||
signOut();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ import XForm from "./auth.form.vue";
|
|||
import MkSignin from "@/components/MkSignin.vue";
|
||||
import MkKeyValue from "@/components/MkKeyValue.vue";
|
||||
import * as os from "@/os";
|
||||
import { login } from "@/account";
|
||||
import { signIn } from "@/account";
|
||||
import { isSignedIn } from "@/me";
|
||||
import { i18n } from "@/i18n";
|
||||
|
||||
|
@ -132,6 +132,6 @@ const accepted = () => {
|
|||
};
|
||||
|
||||
const onLogin = (res) => {
|
||||
login(res.i);
|
||||
signIn(res.i);
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -82,7 +82,7 @@ import { ref } from "vue";
|
|||
import MkSignin from "@/components/MkSignin.vue";
|
||||
import MkButton from "@/components/MkButton.vue";
|
||||
import * as os from "@/os";
|
||||
import { login } from "@/account";
|
||||
import { signIn } from "@/account";
|
||||
import { me } from "@/me";
|
||||
import { appendQuery, query } from "@/scripts/url";
|
||||
import { i18n } from "@/i18n";
|
||||
|
@ -136,7 +136,7 @@ function deny(): void {
|
|||
}
|
||||
|
||||
function onLogin(res): void {
|
||||
login(res.i);
|
||||
signIn(res.i);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import {
|
|||
removeAccount as _removeAccount,
|
||||
addAccount as addAccounts,
|
||||
getAccounts,
|
||||
login,
|
||||
signIn,
|
||||
} from "@/account";
|
||||
import { me } from "@/me";
|
||||
import { i18n } from "@/i18n";
|
||||
|
@ -142,7 +142,7 @@ async function switchAccount(account: any) {
|
|||
}
|
||||
|
||||
function switchAccountWithToken(token: string) {
|
||||
login(token);
|
||||
signIn(token);
|
||||
}
|
||||
|
||||
definePageMetadata({
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
import FormInfo from "@/components/MkInfo.vue";
|
||||
import FormButton from "@/components/MkButton.vue";
|
||||
import * as os from "@/os";
|
||||
import { signout } from "@/account";
|
||||
import { signOut } from "@/account";
|
||||
import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import icon from "@/scripts/icon";
|
||||
|
@ -51,7 +51,7 @@ async function deleteAccount() {
|
|||
title: i18n.ts._accountDelete.started,
|
||||
});
|
||||
|
||||
await signout();
|
||||
await signOut();
|
||||
}
|
||||
|
||||
definePageMetadata({
|
||||
|
|
|
@ -45,7 +45,7 @@ import { computed, onActivated, onMounted, onUnmounted, ref, watch } from "vue";
|
|||
import { i18n } from "@/i18n";
|
||||
import MkInfo from "@/components/MkInfo.vue";
|
||||
import MkSuperMenu from "@/components/MkSuperMenu.vue";
|
||||
import { signout } from "@/account";
|
||||
import { signOut } from "@/account";
|
||||
import { me } from "@/me";
|
||||
import { unisonReload } from "@/scripts/unison-reload";
|
||||
import { instance } from "@/instance";
|
||||
|
@ -248,7 +248,7 @@ const menuDef = computed(() => [
|
|||
text: i18n.ts.logoutConfirm,
|
||||
});
|
||||
if (canceled) return;
|
||||
signout();
|
||||
signOut();
|
||||
},
|
||||
danger: true,
|
||||
},
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted } from "vue";
|
||||
import * as os from "@/os";
|
||||
import { login } from "@/account";
|
||||
import { signIn } from "@/account";
|
||||
import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import icon from "@/scripts/icon";
|
||||
|
@ -24,7 +24,7 @@ onMounted(async () => {
|
|||
const res = await os.apiWithDialog("signup-pending", {
|
||||
code: props.code,
|
||||
});
|
||||
login(res.i, "/");
|
||||
signIn(res.i, "/");
|
||||
});
|
||||
|
||||
definePageMetadata({
|
||||
|
|
|
@ -46,7 +46,7 @@ import MkButton from "@/components/MkButton.vue";
|
|||
import MkInput from "@/components/form/input.vue";
|
||||
import { host } from "@/config";
|
||||
import * as os from "@/os";
|
||||
import { login } from "@/account";
|
||||
import { signIn } from "@/account";
|
||||
import { i18n } from "@/i18n";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
|
@ -71,7 +71,7 @@ function submit() {
|
|||
});
|
||||
}
|
||||
});
|
||||
return login(res?.token);
|
||||
return signIn(res?.token);
|
||||
})
|
||||
.catch(() => {
|
||||
submitting.value = false;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { post } from "@/os";
|
||||
import { login } from "@/account";
|
||||
import { signIn } from "@/account";
|
||||
import { me } from "@/me";
|
||||
import { getAccountFromId } from "@/scripts/get-account-from-id";
|
||||
import { mainRouter } from "@/router";
|
||||
|
@ -15,7 +15,7 @@ export function swInject() {
|
|||
if (ev.data.loginId !== me?.id) {
|
||||
return getAccountFromId(ev.data.loginId).then((account) => {
|
||||
if (!account) return;
|
||||
return login(account.token, ev.data.url);
|
||||
return signIn(account.token, ev.data.url);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue