OSDN Git Service

Expand Notification Class [0.1.2]
authormtsgi <oq@live.jp>
Tue, 12 Mar 2019 02:12:45 +0000 (11:12 +0900)
committermtsgi <oq@live.jp>
Tue, 12 Mar 2019 02:12:45 +0000 (11:12 +0900)
app/ntflist/ntflist.css
app/ntflist/ntflist.js
system.js
system/theme/theme-default.css
system/theme/theme-light.css
system/theme/theme-ringo.css

index f42ba79..5c8871b 100644 (file)
 }
 .ntflist-d:before{
   content: "送信元:";
+}
+.ntflist-e{
+  font-size: 14px;
+}
+.ntflist-e:before{
+  content: "送信日時:";
 }
\ No newline at end of file
index 8881070..20b1a99 100644 (file)
@@ -3,6 +3,6 @@ S.avoidMultiple(pid, false);
 ((_pid) => {
     for( i in Notification.list ){
         S.dom(_pid, ".ntflist-list")
-        .append("<div class='ntflist-items'><span class='ntflist-a'>" + i + "</span><span class='ntflist-b'>" + Notification.list[i].title + "</span><span class='ntflist-c'>" + Notification.list[i].content + "</span><span class='ntflist-d'>" + Notification.list[i].app + "</span>");
+        .append("<div class='ntflist-items'><span class='ntflist-a'>" + i + "</span><span class='ntflist-b'>" + Notification.list[i].title + "</span><span class='ntflist-c'>" + Notification.list[i].content + "</span><span class='ntflist-d'>" + Notification.list[i].app + "</span><br><span class='ntflist-e'>" + Notification.list[i].time + "</span>");
     }
 })(pid)
\ No newline at end of file
index 9a88021..900ec90 100644 (file)
--- a/system.js
+++ b/system.js
@@ -492,7 +492,7 @@ const System = new function() {
     }
 
     this.time = {
-        "obj" : null,
+        "obj" : new Date(),
         "y" : "1970",
         "m" : "1",
         "d" : "1",
@@ -602,13 +602,14 @@ const Notification = new function() {
         this.list[this.nid] = {
             "title" : _title,
             "content" : _content,
-            "app" : _app
+            "app" : _app,
+            "time" : System.time.obj.toLocaleString()
         };
         $( "#last-notification-title" ).text("").text( _title );
         $( "#last-notification-content" ).text("").text( _content );
         $( "#last-notification-app" ).text("").text( _app );
         $( "#last-notification" ).hide().show( "drop", {direction: "right"}, 300 );
-        $( "#notifications" ).append( "<div class='notis' id='nt" + this.nid + "'><span class='notis_close' id='nc" + this.nid + "'></span><span><span class='fas fa-comment-alt'></span>" + _title + "</span>" + _content + "</div>" );
+        $( "#notifications" ).append( "<div class='notis' id='nt" + this.nid + "'><span class='notis_close' id='nc" + this.nid + "'></span><span><span class='fas fa-comment-alt'></span>" + _title + "</span>" + _content + "<div class='notis_time'>" + System.time.obj.toLocaleString() + "</div></div>" );
         $("#nc" + this.nid).on("click", function(){
             let _nid = this.id.slice(2);
             $("#nt" + _nid).fadeOut(300);
index cea94b5..48e55b0 100644 (file)
@@ -347,6 +347,10 @@ footer .task-min:after{
        margin: 2px;
        border-radius: 99px;
 }
+.notis_time{
+       font-size: 13px;
+       color: #909090;
+}
 #tasks{
        padding-left: 38px;
 }
index 33e80c8..09e3bf3 100644 (file)
@@ -301,6 +301,10 @@ footer .task-min:after{
        height: 13px;
        margin: 2px;
 }
+.notis_time{
+       font-size: 13px;
+       color: #909090;
+}
 #tasks{
        padding-left: 28px;
 }
index ec14ab7..3f052d1 100644 (file)
@@ -355,6 +355,10 @@ footer .task-min:before{
        margin: 9px;
        border-radius: 99px;
 }
+.notis_time{
+       font-size: 13px;
+       color: #909090;
+}
 .window{
        position: absolute;
        box-shadow: 0px 2px 20px 0px rgba(0,0,0,.8);