Browse Source

[add] popup 个人中心、提现、登录页

wenliming 3 năm trước cách đây
mục cha
commit
7a0f09df3d

BIN
src/assets/img/denet-logo.png


+ 3 - 0
src/assets/svg/icon-about.svg

@@ -0,0 +1,3 @@
+<svg width="42" height="42" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M21 7C13.272 7 7 13.272 7 21C7 28.728 13.272 35 21 35C28.728 35 35 28.728 35 21C35 13.272 28.728 7 21 7ZM22.708 28.168C22.708 28.924 22.092 29.54 21.336 29.54H20.65C19.894 29.54 19.278 28.924 19.278 28.168V19.978C19.278 19.222 19.894 18.606 20.65 18.606H21.336C22.092 18.606 22.708 19.222 22.708 19.978V28.168ZM21 16.562C20.062 16.562 19.292 15.792 19.292 14.854C19.292 13.916 20.062 13.146 21 13.146C21.938 13.146 22.708 13.916 22.708 14.854C22.708 15.792 21.938 16.562 21 16.562Z" fill="#389AFF"/>
+</svg>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 2 - 0
src/assets/svg/icon-anti-bot.svg


+ 3 - 0
src/assets/svg/icon-bar-arrow-left.svg

@@ -0,0 +1,3 @@
+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M1.46967 7.46967C1.17678 7.76256 1.17678 8.23744 1.46967 8.53033L6.24264 13.3033C6.53553 13.5962 7.01041 13.5962 7.3033 13.3033C7.59619 13.0104 7.59619 12.5355 7.3033 12.2426L3.06066 8L7.3033 3.75736C7.59619 3.46447 7.59619 2.98959 7.3033 2.6967C7.01041 2.40381 6.53553 2.40381 6.24264 2.6967L1.46967 7.46967ZM14 7.25L2 7.25L2 8.75L14 8.75L14 7.25Z" fill="black"/>
+</svg>

+ 4 - 0
src/assets/svg/icon-beta.svg

@@ -0,0 +1,4 @@
+<svg width="38" height="17" viewBox="0 0 38 17" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect opacity="0.2" x="0.35" y="0.35" width="37.3" height="16.3" rx="8.15" fill="#9AC3EE" fill-opacity="0.01" stroke="black" stroke-width="0.7"/>
+<path opacity="0.4" d="M11.6914 12.1055C13.25 12.1055 14.2812 10.8691 14.2812 8.95312C14.2812 7.04297 13.2441 5.80078 11.709 5.80078C10.8477 5.80078 10.1387 6.22852 9.75781 6.92578H9.73438V3.54492H8.71484V12H9.6875V10.9688H9.71094C10.1035 11.6719 10.8008 12.1055 11.6914 12.1055ZM11.4922 6.69727C12.5703 6.69727 13.2383 7.57031 13.2383 8.95312C13.2383 10.3477 12.5703 11.209 11.4922 11.209C10.4609 11.209 9.72852 10.3125 9.72852 8.95312C9.72852 7.59961 10.4609 6.69727 11.4922 6.69727ZM18.0617 6.68555C19.0227 6.68555 19.6613 7.41211 19.6848 8.43164H16.3742C16.4387 7.41797 17.1066 6.68555 18.0617 6.68555ZM19.6613 10.2539C19.4914 10.8281 18.923 11.2207 18.1496 11.2207C17.0539 11.2207 16.3684 10.4531 16.3684 9.28711V9.22852H20.7395V8.8418C20.7395 6.99609 19.7258 5.80078 18.0793 5.80078C16.3977 5.80078 15.3195 7.08398 15.3195 8.97656C15.3195 10.8926 16.3801 12.1055 18.1262 12.1055C19.4563 12.1055 20.4875 11.3203 20.6633 10.2539H19.6613ZM22.3988 4.43555V5.90625H21.4906V6.74414H22.3988V10.418C22.3988 11.5898 22.8324 12.0469 23.9516 12.0469C24.1918 12.0469 24.473 12.0293 24.5961 12V11.1445C24.5258 11.1562 24.2914 11.1738 24.1742 11.1738C23.6527 11.1738 23.4184 10.9219 23.4184 10.3652V6.74414H24.602V5.90625H23.4184V4.43555H22.3988ZM27.8844 11.2383C27.152 11.2383 26.6656 10.8574 26.6656 10.2773C26.6656 9.70312 27.1344 9.33984 27.9547 9.28711L29.5836 9.1875V9.68555C29.5836 10.5645 28.8453 11.2383 27.8844 11.2383ZM27.6559 12.1055C28.4762 12.1055 29.2496 11.6484 29.6129 10.9512H29.6363V12H30.6031V7.78711C30.6031 6.57422 29.7008 5.80078 28.2711 5.80078C26.8297 5.80078 25.9273 6.60938 25.857 7.66406H26.8414C26.9703 7.06641 27.4625 6.69727 28.2477 6.69727C29.0914 6.69727 29.5836 7.14258 29.5836 7.88672V8.39648L27.8375 8.49609C26.4312 8.57812 25.6285 9.23438 25.6285 10.2773C25.6285 11.373 26.443 12.1055 27.6559 12.1055Z" fill="black"/>
+</svg>

+ 3 - 0
src/assets/svg/icon-cell-arrow-right.svg

@@ -0,0 +1,3 @@
+<svg width="18" height="24" viewBox="0 0 18 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M6 6.5L12 12.125L6 17.75" stroke="#D9D9D9" stroke-width="1.5"/>
+</svg>

+ 18 - 0
src/assets/svg/icon-denet-logo.svg

