Ver Fonte

direct link/invite page

huai-sian há 3 anos atrás
pai
commit
1b0b0a94c7

+ 2 - 2
html/index_eng.html

@@ -94,8 +94,8 @@
               <i class="fas fa-times text-white me-3 mt-3"></i>
           </div>
             <div class="text-start">
-              <h2 class="fw-bold ps-0" href="index.html"><a class="nav-link active ps-3 pt-0" aria-current="page"
-                  href="index.html">AI Spokesgirl</a></h2>
+              <h2 class="fw-bold ps-0" href="./user_profile2.html"><a class="nav-link active ps-3 pt-0" aria-current="page"
+                  href="./user_profile2.html">AI Spokesgirl</a></h2>
             </div>
             <div class="userName"></div>
             <img class="user img-fluid rounded-circle" src="./static/img/userprofile/userimg.png" alt="">

+ 27 - 6
html/invite.html

@@ -189,16 +189,32 @@
                         <div class="tab-pane fade p-lg-3 show active" id="register" role="tabpanel" aria-labelledby="register-tab">
                             <form>
                                 <div class="form-floating mb-3">
-                                    <input type="text" class="form-control" id="username" name="username" placeholder="User name" required>
-                                    <label for="username"><i class="fas fa-user me-2"></i>User name</label>
+                                    <input type="text" class="form-control" id="username" name="username" placeholder="User Name" required>
+                                    <label for="username"><i class="fas fa-user me-2"></i><lan set-lan="html:userName">User Name</lan></label>
                                 </div>
                                 <div class="form-floating mb-3">
                                     <input type="email" class="form-control" id="email" name="email" placeholder="name@example.com" required>
-                                    <label for="email"><i class="fas fa-envelope me-2"></i>Email address</label>
+                                    <label for="email"><i class="fas fa-envelope me-2"></i><lan set-lan="html:emailAddress">Email address</lan></label>
                                 </div>
-                                <div class="form-floating mb-3">
+                                <div class="form-floating mb-3 position-relative">
                                     <input type="password" class="form-control" id="password" name="password"  placeholder="Password" required>
-                                    <label for="password"><i class="fas fa-lock me-2"></i>Password</label>
+                                    <label for="password">
+                                        <i class="fas fa-lock me-2"></i>
+                                        <lan set-lan="html:register_password">Password</lan>
+                                        <lan style="font-size: 12px;" set-lan="html:password_length">(4-12位數密碼)</lan>
+                                    </label>
+                                    <i class="fas fa-eye psd_visible position-absolute"></i>
+                                    <i class="fas fa-eye-slash psd_invisible position-absolute"></i>
+                                </div>
+                                <div class="form-floating mb-3 position-relative">
+                                    <input type="password" class="form-control" id="confirm_password" name="confirm_password"  placeholder="Password" required>
+                                    <label for="confirm_password">
+                                        <i class="fas fa-lock me-2"></i>
+                                        <lan set-lan="html:confirm_password">Password</lan>
+                                        <lan style="font-size: 12px;" set-lan="html:password_confirm_txt">(再次輸入您的密碼)</lan>
+                                    </label>
+                                    <i class="fas fa-eye psd_visible position-absolute"></i>
+                                    <i class="fas fa-eye-slash psd_invisible position-absolute"></i>
                                 </div>
                                 <!-- <div class="mb-3">
                                     <input type="checkbox" id="privacy" name="privacy" checked required>
@@ -206,11 +222,16 @@
                                 </div> -->
                                 <div class="d-flex justify-content-center">
                                     <p set-lan="html:oldHere">已經有帳號?</p>
-                                    <a class="ms-1" href="login.html" set-lan="html:login">登入</a>
+                                    <a class="ms-1" href="loginB.html" set-lan="html:login">登入</a>
                                 </div>
                                 <div class="mb-3 d-flex justify-content-center">
                                     <button type="button" class="btn btn-primary align-items-center btn-register" set-lan="html:goRegister_link">立即註冊</button>
                                 </div>
+                                <small class="register__policies">
+                                    <lan set-lan="html:privacy_term_1">註冊即表示您已閱讀並同意</lan><a href="" onclick="window.open('./privacy.html')"><lan set-lan="html:privacy_term_2">服務條款</lan></a>
+                                    <lan set-lan="html:privacy_term_3">及</lan>
+                                    <a href="" onclick="window.open('./privacy.html')"><lan set-lan="html:privacy_term_4">隱私權政策</lan></a>
+                                </small>
                             </form>
                         </div>
                     </div>

