mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-07 22:44:16 +00:00
UI: use gateway token for login gate auth
This commit is contained in:
@@ -140,7 +140,7 @@ export const en: TranslationMap = {
|
||||
},
|
||||
login: {
|
||||
subtitle: "Gateway Dashboard",
|
||||
passwordPlaceholder: "optional",
|
||||
tokenPlaceholder: "paste gateway token",
|
||||
},
|
||||
chat: {
|
||||
disconnected: "Disconnected from gateway.",
|
||||
|
||||
@@ -142,7 +142,7 @@ export const pt_BR: TranslationMap = {
|
||||
},
|
||||
login: {
|
||||
subtitle: "Painel do Gateway",
|
||||
passwordPlaceholder: "opcional",
|
||||
tokenPlaceholder: "cole o token do gateway",
|
||||
},
|
||||
chat: {
|
||||
disconnected: "Desconectado do gateway.",
|
||||
|
||||
@@ -139,7 +139,7 @@ export const zh_CN: TranslationMap = {
|
||||
},
|
||||
login: {
|
||||
subtitle: "网关仪表盘",
|
||||
passwordPlaceholder: "可选",
|
||||
tokenPlaceholder: "粘贴网关令牌",
|
||||
},
|
||||
chat: {
|
||||
disconnected: "已断开与网关的连接。",
|
||||
|
||||
@@ -139,7 +139,7 @@ export const zh_TW: TranslationMap = {
|
||||
},
|
||||
login: {
|
||||
subtitle: "閘道儀表板",
|
||||
passwordPlaceholder: "可選",
|
||||
tokenPlaceholder: "貼上閘道令牌",
|
||||
},
|
||||
chat: {
|
||||
disconnected: "已斷開與網關的連接。",
|
||||
|
||||
@@ -30,15 +30,16 @@ export function renderLoginGate(state: AppViewState) {
|
||||
/>
|
||||
</label>
|
||||
<label class="field">
|
||||
<span>${t("overview.access.password")}</span>
|
||||
<span>${t("overview.access.token")}</span>
|
||||
<input
|
||||
type="password"
|
||||
.value=${state.password}
|
||||
@input=${(e: Event) => {
|
||||
const v = (e.target as HTMLInputElement).value;
|
||||
state.password = v;
|
||||
state.applySettings({ ...state.settings, token: v });
|
||||
}}
|
||||
placeholder="${t("login.passwordPlaceholder")}"
|
||||
placeholder="${t("login.tokenPlaceholder")}"
|
||||
@keydown=${(e: KeyboardEvent) => {
|
||||
if (e.key === "Enter") {
|
||||
state.connect();
|
||||
|
||||
Reference in New Issue
Block a user