Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.6.14 - Feature/notification center time #171

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions frontend/src/views/notice/NotRemindMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<Card shadow @mouseover.native="isDisplayDate=false" @mouseout.native="isDisplayDate=true" @click.native="jump(notice)" style="cursor:pointer">
<p slot="title" style="line-height:16px">
<Row>
<Col span="20">
<Col span="16">
<div :title="notice.sender.file">
<span style="display:inline-block;max-width:270px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">
{{notice.sender.file}}
</span>
<Badge v-if="notice.count > 1" :count="notice.count" class-name="notice-badge-gray" style="padding-left:5px"></Badge>
</div>
</Col>
<Col span="4" align="right">
<Col span="8" align="right">
<div v-if="isDisplayDate">
<p style="font-weight:400;font-size:12px">
{{timestampToTime(notice.timestamp)}}
Expand Down Expand Up @@ -51,11 +51,13 @@ export default {
},
methods: {
timestampToTime(timeStamp){
let date = new Date(timeStamp * 1000)
let hour = date.getHours() + ':'
let minute = (date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes()) + ':'
let second = (date.getSeconds() < 10 ? '0'+date.getSeconds() : date.getSeconds())
return hour + minute + second
let dateObj = new Date(timeStamp * 1000)
let month = dateObj.getMonth()+1
let date = dateObj.getDate()
let hour = dateObj.getHours()
let minute = (dateObj.getMinutes() < 10 ? '0'+dateObj.getMinutes() : dateObj.getMinutes())
let second = (dateObj.getSeconds() < 10 ? '0'+dateObj.getSeconds() : dateObj.getSeconds())
return month + '/' + date + ' ' + hour + ':' + minute + ':' + second
},
deleteNotice(noticeKey){
this.$store.dispatch('deleteNotRemind', noticeKey)
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/notice/NoticeCenter.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="main-header-notice" @click="drawerIsCollapsed=true">
<a>
<Badge :count="noticeList.length" :offset="offset" class-name="notice-badge">
<Badge :count="noticeList.length" overflow-count="999" :offset="offset" class-name="notice-badge">
<Icon type="ios-notifications" size="16" color="white" ></Icon>
</Badge>
</a>
Expand Down Expand Up @@ -49,7 +49,7 @@ export default {
},
data() {
return {
offset: [15, 2],
offset: [15, 4],
selectedTab : "Notifications",
tabList : ["Notifications", "NotRemind"],
count: 0,
Expand Down
16 changes: 9 additions & 7 deletions frontend/src/views/notice/NoticeMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<Card shadow @mouseover.native="isDisplayDate=false" @mouseout.native="isDisplayDate=true" @click.native="jump(notice)" style="cursor:pointer">
<p slot="title" style="line-height:16px">
<Row>
<Col span="20">
<Col span="16">
<div :title="notice.sender.file">
<span style="display:inline-block;max-width:270px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">
{{notice.sender.file}}
</span>
<Badge v-if="notice.count > 1" :count="notice.count" class-name="notice-badge" style="padding-left:5px"></Badge>
</div>
</Col>
<Col span="4" align="right">
<Col span="8" align="right">
<div v-if="isDisplayDate">
<p style="font-weight:400;font-size:12px">
{{timestampToTime(notice.timestamp)}}
Expand Down Expand Up @@ -51,11 +51,13 @@ export default {
},
methods: {
timestampToTime(timeStamp){
let date = new Date(timeStamp * 1000)
let hour = date.getHours() + ':'
let minute = (date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes()) + ':'
let second = (date.getSeconds() < 10 ? '0'+date.getSeconds() : date.getSeconds())
return hour + minute + second
let dateObj = new Date(timeStamp * 1000)
let month = dateObj.getMonth()+1
let date = dateObj.getDate()
let hour = dateObj.getHours()
let minute = (dateObj.getMinutes() < 10 ? '0'+dateObj.getMinutes() : dateObj.getMinutes())
let second = (dateObj.getSeconds() < 10 ? '0'+dateObj.getSeconds() : dateObj.getSeconds())
return month + '/' + date + ' ' + hour + ':' + minute + ':' + second
},
deleteNotice(noticeKey){
this.$store.dispatch('deleteNotice', noticeKey)
Expand Down
2 changes: 1 addition & 1 deletion lyrebird/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
IVERSION = (1, 6, 13)
IVERSION = (1, 6, 14)
VERSION = ".".join(str(i) for i in IVERSION)
LYREBIRD = "Lyrebird " + VERSION