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