@@ -0,0 +1,18 @@
+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_13570_5490)">
+<circle cx="7.5" cy="7.5" r="7" fill="url(#paint0_linear_13570_5490)" stroke="#28ACFC"/>
+<path opacity="0.7" fill-rule="evenodd" clip-rule="evenodd" d="M7.5 13C10.5376 13 13 10.5376 13 7.5C13 4.46243 10.5376 2 7.5 2V13Z" fill="#00A3FF"/>
+<path d="M1.5 5.25C2.4665 5.25 3.25 4.4665 3.25 3.5C3.25 2.5335 2.4665 1.75 1.5 1.75C0.533502 1.75 -0.25 2.5335 -0.25 3.5C-0.25 4.4665 0.533502 5.25 1.5 5.25Z" fill="#44BBFF" stroke="white" stroke-width="0.5"/>
+<path d="M7.5 16.25C8.4665 16.25 9.25 15.4665 9.25 14.5C9.25 13.5335 8.4665 12.75 7.5 12.75C6.5335 12.75 5.75 13.5335 5.75 14.5C5.75 15.4665 6.5335 16.25 7.5 16.25Z" fill="#44BBFF" stroke="white" stroke-width="0.5"/>
+<path d="M14 5.25C14.9665 5.25 15.75 4.4665 15.75 3.5C15.75 2.5335 14.9665 1.75 14 1.75C13.0335 1.75 12.25 2.5335 12.25 3.5C12.25 4.4665 13.0335 5.25 14 5.25Z" fill="#44BBFF" stroke="white" stroke-width="0.5"/>
+</g>
+<defs>
+<linearGradient id="paint0_linear_13570_5490" x1="7.5" y1="0" x2="7.5" y2="15" gradientUnits="userSpaceOnUse">
+<stop stop-color="#ADE0FF"/>
+<stop offset="1" stop-color="#ADE0FF" stop-opacity="0"/>
+</linearGradient>
+<clipPath id="clip0_13570_5490">
+<rect width="16" height="16" fill="white"/>
+</clipPath>
+</defs>
+</svg>

+ 4 - 0
src/assets/svg/icon-following.svg

@@ -0,0 +1,4 @@
+<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
+<circle cx="9.00977" cy="5.5" r="3.5" fill="#566370"/>
+<path d="M3.51018 15C3.51018 15 3.01062 10 9.01018 10C15.0097 10 14.5102 15 14.5102 15H3.51018Z" fill="#566370"/>
+</svg>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 6 - 0
src/assets/svg/icon-giveaways.svg


+ 13 - 0
src/assets/svg/icon-login-denet-logo.svg

@@ -0,0 +1,13 @@
+<svg width="80" height="80" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
+<circle cx="39.1006" cy="37.5" r="35" fill="url(#paint0_linear_13465_131545)" stroke="#28ACFC" stroke-width="5"/>
+<path opacity="0.7" fill-rule="evenodd" clip-rule="evenodd" d="M39.0977 65C54.2855 65 66.5977 52.6878 66.5977 37.5C66.5977 22.3122 54.2855 10 39.0977 10V65Z" fill="#00A3FF"/>
+<path d="M9.10059 26.25C13.9331 26.25 17.8506 22.3325 17.8506 17.5C17.8506 12.6675 13.9331 8.75 9.10059 8.75C4.26809 8.75 0.350586 12.6675 0.350586 17.5C0.350586 22.3325 4.26809 26.25 9.10059 26.25Z" fill="#44BBFF" stroke="#F7FCFF" stroke-width="2.5"/>
+<path d="M39.1006 81.25C43.9331 81.25 47.8506 77.3325 47.8506 72.5C47.8506 67.6675 43.9331 63.75 39.1006 63.75C34.2681 63.75 30.3506 67.6675 30.3506 72.5C30.3506 77.3325 34.2681 81.25 39.1006 81.25Z" fill="#44BBFF" stroke="#F7FCFF" stroke-width="2.5"/>
+<path d="M71.6006 26.25C76.4331 26.25 80.3506 22.3325 80.3506 17.5C80.3506 12.6675 76.4331 8.75 71.6006 8.75C66.7681 8.75 62.8506 12.6675 62.8506 17.5C62.8506 22.3325 66.7681 26.25 71.6006 26.25Z" fill="#44BBFF" stroke="#F7FCFF" stroke-width="2.5"/>
+<defs>
+<linearGradient id="paint0_linear_13465_131545" x1="39.1006" y1="0" x2="39.1006" y2="75" gradientUnits="userSpaceOnUse">
+<stop stop-color="#ADE0FF"/>
+<stop offset="1" stop-color="#ADE0FF" stop-opacity="0"/>
+</linearGradient>
+</defs>
+</svg>

+ 3 - 0
src/assets/svg/icon-login-twitter-white.svg

@@ -0,0 +1,3 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M21.7663 5.93006C21.0431 6.24733 20.256 6.47566 19.4453 6.5646C20.282 6.05745 20.9178 5.25706 21.2179 4.30525C20.4451 4.77395 19.5706 5.11765 18.6606 5.29552C17.9232 4.49513 16.8762 4 15.7157 4C13.4822 4 11.686 5.84113 11.686 8.10047C11.686 8.41774 11.7238 8.73501 11.7852 9.04026C8.44088 8.8624 5.45814 7.23759 3.47517 4.74991C3.12537 5.36041 2.92683 6.05744 2.92683 6.81937C2.92683 8.24228 3.63825 9.49694 4.72309 10.2348C4.06131 10.2084 3.43735 10.0185 2.90084 9.71326V9.76373C2.90084 11.7563 4.28585 13.4075 6.13174 13.7873C5.79376 13.8762 5.43214 13.9267 5.07053 13.9267C4.80818 13.9267 4.56001 13.9003 4.30948 13.8642C4.82 15.489 6.30664 16.6692 8.0769 16.7076C6.69189 17.8108 4.95708 18.4598 3.07337 18.4598C2.73539 18.4598 2.42341 18.4478 2.09961 18.4093C3.88641 19.5751 6.00647 20.248 8.28961 20.248C15.7015 20.248 19.7573 14.0036 19.7573 8.58358C19.7573 8.40572 19.7573 8.22786 19.7455 8.04999C20.5302 7.46593 21.2179 6.74246 21.7663 5.93006Z" fill="white"/>
+</svg>

