mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-12 16:56:02 +00:00
refactor: rename 'allow_change_password' to 'allow_modify_login_info' and update related logic across the application
This commit is contained in:
@@ -21,6 +21,7 @@ import {
|
||||
ItemActions,
|
||||
} from '@/components/ui/item';
|
||||
import { httpClient } from '@/app/infra/http/HttpClient';
|
||||
import { systemInfo } from '@/app/infra/http';
|
||||
import { Loader2, ExternalLink, KeyRound } from 'lucide-react';
|
||||
import PasswordChangeDialog from '../password-change-dialog/PasswordChangeDialog';
|
||||
|
||||
@@ -125,6 +126,7 @@ export default function AccountSettingsDialog({
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={() => setPasswordDialogOpen(true)}
|
||||
disabled={!systemInfo.allow_modify_login_info}
|
||||
>
|
||||
{hasPassword
|
||||
? t('common.changePassword')
|
||||
@@ -179,7 +181,9 @@ export default function AccountSettingsDialog({
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={handleBindSpace}
|
||||
disabled={spaceBindLoading}
|
||||
disabled={
|
||||
spaceBindLoading || !systemInfo.allow_modify_login_info
|
||||
}
|
||||
>
|
||||
{spaceBindLoading ? (
|
||||
<Loader2 className="mr-2 h-4 w-4 animate-spin" />
|
||||
|
||||
@@ -241,7 +241,7 @@ export interface ApiRespSystemInfo {
|
||||
version: string;
|
||||
cloud_service_url: string;
|
||||
enable_marketplace: boolean;
|
||||
allow_change_password: boolean;
|
||||
allow_modify_login_info: boolean;
|
||||
}
|
||||
|
||||
export interface ApiRespPluginSystemStatus {
|
||||
|
||||
@@ -8,7 +8,7 @@ export let systemInfo: ApiRespSystemInfo = {
|
||||
version: '',
|
||||
enable_marketplace: true,
|
||||
cloud_service_url: '',
|
||||
allow_change_password: true,
|
||||
allow_modify_login_info: true,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user