Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
SunWuyuan committed Apr 5, 2024
1 parent 716b101 commit 595fe7e
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 74 deletions.
5 changes: 4 additions & 1 deletion views/html-footer.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
if (typeof msg === 'string') {
msg = { message: msg };
}
mdui.snackbar(msg);
mdui.snackbar({
message: msg.message,
closeable: true,
});
}
mdui.setColorScheme('#2087fd');
</script>
Expand Down
4 changes: 2 additions & 2 deletions views/login_or_register.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ if (Cookies.get('token')) {

<div class="reply-form" style="height: max-content;">
<div>
<mdui-text-field variant="outlined" label="邮箱" id='email' type="email"
<mdui-text-field variant="outlined" label="邮箱" id='email' type="email" autocomplete="on"
style="margin-bottom: 10px;"></mdui-text-field>
<mdui-text-field variant="outlined" label="密码" id='password' type="password" toggle-password
<mdui-text-field variant="outlined" label="密码" id='password' type="password" toggle-password autocomplete="on"
style="margin-bottom: 10px;"></mdui-text-field>


Expand Down
118 changes: 54 additions & 64 deletions views/my_info.ejs
Original file line number Diff line number Diff line change
@@ -1,54 +1,55 @@
<%- include('./html-head.ejs', {pageTitle: '个人中心'}); %>
<%- include('./html-head.ejs', {pageTitle: '个人中心' }); %>

<div class="mdui-typo-display-2">
个人信息
</div>
<div class="mdui-typo-headline-opacity">
您可以随时修改个人信息,可能要重新登录后本地生效
</div><br />


<div class="mdui-typo-display-2">
个人信息
</div>
<div class="mdui-typo-headline-opacity">
您可以随时修改个人信息,可能要重新登录后本地生效
</div><br />

<mdui-tabs value="tab-1">
<mdui-tab value="tab-1">用户信息</mdui-tab>
<mdui-tab value="tab-2">头像</mdui-tab>
<mdui-tab value="tab-3">安全</mdui-tab>

<mdui-tab-panel slot="panel" value="tab-1">
<br />

<mdui-tabs value="tab-1">
<mdui-tab value="tab-1">用户信息</mdui-tab>
<mdui-tab value="tab-2">头像</mdui-tab>
<mdui-tab value="tab-3">安全</mdui-tab>

<mdui-tab-panel slot="panel" value="tab-1">
<br/>

<div>
<div class=" mdui-col-xs-2" style=" margin-bottom: 10px;
">
<mdui-text-field variant="outlined" id="my_display_name" maxlength="10" value="<%= display_name %>"
label="昵称"></mdui-text-field>

</div>
<br/>
<br />
<div class="mdui-col-xs-12" style=" margin-bottom: 10px;
">
<mdui-text-field variant="outlined" id="my_aboutme" maxlength="1000" value="<%= motto %>"
label="简介" autosize min-rows="2"></mdui-text-field>
<mdui-text-field variant="outlined" id="my_aboutme" maxlength="1000" value="<%= motto %>" label="简介"
autosize min-rows="2"></mdui-text-field>
</div>
<br/>
<mdui-select variant="outlined" id="sex-chick" label="性别" class="mdui-col-xs-3" <% if (sex==1) { %>value="1" <% } %>
<% if (sex==0) { %>value="0" <% } %> >
<mdui-menu-item value="1">男</mdui-menu-item>
<mdui-menu-item value="0">女</mdui-menu-item>
</mdui-select>
<br />
<mdui-select variant="outlined" id="sex-chick" label="性别" class="mdui-col-xs-3" <% if (sex==1) {
%>value="1" <% } %>
<% if (sex==0) { %>value="0" <% } %> >
<mdui-menu-item value="1">男</mdui-menu-item>
<mdui-menu-item value="0">女</mdui-menu-item>
</mdui-select>
</div>
<div style="float: right;">
<mdui-button href="/my/info">取消</mdui-button>
<mdui-button onclick="updataInfo()">确认</mdui-button>
</div>
</mdui-tab-panel>
<mdui-tab-panel slot="panel" value="tab-2"><br/>
<img class="mdui-img-circle mdui-m-l-2" src="/api/usertx?id=<%= userid %>"
style="height: 100px;width: auto;border-radius: 15px;" />
<br/> <br/>
<mdui-button class="avatarUpload " lay-data="{exts:'png|jpg', size:1024}">修改头像</mdui-button>
</mdui-tab-panel>
<mdui-tab-panel slot="panel" value="tab-2"><br />
<img class="mdui-img-circle mdui-m-l-2" src="/api/usertx?id=<%= userid %>"
style="height: 100px;width: auto;border-radius: 15px;" />
<br /> <br />
<mdui-button class="avatarUpload " lay-data="{exts:'png|jpg', size:1024}">修改头像</mdui-button>

<!-- <script src="https://registry.npmmirror.com/compressorjs/1.2.1/files/dist/compressor.js" crossorigin="anonymous"></script>
<!-- <script src="https://registry.npmmirror.com/compressorjs/1.2.1/files/dist/compressor.js" crossorigin="anonymous"></script>
<input type="file" id="file" accept="image/*">
Expand Down Expand Up @@ -96,45 +97,34 @@
});</script>-->

