diff --git a/app/src/assets/scss/mobile.scss b/app/src/assets/scss/mobile.scss
index c6e37930e2e..4a772a9be1b 100644
--- a/app/src/assets/scss/mobile.scss
+++ b/app/src/assets/scss/mobile.scss
@@ -192,7 +192,9 @@
.toolbar__text {
min-height: 48px;
+ line-height: 48px;
}
+
.config-about__logo {
display: flex;
align-items: center;
@@ -205,27 +207,24 @@
.config-account {
&__bg {
position: relative;
- margin-bottom: 82px;
width: 100%;
flex: 1;
}
&__cover {
- position: absolute;
- top: 0;
- width: 100%;
- height: 100%;
+ width: 100vw;
+ height: 50vh;
background-size: cover;
background-position: center center;
}
&__avatar {
position: absolute;
- bottom: 24px;
+ top: 50vh;
width: 128px;
height: 128px;
left: 50%;
- margin-left: -64px;
+ margin: -160px 0 0 -64px;
background-repeat: no-repeat;
background-position: 50%;
background-size: cover;
@@ -239,12 +238,9 @@
width: 100%;
box-sizing: border-box;
padding: 16px;
- margin-top: 10vh;
}
&__name {
- bottom: -58px;
- position: absolute;
width: 100%;
text-align: center;
}
diff --git a/app/src/mobile/settings/account.ts b/app/src/mobile/settings/account.ts
index e3387a2e98e..928725ef14b 100644
--- a/app/src/mobile/settings/account.ts
+++ b/app/src/mobile/settings/account.ts
@@ -9,6 +9,7 @@ import md5 from "blueimp-md5";
import {getCloudURL} from "../../config/util/about";
import {Dialog} from "../../dialog";
import {hideElements} from "../../protyle/ui/hideElements";
+import {Constants} from "../../constants";
export const showAccountInfo = () => {
let userTitlesHTML = "";
@@ -19,6 +20,32 @@ export const showAccountInfo = () => {
});
userTitlesHTML += "";
}
+ let subscriptionHTML = ""
+ if (window.siyuan.user.userSiYuanProExpireTime === -1) {
+ // 终身会员
+ subscriptionHTML = `
${Constants.SIYUAN_IMAGE_VIP}${window.siyuan.languages.account12}
`;
+ } else if (window.siyuan.user.userSiYuanProExpireTime > 0) {
+ // 订阅中
+ if (window.siyuan.user.userSiYuanOneTimePayStatus === 1) {
+ subscriptionHTML = `${window.siyuan.languages.onepay}
`;
+ }
+ const renewHTML = `
+
+ ${window.siyuan.languages.account6}
+ ${Math.max(0, Math.floor((window.siyuan.user.userSiYuanProExpireTime - new Date().getTime()) / 1000 / 60 / 60 / 24))}
+ ${window.siyuan.languages.day}
+
${window.siyuan.languages.clickMeToRenew}
+
`;
+ if (window.siyuan.user.userSiYuanSubscriptionPlan === 2) {
+ // 订阅试用
+ subscriptionHTML += `${window.siyuan.languages.account3}
+${renewHTML}`;
+ } else {
+ subscriptionHTML += `${window.siyuan.languages.account10}
${renewHTML}`;
+ }
+ } else if (window.siyuan.user.userSiYuanOneTimePayStatus === 1) {
+ subscriptionHTML = `${window.siyuan.languages.onepay}
`;
+ }
openModel({
title: window.siyuan.languages.manage,
icon: "iconAccount",
@@ -26,10 +53,16 @@ export const showAccountInfo = () => {
diff --git a/app/src/mobile/util/keyboardToolbar.ts b/app/src/mobile/util/keyboardToolbar.ts
index 0a895505da9..6eaad630389 100644
--- a/app/src/mobile/util/keyboardToolbar.ts
+++ b/app/src/mobile/util/keyboardToolbar.ts
@@ -12,6 +12,7 @@ import {getCurrentEditor} from "../editor";
import {fontEvent, getFontNodeElements} from "../../protyle/toolbar/Font";
import {hideElements} from "../../protyle/ui/hideElements";
import {softEnter} from "../../protyle/wysiwyg/enter";
+import {isPaidUser} from "../../util/needSubscribe";
let renderKeyboardToolbarTimeout: number;
let showUtil = false;
@@ -203,6 +204,7 @@ const renderSlashMenu = (protyle: IProtyle, toolbarElement: Element) => {
${getSlashItem("((", "iconRef", window.siyuan.languages.ref, "true")}
${getSlashItem("{{", "iconSQL", window.siyuan.languages.blockEmbed, "true")}
${getSlashItem(Constants.ZWSP + 5, "iconSparkles", "AI Chat")}
+ ${isPaidUser() ? getSlashItem('
', "iconDatabase", window.siyuan.languages.database, "true") : ""}
${getSlashItem(Constants.ZWSP + 4, "iconFile", window.siyuan.languages.newSubDoc)}