+ 4 - 0
src/assets/svg/icon-money.svg

@@ -0,0 +1,4 @@
+<svg width="70" height="70" viewBox="0 0 70 70" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect width="70" height="70" rx="35" fill="#FFB443"/>
+<path d="M36.7104 53.9342V50.8662C43.7295 50.3084 47.7504 46.7059 47.7504 40.9186C47.7504 36.0145 44.8684 33.0395 39.0113 31.6449L36.7104 31.1568V21.5113C39.5459 21.8832 41.5215 23.8355 41.5912 26.2992H47.1461C47.0299 21.0697 42.9857 17.3277 36.7104 16.7699V13.5625H33.5029V16.7699C26.9254 17.351 22.9742 20.9303 22.9742 26.4154C22.9742 31.0639 25.9027 34.2248 31.2717 35.5264L33.5029 36.0842V46.241C30.2258 45.8691 28.1107 43.9865 27.9016 41.3369H22.2305C22.2537 46.8221 26.5768 50.4711 33.5029 50.9127V53.9342H36.7104ZM42.1025 41.5229C42.1025 44.3119 40.127 46.0783 36.7104 46.2875V36.6885C40.4059 37.4322 42.1025 38.9662 42.1025 41.5229ZM28.6918 25.9506C28.6918 23.4869 30.7139 21.6508 33.5029 21.4881V30.4828C30.3652 29.832 28.6918 28.2748 28.6918 25.9506Z" fill="white"/>
+</svg>

+ 6 - 0
src/assets/svg/icon-more.svg

@@ -0,0 +1,6 @@
+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="2" y="2" width="5" height="5" rx="1" fill="black"/>
+<rect x="2" y="8.5" width="5" height="5" rx="1" fill="black"/>
+<rect x="9" y="2" width="5" height="5" rx="1" fill="black"/>
+<rect x="9" y="8.5" width="5" height="5" rx="1" fill="black"/>
+</svg>

+ 6 - 0
src/assets/svg/icon-option-list.svg

@@ -0,0 +1,6 @@
+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="2.1" y="1.6" width="11.8" height="12.8" rx="0.9" fill="#C4C4C4" fill-opacity="0.01" stroke="#C7C7C7" stroke-width="1.2"/>
+<line x1="4.5" y1="4.85" x2="11.5" y2="4.85" stroke="#C7C7C7" stroke-width="1.3"/>
+<line x1="4.5" y1="7.35" x2="11.5" y2="7.35" stroke="#C7C7C7" stroke-width="1.3"/>
+<line x1="4.5" y1="9.85" x2="11.5" y2="9.85" stroke="#C7C7C7" stroke-width="1.3"/>
+</svg>

+ 3 - 0
src/assets/svg/icon-twitter.svg

@@ -0,0 +1,3 @@
+<svg width="42" height="42" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M36 12.8951C34.8968 13.371 33.6962 13.7135 32.4596 13.8469C33.7358 13.0862 34.7057 11.8856 35.1636 10.4579C33.9846 11.1609 32.6506 11.6765 31.2626 11.9433C30.1377 10.7427 28.5406 10 26.7703 10C23.3633 10 20.6232 12.7617 20.6232 16.1507C20.6232 16.6266 20.6809 17.1025 20.7747 17.5604C15.6731 17.2936 11.1232 14.8564 8.09831 11.1249C7.56472 12.0406 7.26187 13.0862 7.26187 14.2291C7.26187 16.3634 8.34707 18.2454 10.0019 19.3522C8.99243 19.3126 8.04062 19.0278 7.22221 18.5699V18.6456C7.22221 21.6344 9.33494 24.1113 12.1507 24.6809C11.6351 24.8143 11.0835 24.89 10.5319 24.89C10.1317 24.89 9.75315 24.8504 9.37099 24.7963C10.1497 27.2335 12.4175 29.0037 15.1179 29.0614C13.0052 30.7163 10.3589 31.6897 7.4854 31.6897C6.96984 31.6897 6.49393 31.6717 6 31.614C8.72563 33.3626 11.9596 34.3721 15.4424 34.3721C26.7487 34.3721 32.9355 25.0054 32.9355 16.8754C32.9355 16.6086 32.9355 16.3418 32.9174 16.075C34.1144 15.1989 35.1636 14.1137 36 12.8951Z" fill="#389AFF"/>
+</svg>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 6 - 0
src/assets/svg/icon-withdraw-paypal-logo.svg


+ 1 - 1
src/iframe/test.js → src/iframe/publish.js

@@ -1,5 +1,5 @@
 import { createApp } from 'vue'
-import App from '../view/test.vue'
+import App from '../view/publish.vue'
 import ElementPlus from 'element-plus'
 import 'element-plus/dist/index.css'
 

+ 1 - 1
src/logic/twitter.js