</mdui-tab-panel><br/>
<mdui-tab-panel slot="panel" value="tab-3"> <br/> <mdui-text-field variant="outlined" id='old_password' type="password"
label="原密码" autocomplete="off"></mdui-text-field><br/><br/>
<mdui-text-field variant="outlined" id='new_password' type="password"
label="新密码" autocomplete="off"></mdui-text-field><br/>
<div style="float: right;">
<mdui-button onclick="updatePassword()">确认</mdui-button>
</div>
</mdui-tab-panel>
</mdui-tabs>

<mdui-dialog class="password-dialog"
headline="修改密码"
description="请确保密码足够安全"
>
<mdui-text-field variant="outlined" id='old_password' type="password"
label="原密码" autocomplete="off"></mdui-text-field><br/><br/>
<mdui-text-field variant="outlined" id='new_password' type="password"
label="新密码" autocomplete="off"></mdui-text-field>
<mdui-button slot="action" variant="text" class="close-password-dialog">关闭</mdui-button>
<mdui-button slot="action" variant="tonal" onclick="updatePassword()">确认</mdui-button>
</mdui-dialog>
</mdui-tab-panel><br />
<mdui-tab-panel slot="panel" value="tab-3"> <br /> <mdui-text-field variant="outlined" id='old_password'
type="password" label="原密码" autocomplete="off" toggle-password></mdui-text-field><br /><br />
<mdui-text-field variant="outlined" id='new_password' type="password" label="新密码" autocomplete="off"
toggle-password></mdui-text-field><br />
<div style="float: right;">
<mdui-button onclick="updatePassword()">确认</mdui-button>
</div>
</mdui-tab-panel>
</mdui-tabs>




<script>
const passwordialog = document.querySelector(".password-dialog");
const openpwButton = document.querySelector(".open-password-dialog");
const closepwButton = document.querySelector(".close-password-dialog");

openpwButton.addEventListener("click", () => passwordialog.open = true);
closepwButton.addEventListener("click", () => passwordialog.open = false);
</script>
<script>
const passwordialog = document.querySelector(".password-dialog");
const openpwButton = document.querySelector(".open-password-dialog");
const closepwButton = document.querySelector(".close-password-dialog");
openpwButton.addEventListener("click", () => passwordialog.open = true);
closepwButton.addEventListener("click", () => passwordialog.open = false);
</script>




<script type="text/javascript" src="<%= process.env.staticurl %>/js/gter.js"></script>


<%- include('./html-footer.ejs', {page: 'myinfo'}); %>
<script type="text/javascript" src="<%= process.env.staticurl %>/js/gter.js"></script>


<%- include('./html-footer.ejs', {page: 'myinfo' }); %>
5 changes: 4 additions & 1 deletion views/python/python_edit.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
if (typeof msg === 'string') {
msg = { message: msg };
}
mdui.snackbar(msg);
mdui.snackbar({
message: msg.message,
closeable: true,
});
}
</script>
Expand Down
10 changes: 4 additions & 6 deletions views/repw.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@

<div class="reply-form" style="height: max-content;">

<div class="mdui-textfield">
<i class="mdui-icon material-icons">lock</i>
<input class="mdui-textfield-input" id='password' type="password" placeholder="密码" />
</div>


<mdui-text-field variant="outlined" label="密码" id='password' type="password" toggle-password
style="margin-bottom: 10px;"></mdui-text-field>

<div id="recaptcha-div-rePW-page"></div>




Expand Down

0 comments on commit 595fe7e

Please sign in to comment.