Browse Source

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

jeter20131220 3 years ago
parent
commit
9788f68d4c

BIN
api/__pycache__/main.cpython-36.pyc


+ 4 - 1
api/etc/docker cmd.txt

@@ -7,4 +7,7 @@ sudo docker run -d -it  --name backend -p 8887:8887 -v C:\Users\ming\Desktop\wor
 
 
 
-uvicorn main:app --host="0.0.0.0" --reload --port 8888
+uvicorn main:app --host="0.0.0.0" --reload --port 8888
+
+
+uvicorn main:app --host 0.0.0.0 --port 8001 --ssl-keyfile=/etc/letsencrypt/live/nftboard.info/privkey.pem --ssl-certfile=/etc/letsencrypt/live/nftboard.info/fullchain.pem/nftboard.info/privkey.pem --ssl

+ 27 - 1
api/main.py

@@ -96,6 +96,31 @@ async def index2():
 @app.get("/index", response_class=HTMLResponse)
 async def get_home_page(request: Request, response: Response):
     return templates.TemplateResponse("index.html", {"request": request, "response": response})
+
+@app.get("/checkStatus")
+async def checkStatus():
+    errorList = []
+    try:
+        conn = rpyc.classic.connect("192.168.1.105",18812)
+        conn.close()
+    except:
+        errorList.append('105:18812 server')
+
+    try:
+        c = rpyc.connect("localhost", 8858)
+        c.close()
+    except:
+        errorList.append('make_video(docker name : new openshot)')
+    
+    try:
+        c = rpyc.connect("localhost", 8868)
+        c.close()
+    except:
+        errorList.append('swap_face(docker name : fcontainer)')
+
+    
+    return {'errors':errorList}
+
 @app.get("/", response_class=HTMLResponse)
 async def get_home_page(request: Request, response: Response):
     return templates.TemplateResponse("index.html", {"request": request, "response": response})
@@ -532,7 +557,7 @@ async def draft_list(token: str = Depends(oauth2_scheme)):
 async def del_draft(id_obj:models.id_obj,token: str = Depends(oauth2_scheme)):
     db = dataset.connect('mysql://choozmo:pAssw0rd@db.ptt.cx:3306/AI_anchor?charset=utf8mb4')
     user_id = get_user_id(token)
-    statement = 'SELECT * FROM draft WHERE user_id="'+str(user_id)+'" and id ="'+id_obj.id+'"'
+    statement = 'SELECT * FROM draft WHERE user_id="'+str(user_id)+'" and id ="'+str(id_obj.id)+'"'
     if first(db.query(statement)) is not None:
         db['draft'].delete(id=id)
     else:
@@ -672,6 +697,7 @@ def get_url_type(url):
     return contentType
 
 def notify_group(msg):
+    #'WekCRfnAirSiSxALiD6gcm0B56EejsoK89zFbIaiZQD' is ChoozmoTeam
     glist=['7vilzohcyQMPLfAMRloUawiTV4vtusZhxv8Czo7AJX8','WekCRfnAirSiSxALiD6gcm0B56EejsoK89zFbIaiZQD','1dbtJHbWVbrooXmQqc4r8OyRWDryjD4TMJ6DiDsdgsX','HOB1kVNgIb81tTB4Ort1BfhVp9GFo6NlToMQg88vEhh']
     for gid in glist:
         headers = {"Authorization": "Bearer " + gid,"Content-Type": "application/x-www-form-urlencoded"}

+ 110 - 0
api/static/invite_register.html