@@ -214,7 +214,7 @@ function _addIframe() {
     // let span = document.createElement('span');
     // const shadowRoot = span.attachShadow({mode: 'closed'})
     let iframe = document.createElement('iframe');
-    iframe.src = chrome.runtime.getURL('/iframe/test.html')
+    iframe.src = chrome.runtime.getURL('/iframe/publish.html')
     iframe.id = 'iframe-test'
     iframe.style.cssText = 'position:fixed;top:0px;right:0;display:block; width:100%;height:100%;z-index:0; border: medium none;display:none';
     // shadowRoot.appendChild(iframe);

+ 1 - 1
src/manifest.development.json

@@ -28,7 +28,7 @@
     "web_accessible_resources": [
         {
           "resources": [
-            "/iframe/test.html",
+            "/iframe/publish.html",
             "/iframe/red-packet.html"
           ],
           "matches": [

+ 1 - 1
src/manifest.production.json

@@ -28,7 +28,7 @@
     "web_accessible_resources": [
         {
           "resources": [
-            "/iframe/test.html"
+            "/iframe/publish.html"
           ],
           "matches": [
             "<all_urls>"

+ 6 - 2
src/view/components/followInput.vue

@@ -4,7 +4,7 @@
             <img :src="require('../../assets/svg/icon-del-follows-user.svg')" 
                 class="icon-del"
                 @click="delUser(item, index)">
-            <!-- <div :id='"pre" + index'   style="position:absolute; top:-1000px;">{{item.name}}</div> -->
+            <pre :id='"pre" + index'   style="position:absolute; top:-1000px;font-size:12px">{{item.name}}</pre>
             @<input class="at-user-input" 
                     :id='"input" + index' 
                     v-model="item.name" 
@@ -149,7 +149,7 @@ const getTwitterUsers = (query, cb) => {
     })
 }
 
-const selectedUser = (params) => {
+const selectedUser = (params, index) => {
     atUserList.value[currentIptIndex.value]['name'] = params.screenName;
     currentIptIndex.value = -1;
 }
@@ -243,11 +243,15 @@ const onUserMouseLeave = (params, index) => {
                         }
 
                         div {
+                            width: calc(100% - 50px);
                             .name {
                                 font-weight: 600;
                                 font-size: 16px;
                                 margin-bottom: 2px;
                                 color: #000;
+                                overflow: hidden;
+                                text-overflow: ellipsis;
+                                white-space: nowrap;
                             }
                             .screenName {
                                 font-size: 15px;

+ 83 - 24
src/view/components/give-dialog.vue

@@ -37,7 +37,7 @@
                                     <el-input
                                         v-model="baseFormData.amountValue"
                                         placeholder="Amount entered"
-                                        oninput = "value=value.replace(/[^\d]/g,'')"
+                                        @input = "onUsdInput"
                                         :input-style="{ 'box-shadow': 'none','padding': '1px', 'width': '110px' }"/>
                                 </div>
                                 <div class="item">
@@ -49,7 +49,7 @@
                                     <el-input
                                         v-model="baseFormData.totalCount"
                                         placeholder="Quantity entered"
-                                        oninput = "value=value.replace(/[^\d]/g,'')"
+                                        @input = "onCountInput"
                                         :input-style="{ 'box-shadow': 'none','padding': '1px', 'width': '110px'}"/>
                                 </div>
                             </div>
@@ -72,17 +72,36 @@
                                     <el-switch v-if="item.type == 2" v-model="item.checked" />
                                 </div>
                             </div>
-                            <!-- <div class="anti-bot-wrapper">
+                            <div class="anti-bot-wrapper">
                                 <div class="label">
-                                    <img src="" class="icon-bot">
+                                    <img :src="require('../../assets/svg/icon-anti-bot.svg')" class="icon-bot">
                                     Anti Bot
-                                    <img src="" class="icon-beta">
-                                    <img src="" class="icon-question">
+                                    <img :src="require('../../assets/svg/icon-beta.svg')" class="icon-beta">
+                                    <img :src="require('../../assets/svg/icon-question.svg')" class="icon-question">
                                 </div>
                                 <el-switch v-model="openAntiBot" />
+                            </div>
+                            <!-- <div class="tips-wrapper">
+                                <div class="title">
+                                    TIPS
+                                </div>
+                                <div class="row">
+                                    用户完成你的任务后,即可自动领取你的Giveaways
+                                </div>
+                                <div class="row">
+                                    Paypal charges 4.4% + $0.3 fee
+                                </div>
+                                <div class="row">
+                                    Giveaways 有效期是7天,过期后余额将自动返回到你的钱包账户
+                                </div>
+                                <div class="more">
+                                    More
+                                </div>
                             </div> -->
 
-                            <div class="submit-btn" @click="confirm">NEXT</div>
+                            <div class="submit-btn-wrapper">
+                                <div class="submit-btn" @click="confirm">NEXT</div>
+                            </div>
                         </div>
                     </template>
                     <template v-if="showPreview">
@@ -108,8 +127,9 @@ const paypalClientId = 'ASn7k0zqyS5AWYikVSfmamR-RFpjyU_QFJWSxOHHoWE04-RgHNO6nahn
 
 let publishRes = reactive({})
 
-let visible = ref(true);
+let visible = ref(false);
 let showPreview = ref(false);
+let openAntiBot = ref(false);
 let dialogHeight = ref(620);
 let previewDialogHeight = ref(880)
 
@@ -198,12 +218,14 @@ const confirm = () => {
             finishConditions.push(item);
         }
     }
+    let receiveConditions = openAntiBot.value ? '' : [];
     console.log('finishConditions', finishConditions);
     let formData = {
         amountCurrencyCode,
         amountValue,
         totalCount,
-        finishConditions
+        finishConditions,
+        receiveConditions
     }
     let data = {
         params: {
@@ -252,6 +274,21 @@ const updateAtUser = (val) => {
     formList[0]['text'] = val;
 }
 
+const onUsdInput = (val) => {
+    val = val.replace(/[^\d]/g,'');
+    baseFormData.amountValue = val;
+    return val;
+}
+
+const onCountInput = (val) => {
+    if(val == 0) {
+        val = ''
+    }
+    val = val.replace(/[^\d]/g,'');
+    baseFormData.totalCount = val;
+    return val;
+}
+
 onMounted(() => {
     setPreviewDialogHeight();
 })
@@ -352,6 +389,8 @@ onMounted(() => {
 
                 .form-wrapper {
                     padding: 26px 18px;
+                    height: calc(100% - 80px);
+                    overflow-y: scroll;
                     box-sizing: border-box;
 
                     .form-base {
@@ -360,7 +399,7 @@ onMounted(() => {
                         align-items: center;
 
                         .item {
-                            width: 250px;
+                            width: 260px;
                             height: 60px;
                             box-sizing: border-box;
                             border-radius: 15px;
@@ -435,35 +474,55 @@ onMounted(() => {
                     justify-content: space-between;
                     box-sizing: border-box;
                     border-radius: 15px;
-                    border: 1px solid #ececec;
                     padding: 0 15px;
                     margin-top: 14px;
+                    box-shadow: 0px 3px 27px 0px #0000001A;
 
                     .label {
+                        display: flex;
+                        align-items: center ;
                         .icon-bot {
-
+                            margin-right: 8px;
                         }
                         .icon-beta {
-
+                            margin-left: 5px;
+                            margin-right: 8px;
                         }
                         .icon-question {
-
+                            cursor: pointer;
                         }
                     }
 
                 }
-                .submit-btn {
-                    width: calc(100% - 36px);
-                    height: 46px;
-                    text-align: center;
-                    line-height: 46px;
-                    background: #4a99e9;
-                    border-radius: 100px;
-                    color: #fff;
+
+                .tips-wrapper {
+                    .title, .row {
+                        font-weight: 400;
+                        font-size: 13px;
+                        color: rgba(0, 0, 0, 0.3);
+                    }
+                    
+                }
+
+                .submit-btn-wrapper {
+                    width: 100%;
+                    background: #fff;
                     position: absolute;
                     bottom: 32px;
-                    left: 18px;
-                    cursor: pointer;
+                    left: 0;
+                    box-sizing: border-box;
+                    padding-top: 16px;
+                    .submit-btn {
+                        width: calc(100% - 36px);
+                        height: 46px;
+                        text-align: center;
+                        line-height: 46px;
+                        background: #4a99e9;
+                        border-radius: 100px;
+                        color: #fff;
+                        margin-left: 18px;
+                        cursor: pointer;
+                    }
                 }
             }
         }

+ 67 - 0
src/view/components/option-login.vue

@@ -0,0 +1,67 @@
+<template>
+    <div class="login-wrapper">
+        <div class="content">
+            <img :src="require('../../assets/svg/icon-login-denet-logo.svg')" class="logo">
+            <div class="product-name">
+                DeNet
+            </div>
+        </div>
+
+        <div class="login-btn" @click="login">
+            <img :src="require('../../assets/svg/icon-login-twitter-white.svg')" 
+            class="login-btn-icon">
+            Login with Twitter
+        </div>
+    </div>
+</template>     
+
+<script setup>
+import {defineEmits} from 'vue';
+
+let emits = defineEmits(['loginSuccess']);
+
+const login = () => {
+    emits('loginSuccess', {})
+}
+</script>
+
+<style lang='scss' scoped>
+.login-wrapper {
+    width: 100%;
+    height: 100%;
+    overflow: hidden;
+    text-align: center;
+    .content {
+        text-align: center;
+        margin-top: 150px;
+        margin-bottom: 105px;
+        .logo {
+            margin-bottom: 15px;
+        }
+        .product-name {
+            font-weight: 600;
+            font-size: 34px;
+        }
+    }
+    .login-btn {
+        background: #389AFF;
+        border-radius: 100px;
+        padding: 18px 60px;
+        box-sizing: border-box;
+        width: fit-content;
+        display: flex;
+        align-items: center;
+        font-weight: 500;   
+        font-size: 18px;
+        color: #fff;
+        margin: 0 auto;
+        cursor: pointer;
+
+        .login-btn-icon {
+            width: 24px;
+            height: 24px;
+            margin-right: 8px;
+        }
+    }
+}
+</style>

+ 172 - 0
src/view/components/option-withdraw.vue

@@ -0,0 +1,172 @@
+<template>
+    <div class="withdraw-wrapper">
+        <div class="nav-bar">
+            <img
+                :src="require('../../assets/svg/icon-bar-arrow-left.svg')"
+                class="icon"
+                @click="back"
+            />
+            Withdraw
+        </div>
+        <div class="content">
+            <div class="logo-wrapper">
+                <div class="title">Withdraw to</div>
+                <img
+                    class="icon"
+                    :src="
+                        require('../../assets/svg/icon-withdraw-paypal-logo.svg')
+                    "
+                />
+            </div>
+
+            <div class="form-wrapper">
+                <div class="form-item">
+                    <div class="label">PayPal account</div>
+                    <div class="input-wrapper">
+                        <el-input
+                            type="text"
+                            v-model="account"
+                            placeholder="Enter PayPal account"
+                            :input-style="{
+                                'box-shadow': 'none',
+                                height: '48px',
+                                'border-radius': '8px',
+                            }"
+                        />
+                    </div>
+                </div>
+                <div class="form-item">
+                    <div class="label">Withdrawal amount</div>
+                    <div class="input-wrapper amount-wrapper">
+                        <el-input
+                            type="text"
+                            v-model="amount"
+                            placeholder="$0"
+                            :input-style="{
+                                'box-shadow': 'none',
+                                width: '220px',
+                                height: '46px',
+                                'border-radius': '8px',
+                            }"
+                        />
+                        <div class="withdrawal-all-btn">Withdrawal All</div>
+                    </div>
+                </div>
+            </div>
+
+            <div class="bottom-msg">
+                <div>
+                    final amount
+                    <span>$0</span>
+                </div>
+                <div>(Paypal charges fee: 4.4% + $0.3)</div>
+            </div>
+        </div>
+        <div class="confirm-btn">Confirm</div>
+    </div>
+</template>
+
+<script setup>
+import { defineEmits, ref } from "vue";
+
+let amount = ref('');
+let account = ref('');
+
+
+const emits = defineEmits("back");
+const back = () => {
+    emits("back", {});
+};
+</script>
+
+<style lang="scss" scoped>
+.withdraw-wrapper {
+    width: 100%;
+    height: 100%;
+    position: relative;
+    overflow: hidden;
+
+    .nav-bar {
+        padding: 14px;
+        box-sizing: border-box;
+        display: flex;
+        align-items: center;
+        font-weight: 500;
+        font-size: 13px;
+        .icon {
+            width: 16px;
+            margin-right: 6px;
+            cursor: pointer;
+        }
+    }
+
+    .content {
+        padding: 0 20px;
+        box-sizing: border-box;
+        .logo-wrapper {
+            .title {
+                margin-top: 13px;
+                font-size: 14px;
+                color: #5b5b5b;
+            }
+            .icon {
+                width: 111px;
+                height: 56px;
+                margin-bottom: 20px;
+            }
+        }
+
+        .form-wrapper {
+            .form-item {
+                margin-bottom: 30px;
+                .label {
+                    font-size: 14px;
+                    color: #5b5b5b;
+                    margin-bottom: 8px;
+                }
+                .input-wrapper {
+                    display: flex;
+                    align-items: center;
+                    border: 1px solid #e8e8e8;
+                    border-radius: 8px;
+                    .withdrawal-all-btn {
+                        font-weight: 500;
+                        font-size: 13px;
+                        color: #389aff;
+                        cursor: pointer;
+                    }
+                }
+            }
+        }
+
+        .bottom-msg {
+            font-size: 13px;
+            color: #9d9d9d;
+            text-align: right;
+            margin-top: 90px;
+            span {
+                font-weight: 500;
+                font-size: 15px;
+                color: #000000;
+            }
+        }
+    }
+
+    .confirm-btn {
+        width: 335px;
+        height: 60px;
+        text-align: center;
+        line-height: 60px;
+        border-radius: 100px;
+        background: #389aff;
+        font-weight: 600;
+        font-size: 18px;
+        color: #fff;
+        cursor: pointer;
+        position: absolute;
+        left: 50%;
+        bottom: 35px;
+        transform: translateX(-50%);
+    }
+}
+</style>

+ 137 - 0
src/view/components/options-transactions.vue

@@ -0,0 +1,137 @@
+<template>
+    <div class="com-wrapper">
+        <div class="nav-bar">
+            <img :src="require('../../assets/svg/icon-bar-arrow-left.svg')" class="icon" 
+            @click="back" />
+            Transactions
+        </div>
+        <div class="list-wrapper">
+            <div class="content">
+                <div
+                    class="cell"
+                    v-for="(item, index) in giveList"
+                    :key="index">
+                    <div class="img-wrapper">
+                        <img
+                            class="icon-avatar"
+                            src="https://t7.baidu.com/it/u=1595072465,3644073269&fm=193&f=GIF"
+                        />
+                        <img
+                            class="icon-give"
+                            :src="
+                                require('../../assets/svg/icon-giveaways.svg')
+                            "
+                        />
+                    </div>
+                    <div class="info-wrapper">
+                        <div class="left">
+                            <div class="nickname">Benedict22</div>
+                            <div class="time">03-12 13:36</div>
+                        </div>
+                        <div class="right">
+                            <div class="msg">$0.51</div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script setup>
+/* eslint-disable */
+import { onMounted, ref, defineProps, defineEmits } from "vue";
+let giveList = ref([]);
+
+onMounted(() => {
+    giveList.value.length = 100;
+});
+
+const emits = defineEmits(['showHome'])
+
+const back = () => {
+    emits('showHome', {})
+}
+</script>
+
+<style lang="scss" scoped>
+.com-wrapper {
+    height: 100%;
+    .nav-bar {
+        padding: 14px;
+        box-sizing: border-box;
+        display: flex;
+        align-items: center;
+        font-weight: 500;
+        font-size: 13px;
+        .icon {
+            width: 16px;
+            margin-right: 6px;
+            cursor: pointer;
+        }
+    }
+    .list-wrapper {
+        width: 100%;
+        height: calc(100% - 51px);
+        overflow-y: scroll;
+        .cell {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            height: 66px;
+            box-sizing: border-box;
+            padding-left: 20px;
+
+            .img-wrapper {
+                position: relative;
+                margin-right: 16px;
+                box-sizing: border-box;
+                .icon-avatar {
+                    width: 34px;
+                    height: 34px;
+                    border-radius: 50%;
+                }
+                .icon-give {
+                    position: absolute;
+                    right: -4px;
+                    bottom: 2px;
+                }
+            }
+            .info-wrapper {
+                flex: 1;
+                height: 100%;
+                display: flex;
+                justify-content: space-between;
+                align-items: center;
+                border-bottom: 1px solid #d1d1d1;
+                box-sizing: border-box;
+                padding-right: 20px;
+                .left {
+                    .nickname {
+                        font-weight: 500;
+                        font-size: 14px;
+                        margin-bottom: 5px;
+                    }
+                    .time {
+                        font-size: 12px;
+                        color: #b6b6b6;
+                    }
+                }
+                .right {
+                    display: flex;
+                    align-items: center;
+                    cursor: pointer;
+                    .msg {
+                        font-weight: 500;
+                        font-size: 14px;
+                    }
+                    .icon {
+                        width: 18px;
+                        height: 24px;
+                    }
+                }
+            }
+        }
+    }
+}
+</style>

+ 414 - 10
src/view/popup.vue

@@ -1,20 +1,424 @@
 <template>
-  <div class="main_app">
-    <h1> {{count}} {{user.name}}</h1>
-  </div>
+    <div class="page-wrapper" ref="pageWrapper" @scroll="pageScroll">
+        <template v-if="isLogin && homeVisibility">
+            <div class="nav-bar">
+                <div class="item left">
+                    <img :src="require('../assets/svg/icon-denet-logo.svg')" />
+                    DeNet
+                </div>
+                <div class="item right" @click="showTransactions">
+                    <img :src="require('../assets/svg/icon-option-list.svg')" />
+                    Transactions
+                </div>
+            </div>
+            <div class="content">
+                <img
+                    :src="require('../assets/svg/icon-money.svg')"
+                    class="icon-money"
+                />
+                <div class="amount">$3.75</div>
+                <div class="withdraw-btn" @click="clickWithdraw">Withdraw</div>
+                <div class="msg">(Paypal charges $0.25 fee)</div>
+            </div>
+            <div class="tab-bar">
+                <div
+                    class="tab-item"
+                    :class="{ active: currentTabIndex == index }"
+                    v-for="(item, index) in tabList"
+                    :key="index"
+                    @click="clickTab(item, index)"
+                >
+                    <img :src="item.icon" class="icon" />
+                    {{ item.label }}
+                </div>
+            </div>
+            <div class="list-wrapper" ref="pageGiveList">
+                <div class="give-list" v-if="currentTabIndex == 0">
+                    <div
+                        class="cell"
+                        v-for="(item, index) in giveList"
+                        :key="index"
+                    >
+                        <div class="img-wrapper">
+                            <img
+                                class="icon-avatar"
+                                src="https://t7.baidu.com/it/u=1595072465,3644073269&fm=193&f=GIF"
+                            />
+                            <img
+                                class="icon-give"
+                                :src="
+                                    require('../assets/svg/icon-giveaways.svg')
+                                "
+                            />
+                        </div>
+                        <div class="info-wrapper">
+                            <div class="left">
+                                <div class="nickname">Benedict22</div>
+                                <div class="time">03-12 13:36</div>
+                            </div>
+                            <div class="right">
+                                <div class="msg">$0.51</div>
+                                <img
+                                    class="icon"
+                                    :src="
+                                        require('../assets/svg/icon-cell-arrow-right.svg')
+                                    "
+                                />
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="more-list" v-else>
+                    <div
+                        class="cell"
+                        v-for="(item, index) in moreTabList"
+                        :key="index"
+                    >
+                        <div class="img-wrapper">
+                            <img class="icon" :src="item.icon" />
+                        </div>
+                        <div class="info-wrapper">
+                            <div class="left">
+                                {{ item.label }}
+                            </div>
+                            <div class="right">
+                                <img
+                                    class="icon"
+                                    :src="
+                                        require('../assets/svg/icon-cell-arrow-right.svg')
+                                    "
+                                />
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </template>
+        <option-login
+            v-if="!isLogin"
+            @loginSuccess="loginSuccess" />
+        <option-transactions
+            v-if="isLogin && !homeVisibility && transactionsVisibility"
+            @showHome="onShowHome" />
+        <option-withdraw
+            v-if="isLogin && !homeVisibility && optionWithdraw"
+            @back="withdrawBack" />
+    </div>
 </template>
 
 <script setup>
-  import {ref, reactive} from 'vue';
-  let count = ref(0);
-  const user = reactive({ name: "test"  });
-</script>
+/* eslint-disable */
+import { ref, reactive, onMounted } from "vue";
+import optionTransactions from "./components/options-transactions";
+import optionLogin from "./components/option-login.vue";
+import optionWithdraw from "./components/option-withdraw.vue";
+
+let pageWrapper = ref(null);
+let pageGiveList = ref(null);
+
+let isLogin = ref(false);
+let homeVisibility = ref(false);
+let transactionsVisibility = ref(false);
+let withdrawVisibility = ref(false);
+
+let currentTabIndex = ref(0);
+let giveList = ref([]);
+
+let moreTabList = ref([
+    {
+        icon: require("../assets/svg/icon-twitter.svg"),
+        label: "Twitter contact",
+    },
+    {
+        icon: require("../assets/svg/icon-about.svg"),
+        label: "About",
+    },
+]);
+
+let tabList = ref([
+    {
+        icon: require("../assets/svg/icon-giveaways.svg"),
+        label: "Giveaways",
+    },
+    {
+        icon: require("../assets/svg/icon-more.svg"),
+        label: "More",
+    },
+]);
+
+onMounted(() => {
+    giveList.value.length = 100;
+});
+const clickTab = (params, index) => {
+    currentTabIndex.value = index;
+    console.log(params, index);
+};
+
+const onShowHome = () => {
+    if (!homeVisibility.value) {
+        if (transactionsVisibility.value) {
+            transactionsVisibility.value = false;
+        }
+        homeVisibility.value = true;
+    }
+};
 
-<script>
+const withdrawBack = () => {
+    if (!homeVisibility.value) {
+        if (withdrawVisibility.value) {
+            withdrawVisibility.value = false;
+        }
+        homeVisibility.value = true;
+    }
+};
 
+const loginSuccess = () => {
+    isLogin.value = true;
+    onShowHome();
+};
+
+const showTransactions = () => {
+    homeVisibility.value = false;
+    transactionsVisibility.value = true;
+};
+
+const clickWithdraw = () => {
+    homeVisibility.value = false;
+    withdrawVisibility.value = true;
+};
+
+const pageScroll = (e) => {
+    let wrapperHeight = pageWrapper.value.offsetHeight;
+    let pageGiveListHeight = pageGiveList.value.offsetHeight;
+    let scrollTop = e.target.scrollTop || 0;
+    let loadMore = false;
+    if (
+        loadMore.value === false &&
+        wrapperHeight + scrollTop >= pageGiveListHeight
+    ) {
+        // loadMore = true;
+        // pageData.pageNum++;
+        // getListData((res) => {
+        // 	if (res.data.length) {
+        // 		loadMore = false;
+        // 	}
+        // });
+    }
+};
 </script>
 
-<style>
-.main_app {
+<style lang="scss" scoped>
+.page-wrapper {
+    width: 375px;
+    height: 600px;
+    box-sizing: border-box;
+    overflow-y: scroll;
+
+    .nav-bar {
+        padding: 14px;
+        box-sizing: border-box;
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+
+        .item {
+            display: flex;
+            align-items: center;
+            font-size: 13px;
+            cursor: pointer;
+            img {
+                width: 16px;
+                height: 16px;
+                margin-right: 4px;
+            }
+        }
+
+        .left {
+            font-weight: 500;
+        }
+
+        .right {
+            color: #b6b6b6;
+        }
+    }
+
+    .content {
+        margin-top: 30px;
+        text-align: center;
+
+        .icon-money {
+            width: 70px;
+            height: 70px;
+        }
+
+        .amount {
+            margin-top: 16px;
+            margin-bottom: 20px;
+            font-weight: 700;
+            font-size: 42px;
+        }
+
+        .withdraw-btn {
+            background: rgba(56, 154, 255, 0.01);
+            border: 1px solid #ffb443;
+            box-sizing: border-box;
+            width: 120px;
+            height: 38px;
+            text-align: center;
+            line-height: 38px;
+            border-radius: 100px;
+            color: #ffb443;
+            display: inline-block;
+            cursor: pointer;
+        }
+
+        .msg {
+            margin-top: 10px;
+            font-size: 13px;
+            color: #b6b6b6;
+        }
+    }
+
+    .tab-bar {
+        display: flex;
+        align-items: center;
+        margin-top: 25px;
+        position: sticky;
+        position: -webkit-sticky;
+        top: 0px;
+        z-index: 1000;
+        background-color: #fff;
+
+        .tab-item {
+            flex: 1;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            padding: 17px 0;
+            box-sizing: border-box;
+            border-bottom: 1px solid #d1d1d1;
+            cursor: pointer;
+
+            .icon {
+                width: 16px;
+                height: 16px;
+                margin-right: 5px;
+                font-weight: 500;
+                font-size: 16px;
+            }
+        }
+
+        .active {
+            border-bottom: 2px solid #000;
+        }
+    }
+
+    .list-wrapper {
+        .give-list {
+            .cell {
+                display: flex;
+                justify-content: space-between;
+                align-items: center;
+                height: 66px;
+                box-sizing: border-box;
+                padding-left: 20px;
+
+                .img-wrapper {
+                    position: relative;
+                    margin-right: 16px;
+                    box-sizing: border-box;
+                    .icon-avatar {
+                        width: 34px;
+                        height: 34px;
+                        border-radius: 50%;
+                    }
+                    .icon-give {
+                        position: absolute;
+                        right: -4px;
+                        bottom: 2px;
+                    }
+                }
+                .info-wrapper {
+                    flex: 1;
+                    height: 100%;
+                    display: flex;
+                    justify-content: space-between;
+                    align-items: center;
+                    border-bottom: 1px solid #d1d1d1;
+                    box-sizing: border-box;
+                    padding-right: 20px;
+                    .left {
+                        .nickname {
+                            font-weight: 500;
+                            font-size: 14px;
+                            margin-bottom: 5px;
+                        }
+                        .time {
+                            font-size: 12px;
+                            color: #b6b6b6;
+                        }
+                    }
+                    .right {
+                        display: flex;
+                        align-items: center;
+                        cursor: pointer;
+                        .msg {
+                            font-weight: 500;
+                            font-size: 14px;
+                        }
+                        .icon {
+                            width: 18px;
+                            height: 24px;
+                        }
+                    }
+                }
+            }
+        }
+        .more-list {
+            .cell {
+                display: flex;
+                justify-content: space-between;
+                align-items: center;
+                height: 66px;
+                box-sizing: border-box;
+                padding-left: 20px;
+                .img-wrapper {
+                    .icon {
+                        width: 42px;
+                        height: 42px;
+                        border-radius: 50%;
+                    }
+                }
+                .info-wrapper {
+                    flex: 1;
+                    height: 100%;
+                    display: flex;
+                    justify-content: space-between;
+                    align-items: center;
+                    border-bottom: 1px solid #d1d1d1;
+                    box-sizing: border-box;
+                    padding-right: 20px;
+
+                    .left {
+                        font-weight: 500;
+                        font-size: 16px;
+                    }
+                    .right {
+                        display: flex;
+                        align-items: center;
+                        cursor: pointer;
+                        .icon {
+                            width: 18px;
+                            height: 24px;
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
+
+.page-wrapper::-webkit-scrollbar {
+    display: none;
 }
 </style>

+ 0 - 0
src/view/test.vue → src/view/publish.vue


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác