Browse Source

format date and close modal

huaisianhuang 3 years ago
parent
commit
6cc2495978

+ 1 - 3
html/index_eng.html

@@ -223,12 +223,10 @@
   <div class="modal" tabindex="-1"  id="avatarmega" aria-labelledby="history" aria-hidden="true">
     <div class="modal-dialog modal-dialog-centered">
       <div class="modal-content text-center">
-        <div class="modal-header">
-         
-        </div>
         <div class="modal-body">
           <img class="modal-img" src="" alt="">
           <h5 class="modal-title mt-2"></h5>
+          <button type="button" class="btn btn-secondary btn-dismiss" data-bs-dismiss="modal" set-lan="html:close">Close</button>
         </div>
       </div>
     </div>

+ 1 - 3
html/make_video.html

@@ -270,12 +270,10 @@
             <div class="modal" tabindex="-1"  id="avatarmega" aria-labelledby="history" aria-hidden="true">
                 <div class="modal-dialog modal-dialog-centered">
                     <div class="modal-content text-center">
-                        <div class="modal-header">
-                           
-                        </div>
                         <div class="modal-body">
                             <img class="modal-img" src="" alt="">
                             <h5 class="modal-title mt-2"></h5>
+                            <button type="button" class="btn btn-secondary btn-dismiss" data-bs-dismiss="modal" set-lan="html:close">Close</button>
                         </div>
                     </div>
                 </div>

+ 1 - 3
html/make_video_long.html

@@ -260,12 +260,10 @@
         <div class="modal" tabindex="-1"  id="avatarmega" aria-labelledby="history" aria-hidden="true">
             <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="">
                     <h5 class="modal-title mt-2"></h5>
+                    <button type="button" class="btn btn-secondary btn-dismiss" data-bs-dismiss="modal" set-lan="html:close">Close</button>
                     </div>
                 </div>
                 </div>

+ 1 - 3
html/make_video_slide.html

@@ -242,12 +242,10 @@
             <div class="modal" tabindex="-1"  id="avatarmega" aria-labelledby="history" aria-hidden="true">
                 <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="">
                             <h5 class="modal-title mt-2"></h5>
+                            <button type="button" class="btn btn-secondary btn-dismiss" data-bs-dismiss="modal" set-lan="html:close">Close</button>
                         </div>
                     </div>
                 </div>

+ 9 - 2
html/script_profiles.js

@@ -117,11 +117,18 @@ function renderView() {
         }
         // 歷史紀錄
         // const historicalrecord 
-        var  historicalrecord=''
+        var  historicalrecord='';
         for (var i = 0; i < userInfo.video_info.length; i++) {
+          const timeStamp = userInfo.video_info[i].time_stamp;
+          const year = timeStamp.split(',')[0].split('/')[2];
+          const arr = timeStamp.split(',')[0].split('/');
+          arr.pop();
+          arr.unshift(year);
+          const fomatDate = [arr.join('/')];
+          const formatted = fomatDate.concat(timeStamp.split(',')[1]).join('');
             historicalrecord+='\
             <tr>\
-            <td class="px-0">'+userInfo.video_info[i].time_stamp+'</td>\
+            <td class="px-0">'+formatted+'</td>\
             <td class="px-0">'+userInfo.video_info[i].title+'</td>\
             <td class="px-0 w-25">'+userInfo.video_info[i].duration+'</td>\
           </tr>`\

+ 4 - 2
html/static/lan.js

@@ -126,7 +126,8 @@ var zh = {
     "no_draft": "目前沒有草稿喔",
     "trial_title": "想要免費獲得更多時間額度?",
     "trial_txt": "透過社群分享專屬連結,邀請好友註冊 AI Spokesgirl,凡是好友透過連結註冊成功,您可以免費獲得2分鐘製作額度。",
-    "share": "分享:"
+    "share": "分享:",
+    "close": "關閉"
 };
 
 var en = {
@@ -209,7 +210,8 @@ var en = {
     "no_draft": "No drafts yet.",
     "trial_title": "Want to get more minutes?",
     "trial_txt": "Invite your friends to AI Spokesgirl and for each eligible one that signs up from your referral, we'll give you 2 more minutes free!",
-    "share": "Share:"
+    "share": "Share:",
+    "close": "Close"
 };
 
 function switchLanContent(val){

+ 13 - 4
html/static/scss/style.css

@@ -662,6 +662,19 @@ footer {
   border-bottom: none;
 }
 
+.btn-dismiss {
+  background: -webkit-gradient(linear, left top, right top, from(#0162c8), to(#55e7fc));
+  background: linear-gradient(90deg, #0162c8, #55e7fc);
+  font-weight: bold;
+  color: white;
+  border: 0 none;
+  border-radius: 20px;
+  cursor: pointer;
+  padding: 10px 35px;
+  margin: 10px auto;
+  display: block;
+}
+
 #avatarmega .modal-content {
   background-color: transparent;
   border: none;
@@ -671,10 +684,6 @@ footer {
   color: white;
 }
 
-#avatarmega .btn-close {
-  background: none;
-}
-
 #avatarmega .modal-header {
   position: absolute;
   top: -0.5rem;

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


+ 12 - 4
html/static/scss/style.scss

@@ -622,6 +622,18 @@ footer {
 	border-bottom: none;
 }
 
+.btn-dismiss {
+	background: linear-gradient(90deg, #0162c8, #55e7fc);
+	font-weight: bold;
+	color: white;
+	border: 0 none;
+	border-radius: 20px;
+	cursor: pointer;
+	padding: 10px 35px;
+	margin: 10px auto;
+	display: block;
+}
+
 #avatarmega .modal-content {
 	background-color: transparent;
 	border: none;
@@ -631,10 +643,6 @@ footer {
 	color: white;
 }
 
-#avatarmega .btn-close {
-	background: none;
-}
-
 #avatarmega .modal-header {
 	position: absolute;
 	top: -0.5rem;

+ 3 - 0
html/user_profile2.html

@@ -52,6 +52,9 @@
                                     <li><button class="nav-link lan-switch" aria-current="page" set-lan="html:zh" onclick="changeLan(this)" value="zh">中文</button></li>
                                 </ul>
                             </li>
+                            <li class="nav-item">
+                                <a class="nav-link btn-userProfile text-white" aria-current="page" href="user_profile2.html" set-lan="html:user_profile">會員資料</a>
+                            </li>
                             <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>

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