From b6d106b2c0954c497f6e44d1e25c238ff2fef283 Mon Sep 17 00:00:00 2001 From: AlphaX-Projects <77661270+AlphaX-Projects@users.noreply.github.com> Date: Mon, 19 Dec 2022 19:07:42 +0100 Subject: [PATCH] adjust pow --- .../plugins/core/components/ChatModals.js | 2 +- .../plugins/core/components/ChatPage.js | 2 +- .../core/components/ChatWelcomePage.js | 2 +- .../plugins/core/components/NameMenu.js | 2 +- .../core/messaging/q-chat/q-chat.src.js | 40 +------------------ 5 files changed, 6 insertions(+), 42 deletions(-) diff --git a/qortal-ui-plugins/plugins/core/components/ChatModals.js b/qortal-ui-plugins/plugins/core/components/ChatModals.js index c1ce0b2d..d6cf6aba 100644 --- a/qortal-ui-plugins/plugins/core/components/ChatModals.js +++ b/qortal-ui-plugins/plugins/core/components/ChatModals.js @@ -202,7 +202,7 @@ class ChatModals extends LitElement { const hashAry = new Uint8Array(window.parent.memory.buffer, hashPtr, 32); hashAry.set(chatBytesHash); - const difficulty = this.balance === 0 ? 12 : 8; + const difficulty = this.balance < 4 ? 18 : 8; const workBufferLength = 8 * 1024 * 1024; const workBufferPtr = window.parent.sbrk(workBufferLength, window.parent.heap); diff --git a/qortal-ui-plugins/plugins/core/components/ChatPage.js b/qortal-ui-plugins/plugins/core/components/ChatPage.js index aba20938..a959dbb0 100644 --- a/qortal-ui-plugins/plugins/core/components/ChatPage.js +++ b/qortal-ui-plugins/plugins/core/components/ChatPage.js @@ -704,7 +704,7 @@ class ChatPage extends LitElement { const hashAry = new Uint8Array(window.parent.memory.buffer, hashPtr, 32); hashAry.set(chatBytesHash); - const difficulty = this.balance === 0 ? 12 : 8; + const difficulty = this.balance < 4 ? 18 : 8; const workBufferLength = 8 * 1024 * 1024; const workBufferPtr = window.parent.sbrk(workBufferLength, window.parent.heap); let nonce = window.parent.computePow(hashPtr, workBufferPtr, workBufferLength, difficulty); diff --git a/qortal-ui-plugins/plugins/core/components/ChatWelcomePage.js b/qortal-ui-plugins/plugins/core/components/ChatWelcomePage.js index 1d9ea9bc..11f046ff 100644 --- a/qortal-ui-plugins/plugins/core/components/ChatWelcomePage.js +++ b/qortal-ui-plugins/plugins/core/components/ChatWelcomePage.js @@ -430,7 +430,7 @@ class ChatWelcomePage extends LitElement { const hashAry = new Uint8Array(window.parent.memory.buffer, hashPtr, 32); hashAry.set(chatBytesHash); - const difficulty = this.balance === 0 ? 12 : 8; + const difficulty = this.balance < 4 ? 18 : 8; const workBufferLength = 8 * 1024 * 1024; const workBufferPtr = window.parent.sbrk(workBufferLength, window.parent.heap); diff --git a/qortal-ui-plugins/plugins/core/components/NameMenu.js b/qortal-ui-plugins/plugins/core/components/NameMenu.js index 825f2889..ca67af73 100644 --- a/qortal-ui-plugins/plugins/core/components/NameMenu.js +++ b/qortal-ui-plugins/plugins/core/components/NameMenu.js @@ -548,7 +548,7 @@ class NameMenu extends LitElement { const hashAry = new Uint8Array(window.parent.memory.buffer, hashPtr, 32); hashAry.set(chatBytesHash); - const difficulty = this.balance === 0 ? 12 : 8; + const difficulty = this.balance < 4 ? 18 : 8; const workBufferLength = 8 * 1024 * 1024; const workBufferPtr = window.parent.sbrk(workBufferLength, window.parent.heap); diff --git a/qortal-ui-plugins/plugins/core/messaging/q-chat/q-chat.src.js b/qortal-ui-plugins/plugins/core/messaging/q-chat/q-chat.src.js index 8a83fe5e..193883ee 100644 --- a/qortal-ui-plugins/plugins/core/messaging/q-chat/q-chat.src.js +++ b/qortal-ui-plugins/plugins/core/messaging/q-chat/q-chat.src.js @@ -56,31 +56,26 @@ class Chat extends LitElement { --_lumo-grid-secondary-border-color: var(--border2); --mdc-dialog-min-width: 750px; } - paper-spinner-lite { height: 24px; width: 24px; --paper-spinner-color: var(--mdc-theme-primary); --paper-spinner-stroke-width: 2px; } - *, *:before, *:after { box-sizing: border-box; } - ul { list-style: none; padding: 0; } - .container { margin: 0 auto; width: 100%; background: var(--white); } - .people-list { width: 20vw; float: left; @@ -88,7 +83,6 @@ class Chat extends LitElement { overflow-y: hidden; border-right: 3px #ddd solid; } - .people-list .blockedusers { position: absolute; bottom: 0; @@ -98,13 +92,11 @@ class Chat extends LitElement { border-top: 1px solid var(--border); border-right: 3px #ddd solid; } - .people-list .search { padding-top: 20px; padding-left: 20px; padding-right: 20px; } - .center { margin: 0; position: absolute; @@ -113,7 +105,6 @@ class Chat extends LitElement { -ms-transform: translateX(-50%); transform: translateX(-50%); } - .people-list .create-chat { border-radius: 5px; border: none; @@ -126,19 +117,16 @@ class Chat extends LitElement { text-align: center; cursor: pointer; } - .people-list .create-chat:hover { opacity: .8; box-shadow: 0 3px 5px rgba(0, 0, 0, .2); } - .people-list ul { padding: 0; height: 85vh; overflow-y: auto; overflow-x: hidden; } - .chat { width: 80vw; height: 100vh; @@ -149,7 +137,6 @@ class Chat extends LitElement { color: #434651; box-sizing: border-box; } - .chat .new-message-bar { display: flex; flex: 0 1 auto; @@ -172,17 +159,14 @@ class Chat extends LitElement { opacity: .85; cursor: pointer; } - .chat .new-message-bar:hover { opacity: .75; transform: translateY(-1px); box-shadow: 0 3px 7px rgba(0, 0, 0, .2); } - .hide-new-message-bar { display: none !important; } - .chat .chat-history { position: absolute; top: 0; @@ -194,7 +178,6 @@ class Chat extends LitElement { height: 100vh; box-sizing: border-box; } - .chat .chat-message { padding: 10px; height: 10%; @@ -202,7 +185,6 @@ class Chat extends LitElement { width: 100%; background-color: #eee; } - .chat .chat-message textarea { width: 90%; border: none; @@ -211,7 +193,6 @@ class Chat extends LitElement { border-radius: 5px; resize: none; } - .chat .chat-message button { float: right; color: #94c2ed; @@ -225,18 +206,15 @@ class Chat extends LitElement { margin-top: 4px; margin-right: 4px; } - .chat .chat-message button:hover { color: #75b1e8; } - .online, .offline, .me { margin-right: 3px; font-size: 10px; } - .clearfix:after { visibility: hidden; display: block; @@ -245,37 +223,30 @@ class Chat extends LitElement { clear: both; height: 0; } - .red { --mdc-theme-primary: red; } - h2 { margin:0; } - h2, h3, h4, h5 { color: var(--black); font-weight: 400; } - [hidden] { display: hidden !important; visibility: none !important; } - .details { display: flex; font-size: 18px; } - .title { font-weight:600; font-size:12px; line-height: 32px; opacity: 0.66; } - .input { width: 100%; border: none; @@ -286,7 +257,6 @@ class Chat extends LitElement { resize: none; background: #eee; } - .textarea { width: 100%; border: none; @@ -342,7 +312,6 @@ class Chat extends LitElement { -
${translate("chatpage.cchange6")}
--