zhaolei
9 days ago 4a2e5b9a21940f11757be37d99f0944e240e908b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
@inherits ProfilesBase
 
<AuthorizateComponent Key="saveDisplayName">
    <div class="card">
        <div class="card-header">基本资料</div>
        <div class="card-body">
            <ConditionComponent>
                <div class="alert alert-danger" role="alert">
                    <span>演示系统禁止更改管理员显示名称</span>
                </div>
            </ConditionComponent>
            <LgbEditForm class="form-inline" Id="Profile" Model="User" OnValidSubmit="SaveDisplayName">
                <div class="row">
                    <div class="form-group col-sm-6 col-md-auto">
                        <label class="control-label" for="userName">登录名称</label>
                        <input type="text" class="form-control ignore" value="@Model?.UserName" readonly />
                    </div>
                    <LgbInputText ColumnClass="col-sm-6 col-md-auto" @bind-Value="@DisplayName" placeholder="不可为空,16字以内" maxlength="16">
                        <RequiredValidator />
                        <StringLengthValidator Length="16" />
                    </LgbInputText>
                </div>
            </LgbEditForm>
        </div>
        <ConditionComponent Inverse="true">
            <div class="card-footer">
                <button class="btn btn-secondary" type="button" onclick="$.submitForm(this)"><i class="fa fa-save"></i><span>保存</span></button>
            </div>
        </ConditionComponent>
    </div>
</AuthorizateComponent>
<ConditionComponent Condition="@(Model?.External ?? false)" Inverse="true">
    <ConditionComponent AuthKey="savePassword">
        <div class="card">
            <div class="card-header">修改密码</div>
            <div class="card-body">
                <ConditionComponent>
                    <div class="alert alert-danger" role="alert">
                        <span>演示系统禁止更改管理员密码</span>
                    </div>
                </ConditionComponent>
                <LgbEditForm class="form-inline" Id="Profile" Model="Password" OnValidSubmit="SavePassword">
                    <div class="row">
                        <LgbInputText InputType="password" ColumnClass="col-sm-6 col-md-auto" @bind-Value="@Password.Password" autocomplete="off" placeholder="原密码" maxlength="16">
                            <RequiredValidator />
                            <StringLengthValidator Length="16" />
                        </LgbInputText>
                    </div>
                    <div class="row">
                        <LgbInputText InputType="password" ColumnClass="col-sm-6 col-md-auto" @bind-Value="@Password.NewPassword" autocomplete="off" placeholder="新密码" maxlength="16">
                            <RequiredValidator />
                            <StringLengthValidator Length="16" />
                        </LgbInputText>
                        <LgbInputText InputType="password" ColumnClass="col-sm-6 col-md-auto" @bind-Value="@Password.ConfirmPassword" autocomplete="off" placeholder="与新密码一致" maxlength="16">
                            <RequiredValidator />
                            <StringLengthValidator Length="16" />
                            <EqualToValidator @bind-Value="@Password.NewPassword" />
                        </LgbInputText>
                    </div>
                </LgbEditForm>
            </div>
            <ConditionComponent Inverse="true">
                <div class="card-footer">
                    <button class="btn btn-secondary" type="button" onclick="$.submitForm(this)"><i class="fa fa-save"></i><span>保存</span></button>
                </div>
            </ConditionComponent>
        </div>
    </ConditionComponent>
</ConditionComponent>
<ConditionComponent AuthKey="saveApp">
    <div class="card">
        <div class="card-header">默认应用</div>
        <div class="card-body">
            <div class="form-group">
                <div class="btn-group" role="group">
                    <Dropdown @bind-Value="@SelectedApp" Items="@Apps"></Dropdown>
                </div>
            </div>
        </div>
        <div class="card-footer">
            <button class="btn btn-secondary" type="button" @onclick="SaveApp"><i class="fa fa-save"></i><span>保存</span></button>
        </div>
    </div>
</ConditionComponent>
<ConditionComponent AuthKey="saveTheme">
    <div class="card">
        <div class="card-header">网站样式</div>
        <div class="card-body">
            <div class="alert alert-info" role="alert">
                <span>注意:本设置将覆盖<b><a class="badge-pill" href="@("~/Admin/Settings".ToBlazorMenuUrl())">网站设置</a></b>中设置的网站样式</span>
            </div>
            <div class="form-group">
                <Dropdown @bind-Value="@SelectedTheme" Items="@Themes"></Dropdown>
            </div>
        </div>
        <div class="card-footer">
            <button class="btn btn-secondary" type="button" @onclick="SaveTheme"><i class="fa fa-save"></i><span>保存</span></button>
        </div>
    </div>
</ConditionComponent>
<ConditionComponent AuthKey="saveIcon">
    <div class="card">
        <div class="card-header">修改头像</div>
        <div class="card-body">
            <form enctype="multipart/form-data">
                <div class="form-group">
                    <input id="fileIcon" type="file" data-init="@Model?.Size" data-file="@Model?.FileName">
                </div>
            </form>
            <img class="card-img d-none" src="@Model?.Icon.ToBlazorLink()" />
        </div>
    </div>
</ConditionComponent>