diff --git a/src/App.vue b/src/App.vue index 8065b93..f2b1a4f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -122,10 +122,10 @@ body { display: none; } -button span { +/* button span { margin-left: 0px !important; font-size: 16px !important; font-family: apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif; margin-bottom: 6px; -} +} */ diff --git a/src/views/EditNote.vue b/src/views/EditNote.vue index 29780c9..1e23cc3 100644 --- a/src/views/EditNote.vue +++ b/src/views/EditNote.vue @@ -38,6 +38,13 @@ justify-content: center; } +/* button span { + margin-left: 0px !important; + font-size: 18px !important; + font-family: apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif; + margin-bottom: 6px; +} */ + @media print { @@ -80,30 +87,19 @@ v-on:click="refreshPage()" />
-
-
-
+
@@ -388,6 +401,8 @@ export default { showMenuState: false, showHeaderShade: false, errorInfo: '', + targetTime: null, + showSkeleton: true, } }, created() { @@ -413,6 +428,7 @@ export default { this.state.initTime = new Date().getTime(); this.state.initTtl = noteMeta.ttl; this.state.ttl = noteMeta.ttl; + this.targetTime = noteMeta.ttl + new Date().getTime(); this.state.serverTime = noteMeta.serverTime; this.secret.cipher = "00000000000000000000000000000000";//noteMeta.cipher; //读者有没有值可配置 @@ -437,12 +453,6 @@ export default { }, mounted() { - let stateInfo = storage.session.getText(this.secret.storeKey + "_share"); - if (stateInfo == '1') { - storage.session.setText(this.secret.storeKey + "_share", '0'); - this.showShareModel(); - } - const myObserver = new ResizeObserver(entries => { // iterate over the entries, do something. entries.forEach(entry => { @@ -469,6 +479,13 @@ export default { } new QRCode(qrimg, opts); + let stateInfo = storage.session.getText(this.secret.storeKey + "_share"); + if (stateInfo == '1') { + storage.session.setText(this.secret.storeKey + "_share", '0'); + setTimeout(() => { + this.showShareModel(); + }, 100); + } }, updated() { }, @@ -505,9 +522,7 @@ export default { } else if (mins < 10) { mins = "0" + mins; } - let seds = parseInt(ittl % 60); - if (seds < 0) { seds = "00"; } else if (seds < 10) { @@ -515,7 +530,6 @@ export default { } that.state.ttlDesc = mins + ":" + seds; that.state.ttl = that.state.initTtl - (new Date().getTime() - that.state.initTime); - if (that.state.ttl <= 0) { storage.local.delete(that.secret.storeKey); location.reload(); @@ -587,7 +601,7 @@ export default { let base64String = Buffer.from(ab).toString('base64') that.noteForm.text = unwrap(base64String, that.secret.secretKey); - + that.showSkeleton = false; // if local is enough, set local if (storage.local.getAvailableSize() > 1 * 1024 * 1024) { storage.local.setText(that.secret.storeKey, that.state.lock + '|' + that.secret.cipher + '|1|' + that.state.serverTime + '|' + base64String); @@ -603,6 +617,7 @@ export default { } this.noteForm.text = unwrap(starray[4], this.secret.secretKey); + this.showSkeleton = false; //this.noteForm.escapeText = getEscapeText(this.noteForm.text); // local is usable, and set commited flag