Client:OAuth2: fix
This commit is contained in:
parent
01bb18a6a3
commit
a02fac57f0
@ -128,7 +128,7 @@ const ScopesBlock = ({
|
|||||||
>
|
>
|
||||||
{scope.read.name}
|
{scope.read.name}
|
||||||
</Text>{" "}
|
</Text>{" "}
|
||||||
— {t(`${scope.read.tKey}`)}
|
— {t(`Common:${scope.read.tKey}`)}
|
||||||
</Text>
|
</Text>
|
||||||
{/* @ts-ignore */}
|
{/* @ts-ignore */}
|
||||||
<Text
|
<Text
|
||||||
@ -147,7 +147,7 @@ const ScopesBlock = ({
|
|||||||
>
|
>
|
||||||
{scope.write.name}
|
{scope.write.name}
|
||||||
</Text>
|
</Text>
|
||||||
— {t(`${scope.write.tKey}`)}
|
— {t(`Common:${scope.write.tKey}`)}
|
||||||
</Text>
|
</Text>
|
||||||
</StyledScopesName>
|
</StyledScopesName>
|
||||||
<StyledScopesCheckbox>
|
<StyledScopesCheckbox>
|
||||||
|
@ -67,23 +67,25 @@ const AuthorizedApps = ({
|
|||||||
<Text fontSize={"12px"} fontWeight={"400"} lineHeight={"16px"}>
|
<Text fontSize={"12px"} fontWeight={"400"} lineHeight={"16px"}>
|
||||||
{t("ProfileDescription")}
|
{t("ProfileDescription")}
|
||||||
</Text>
|
</Text>
|
||||||
<Consumer>
|
{consents && consents?.length > 0 && (
|
||||||
{(context: { sectionWidth: number; sectionHeight: number }) => (
|
<Consumer>
|
||||||
<>
|
{(context: { sectionWidth: number; sectionHeight: number }) => (
|
||||||
{viewAs === "table" ? (
|
<>
|
||||||
<TableView
|
{viewAs === "table" ? (
|
||||||
items={consents || []}
|
<TableView
|
||||||
sectionWidth={context.sectionWidth}
|
items={consents || []}
|
||||||
/>
|
sectionWidth={context.sectionWidth}
|
||||||
) : (
|
/>
|
||||||
<RowView
|
) : (
|
||||||
items={consents || []}
|
<RowView
|
||||||
sectionWidth={context.sectionWidth}
|
items={consents || []}
|
||||||
/>
|
sectionWidth={context.sectionWidth}
|
||||||
)}
|
/>
|
||||||
</>
|
)}
|
||||||
)}
|
</>
|
||||||
</Consumer>
|
)}
|
||||||
|
</Consumer>
|
||||||
|
)}
|
||||||
{infoDialogVisible && (
|
{infoDialogVisible && (
|
||||||
<InfoDialog visible={infoDialogVisible} isProfile />
|
<InfoDialog visible={infoDialogVisible} isProfile />
|
||||||
)}
|
)}
|
||||||
|
@ -226,8 +226,6 @@ class OAuthStore implements OAuthStoreProps {
|
|||||||
try {
|
try {
|
||||||
const consentList: IClientProps[] = await getConsentList();
|
const consentList: IClientProps[] = await getConsentList();
|
||||||
|
|
||||||
console.log(consentList);
|
|
||||||
|
|
||||||
runInAction(() => {
|
runInAction(() => {
|
||||||
this.consents = [...consentList];
|
this.consents = [...consentList];
|
||||||
});
|
});
|
||||||
@ -370,7 +368,7 @@ class OAuthStore implements OAuthStoreProps {
|
|||||||
t: any,
|
t: any,
|
||||||
item: IClientProps,
|
item: IClientProps,
|
||||||
isInfo?: boolean,
|
isInfo?: boolean,
|
||||||
isSettings?: boolean
|
isSettings: boolean = true
|
||||||
) => {
|
) => {
|
||||||
const { clientId } = item;
|
const { clientId } = item;
|
||||||
|
|
||||||
@ -438,16 +436,17 @@ class OAuthStore implements OAuthStoreProps {
|
|||||||
|
|
||||||
await Promise.all(actions);
|
await Promise.all(actions);
|
||||||
|
|
||||||
runInAction(() => {
|
this.setActiveClient("");
|
||||||
this.activeClients = [];
|
this.setSelection("");
|
||||||
this.selection = [];
|
|
||||||
});
|
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
} else {
|
} else {
|
||||||
this.setActiveClient(clientId);
|
this.setActiveClient(clientId);
|
||||||
|
|
||||||
await this.changeClientStatus(clientId, status);
|
await this.changeClientStatus(clientId, status);
|
||||||
|
|
||||||
|
this.setActiveClient("");
|
||||||
|
this.setSelection("");
|
||||||
|
|
||||||
//TODO OAuth, show toast
|
//TODO OAuth, show toast
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user