This commit is contained in:
parent
f4ed76aa00
commit
c3b472359a
3 changed files with 41 additions and 30 deletions
|
@ -198,19 +198,29 @@
|
|||
}
|
||||
|
||||
.config-account {
|
||||
&__bg {
|
||||
position: relative;
|
||||
margin-bottom: 82px;
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
&__cover {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-size: cover;
|
||||
background-position: center center;
|
||||
height: 70vh;
|
||||
}
|
||||
|
||||
&__avatar {
|
||||
position: absolute;
|
||||
top: 50vh;
|
||||
bottom: 24px;
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
left: 50%;
|
||||
margin: -64px 0 0 -64px;
|
||||
margin-left: -64px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 50%;
|
||||
background-size: cover;
|
||||
|
@ -219,7 +229,16 @@
|
|||
box-shadow: var(--b3-point-shadow);
|
||||
}
|
||||
|
||||
&__info {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
&__name {
|
||||
bottom: -58px;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,14 +15,14 @@ export const account = {
|
|||
<div class="fn__hr--b"></div>
|
||||
<a class="b3-button b3-button--outline" style="min-width: 214px" href="https://ld246.com/subscribe/siyuan" target="_blank">
|
||||
<span>
|
||||
<span class="fn__hr"></span>
|
||||
<div class="fn__hr"></div>
|
||||
<span class="ft__smaller">${window.siyuan.languages.account4}</span>
|
||||
<span class="fn__hr"></span>
|
||||
<div class="fn__hr--small"></div>
|
||||
<big class="ft__secondary">${window.siyuan.languages.priceAnnual}</big>
|
||||
<span class="ft__on-background">/${window.siyuan.languages.year}</span>
|
||||
<span class="fn__hr"></span>
|
||||
<div class="fn__hr--small"></div>
|
||||
<span class="ft__smaller ft__on-surface">${window.siyuan.languages.account1}</span>
|
||||
<span class="fn__hr"></span>
|
||||
<div class="fn__hr"></div>
|
||||
</span>
|
||||
</a>
|
||||
<div class="fn__hr--b"></div>
|
||||
|
|
|
@ -27,35 +27,27 @@ const showAccountInfo = (modelElement: HTMLElement, modelMainElement: Element) =
|
|||
modelElement.querySelector(".toolbar__icon").innerHTML = '<use xlink:href="#iconAccount"></use>';
|
||||
modelElement.querySelector(".toolbar__text").textContent = window.siyuan.languages.accountManage;
|
||||
modelMainElement.innerHTML = `<div class="fn__flex-column">
|
||||
<div style="position: relative">
|
||||
<div class="config-account__bg">
|
||||
<div class="config-account__cover" style="background-image: url(${window.siyuan.user.userHomeBImgURL})"></div>
|
||||
<a target="_blank" href="https://ld246.com/settings/avatar" class="config-account__avatar" style="background-image: url(${window.siyuan.user.userAvatarURL})" target="_blank"></a>
|
||||
</div>
|
||||
<div class="fn__hr"></div>
|
||||
<div class="fn__flex-1">
|
||||
<a href="https://ld246.com/settings/avatar" class="config-account__avatar" style="background-image: url(${window.siyuan.user.userAvatarURL})" target="_blank"></a>
|
||||
<h1 class="config-account__name">
|
||||
<a target="_blank" class="fn__a" href="https://ld246.com/member/${window.siyuan.user.userName}">${window.siyuan.user.userName}</a>
|
||||
</h1>
|
||||
${userTitlesHTML}
|
||||
</div>
|
||||
<div class="fn__hr"></div>
|
||||
<div class="fn__flex">
|
||||
<span class="fn__space"></span>
|
||||
<a class="b3-button b3-button--text" href="https://ld246.com/settings" target="_blank">${window.siyuan.languages.accountManage}</a>
|
||||
<span class="fn__space"></span>
|
||||
<button class="b3-button b3-button--cancel" id="logout">
|
||||
${window.siyuan.languages.logout}
|
||||
</button>
|
||||
<span class="fn__space"></span>
|
||||
<button class="b3-button b3-button--cancel" id="deactivateUser">
|
||||
${window.siyuan.languages.deactivateUser}
|
||||
</button>
|
||||
<span class="fn__flex-1"></span>
|
||||
<button class="b3-button b3-button--cancel" id="refresh">
|
||||
<svg><use xlink:href="#iconRefresh"></use></svg>
|
||||
</button>
|
||||
<span class="fn__space"></span>
|
||||
</div>`;
|
||||
<div class="config-account__info">
|
||||
<div class="fn__flex">
|
||||
<a class="b3-button b3-button--text" href="https://ld246.com/settings" target="_blank">${window.siyuan.languages.accountManage}</a>
|
||||
<span class="fn__space"></span>
|
||||
<button class="b3-button b3-button--cancel" id="logout">
|
||||
${window.siyuan.languages.logout}
|
||||
</button>
|
||||
<span class="fn__flex-1"></span>
|
||||
<button class="b3-button b3-button--cancel" id="refresh">
|
||||
<svg><use xlink:href="#iconRefresh"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div></div>`;
|
||||
|
||||
modelMainElement.querySelector("#logout").addEventListener(getEventName(), () => {
|
||||
fetchPost("/api/setting/logoutCloudUser", {}, () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue