mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-06 17:08:29 +08:00
socialsProvider hidden ->display
This commit is contained in:
parent
4617f65447
commit
0034abd392
@ -192,7 +192,7 @@ public class SocialSignOnProviderService{
|
||||
_logger.debug("Social Provider {} ({})" ,
|
||||
socialsProvider.getProvider() ,socialsProvider.getProviderName());
|
||||
|
||||
if(!socialsProvider.getHidden().equals("true")) {
|
||||
if(socialsProvider.getDisplay().equals("true")) {
|
||||
socialSignOnProviders.add(new SocialsProvider(socialsProvider));
|
||||
}
|
||||
|
||||
@ -226,7 +226,7 @@ public class SocialSignOnProviderService{
|
||||
clientSecret = PasswordReciprocal.getInstance().decoder(clientSecret);
|
||||
socialsProvider.setClientSecret(clientSecret);
|
||||
socialsProvider.setAgentId(rs.getString("agentId"));
|
||||
socialsProvider.setHidden(rs.getString("hidden"));
|
||||
socialsProvider.setDisplay(rs.getString("display"));
|
||||
socialsProvider.setSortIndex(rs.getInt("sortindex"));
|
||||
socialsProvider.setScanCode(rs.getString("scancode"));
|
||||
socialsProvider.setStatus(rs.getInt("status"));
|
||||
|
||||
@ -56,7 +56,7 @@ public class SocialsProvider extends JpaBaseEntity implements Serializable {
|
||||
@Column
|
||||
private String agentId;
|
||||
@Column
|
||||
private String hidden;
|
||||
private String display;
|
||||
@Column
|
||||
private long sortIndex;
|
||||
@Column
|
||||
@ -217,15 +217,15 @@ public class SocialsProvider extends JpaBaseEntity implements Serializable {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getHidden() {
|
||||
return hidden;
|
||||
}
|
||||
public String getDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setHidden(String hidden) {
|
||||
this.hidden = hidden;
|
||||
}
|
||||
public void setDisplay(String display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -306,8 +306,8 @@ public class SocialsProvider extends JpaBaseEntity implements Serializable {
|
||||
builder.append(clientSecret);
|
||||
builder.append(", agentId=");
|
||||
builder.append(agentId);
|
||||
builder.append(", hidden=");
|
||||
builder.append(hidden);
|
||||
builder.append(", display=");
|
||||
builder.append(display);
|
||||
builder.append(", sortIndex=");
|
||||
builder.append(sortIndex);
|
||||
builder.append(", scanCode=");
|
||||
|
||||
@ -5,14 +5,9 @@
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="startDatePicker">{{ 'mxk.text.startDate' | i18n }}</nz-form-label>
|
||||
<nz-form-control>
|
||||
<nz-date-picker
|
||||
nzShowTime
|
||||
nzFormat="yyyy-MM-dd HH:mm:ss"
|
||||
[(ngModel)]="query.params.startDatePicker"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
name="startDatePicker"
|
||||
nzPlaceHolder="startDatePicker"
|
||||
></nz-date-picker>
|
||||
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" [(ngModel)]="query.params.startDatePicker"
|
||||
[ngModelOptions]="{ standalone: true }" name="startDatePicker" nzPlaceHolder="startDatePicker">
|
||||
</nz-date-picker>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
@ -20,24 +15,19 @@
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="endDatePicker">{{ 'mxk.text.endDate' | i18n }}</nz-form-label>
|
||||
<nz-form-control>
|
||||
<nz-date-picker
|
||||
nzShowTime
|
||||
nzFormat="yyyy-MM-dd HH:mm:ss"
|
||||
[(ngModel)]="query.params.endDatePicker"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
name="endDatePicker"
|
||||
nzPlaceHolder="endDatePicker"
|
||||
></nz-date-picker>
|
||||
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" [(ngModel)]="query.params.endDatePicker"
|
||||
[ngModelOptions]="{ standalone: true }" name="endDatePicker" nzPlaceHolder="endDatePicker">
|
||||
</nz-date-picker>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
|
||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' | i18n }}</button>
|
||||
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' |
|
||||
i18n }}</button>
|
||||
<button nz-button type="reset" (click)="onReset()" class="mx-sm">{{ 'mxk.text.reset' | i18n }}</button>
|
||||
<button nz-button (click)="query.expandForm = !query.expandForm" class="mx-sm d-none">
|
||||
{{ query.expandForm ? ('mxk.text.collapse' | i18n) : ('mxk.text.expand' | i18n) }}</button
|
||||
>
|
||||
{{ query.expandForm ? ('mxk.text.collapse' | i18n) : ('mxk.text.expand' | i18n) }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -46,32 +36,21 @@
|
||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
||||
<button nz-button type="button" (click)="onTerminate($event)" [nzType]="'primary'" nzDanger class="mx-sm">{{
|
||||
'mxk.text.terminate' | i18n
|
||||
}}</button>
|
||||
}}</button>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="24">
|
||||
<nz-table
|
||||
#dynamicTable
|
||||
nzTableLayout="auto"
|
||||
nzSize="small"
|
||||
nzShowSizeChanger
|
||||
[nzBordered]="true"
|
||||
[nzData]="query.results.rows"
|
||||
[nzFrontPagination]="false"
|
||||
[nzTotal]="query.results.records"
|
||||
[nzPageSizeOptions]="query.params.pageSizeOptions"
|
||||
[nzPageSize]="query.params.pageSize"
|
||||
[nzPageIndex]="query.params.pageNumber"
|
||||
[nzLoading]="this.query.tableLoading"
|
||||
(nzQueryParams)="onQueryParamsChange($event)"
|
||||
>
|
||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" nzShowSizeChanger [nzBordered]="true"
|
||||
[nzData]="query.results.rows" [nzFrontPagination]="false" [nzTotal]="query.results.records"
|
||||
[nzPageSizeOptions]="query.params.pageSizeOptions" [nzPageSize]="query.params.pageSize"
|
||||
[nzPageIndex]="query.params.pageNumber" [nzLoading]="this.query.tableLoading"
|
||||
(nzQueryParams)="onQueryParamsChange($event)">
|
||||
<thead>
|
||||
<tr>
|
||||
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate" (nzCheckedChange)="onTableAllChecked($event)"></th>
|
||||
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate"
|
||||
(nzCheckedChange)="onTableAllChecked($event)"></th>
|
||||
<th nzAlign="center">{{ 'mxk.history.login.sessionId' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.history.login.username' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.history.login.displayName' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.history.login.message' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.history.login.loginType' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.history.login.sourceIp' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.history.login.browser' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.history.login.platform' | i18n }}</th>
|
||||
@ -80,18 +59,13 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr *ngFor="let data of query.results.rows">
|
||||
<td
|
||||
[nzChecked]="query.tableCheckedId.has(data.sessionId)"
|
||||
[nzDisabled]="data.disabled"
|
||||
(nzCheckedChange)="onTableItemChecked(data.sessionId, $event)"
|
||||
></td>
|
||||
<td [nzChecked]="query.tableCheckedId.has(data.sessionId)" [nzDisabled]="data.disabled"
|
||||
(nzCheckedChange)="onTableItemChecked(data.sessionId, $event)"></td>
|
||||
<td nzAlign="left">
|
||||
<span>{{ data.sessionId }}</span>
|
||||
</td>
|
||||
<td nzAlign="left">{{ data.username }}</td>
|
||||
<td nzAlign="left">{{ data.displayName }}</td>
|
||||
<td nzAlign="left">{{ data.provider }}</td>
|
||||
<td nzAlign="left">{{ data.loginType }}</td>
|
||||
<td nzAlign="left">{{ data.sourceIp }}</td>
|
||||
<td nzAlign="left">{{ data.browser }}</td>
|
||||
<td nzAlign="left">{{ data.platform }}</td>
|
||||
@ -100,4 +74,4 @@
|
||||
</tbody>
|
||||
</nz-table>
|
||||
</div>
|
||||
</nz-card>
|
||||
</nz-card>
|
||||
@ -1,19 +1,18 @@
|
||||
/*
|
||||
* Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { BaseEntity } from './BaseEntity';
|
||||
|
||||
@ -24,9 +23,8 @@ export class SocialsProvider extends BaseEntity {
|
||||
clientId!: String;
|
||||
clientSecret!: String;
|
||||
agentId!: String;
|
||||
hidden!: String;
|
||||
display!: String;
|
||||
scanCode!: String;
|
||||
switch_hidden: boolean = false;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
@ -40,9 +38,6 @@ export class SocialsProvider extends BaseEntity {
|
||||
if (this.status == 1) {
|
||||
this.switch_status = true;
|
||||
}
|
||||
if (this.hidden == 'true') {
|
||||
this.switch_hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
override trans(): void {
|
||||
@ -51,9 +46,5 @@ export class SocialsProvider extends BaseEntity {
|
||||
} else {
|
||||
this.status = 0;
|
||||
}
|
||||
|
||||
if (this.switch_hidden) {
|
||||
this.hidden = 'true';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,9 +67,9 @@
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="hidden">{{ 'mxk.socialsproviders.hidden' | i18n }}</nz-form-label>
|
||||
<nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="The input is not valid hidden!">
|
||||
<nz-radio-group [(ngModel)]="form.model.hidden" [ngModelOptions]="{ standalone: true }" nzButtonStyle="solid">
|
||||
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="display">{{ 'mxk.socialsproviders.display' | i18n }}</nz-form-label>
|
||||
<nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="The input is not valid display!">
|
||||
<nz-radio-group [(ngModel)]="form.model.display" [ngModelOptions]="{ standalone: true }" nzButtonStyle="solid">
|
||||
<label nz-radio-button nzValue="false">{{ 'mxk.text.no' | i18n }}</label>
|
||||
<label nz-radio-button nzValue="true">{{ 'mxk.text.yes' | i18n }}</label>
|
||||
</nz-radio-group>
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
<th nzAlign="center">{{ 'mxk.socialsproviders.provider' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.socialsproviders.providerName' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.text.sortIndex' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.socialsproviders.hidden' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.socialsproviders.display' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.socialsproviders.scanCode' | i18n }}</th>
|
||||
|
||||
<th nzAlign="center">{{ 'mxk.text.status' | i18n }}</th>
|
||||
@ -62,7 +62,7 @@
|
||||
<td nzAlign="left"> {{ data.provider }}</td>
|
||||
<td nzAlign="left"> {{ data.providerName }}</td>
|
||||
<td nzAlign="center"> {{ data.sortIndex }}</td>
|
||||
<td nzAlign="center"> <i *ngIf="data.hidden == 'true'" nz-icon nzType="check-circle" nzTheme="fill"
|
||||
<td nzAlign="center"> <i *ngIf="data.display == 'true'" nz-icon nzType="check-circle" nzTheme="fill"
|
||||
style="color: green"></i></td>
|
||||
<td nzAlign="center"> <i *ngIf="data.scanCode == 'true'" nz-icon nzType="check-circle" nzTheme="fill"
|
||||
style="color: green"></i></td>
|
||||
|
||||
@ -531,7 +531,7 @@
|
||||
"clientSecret": "ClientSecret",
|
||||
"agentId": "AgentId",
|
||||
"scanCode": "ScanCode",
|
||||
"hidden": "Is Show"
|
||||
"display": "Is Show"
|
||||
},
|
||||
"synchronizers": {
|
||||
"name": "Name",
|
||||
|
||||
@ -529,7 +529,7 @@
|
||||
"clientSecret": "密钥",
|
||||
"agentId": "AgentId",
|
||||
"scanCode": "扫码登录",
|
||||
"hidden": "是否显示"
|
||||
"display": "是否显示"
|
||||
},
|
||||
"synchronizers": {
|
||||
"name": "名称",
|
||||
|
||||
@ -530,7 +530,7 @@
|
||||
"clientSecret": "密鑰",
|
||||
"agentId": "AgentId",
|
||||
"scanCode": "掃碼登錄",
|
||||
"hidden": "是否顯示"
|
||||
"display": "是否顯示"
|
||||
},
|
||||
"synchronizers": {
|
||||
"name": "名稱",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user