+ 29 - 1
html/invite.js

@@ -6,6 +6,19 @@ const registerPassword = document.querySelector('#register #password');
 const btnLoginPage_d = document.querySelector('.login-top .btn-login');
 const btnUserProfile_d = document.querySelector('.login-top .btn-userProfile');
 const btnLogout_d= document.querySelector('.login-top .btn-logout');
+$('.psd_visible').hide();
+
+$('.psd_invisible').click(function(){
+    $(this).prev().toggle();
+    $(this).toggle();
+    $(this).parent().children(':first').attr('type', 'text');
+})
+
+$('.psd_visible').click(function(){
+    $(this).toggle();
+    $(this).next().toggle();
+    $(this).parent().children(':first').attr('type', 'password');
+})
 
 registerPassword.addEventListener('keyup', registerByEnter);
 btnRegister.addEventListener('click', register);
@@ -53,6 +66,20 @@ function validatePassword(psd) {
     }
 }
 
+function validateConfirmPsd(psd1, psd2) {
+    if(psd1 == psd2) {
+        $('#register #confirm_password').removeClass('error');
+        $('.error-text').remove();
+        return true;
+    } else {
+        $('#register #confirm_password').addClass('error');
+        if( !$('.error-text').length ) {
+            $('input.error').after('<p class="error-text" set-lan="html:errorConsistentPsd">密碼輸入需一致</p>');
+        } 
+        return false;
+    }
+}
+
 function getpathId() {
     const urlParams = new URLSearchParams(window.location.search);
     const id = urlParams.get('code');
@@ -66,6 +93,7 @@ function register() {
     let userName = $('#register [name = "username"]').val();
     let email = $('#register [name = "email"]').val();
     let password = $('#register [name = "password"]').val();
+    let confirm_psd = $('#register #confirm_password').val();
     let code = getpathId();
 
     let userObj = {
@@ -104,7 +132,7 @@ function register() {
         return;
     }
 
-    if(userName && validateEmail(email) && validatePassword(password)) {
+    if(userName && validateEmail(email) && validatePassword(password) && validateConfirmPsd(password, confirm_psd)) {
         JsLoadingOverlay.show({
             "overlayBackgroundColor": "#666666",
             "overlayOpacity": 0.6,

+ 2 - 2
html/make_video.html

@@ -137,8 +137,8 @@
                             <i class="fas fa-times text-white me-3 mt-3"></i>
                         </div>
                         <div class="text-start">
-                            <h2 class="fw-bold ps-0" href="index.html"><a class="nav-link active ps-3 pt-0"
-                                    aria-current="page" href="index.html">AI Spokesgirl</a></h2>
+                            <h2 class="fw-bold ps-0" href="./user_profile2.html"><a class="nav-link active ps-3 pt-0"
+                                    aria-current="page" href="./user_profile2.html">AI Spokesgirl</a></h2>
                         </div>
                         <div class="choozmologo text-start">
                             <!-- <a class="navbar-brand pb-0 d-inline" href="index.html"><img class="img-fluid" style="width: 120px;" src="./static/img//contactus/CMM_LOGO.png" alt=""></a> -->

+ 2 - 2
html/make_video2.html

@@ -137,8 +137,8 @@
                             <i class="fas fa-times text-white me-3 mt-3"></i>
                         </div>
                         <div class="text-start">
-                            <h2 class="fw-bold ps-0" href="index.html"><a class="nav-link active ps-3 pt-0"
-                                    aria-current="page" href="index.html">AI Spokesgirl</a></h2>
+                            <h2 class="fw-bold ps-0" href="./user_profile2.html"><a class="nav-link active ps-3 pt-0"
+                                    aria-current="page" href="./user_profile2.html">AI Spokesgirl</a></h2>
                         </div>
                         <div class="choozmologo text-start">
                             <!-- <a class="navbar-brand pb-0 d-inline" href="index.html"><img class="img-fluid" style="width: 120px;" src="./static/img//contactus/CMM_LOGO.png" alt=""></a> -->

+ 2 - 2
html/make_video_long.html

@@ -137,8 +137,8 @@
                             <i class="fas fa-times text-white me-3 mt-3"></i>
                         </div>
                         <div class="text-start">
-                            <h2 class="fw-bold ps-0" href="index.html"><a class="nav-link active ps-3 pt-0"
-                                    aria-current="page" href="index.html">AI Spokesgirl</a></h2>
+                            <h2 class="fw-bold ps-0" href="./user_profile2.html"><a class="nav-link active ps-3 pt-0"
+                                    aria-current="page" href="./user_profile2.html">AI Spokesgirl</a></h2>
                         </div>
                         <div class="userName"></div>
                         <img class="user img-fluid rounded-circle" src="./static/img/userprofile/userimg.png" alt="">

+ 2 - 2
html/make_video_slide.html

@@ -137,8 +137,8 @@
                             <i class="fas fa-times text-white me-3 mt-3"></i>
                         </div>
                         <div class="text-start">
-                            <h2 class="fw-bold ps-0" href="index.html"><a class="nav-link active ps-3 pt-0"
-                                    aria-current="page" href="index.html">AI Spokesgirl</a></h2>
+                            <h2 class="fw-bold ps-0" href="./user_profile2.html"><a class="nav-link active ps-3 pt-0"
+                                    aria-current="page" href="./user_profile2.html">AI Spokesgirl</a></h2>
                         </div>
                         <div class="userName"></div>
                         <img class="user img-fluid rounded-circle" src="./static/img/userprofile/userimg.png" alt="">

+ 2 - 2
html/make_video_slide_eng.html

@@ -103,8 +103,8 @@
                             <i class="fas fa-times text-white me-3 mt-3"></i>
                         </div>
                         <div class="text-start">
-                            <h2 class="fw-bold ps-0" href="index.html"><a class="nav-link active ps-3 pt-0"
-                                    aria-current="page" href="index.html">AI Spokesgirl</a></h2>
+                            <h2 class="fw-bold ps-0" href="./user_profile2.html"><a class="nav-link active ps-3 pt-0"
+                                    aria-current="page" href="./user_profile2.html">AI Spokesgirl</a></h2>
                         </div>
                         <div class="userName"></div>
                         <img class="user img-fluid rounded-circle" src="./static/img/userprofile/userimg.png" alt="">

+ 18 - 15
html/script_profile.js

@@ -49,21 +49,24 @@ function renderView() {
     if(!token) {
         window.location.replace("login.html");
     }
-    // JsLoadingOverlay.show({
-    //   "overlayBackgroundColor": "#666666",
-    //   "overlayOpacity": 0.9,
-    //   "spinnerIcon": "ball-circus",
-    //   "spinnerColor": "#000",
-    //   "spinnerSize": "3x",
-    //   "overlayIDName": "overlay",
-    //   "spinnerIDName": "spinner",
-    //   "offsetX": 0,
-    //   "offsetY": 0,
-    //   "containerID": null,
-    //   "lockScroll": false,
-    //   "overlayZIndex": 99,
-    //   "spinnerZIndex": 100
-    // });
+    JsLoadingOverlay.show({
+      "overlayBackgroundColor": "#666666",
+      "overlayOpacity": 1,
+      "spinnerIcon": "ball-circus",
+      "spinnerColor": "#000",
+      "spinnerSize": "3x",
+      "overlayIDName": "overlay",
+      "spinnerIDName": "spinner",
+      "offsetX": 0,
+      "offsetY": 0,
+      "containerID": null,
+      "lockScroll": false,
+      "overlayZIndex": 99,
+      "spinnerZIndex": 100
+    });
+    window.setTimeout(function () {
+      JsLoadingOverlay.hide()
+    }, 2000)
     axios({
         method: 'post',
         url: 'https://www.choozmo.com:8887/user_profile',

+ 2 - 2
html/user_profile2.html

@@ -110,8 +110,8 @@
                                 <i class="fas fa-times text-white me-3 mt-3"></i>
                             </div>
                             <div class="text-start mt-3">
-                                <h2 class="fw-bold ps-0" href="index.html"><a class="nav-link active ps-3 pt-0"
-                                        aria-current="page" href="index.html">AI Spokesgirl</a></h2>
+                                <h2 class="fw-bold ps-0" href="./user_profile2.html"><a class="nav-link active ps-3 pt-0"
+                                        aria-current="page" href="./user_profile2.html">AI Spokesgirl</a></h2>
                             </div>
                             <div class="choozmologo text-start">
                                 <!-- <a class="navbar-brand pb-0 d-inline" href="index.html"><img class="img-fluid" style="width: 120px;" src="./static/img//contactus/CMM_LOGO.png" alt=""></a> -->