Forráskód Böngészése

Merge branch 'master' of http://git.choozmo.com:3000/choozmo/AI_Anchor_2

huaisianhuang 3 éve
szülő
commit
ce19c1daaf

+ 12 - 0
api/main.py

@@ -460,6 +460,10 @@ async def make_anchor_video_long(req:models.request,token: str = Depends(oauth2_
     video_id = save_history(req,name_hash,user_id)
     x = threading.Thread(target=gen_video_long_queue, args=(name_hash,req.name, req.text_content, req.image_urls,int(req.avatar),req.multiLang,video_id,user_id))
     x.start()
+    if first(db.query('SELECT COUNT(1) FROM video_queue'))['COUNT(1)'] >= 3:
+        return {'msg':{'eng':'There are many videos have been processing, please wait.','zh':'目前有多部影片處理中,煩請耐心等候'}}
+    else:
+        return {'msg'{'eng':'Processing video requires a few minutes, please wait for notification','zh':'影片處理需要數分鐘,請等待通知'}}
     return {"msg":"ok"} 
 
 @app.post("/make_anchor_video")
@@ -491,6 +495,10 @@ async def make_anchor_video(req:models.request,token: str = Depends(oauth2_schem
     video_id = save_history(req,name_hash,user_id)
     x = threading.Thread(target=gen_video_queue, args=(name_hash,req.name, req.text_content, req.image_urls,int(req.avatar),req.multiLang,video_id,user_id))
     x.start()
+    if first(db.query('SELECT COUNT(1) FROM video_queue'))['COUNT(1)'] >= 3:
+        return {'msg':{'eng':'There are many videos have been processing, please wait.','zh':'目前有多部影片處理中,煩請耐心等候'}}
+    else:
+        return {'msg'{'eng':'Processing video requires a few minutes, please wait for notification','zh':'影片處理需要數分鐘,請等待通知'}}
     return {'msg':'ok'}
 
 @app.post("/make_anchor_video_eng")
@@ -514,6 +522,10 @@ async def make_anchor_video_eng(req:models.request_eng,token: str = Depends(oaut
     video_id = save_history(req,name_hash, user_id)
     x = threading.Thread(target=gen_video_queue_eng, args=(name_hash,req.name, req.text_content, req.image_urls,req.sub_titles,int(req.avatar),video_id))
     x.start()
+    if first(db.query('SELECT COUNT(1) FROM video_queue'))['COUNT(1)'] >= 3:
+        return {'msg':{'eng':'There are many videos have been processing, please wait.','zh':'目前有多部影片處理中,煩請耐心等候'}}
+    else:
+        return {'msg'{'eng':'Processing video requires a few minutes, please wait for notification','zh':'影片處理需要數分鐘,請等待通知'}}
     return {"msg":"ok"} 
 
 @app.post("/save_draft")

+ 1 - 25
api/static/script_util.js

@@ -480,28 +480,4 @@ function renderimgBlock(i) {
   imguploadlabel.textContent = '上傳檔案';
   imgInputs.appendChild(imguploadlabel);
   $('.img_uploader').on('change', prepareUpload);
-}
-
-
-$('.owl-carousel').owlCarousel({
-  loop: true,
-  margin: 10,
-  nav: false,
-  mouseDrag: true,
-  touchDrag: true,
-  smartSpeed: 1000,
-  autoplay: true,
-  autoplayTimeout: 8000,
-  autoplayHoverPause: false,
-  responsive: {
-    0: {
-      items: 1
-    },
-    600: {
-      items: 2
-    },
-    1000: {
-      items: 4
-    }
-  }
-})
+}

+ 2 - 2
api/static/script_util_copy.js

@@ -2,7 +2,7 @@ checkRoute();
 
 let userBasics = JSON.parse(localStorage.getItem('user_profile')) || [];
 if(userBasics !== []){
-  $('.userName').html(`<h2 class="user-name text-white mt-4 fw-bold">Hello,${userBasics.user_info.userName}</h2>`);
+  $('.userName').html(`<h2 class="user-name text-white mt-4 fw-bold">Hi ${userBasics.user_info.userName}</h2>`);
 }
 
 function checkRoute() {
@@ -23,7 +23,7 @@ function checkRoute() {
       window.location.replace("login.html");
     }
     var userName='';
-    userName+=' <h2 class="user-name text-white mt-4 fw-bold">Hello,'+res.data.user_info.userName+'</h2>';
+    userName+=' <h2 class="user-name text-white mt-4 fw-bold">Hi '+res.data.user_info.userName+'</h2>';
     $('.userName').html(userName);
   }).catch(err => {
     console.log(err);

+ 2 - 2
html/index.html

@@ -98,7 +98,7 @@
                             </ul>
                     </div>
                     <div class="col-12 col-lg-4">
-                        <a href="./pricing.html"><img style="width: 128px;" src="./static/img//transfer.png" alt=""></a>                    
+                        <a href="./pricing.html"><img style="width: 128px;" src="./static/img/transfer.png" alt=""></a>                    
                         <h2 set-lan="html:pricing_content">畫面素材支援: 圖檔 | 影檔 | 簡報</h2>
                         <ul class="price-text ms-1">
                             <li set-lan="html:index_li3_1">可上傳圖片或是影片作為背景</li>
@@ -109,7 +109,7 @@
              
                 <!-- <h1 class="mt-5 d-inline pe-5">$1200/7min</h1> -->
                 <p class="mt-5" set-lan="html:index_action">想要快速製作影音內容?立即註冊,開始創作!</p>
-                <a href="./pricing.html"><button class="get-started my-3" set-lan="html:pricing_checkout">立即查看</button></a>
+                <a href="./register.html"><button class="get-started my-3" set-lan="html:pricing_checkout">立即查看</button></a>
             </div>
         </div>
     </div>

+ 2 - 2
html/index_eng.html

@@ -31,7 +31,7 @@
         <div class="collapse navbar-collapse" id="navbarSupportedContent">
             <ul class="navbar-nav ms-auto mb-2 mb-lg-0">
                 <li class="nav-item">
-                    <a class="nav-link active" aria-current="page" href="pricing.html">Early Bird Plan</a>
+                    <a class="nav-link active" aria-current="page" href="pricing.html">Pricing</a>
                 </li>
                 <li class="nav-item">
                     <a class="nav-link active btn-login" aria-current="page" href="login.html">Login</a>
@@ -53,7 +53,7 @@
           <h2 class="fw-bold ps-0" href="index.html"><a class="nav-link active ps-1" aria-current="page" href="index.html">AI Spokesgirl</a></h2>
       </div>
       <div class="userName"></div> 
-      <img class="user img-fluid rounded-circle" src="./static/img/contactus/man.jpg" alt="">
+      <img class="user img-fluid rounded-circle" src="./static/img/userprofile/userimg.png" alt="">
       <p class="text-white my-3 text-center">Create something today!</p>
       <div class="navbar-nav mb-2 mb-lg-0 px-3 pe-4">
           <a class="nav-link btn-gocreate text-white col-6" aria-current="page" href="./make_video.html">Make <br>Videos</a>

+ 8 - 3
html/login.html

@@ -109,7 +109,7 @@
                 <div class="login-content">
                     <!-- 已登入 {% if success %} -->
                   <!-- 未登入 {% endif %} -->
-                    <h2 class="my-3 title">LOGIN</h2>
+                    <h2 class="my-3 title" set-lan="html:login">LOGIN</h2>
                     <div class="tab-content" id="myTabContent">
                         <div class="tab-pane fade p-lg-3 show active" id="login" role="tabpanel" aria-labelledby="login-tab">
                             
@@ -123,10 +123,15 @@
                                 </div>
                                 <div class="d-flex justify-content-center">
                                     <p set-lan="html:newHere">還沒有帳號?</p>
-                                    <a class="ms-1" set-lan="html:goRegister" href="register.html">註冊</a>
+                                    <a class="ms-2" set-lan="html:goRegister" href="register.html">註冊</a> 
+                                    <p class="mx-2"> / </p>
+                                    <a set-lan="html:forgotPsd" href="reset_pwd_email.html">忘記密碼</a>
                                 </div>
                                 <div class="d-flex justify-content-center">
-                                    <button id="btn_login" class="">Login</button>
+                                    <button id="btn_login" set-lan="html:login_link">立即登入</button>
+                                </div>
+                                <div class="mt-3 d-flex justify-content-center">
+                                    
                                 </div>
                         </div>
                         <!-- <div class="tab-pane fade p-lg-3" id="register" role="tabpanel" aria-labelledby="register-tab">

+ 24 - 1
html/login.js

@@ -67,7 +67,30 @@ function login(){
         }
     };
     
-    var data = "grant_type=&username=" + $('#username').val() + "&password="+$('#password').val()+"&scope=&client_id=&client_secret=";
+    var username = $('#username').val();
+    var password = $('#password').val();
+
+    // 登入資料檢查
+    if (username == '' || password == '') {
+        let title = "登入失敗";
+        let text = "請先輸入您的帳號/密碼";
+
+        if (lang == 'en') { 
+            title = "Login Failed!";
+            text = "Please enter your username and password";
+        }
+
+        Swal.fire({
+            title: title,
+            icon: 'error',
+            text: text,
+            confirmButtonColor: '#3085d6',
+        });
+
+        return;
+    }
+
+    var data = "grant_type=&username=" + username + "&password="+password+"&scope=&client_id=&client_secret=";
     result = xhr.send(data);
     console.log(result);
 }

+ 25 - 1
html/make_video.html

@@ -83,7 +83,7 @@
                     <h2 class="fw-bold ps-0" href="index.html"><a class="nav-link active ps-1" aria-current="page" href="index.html">AI Spokesgirl</a></h2>
                 </div>
                 <div class="userName"></div> 
-                <img class="user img-fluid rounded-circle" src="./static/img/contactus/man.jpg" alt="">
+                <img class="user img-fluid rounded-circle" src="./static/img/userprofile/userimg.png" alt="">
                 <p class="text-white my-3 text-center" set-lan="html:Createsthtoday">今天要做甚麼影片呢?</p>
                 <div class="navbar-nav mb-2 mb-lg-0 px-3 pe-4">
                     <a class="nav-link btn-gocreate text-white col-6" aria-current="page" href="./make_video.html" set-lan="html:make_video">影片製作</a>
@@ -302,6 +302,30 @@
     <script type="text/javascript" src="static/lan.js"></script>
     <script src="static/script_util.js"></script>
     <script src="static/common.js"></script>
+<script>
+$('.owl-carousel').owlCarousel({
+  loop: true,
+  margin: 10,
+  nav: false,
+  mouseDrag: true,
+  touchDrag: true,
+  smartSpeed: 1000,
+  autoplay: true,
+  autoplayTimeout: 8000,
+  autoplayHoverPause: false,
+  responsive: {
+    0: {
+      items: 1
+    },
+    600: {
+      items: 2
+    },
+    1000: {
+      items: 4
+    }
+  }
+});
+</script>
 </body>
 
 </html>

+ 25 - 1
html/make_video_long.html

@@ -83,7 +83,7 @@
                     <h2 class="fw-bold ps-0" href="index.html"><a class="nav-link active ps-1" aria-current="page" href="index.html">AI Spokesgirl</a></h2>
                 </div>
                 <div class="userName"></div>            
-                <img class="user img-fluid rounded-circle" src="./static/img/contactus/man.jpg" alt="">
+                <img class="user img-fluid rounded-circle" src="./static/img/userprofile/userimg.png" alt="">
                 <p class="text-white my-3 text-center" set-lan="html:Createsthtoday">今天要做甚麼影片呢?</p>
                 <div class="navbar-nav mb-2 mb-lg-0 px-3 pe-4">
                     <a class="nav-link btn-gocreate text-white col-6" aria-current="page" href="./make_video.html" set-lan="html:make_video">影片製作</a>
@@ -291,6 +291,30 @@
     <script src="static/script_util.js"></script>
     <script type="text/javascript" src="static/lan.js"></script>
     <script src="static/common.js"></script>
+<script>
+$('.owl-carousel').owlCarousel({
+    loop: true,
+    margin: 10,
+    nav: false,
+    mouseDrag: true,
+    touchDrag: true,
+    smartSpeed: 1000,
+    autoplay: true,
+    autoplayTimeout: 8000,
+    autoplayHoverPause: false,
+    responsive: {
+        0: {
+            items: 1
+        },
+        600: {
+            items: 2
+        },
+        1000: {
+            items: 4
+        }
+    }
+});
+</script>
 </body>
 
 </html>

+ 25 - 1
html/make_video_slide.html

@@ -83,7 +83,7 @@
                     <h2 class="fw-bold ps-0" href="index.html"><a class="nav-link active ps-1" aria-current="page" href="index.html">AI Spokesgirl</a></h2>
                 </div>
                 <div class="userName"></div> 
-                <img class="user img-fluid rounded-circle" src="./static/img/contactus/man.jpg" alt="">
+                <img class="user img-fluid rounded-circle" src="./static/img/userprofile/userimg.png" alt="">
                 <p class="text-white my-3 text-center" set-lan="html:Createsthtoday">今天要做甚麼影片呢?</p>
                 <div class="navbar-nav mb-2 mb-lg-0 px-3 pe-4">
                     <a class="nav-link btn-gocreate text-white col-6" aria-current="page" href="./make_video.html" set-lan="html:make_video">影片製作</a>
@@ -273,6 +273,30 @@
     <script src="static/script_slides.js"></script>
     <script type="text/javascript" src="static/lan.js"></script>
     <script src="static/common.js"></script>
+<script>
+$('.owl-carousel').owlCarousel({
+    loop: true,
+    margin: 10,
+    nav: false,
+    mouseDrag: true,
+    touchDrag: true,
+    smartSpeed: 1000,
+    autoplay: true,
+    autoplayTimeout: 8000,
+    autoplayHoverPause: false,
+    responsive: {
+        0: {
+            items: 1
+        },
+        600: {
+            items: 2
+        },
+        1000: {
+            items: 4
+        }
+    }
+});
+</script>
 </body>
 
 </html>

+ 1 - 1
html/pricing.html

@@ -101,7 +101,7 @@
                 <div class="col-4">
                     <div class="pricingTable">
                         <div class="pricingTable-header">
-                            <h3 class="title">早鳥方案</h3>
+                            <div class="title" set-lan="html:launch_special" style="font-size:2rem;">早鳥方案</div>
                         </div>
                         <ul class="pricing-content">
                             <li set-lan="html:pricing_lan">語言選擇: 中文 | 英文</li>

+ 8 - 5
html/register.html

@@ -108,7 +108,7 @@
                 <div class="login-content">
                     <!-- 已登入 {% if success %} -->
                   <!-- 未登入 {% endif %} -->
-                    <h2 class="my-3 title">REGISTER</h2>
+                    <h2 class="my-3 title" set-lan="html:goRegister">REGISTER</h2>
                     <div class="tab-content" id="myTabContent">
                         <div class="tab-pane fade p-lg-3 show active" id="register" role="tabpanel" aria-labelledby="register-tab">
                             <form>
@@ -124,14 +124,17 @@
                                     <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>
                                 </div>
-                                <div class="mb-3">
+                                <!-- <div class="mb-3">
                                     <input type="checkbox" id="privacy" name="privacy" checked required>
                                     <label for="privacy"><a href="privacy.html" class="link_privacy" target="_blank" set-lan="html:privacy_term">同意隱私政策及使用條款</a></label>
-                                </div>
+                                </div> -->
                                 <div class="d-flex justify-content-center">
-                                    <button type="button" class="btn btn-primary align-items-center btn-register">Register</button>
+                                    <p set-lan="html:oldHere">已經有帳號?</p>
+                                    <a class="ms-1" href="login.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>
-        
                             </form>
                         </div>
                     </div>

+ 31 - 4
html/register.js

@@ -23,7 +23,13 @@ function validateEmail(email) {
     if(re.test(String(email).toLowerCase()) === false) {
         $('#register [name = "email"]').addClass('error');
         if( !$('.error-text').length ) {
-            $('input.error').after('<p class="error-text" set-lan="html:errorEmail">請輸入正確E-mail</p>');
+            let msg = '請輸入正確E-mail';
+
+            if (lang == 'en') { 
+                msg = 'Please enter valid Email format.';
+            }
+
+            $('input.error').after('<p class="error-text" set-lan="html:errorEmail">' + msg + '</p>');
         } 
     } else {
         $('#register [name = "email"]').removeClass('error');
@@ -48,9 +54,30 @@ function validatePassword(psd) {
 }
 
 function register() {
-    const userName = $('#register [name = "username"]').val();
-    const email = $('#register [name = "email"]').val();
-    const password = $('#register [name = "password"]').val();
+    let userName = $('#register [name = "username"]').val();
+    let email = $('#register [name = "email"]').val();
+    let password = $('#register [name = "password"]').val();
+
+    // 註冊資料檢查
+    if (username == '' || password == '') {
+        let title = "註冊失敗";
+        let text = "請先輸入您的帳號/密碼";
+
+        if (lang == 'en') { 
+            title = "Login Failed!";
+            text = "Please enter your username and password";
+        }
+
+        Swal.fire({
+            title: title,
+            icon: 'error',
+            text: text,
+            confirmButtonColor: '#3085d6',
+        });
+
+        return;
+    }
+
     if(userName && validateEmail(email) && validatePassword(password)) {
         let userObj = {
             username: userName,

+ 1 - 1
html/reset_pwd.html

@@ -62,7 +62,7 @@
           <h2 class="fw-bold ps-0" href="index.html"><a class="nav-link active ps-1" aria-current="page" href="index.html">AI Spokesgirl</a></h2>
       </div>
       <div class="userName"></div> 
-      <img class="user img-fluid rounded-circle" src="./static/img/contactus/man.jpg" alt="">
+      <img class="user img-fluid rounded-circle" src="./static/img/userprofile/userimg.png" alt="">
       <p class="text-white my-3 text-center" set-lan="html:Createsthtoday">今天要做甚麼影片呢?</p>
       <div class="navbar-nav mb-2 mb-lg-0 px-3 pe-4">
           <a class="nav-link btn-gocreate text-white col-6" aria-current="page" href="./make_video.html" set-lan="html:make_video">影片製作</a>

+ 2 - 2
html/reset_pwd_email.html

@@ -62,7 +62,7 @@
           <h2 class="fw-bold ps-0" href="index.html"><a class="nav-link active ps-1" aria-current="page" href="index.html">AI Spokesgirl</a></h2>
       </div>
       <div class="userName"></div> 
-      <img class="user img-fluid rounded-circle" src="./static/img/contactus/man.jpg" alt="">
+      <img class="user img-fluid rounded-circle" src="./static/img/userprofile/userimg.png" alt="">
       <p class="text-white my-3 text-center" set-lan="html:Createsthtoday">今天要做甚麼影片呢?</p>
       <div class="navbar-nav mb-2 mb-lg-0 px-3 pe-4">
           <a class="nav-link btn-gocreate text-white col-6" aria-current="page" href="./make_video.html" set-lan="html:make_video">影片製作</a>
@@ -110,7 +110,7 @@
     <div class="content ms-auto">
       <form id="msform">
         <fieldset id='imgSrc'>
-          <h3 class="fs-subtitle" style="display: inline-block;">email</h3><br/>
+          <h3 class="fs-subtitle" style="display: inline-block;">Email</h3><br/>
           <input type="text" id='in_email' name='m1' class='imgsrc imgsrc1' value="" placeholder="" /><br/>
         
           <input id="checker" type="button" class="sender action-button" value="送出" set-lan="value:submit" />

+ 2 - 2
html/script_eng.js

@@ -2,7 +2,7 @@ checkRoute();
 
 let userBasics = JSON.parse(localStorage.getItem('user_profile')) || [];
 if(userBasics !== []){
-  $('.userName').html(`<h2 class="user-name text-white mt-4 fw-bold">Hello,${userBasics.user_info.userName}</h2>`);
+  $('.userName').html(`<h2 class="user-name text-white mt-4 fw-bold">Hi ${userBasics.user_info.userName}</h2>`);
 }
 
 
@@ -24,7 +24,7 @@ function checkRoute() {
       window.location.replace("login.html");
     }
     var userName='';
-    userName+=' <h2 class="user-name text-white mt-4 fw-bold">Hello,'+res.data.user_info.userName+'</h2>';
+    userName+=' <h2 class="user-name text-white mt-4 fw-bold">Hi '+res.data.user_info.userName+'</h2>';
     $('.userName').html(userName);
   }).catch(err => {
     console.log(err);

+ 1 - 1
html/script_profiles.js

@@ -14,7 +14,7 @@ let userBasics = JSON.parse(localStorage.getItem('user_profile')) || [];
 
 function checkLocal() {
   if(userBasics.length == 0){ return };
-  $('.userName').html(`<h2 class="user-name text-white mt-4 fw-bold">Hello,${userBasics.user_info.userName}</h2>`);
+  $('.userName').html(`<h2 class="user-name text-white mt-4 fw-bold">Hi ${userBasics.user_info.userName}</h2>`);
 }
 
 checkLocal()

+ 9 - 1
html/static/lan.js

@@ -54,6 +54,7 @@ var zh = {
     "make_video_long": "長影片製作",
     "make_video_eng": "英文影片製作",
     "login" : "登入",
+    "login_link" : "立即登入",
     "user_profile": "會員資料",
     "logout": "登出",
     "en": "English",
@@ -76,7 +77,9 @@ var zh = {
     "submit": "送出",
     "privacy_term": "同意隱私政策及使用條款",
     "newHere": "還沒有帳號?",
+    "oldHere": "已經有帳號?",
     "goRegister": "註冊",
+    "goRegister_link": "立即註冊",
     "pricing" : "早鳥方案",
     "errorEmail": "請輸入正確E-mail",
     "errorPsd": "密碼至少為4個字元",
@@ -86,6 +89,7 @@ var zh = {
     "username": "帳號/用戶名稱",
     "password": "密碼",
     "resetPsd": "更改密碼",
+    "forgotPsd": "忘記密碼",
     "details": "查看詳情",
     "refill": "我要加值",
     "Createsthtoday": "今天要做甚麼影片呢?",
@@ -133,6 +137,7 @@ var en = {
     "make_video_long": "Make Long Videos",
     "make_video_eng": "Make English Video",
     "login" : "Login",
+    "login_link" : "Login",
     "user_profile": "User Profile",
     "logout": "Logout",
     "en": "English",
@@ -155,7 +160,9 @@ var en = {
     "submit": "Submit",
     "privacy_term": "I Agree to privacy policy and terms of use.",
     "newHere": "New here?",
+    "oldHere": "Already have an account?",
     "goRegister": "REGISTER",
+    "goRegister_link": "REGISTER",
     "pricing" : "Pricing",
     "errorEmail": "Please enter valid Email format.",
     "errorPsd": "Passwords must be at least 4 characters long.",
@@ -163,8 +170,9 @@ var en = {
     "left": "Left",
     "sec": "Sec",
     "username": "User Name",
-    "password": "password",
+    "password": "Password",
     "resetPsd": "Reset Password",
+    "forgotPsd": "Forgot Password",
     "details": "Details",
     "refill": "Refill",
     "Createsthtoday": "Create something today!",

+ 2 - 2
html/static/script_slides.js

@@ -2,7 +2,7 @@ checkRoute();
 
 let userBasics = JSON.parse(localStorage.getItem('user_profile')) || [];
 if(userBasics !== []){
-  $('.userName').html(`<h2 class="user-name text-white mt-4 fw-bold">Hello,${userBasics.user_info.userName}</h2>`);
+  $('.userName').html(`<h2 class="user-name text-white mt-4 fw-bold">Hi ${userBasics.user_info.userName}</h2>`);
 }
 
 function checkRoute() {
@@ -23,7 +23,7 @@ function checkRoute() {
       window.location.replace("login.html");
     }
     var userName='';
-    userName+=' <h2 class="user-name text-white mt-4 fw-bold">Hello,'+res.data.user_info.userName+'</h2>';
+    userName+=' <h2 class="user-name text-white mt-4 fw-bold">Hi '+res.data.user_info.userName+'</h2>';
     $('.userName').html(userName);
   }).catch(err => {
     console.log(err);

+ 14 - 7
html/static/script_util.js

@@ -2,7 +2,7 @@ checkRoute();
 
 let userBasics = JSON.parse(localStorage.getItem('user_profile')) || [];
 if(userBasics !== []){
-  $('.userName').html(`<h2 class="user-name text-white mt-4 fw-bold">Hello,${userBasics.user_info.userName}</h2>`);
+  $('.userName').html(`<h2 class="user-name text-white mt-4 fw-bold">Hi ${userBasics.user_info.userName}</h2>`);
 }
 
 function checkRoute() {
@@ -287,11 +287,11 @@ $("#send_slide").click(function () {
   xhr.onreadystatechange = function () {
     if (xhr.readyState === 4) {
       let title = "資料已送出";
-        let text = '資料已傳送,請耐心等候';
-        if (lang == 'en') { // 英文版訊息
-          title = "Submitted Successfully!";
-          text = 'We are working on your video. You will get notfication in line group when your video is done.';
-        }
+      let text = '資料已傳送,請耐心等候';
+      if (lang == 'en') { // 英文版訊息
+        title = "Submitted Successfully!";
+        text = 'We are working on your video. You will get notfication in line group when your video is done.';
+      }
       Swal.fire({
         title: title,
         icon: 'success',
@@ -648,7 +648,14 @@ $('.owl-carousel').owlCarousel({
 });
 
 $('.draft-btn').click(() => {
-  $('.draft-btn').text('Loading...');
+  let text = '儲存中...';
+
+  if (lang == 'en') {
+    text = 'Saving...';
+  }
+
+  $('.draft-btn').text(text);
+
   let jwt_token = get_jwt_token();
   let avatar = $('.avatar').val();
   let name_title = $('.title_new').val();

+ 3 - 6
html/user_profile2.html

@@ -55,9 +55,6 @@
                             <li class="nav-item">
                                 <a class="nav-link active btn-login text-white" aria-current="page" href="login.html" set-lan="html:login">登入</a>
                             </li>
-                            <li class="nav-item">
-                                <a class="nav-link btn-userProfile text-white" aria-current="page" href="user_profile.html" set-lan="html:user_profile">會員資料</a>
-                            </li>
                             <li class="nav-item text-white">
                                 <a class="nav-link btn-logout text-white" aria-current="page" set-lan="html:logout">登出</a>
                             </li>
@@ -78,7 +75,7 @@
                 <h2 class="fw-bold ps-0" href="index.html"><a class="nav-link active ps-1" aria-current="page" href="index.html">AI Spokesgirl</a></h2>
             </div>
             <div class="userName"></div> 
-            <img class="user img-fluid rounded-circle" src="./static/img/contactus/man.jpg" alt="">
+            <img class="user img-fluid rounded-circle" src="./static/img/userprofile/userimg.png" alt="">
             <p class="text-white my-3 text-center" set-lan="html:Createsthtoday">今天要做甚麼影片呢?</p>
             <div class="navbar-nav mb-2 mb-lg-0 px-3 pe-4">
                 <a class="nav-link btn-gocreate text-white col-6" aria-current="page" href="./make_video.html" set-lan="html:make_video">影片製作</a>
@@ -131,8 +128,8 @@
                     <div class="information">
                         <div class="row px-0 mx-0 mt-4">
                             <div style="letter-spacing: 3px;" class="col-lg-4">
-                                <p class="text-end" set-lan="html:username">帳號/用戶名稱:</p>
-                                <P class="text-end" set-lan="html:password">密碼:</P>
+                                <p class="text-end"><span set-lan="html:username">帳號/用戶名稱</span> : </p>
+                                <P class="text-end"><span set-lan="html:password">密碼</span> : </P>
                                 <p class="text-end">Email:</p>
                             </div>
                             <div class="userinf col-lg-8">