@@ -0,0 +1,110 @@
+<!DOCTYPE html>
+<html lang="en" >
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>AI ANCHOR GO</title>
+  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">
+  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp"
+    crossorigin="anonymous">
+  <link rel="stylesheet"
+    href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt"
+    crossorigin="anonymous">
+    <link rel="preconnect" href="https://fonts.googleapis.com">
+    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+    <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap" rel="stylesheet"> 
+  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
+  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11.0.18/dist/sweetalert2.min.css">
+  <link rel="stylesheet" href="static/style.css">
+  <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
+  <style>
+    body {
+      font-family: "Lato", sans-serif;
+    }
+    .sidenav {
+      height: 100%;
+      width: 250px;
+      position: fixed;
+      z-index: 1;
+      top: 0;
+      left: 0;
+      background: linear-gradient(to bottom, #1C7CE0, #150051);
+      overflow-x: hidden;
+      transition: 0.5s;
+      padding-top: 20px;
+    }
+    
+    .sidenav a {
+      padding: 8px 8px 8px 32px;
+      text-decoration: none;
+      font-size: 25px;
+      color: #818181;
+      display: block;
+      transition: 0.3s;
+    }
+    
+    .sidenav a:hover {
+      color: #f1f1f1;
+    }
+    
+    .sidenav .closebtn {
+      position: absolute;
+      top: 0;
+      right: 25px;
+      font-size: 36px;
+      margin-left: 50px;
+    }
+    
+    @media screen and (max-height: 450px) {
+      .sidenav {padding-top: 15px;}
+      .sidenav a {font-size: 18px;}
+    }
+    </style>
+</head>
+<body>
+  <div class="container-fluid">
+    <div id="mySidenav" class="sidenav">
+      <!-- <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a> -->
+      <h2 class="go_title">reset_pwd</h2>
+      <ul class="nav-list">
+        <li class="nav-list-item pb-1 mb-3" data-bs-toggle="modal" data-bs-target="#howto"><i class="fas fa-book-open me-2"></i>使用說明</li>
+        <li class="nav-list-item pb-1" data-bs-toggle="modal" data-bs-target="#history" onclick="openNav()"><i class="fas fa-history me-2"></i>歷史紀錄</li>
+      </ul>
+      <p class="right-text text-white d-inline-block">Choozmo All Rights Reserved</p>
+    </div>
+    <!-- <span style="font-size:30px;cursor:pointer" onclick="openNav()">&#9776; 過去紀錄</span> -->
+    <div class="content ms-auto">
+      <form id="msform">
+        <fieldset id='imgSrc'>
+          <h3 class="fs-subtitle" style="display: inline-block;">新密碼<img class="ms-1" src="static/img/question.png" alt="" data-bs-toggle="tooltip" data-bs-placement="right" title="僅接受png, jpg, mp4格式"></h3><br/>
+          <input type="text" id='in_pwd' name='m1' class='imgsrc imgsrc1' value="" placeholder="1" /><br/>
+          <h3 class="fs-subtitle" style="display: inline-block;">驗證碼<img class="ms-1" src="static/img/question.png" alt="" data-bs-toggle="tooltip" data-bs-placement="right" title="僅接受png, jpg, mp4格式"></h3><br/>
+          <input type="text" id='code' name='m1' class='imgsrc imgsrc1' value="" placeholder="1" /><br/>
+        
+          <input id="checker" type="button" class="sender action-button" value="送出" />
+
+        </fieldset>
+      </form>
+      <!-- <div style="width: 80%;margin: 0 auto;"><iframe src="http://www.choozmo.com:8168/ai_anchor_video/16250306886652043.mp4" frameborder="0" style="width: 100%;height: 400px;"></iframe></div> -->
+    </div>
+    
+
+
+  </div>
+  
+  <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
+  <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js'></script>
+
+  <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
+  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.min.js" integrity="sha384-Atwg2Pkwv9vp0ygtn1JAojH0nYbwNJLPhwyoVbhoPwBhjQPR5VtM2+xf0Uwh9KtT" crossorigin="anonymous"></script> 
+  <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.0.18/dist/sweetalert2.all.min.js"></script>
+  <script src="//cdnjs.cloudflare.com/ajax/libs/validate.js/0.13.1/validate.min.js"></script>
+  <script src="static/reset_pwd.js"></script>
+
+
+  <body>
+
+</div>
+
+</body>
+</html>

+ 52 - 0
api/static/invite_register.js

@@ -0,0 +1,52 @@
+
+
+$(".sender").click(function () {
+
+  var pwd = $("#in_pwd").val();
+  var code = $("#code").val();
+  
+  var url = "/reset_pwd";
+
+  var xhr = new XMLHttpRequest();
+  xhr.open("POST", url);
+
+  xhr.setRequestHeader("accept", "application/json");
+  xhr.setRequestHeader("Content-Type", "application/json");
+
+  xhr.onreadystatechange = function () {
+    if (xhr.readyState === 4) {
+        alert('重設成功')
+    }};
+
+  var data = `{"code":"`+ code+`","password":"`+pwd+`"}`
+
+  xhr.send(data);
+});
+
+function findGetParameter(parameterName) {
+var result = null,
+      tmp = [];
+  location.search
+      .substr(1)
+      .split("&")
+      .forEach(function (item) {
+        tmp = item.split("=");
+        if (tmp[0] === parameterName) result = decodeURIComponent(tmp[1]);
+      });
+  return result;
+}
+
+function renderXHR_data(jsonObj) {
+  XHRstring = ''
+  for (const [key, value] of Object.entries(jsonObj)) {
+    console.log(value)
+    if (typeof (value) == "object") {
+      XHRstring += (key+'=['+value.join(',')+']&')
+    }
+    else {
+      XHRstring += (key + '=' + value + '&')
+    }
+  }
+  XHRstring = XHRstring.substring(0, XHRstring.length - 1);
+  return XHRstring
+}

+ 27 - 0
etc/serverCheck.py

@@ -0,0 +1,27 @@
+import urllib.request
+import json
+import requests
+
+def notify_group(msg):
+    #'WekCRfnAirSiSxALiD6gcm0B56EejsoK89zFbIaiZQD' is ChoozmoTeam
+    glist=['WekCRfnAirSiSxALiD6gcm0B56EejsoK89zFbIaiZQD']
+    for gid in glist:
+        headers = {"Authorization": "Bearer " + gid,"Content-Type": "application/x-www-form-urlencoded"}
+        r = requests.post("https://notify-api.line.me/api/notify",headers=headers, params={"message": msg})
+
+try:
+    contents = urllib.request.urlopen("https://www.choozmo.com:8887/checkStatus").read()
+    status_dict = json.loads(contents.decode('utf-8'))
+    if len(status_dict['errors'])==0:
+        print('Everything works fine')
+    else:
+        for msg in status_dict['errors']:
+            notify_group('ERROR : '+msg+' down')
+except:
+    err_msg = 'ERROR : 8887 status api down'
+    print(err_msg)
+    notify_group(err_msg)
+
+
+
+

+ 2 - 1
html/index.html

@@ -20,6 +20,7 @@
     <link rel="stylesheet" href="static/owl.theme.default.min.css">
     <link rel="stylesheet" href="static/scss/style.css">
     <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
+    <div id="fb-root"></div>
     <title>AI Spokesgirl</title>
 </head>
 
@@ -70,7 +71,7 @@
     <div class="px-0">
         <div class="text-center">
             <a href="login.html">
-                <img class="img-fluid" src="static/img/intro2.jpg"></img>
+                <img class="img-fluid" src="static/img/intro2.jpg" set-lan="img:intro_img"></img>
             </a>
         </div>
     </div>

+ 3 - 3
html/index_eng.html

@@ -37,10 +37,10 @@
                     <a class="nav-link active btn-login" aria-current="page" href="login.html">Login</a>
                 </li>
                 <li class="nav-item">
-                    <a class="nav-link btn-userProfile" aria-current="page" href="user_profile.html" set-lan="html:user_profile">會員資料</a>
+                    <a class="nav-link btn-userProfile" aria-current="page" href="user_profile.html">User Profile</a>
                 </li>
                 <li class="nav-item">
-                    <a class="nav-link btn-logout" aria-current="page" set-lan="html:logout">登出</a>
+                    <a class="nav-link btn-logout" aria-current="page">Log Out</a>
                 </li>
             </ul>
         </div>
@@ -225,7 +225,7 @@
     <div class="modal-dialog modal-dialog-centered">
       <div class="modal-content text-center">
         <div class="modal-header">
-          <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"><img src="static/img/close.svg" alt=""></button>
+         
         </div>
         <div class="modal-body">
           <img class="modal-img" src="" alt="">

+ 3 - 2
html/login.html

@@ -29,7 +29,8 @@
     <!-- navbar -->
     <nav class="navbar navbar-expand-lg navbar-light d-block d-md-none">
         <div class="container-fluid">
-            <a class="navbar-brand d-block d-md-none" href="index.html">AI Spokesgirl</a>
+            <!-- <a class="navbar-brand d-block d-md-none" href="index.html">AI Spokesgirl</a> -->
+            <a class="navbar-brand" href="index.html"><img class="img-fluid" style="width: 150px;" src="./static/img/contactus/choozmo-nav.png" alt=""></a>
             <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
                 data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false"
                 aria-label="Toggle navigation">
@@ -122,7 +123,7 @@
                                 </div>
                                 <div class="d-flex justify-content-center">
                                     <p set-lan="html:newHere">還沒有帳號?</p>
-                                    <a set-lan="html:goRegister" href="register.html">註冊</a>
+                                    <a class="ms-1" set-lan="html:goRegister" href="register.html">註冊</a>
                                 </div>
                                 <div class="d-flex justify-content-center">
                                     <button id="btn_login" class="">Login</button>

+ 16 - 2
html/login.js

@@ -34,8 +34,16 @@ function login(){
             console.log(responseOBJ);
             if (responseOBJ.access_token!=null)
                 {
+                    var title = "登入成功";
+
+                    alert(lang); // test
+
+                    if (lang == 'en') { // 英文版訊息
+                        title = "Login Successfully!"
+                    }
+
                     Swal.fire({
-                        title: " 登入成功",
+                        title: title,
                         icon: 'success',
                         confirmButtonColor: '#3085d6',
                     });
@@ -45,8 +53,14 @@ function login(){
                     btnLoginPage.style.display = 'none';
                 }
             else{
+                var title = "登入失敗";
+
+                if (lang == 'en') { // 英文版訊息
+                    title = "Login Failed!"
+                }
+
                 Swal.fire({
-                    title: "登入失敗",
+                    title: title,
                     icon: 'error',
                     text: responseOBJ.detail,
                     confirmButtonColor: '#3085d6',

+ 4 - 3
html/make_video.html

@@ -133,13 +133,13 @@
                 <form id="msform">
                     <div class="linker__box">
                         <p set-lan="html:preview_videos">預覽影片</p>
-                        <i class="fas fa-link"></i>
+                        <i class="fas fa-link copy"></i>
                         <a id='linker' style="display: none;" class="ms-2" set-lan="html:video_link">影片連結</a>
                     </div>
                     <!-- fieldsets -->
                     <fieldset>
                         <h3 class="fs-subtitle"><lan set-lan="html:video_title">標題</lan><img class="ms-1" src="static/img/question.png" alt="" data-bs-toggle="tooltip" data-bs-placement="right" title="將作為影片的內嵌標題 The title of your video"></h3>            
-                        <input id=title type="text" name='t1' class='title_new' value="" placeholder="標題" /> <br/>
+                        <input id=title type="text" name='t1' class='title_new' value="" set-lan="placeholder:video_title" /> <br/>
                     </fieldset>
                     <fieldset>
                         <h3  class="fs-subtitle"><lan set-lan="html:choose_character">選擇人物</lan><img class="ms-1" src="static/img/question.png" alt="" data-bs-toggle="tooltip" data-bs-placement="right" title="將作為影片的講者 The spokesgirl of your video"></h3>            
@@ -213,6 +213,7 @@
                         </div>
                         <span class="addimg">+</span>
                         <input id="checker" type="button" name="next" class="next action-button" set-lan="value:submit" value="送出" />
+                        <span class="draft-btn" data-bs-toggle="tooltip" data-bs-placement="right" title="儲存為草稿 Save as draft" set-lan="html:save_draft_btn">存為草稿</span>
                         <h3 style="display: none;" class="fs-subtitle"><lan set-lan="html:processing_progress">處理進度</lan></h3>
                         <div style="display: none;" id="myProgress">
                             <div style="display: none;" id="myBar">0%</div>
@@ -262,7 +263,7 @@
                 <div class="modal-dialog modal-dialog-centered">
                     <div class="modal-content text-center">
                         <div class="modal-header">
-                            <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"><img src="static/img/close.svg" alt=""></button>
+                           
                         </div>
                         <div class="modal-body">
                             <img class="modal-img" src="" alt="">

+ 1 - 2
html/make_video_long.html

@@ -139,7 +139,7 @@
                 <!-- fieldsets -->
                 <fieldset>
                     <h3 class="fs-subtitle"><lan set-lan="html:video_title">標題</lan><img class="ms-1" src="static/img/question.png" alt="" data-bs-toggle="tooltip" data-bs-placement="right" title="將作為影片的內嵌標題"></h3>            
-                    <input id=title type="text" name='t1' class='title_new' value="" placeholder="標題" /> <br/>
+                    <input id=title type="text" name='t1' class='title_new' value="" set-lan="placeholder:video_title" /> <br/>
                 </fieldset>
                 <fieldset>
                     <h3  class="fs-subtitle"><lan set-lan="html:choose_character">選擇人物</lan><img class="ms-1" src="static/img/question.png" alt="" data-bs-toggle="tooltip" data-bs-placement="right" title="將作為影片的講者"></h3>            
@@ -290,7 +290,6 @@
     <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.0.18/dist/sweetalert2.all.min.js"></script>
     <script src="static/owl.carousel.min.js"></script>
     <script src="static/script_util.js"></script>
-    <script src="script_index.js"></script>
     <script type="text/javascript" src="static/lan.js"></script>
     <script src="static/common.js"></script>
 </body>

+ 3 - 3
html/make_video_slide.html

@@ -140,7 +140,7 @@
                     <!-- fieldsets -->
                     <fieldset>
                         <h3 class="fs-subtitle"><lan set-lan="html:slide_link">SLIDE 連結</lan><img class="ms-1" src="static/img/question.png" alt="" data-bs-toggle="tooltip" data-bs-placement="right" title="請輸入Google Slides連結 Google Slides Link"></h3>
-                        <input id=slide_raw_url type="text" name='t1' class='title_new' value="" placeholder="連結" /><label for="myCheck" set-lan="html:add_eng">加入英文:</label> 
+                        <input id=slide_raw_url type="text" name='t1' class='title_new' value="" set-lan="placeholder:slide_link"/><label for="myCheck" set-lan="html:add_eng">加入英文:</label> 
                         <input type="checkbox" id="multiLang" > <br/>
                     </fieldset>
                     <fieldset>
@@ -188,13 +188,13 @@
                             <div class="card item" data-avatar="Jocelyn" data-img="Jocelyn">
                                 <div class="imgfr"><img src="static/img/Jocelyn.webp" class="card-img-top" alt="..."></div>
                                 <div class="card-body">
-                                  <h5 class="card-title">Jocelyn</h5>
+                                    <h5 class="card-title">Jocelyn</h5>
                                 </div>
                             </div>
                             <div class="card item" data-avatar="Angela" data-img="Angela">
                                 <div class="imgfr"><img src="static/img/Angela.webp" class="card-img-top" alt="..."></div>
                                 <div class="card-body">
-                                  <h5 class="card-title">Angela</h5>
+                                    <h5 class="card-title">Angela</h5>
                                 </div>
                             </div>
                         </div>

+ 6 - 18
html/pricing.html

@@ -28,26 +28,14 @@
     <!-- navbar -->
     <nav class="navbar navbar-expand-lg navbar-light">
         <div class="container-fluid">
-            <a class="navbar-brand" href="index.html">AI Spokesgirl</a>
+            <a class="navbar-brand" href="index.html"><img class="img-fluid" style="width: 150px;" src="./static/img/contactus/choozmo-nav.png" alt=""></a>
             <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
                 data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false"
                 aria-label="Toggle navigation">
                 <span class="navbar-toggler-icon"></span>
             </button>
             <div class="collapse navbar-collapse" id="navbarSupportedContent">
-                <ul class="navbar-nav me-auto mb-2 mb-lg-0">
-                    <li class="nav-item">
-                        <a class="nav-link active btn-gocreate text-white me-2" aria-current="page" href="make_video.html" set-lan="html:make_video">製作影片</a>
-                    </li>
-                    <li class="nav-item">
-                        <a class="nav-link active btn-gocreate text-white" aria-current="page" href="make_video_slide.html" set-lan="html:make_slides">SLIDE製作影片</a>                        
-                    </li>
-                    <li class="nav-item">
-                        <a class="nav-link active btn-gocreate text-white" aria-current="page" href="make_video_long.html" set-lan="html:make_slides">製作長影片</a>                        
-                    </li>
-                </ul>
-                
-                <ul class="navbar-nav mb-2 mb-lg-0">
+                <ul class="navbar-nav mb-2 ms-auto mb-lg-0">
                     <li class="nav-item">
                         <a class="nav-link active" aria-current="page" href="pricing.html" set-lan="html:pricing">早鳥方案</a>
                     </li>
@@ -82,12 +70,12 @@
     <!-- content -->
     <!-- 手機版 -->
     <div class="d-block d-md-none">
-        <div class="container text-center p-5">
+        <div class="container text-center">
             <div class="row">
                 <div class="col-md-4 col-sm-6">
                     <div class="pricingTable">
                         <div class="pricingTable-header">
-                            <h3 class="title">早鳥方案</h3>
+                            <h3 class="title" set-lan="html:launch_special">早鳥方案</h3>
                         </div>
                         <ul class="pricing-content">
                             <li set-lan="html:pricing_lan">語言選擇: 中文 | 英文</li>
@@ -110,7 +98,7 @@
     </div>
     <!-- 電腦版 -->
     <div class="d-none d-md-block">
-        <div class="container-fluid text-center p-5">
+        <div class="container-fluid text-center">
             <div class="row">
                 <div class="col-4">
                     <div class="pricingTable">
@@ -135,7 +123,7 @@
                 </div>
                 <div class="col-8">
                     <a href="https://p.ecpay.com.tw/B3701C8" target="_blank">
-                        <img class="img-fluid" src="static/img/intro2.jpg"></img>
+                        <img class="img-fluid" src="static/img/intro2.jpg" set-lan="img:intro_img"></img>
                     </a>
                 </div>
             </div>

+ 4 - 4
html/reset_pwd.html

@@ -110,10 +110,10 @@
     <div class="content ms-auto">
       <form id="msform">
         <fieldset id='imgSrc'>
-          <h3 class="fs-subtitle" style="display: inline-block;"><lan set-lan="html:new_pwd">新密碼</lan><img class="ms-1" src="static/img/question.png" alt="" data-bs-toggle="tooltip" data-bs-placement="right" title="僅接受png, jpg, mp4格式"></h3><br/>
-          <input type="text" id='in_pwd' name='m1' class='imgsrc imgsrc1' value="" placeholder="1" /><br/>
-          <h3 class="fs-subtitle" style="display: inline-block;"><lan set-lan="html:confirm_pwd">驗證碼</lan><img class="ms-1" src="static/img/question.png" alt="" data-bs-toggle="tooltip" data-bs-placement="right" title="僅接受png, jpg, mp4格式"></h3><br/>
-          <input type="text" id='code' name='m1' class='imgsrc imgsrc1' value="" placeholder="1" /><br/>
+          <h3 class="fs-subtitle" style="display: inline-block;"><lan set-lan="html:new_pwd">新密碼</lan></h3><br/>
+          <input type="text" id='in_pwd' name='m1' class='imgsrc imgsrc1' value="" placeholder="" /><br/>
+          <h3 class="fs-subtitle" style="display: inline-block;"><lan set-lan="html:confirm_pwd">驗證碼</lan></h3><br/>
+          <input type="text" id='code' name='m1' class='imgsrc imgsrc1' value="" placeholder="" /><br/>
         
           <input id="checker" type="button" class="sender action-button" set-lan="value:submit" value="" />
 

+ 2 - 2
html/reset_pwd_email.html

@@ -110,8 +110,8 @@
     <div class="content ms-auto">
       <form id="msform">
         <fieldset id='imgSrc'>
-          <h3 class="fs-subtitle" style="display: inline-block;">email<img class="ms-1" src="static/img/question.png" alt="" data-bs-toggle="tooltip" data-bs-placement="right" title="僅接受png, jpg, mp4格式"></h3><br/>
-          <input type="text" id='in_email' name='m1' class='imgsrc imgsrc1' value="" placeholder="1" /><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" />
 

+ 6 - 0
html/script_eng.js

@@ -1,5 +1,11 @@
 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>`);
+}
+
+
 function checkRoute() {
   let jwt_token = get_jwt_token();
   if(jwt_token == undefined) {

+ 117 - 2
html/script_profiles.js

@@ -8,6 +8,16 @@ function getCookie(name) {
     if (parts.length === 2) return parts.pop().split(';').shift();
   }
 
+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>`);
+}
+
+checkLocal()
+
+
 function renderView() {
     let token = getCookie('jwt_token');
     if(!token) {
@@ -24,6 +34,7 @@ function renderView() {
     }).then(res => {
         console.log(res.data);
         const userInfo = res.data;
+        localStorage.setItem('user_profile', JSON.stringify(res.data));
           if(userInfo.user_info.left_sec < 20){
             Swal.fire({
                 title: "剩餘秒數不足",
@@ -109,6 +120,74 @@ function renderView() {
 renderView();
 
 
+function getDraft() {
+  JsLoadingOverlay.show({
+    "overlayBackgroundColor": "#FFFFFF",
+    "overlayOpacity": "0.1",
+    "spinnerIcon": "ball-circus",
+    "spinnerColor": "#B9DDF3",
+    "spinnerSize": "1x",
+    "overlayIDName": "overlay",
+    "spinnerIDName": "spinner",
+    "offsetX": 0,
+    "offsetY": 0,
+    "containerID": "draft-table",
+    "lockScroll": false,
+    "overlayZIndex": 9998,
+    "spinnerZIndex": 9999
+  });
+  let token = getCookie('jwt_token');
+  axios({
+    method: 'post',
+    url: 'https://www.choozmo.com:8887/draft_list',
+    headers: { 
+        'accept': 'application/json',
+        'Authorization': `Bearer ${token}`
+     }
+  }).then(res => {
+    console.log(res.data);
+    let result = [...res.data];
+    let str = '';
+    let draftStr = '';
+    if(result.length > 0){
+      for(let i = 0;i < result.length; i++) {
+        draftStr += `<tr>
+                  <td>${result[i].title}</td>
+                  <td>
+                  <span class="me-3 draft-content-icon" id="${result[i].id}" onclick="gotoDraft(${result[i].id})">
+                    <i class="fas fa-edit"></i>
+                    </span>
+                    <span class="ms-3 draft-content-icon" id="${result[i].id}" onclick="deleteDraft(${result[i].id})">
+                    <i class="fas fa-trash-alt"></i>
+                    </span>
+                    </td>
+                </tr>`
+      }
+      str = `<table class="table text-center">
+      <thead>
+        <tr>
+          <th scope="col" set-lan="html:video_title">標題</th>
+          <th class="px-0" scope="col" set-lan="html:draft_edit">編輯</th>
+        </tr>
+      </thead>
+      <tbody class="draft-content">${draftStr}</tbody>
+      </table>`
+      $('.draft-table .card').html(str);
+      JsLoadingOverlay.hide();
+    } else {
+      str = `<div>
+              <h5 set-lan="html:no_draft">目前沒有草稿喔</h5>
+              <img src="static/img/undraw_void_3ggu.svg" width="80">
+            </div>`;
+      $('.draft-table .card').html(str); 
+      JsLoadingOverlay.hide();
+    }
+  }).catch(err => {
+    console.log(err);
+  });
+}
+
+getDraft();
 
 function checkLogin() {
     let token = getCookie('jwt_token');
@@ -129,10 +208,16 @@ checkLogin();
 $(".historical-record").hide();
 
 $( ".check-history" ).click(function() {
-  $(".historical-record").toggle();
+  $(".historical-record").toggle(150);
   $(".arrowdown").toggleClass("arrowdoup");
   });
 
+$('.draft-table').hide();
+$('.draft .arrowdown').click(function() {
+    $(".draft-table").toggle(150);
+    $(".draft .arrowdown").toggleClass("arrowdoup");
+});
+
 var loaded_data = ''
 function openNav() {
   document.getElementById("mySidenav").style.width = "250px";
@@ -199,4 +284,34 @@ function view() {
     } else {
       window.open(`http://${event.target.dataset.url}`, '_blank');
     }
-  }
+  }
+
+function gotoDraft (id) {
+  location.href = `make_video.html?draftid=${id}`;
+}
+function deleteDraft(id) {
+  let token = getCookie('jwt_token');
+  axios({
+    method: 'post',
+    url: 'https://www.choozmo.com:8887/del_draft',
+    headers: { 
+        'accept': 'application/json',
+        'Authorization': `Bearer ${token}`,
+        'Content-Type': 'application/json'
+    },
+    data: { "id": id }
+  }).then(res => {
+    console.log(res.data);
+    getDraft();
+  }).catch(err => {
+    console.log(err);
+  });
+}
+
+$('.share-email').click(function() {
+  var link = `mailto:me@example.com?subject=
+  ${encodeURIComponent("Check out AI Spokesgirl")}
+  &body=${encodeURIComponent('I just created a video in 5 minutes, check out this amazing video making tool. https://video.choozmo.com/')}`;
+    
+    window.location.href = link;
+})

BIN
html/static/img/draft-button.png


BIN
html/static/img/intro_en.png


File diff suppressed because it is too large
+ 0 - 0
html/static/img/undraw_void_3ggu.svg


+ 44 - 26
html/static/lan.js

@@ -17,6 +17,12 @@ function getCookie(name)
     return null;
 }
 
+let lang = localStorage.getItem('lan') || 'zh';
+if(lang == 'undefined') {
+    lang = 'zh'
+}
+
+
 var zh = {
     "logleftbox1": "將你的生活、創作 、宣傳做成影片",
     "logleftbox2": "開始使用 AI Spokesgirl",
@@ -84,7 +90,13 @@ var zh = {
     "contact_name": "集仕多股份有限公司",
     "address": "新竹縣竹北市復興二路229號9樓之9",
     "contact_tel": "聯絡電話",
-    "contact_mail": "聯絡信箱"
+    "contact_mail": "聯絡信箱",
+    "draft_edit": "編輯",
+    "drafts": "草稿夾",
+    "save_draft_btn": "存為草稿",
+    "upload_file": "上傳檔案",
+    "intro_img": "static/img/intro2.jpg",
+    "no_draft": "目前沒有草稿喔"
 };
 
 var en = {
@@ -154,15 +166,16 @@ var en = {
     "contact_name": "Choozmo Inc.",
     "address": "Rm. 9, 9F., No. 229, Fuxing 2nd Rd., Zhubei City, Hsinchu County 302052, Taiwan (R.O.C.)",
     "contact_tel": "Tel",
-    "contact_mail": "Email"
+    "contact_mail": "Email",
+    "draft_edit": "Edit",
+    "drafts": "Drafts",
+    "save_draft_btn": "Save as Draft",
+    "upload_file": "Upload",
+    "intro_img": "static/img/intro_en.png",
+    "no_draft": "No drafts yet."
 };
 
-
-// 4. 轉換
-function changeLan(val) {
-    var val = val.value;
-    console.log(`val: ${val}`);
-    setCookie('lan', val);
+function switchLanContent(val){
     $('[set-lan]').each(function(){
         var me = $(this);
         var a = me.attr('set-lan').split(':');
@@ -170,22 +183,18 @@ function changeLan(val) {
         var m = a[1];   //文字標示
         
         //用虎選擇語言後保存在cookie中,這裡讀取cooikes的語言版本
-        var lan = getCookie('lan');
-        console.log(lan);
-    
+        // var lan = getCookie('lan');
+       // console.log(lan);
         //選取語言文字
-        switch(lan){
+        switch(val){
             case 'zh':
                 var t = zh[m];  
-                console.log(t);
                 break;
             case 'en':
                 var t = en[m];
-                console.log(t);
                 break;
             default:
                 var t = zh[m];
-                console.log(t);
         }
     
         //所選語言沒有就換
@@ -200,13 +209,15 @@ function changeLan(val) {
                 me.html(t);
                 break;
             case 'placeholder':
-                me.placeholder(t);
+                me.attr('placeholder', t);
                 console.log("placeholder");
-                console.log(t);
             case 'val':
             case 'value':
                 me.val(t);
                 break;
+            case 'img':
+                me.attr('src', t);
+                break;
             default:
                 me.html(t);
         }
@@ -214,6 +225,22 @@ function changeLan(val) {
     });
 }
 
+changeLang(lang);
+function changeLang(val) {
+    localStorage.setItem('lan', `${val}`);
+    // setCookie('lan', val);
+    switchLanContent(val);
+}
+
+// 4. 轉換
+function changeLan(val) {
+    var val = val.value;
+    console.log(`val: ${val}`);
+    localStorage.setItem('lan', `${val}`);
+    // setCookie('lan', val);
+    switchLanContent(val);
+}
+
 
 
 // js裡面的轉換
@@ -242,12 +269,3 @@ function get_lan(m)
 
     return t;
 }
-
-
-// 預設中文版
-var lan = getCookie('lan');
-
-if(lan) {
-    changeLan(lan);
-}
-console.log(`目前語言版本: ${lan}`);

File diff suppressed because it is too large
+ 0 - 0
html/static/loading-overlay.js


+ 147 - 15
html/static/script_util.js

@@ -1,5 +1,10 @@
 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>`);
+}
+
 function checkRoute() {
   let jwt_token = get_jwt_token();
   if(jwt_token == undefined) {
@@ -323,7 +328,8 @@ function openNav() {
       boxTitle.classList.add('box-title');
       boxTitle.textContent = obj.name;
       boxTitle.id = obj.id;
-      boxTitle.setAttribute('onclick', `load_data(${obj.id})`);
+      console.log(loaded_data);
+      boxTitle.setAttribute('onclick', `direct(${obj.id})`);
 
       var boxLink = document.createElement('span');
       boxLink.classList.add('box-link');
@@ -333,7 +339,7 @@ function openNav() {
       contentBox.appendChild(boxTitle);
       contentBox.appendChild(boxLink);
       list.classList.add("historyList-item");
-      list.setAttribute('onclick', `load_data(${obj.id})`);
+      list.setAttribute('onclick', `direct(${obj.id})`);
       list.appendChild(divImgfr);
       list.appendChild(contentBox);
       historyList.appendChild(list);
@@ -379,22 +385,34 @@ function get_jwt_token(){
   return jwt_raw.split('=')[1];
 }
 
-function load_data(tid, loaded_data) {
+function direct(id) {
+  location.href = `make_video.html?id=${id}`;
+}
+
+
+function load_data(tid, loaded_data, draft = false) {
   if(!tid) {
     return;
   }
   var title = document.getElementById("title");
   var linker = document.getElementById("linker");
-  myModal.hide()
-  linker.setAttribute('href', `http://${loaded_data.find(item => item.id == tid).link}`)
-  linker.setAttribute('target', '_blank')
-  $("#linker").html(`http://${loaded_data.find(item => item.id == tid).link}`)
-  $("#linker").show();
-  $(".linker__box").show();
-
+  myModal.hide();
+  if(!draft) {
+    linker.setAttribute('href', `http://${loaded_data.find(item => item.id == tid).link}`)
+    linker.setAttribute('target', '_blank')
+    $("#linker").html(`http://${loaded_data.find(item => item.id == tid).link}`)
+    $("#linker").show();
+    $(".linker__box").show();
+  }
+  console.log(loaded_data);
   let historyItem = loaded_data.filter(item => item.id == tid)[0];
-  console.log(historyItem);
-  $(".title_new").val(loaded_data.find(item => item.id == tid).name);
+  console.log(historyItem.title);
+  if(draft) {
+    $(".title_new").val(historyItem.title);
+    $("#avatar").val(historyItem.avatar);
+  } else {
+    $(".title_new").val(loaded_data.find(item => item.id == tid).name);
+  }
 
   let txtlength = historyItem.text_content.length;
   let imglength = historyItem.image_urls.length;
@@ -428,6 +446,7 @@ function load_data(tid, loaded_data) {
     imguploadlabel.setAttribute('for', `img${i + 1}`);
     imguploadlabel.classList.add('upload-btn');
     imguploadlabel.textContent = '上傳檔案';
+    imguploadlabel.setAttribute('set-lan', `html:upload_file`);
     imgInputs.appendChild(imguploadlabel);
   }
 
@@ -435,12 +454,24 @@ function load_data(tid, loaded_data) {
 
  getpathId();
 
-function getpathId() {
-  id = window.location.search.split('?').pop();
+function getMode() {
+  let id = window.location.search.split('?').pop();
+  let mode = id.split('=')[0];
+  if(mode == 'draftid') {
+    getDraftData();
+  } else if(mode == 'id') {
+    getData()
+  }
   return id.split('=')[1];
   //load_data(id);
 }
-getData();
+
+getMode();
+
+function getpathId(){
+  let id = window.location.search.split('?').pop();
+  return id.split('=')[1];
+}
 
 function getData() {
   let jwt_token = get_jwt_token();
@@ -518,6 +549,7 @@ function renderimgBlock(i) {
   imguploadlabel.setAttribute('for', `img${i}`);
   imguploadlabel.classList.add('upload-btn');
   imguploadlabel.textContent = '上傳檔案';
+  imguploadlabel.setAttribute('set-lan', `html:upload_file`);
   imgInputs.appendChild(imguploadlabel);
   $('input[type=file]').on('change', prepareUpload);
 }
@@ -546,4 +578,104 @@ $('.owl-carousel').owlCarousel({
   }
 });
 
+$('.draft-btn').click(() => {
+  $('.draft-btn').text('Loading...');
+  let jwt_token = get_jwt_token();
+  let avatar = $('.avatar').val();
+  let name_title = $('.title_new').val();
+  let txtARR = [];
+  let imgARR = [];
+  var step;
+  let contentIdx = document.querySelectorAll(".txtsrc").length;
+  for (let i = 1; i < (contentIdx + 1); i++) {
+    if ($(`.txtsrc${i}`).val() != "") {
+      txtARR.push($(`.txtsrc${i}`).val())
+    }
+  }
+  let imgIdx = document.querySelectorAll(".imgsrc").length;
+  for (let i = 1; i < (imgIdx + 1); i++) {
+    if ($(`.imgsrc${i}`).val() != "") {
+      imgARR.push($(`.imgsrc${i}`).val())
+    }
+  }
+  let multiLang = 0
+  if ($('#multiLang').prop("checked")) {multiLang = 1;}
+  let id = window.location.search.split('?').pop();
+  let mode = id.split('=')[0];
+  if(mode == 'draftid') {
+    id = Number(id.split('=')[1]);
+  } else {
+    id = -1;
+  }
+  let dataOBJ = { "id": id, "title": name_title, "text_content": txtARR, "image_urls": imgARR, "avatar": avatar,"multiLang":multiLang }
+  console.log(dataOBJ);
+  axios({
+    method: 'post',
+    url: 'https://www.choozmo.com:8887/save_draft',
+    headers: { 
+        'accept': 'application/json',
+        'Authorization': `Bearer ${jwt_token}`,
+        'Content-Type': 'application/json',
+     },
+    data: dataOBJ
+  }).then(res => {
+    console.log(res.data);
+    $('.draft-btn').text('存為草稿');
+    Swal.fire({
+      title: "儲存完成",
+      icon: 'success',
+      confirmButtonColor: '#3085d6',
+    }); 
+  }).catch(err => {
+    console.log(err);
+  });
+
+});
+
+function getDraftData() {
+  let token = get_jwt_token();
+  axios({
+    method: 'post',
+    url: 'https://www.choozmo.com:8887/draft_list',
+    headers: { 
+        'accept': 'application/json',
+        'Authorization': `Bearer ${token}`
+     }
+  }).then(res => {
+    console.log(res.data);
+    let result = [...res.data];
+    let id = getpathId();
+    load_data(id, result, true);
+  }).catch(err => {
+    console.log(err);
+  });
+
+}
+
+$(".copy").click(function(){
+  const copyStr = $(this).next().text();
+  copyToClipboard(copyStr);
+});
+
+const copyToClipboard = str => {
+  const el = document.createElement('textarea');
+  el.value = str;
+  el.setAttribute('readonly', '');
+  el.style.position = 'absolute';
+  el.style.left = '-9999px';
+  document.body.appendChild(el);
+  el.select();
+  document.execCommand('copy');
+  document.body.removeChild(el);
+  Swal.fire({
+    toast: true,
+    icon: 'success',
+    position: 'top-end',
+    title: 'Link copied!',
+    timerProgressBar: true,
+    showConfirmButton: false,
+    timer: 1000,
+    backdrop: false
+  })
+};
 

+ 49 - 1
html/static/scss/style.css

@@ -45,6 +45,10 @@ body {
   background-color: inherit;
 }
 
+.copy {
+  cursor: pointer;
+}
+
 .navbar {
   background-color: white;
 }
@@ -334,6 +338,23 @@ body {
   background-color: grey;
 }
 
+.draft-btn {
+  padding: 10px 5px;
+  background-color: #d1d1d1;
+  display: inline-block;
+  position: absolute;
+  left: 1rem;
+  bottom: 1rem;
+  font-size: 1rem;
+  -webkit-transition: all .3s;
+  transition: all .3s;
+  cursor: pointer;
+}
+
+.draft-btn:hover {
+  background-color: #aaaaaa;
+}
+
 /*headings*/
 .fs-title {
   font-size: 15px;
@@ -1150,6 +1171,12 @@ body {
   margin: 0;
 }
 
+@media screen and (max-width: 767px) {
+  .pricingTable .title {
+    font-size: 30px;
+  }
+}
+
 .pricingTable .pricing-content {
   text-align: left;
   padding: 0;
@@ -1304,6 +1331,10 @@ body {
           transform: rotate(180deg);
 }
 
+.arrowdown {
+  cursor: pointer;
+}
+
 .userprofile {
   position: relative;
   top: -80px;
@@ -1353,6 +1384,21 @@ body {
   font-size: 15px;
 }
 
+.userprofile .userprofile-content .user-information .draft {
+  color: #183790;
+  font-weight: 900;
+}
+
+.userprofile .userprofile-content .user-information .draft-table th {
+  border-bottom: none !important;
+  color: #183790;
+  font-weight: 900;
+}
+
+.userprofile .userprofile-content .user-information .draft-table .draft-content-icon {
+  cursor: pointer;
+}
+
 .sidenav {
   height: 100%;
   width: 250px;
@@ -1466,7 +1512,9 @@ body {
 }
 
 .sidenav .right-text {
-  padding-top: 9vw;
+  position: absolute;
+  bottom: 0;
+  left: 0;
   color: #fff;
 }
 

File diff suppressed because it is too large
+ 0 - 0
html/static/scss/style.css.map


+ 45 - 1
html/static/scss/style.scss

@@ -46,6 +46,10 @@ body {
 	background-color: inherit;
 }
 
+.copy {
+	cursor: pointer;
+}
+
 .navbar {
 	background-color: white;
 }
@@ -314,6 +318,21 @@ body {
 #msform .next[disabled] {
 	background-color: grey;
 }
+
+.draft-btn {
+	padding: 10px 5px;
+	background-color: rgb(209, 209, 209);
+	display: inline-block;
+	position: absolute;
+	left: 1rem;
+	bottom: 1rem;
+	font-size: 1rem;
+	transition: all .3s;
+	cursor: pointer;
+	&:hover {
+		background-color: rgb(170, 170, 170);
+	}
+}
 /*headings*/
 .fs-title {
 	font-size: 15px;
@@ -1055,6 +1074,10 @@ body {
 	text-transform: uppercase;
 	letter-spacing: 1px;
 	margin: 0;
+
+	@media screen and(max-width:767px) {
+		font-size: 30px;
+	}
 }
 .pricingTable .pricing-content {
 	text-align: left;
@@ -1185,6 +1208,9 @@ body {
 .arrowdoup{
 	transform: rotate(180deg);
 }
+.arrowdown {
+	cursor: pointer;
+}
 .userprofile {
 	position: relative;
 	top: -80px;
@@ -1226,6 +1252,22 @@ body {
 					font-size: 15px;
 				}
 			}
+			.draft {
+				color:#183790;
+				font-weight: 900;
+			}
+			.draft-table {
+				th {
+					border-bottom: none !important;
+					color:#183790;
+					font-weight: 900;
+				}
+				.draft-content {
+					&-icon {
+						cursor: pointer;
+					}
+				}
+			}
 		}
 	}
 }
@@ -1321,7 +1363,9 @@ body {
 		}
 	}
 	.right-text {
-		padding-top: 9vw;
+		position: absolute;
+		bottom: 0;
+		left: 0;
 		color: #fff;
 		a {
 			font-size: 18px;

+ 29 - 6
html/user_profile2.html

@@ -20,6 +20,7 @@
     <link rel="stylesheet" href="static/owl.theme.default.min.css">
     <link rel="stylesheet" href="static/scss/style.css">
     <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
+    <script async defer crossorigin="anonymous" src="https://connect.facebook.net/zh_TW/sdk.js#xfbml=1&version=v12.0&appId=831591714123614&autoLogAppEvents=1" nonce="lDAd6vGz"></script>
     <title>AI Spokesgirl</title>
 </head>
 
@@ -162,7 +163,7 @@
                                     </div>
                                 </div>
                                 <div class="historical-record col-lg-12">
-                                    <div class="card p-3">
+                                    <div class="card p-3 text-center">
                                         <table class="table text-center">
                                             <thead>
                                               <tr>
@@ -201,6 +202,29 @@
                                           </table>
                                     </div>
                                 </div>
+                                <div class="draft col-lg-12">
+                                    <div class="card p-4">
+                                        <div class="d-flex justify-content-between">
+                                            <span set-lan="html:drafts">草稿夾</span>
+                                            <span><img width="20" class="arrowdown me-2 mb-1" src="./static/img/userprofile/Icon ionic-md-arrow-dropdown-circle.png" alt=""></span>
+                                        </div>
+                                    </div>
+                                </div>
+                                <div class="draft-table col-lg-12" id="draft-table">
+                                    <div class="card p-3 text-center">
+                                        <table class="table text-center">
+                                            <thead>
+                                             <!--  <tr>
+                                                <th scope="col" set-lan="html:video_title">標題</th>
+                                                <th class="px-0" scope="col" set-lan="html:draft_edit">編輯</th>
+                                              </tr> -->
+                                            </thead>
+                                            <tbody class="draft-content">
+                                              
+                                            </tbody>
+                                          </table>
+                                    </div>
+                                </div>
                                 <div class="share col-lg-12">
                                     <div class="card p-4">
                                         <h3>Want to get more minutes?</h3>
@@ -208,10 +232,9 @@
                                        <p>signs up from your referral, we'll give you 3 more minutes free!</p>
                                        <div>
                                            <p style="color:#183790; font-size: 20px;" class="d-inline fw-bold">Share:</p>
-                                         
-                                           <a class="mx-4" href=""><img width="28" class="me-2" src="./static/img/userprofile/Icon awesome-facebook-square.png" alt="">Facebook</a>
-                                            <a class="mx-4" href=""><img width="28" class="me-2" src="./static/img/userprofile/Icon awesome-twitter-square.png" alt="">Twitter</a>
-                                            <a class="mx-4" href=""><img width="28" class="me-2" src="./static/img/userprofile/Icon material-email.png" alt="">Email</a>                                         
+                                           <div class="fb-share-button" data-href="https://video.choozmo.com/" data-layout="button" data-size="large"><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Flocalhost%3A8080%2Fhtml%2Findex.html&amp;src=sdkpreparse" class="fb-xfbml-parse-ignore">分享</a></div>
+                                            <a class="mx-4" href="https://twitter.com/intent/tweet?text=I%20just%20created%20a%20video%20in%205%20minutes.%20Check%20it%20out%20%F0%9F%91%89%20https%3A%2F%2Fvideo.choozmo.com/&related=ai_cmm" target="_blank"><img width="28" class="me-2" src="./static/img/userprofile/Icon awesome-twitter-square.png" alt="">Twitter</a>
+                                            <a class="mx-4 share-email"><img width="28" class="me-2" src="./static/img/userprofile/Icon material-email.png" alt="">Email</a>                                         
                                        </div>
                                      
                                     </div>
@@ -281,9 +304,9 @@
     <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.min.js" integrity="sha384-Atwg2Pkwv9vp0ygtn1JAojH0nYbwNJLPhwyoVbhoPwBhjQPR5VtM2+xf0Uwh9KtT" crossorigin="anonymous"></script> 
     <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.0.18/dist/sweetalert2.all.min.js"></script>
     <script src="static/owl.carousel.min.js"></script>
+    <script src="static/loading-overlay.js"></script>
     <script src="./script_profiles.js"></script>
     <script type="text/javascript" src="static/lan.js"></script>
-    <script src="../api/static/reset_pwd.js"></script>
     <script src="static/common.js"></script>
 </body>
 

Some files were not shown because too many files changed in this diff