mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	recent_topics: Show exact date-time on last msg time hover.
This commit is contained in:
		@@ -42,6 +42,12 @@ set_global('timerender', {
 | 
			
		||||
    last_seen_status_from_date: () => {
 | 
			
		||||
        return "Just now";
 | 
			
		||||
    },
 | 
			
		||||
    get_full_datetime: () => {
 | 
			
		||||
        return {
 | 
			
		||||
            date: "date",
 | 
			
		||||
            time: "time",
 | 
			
		||||
        };
 | 
			
		||||
    },
 | 
			
		||||
});
 | 
			
		||||
set_global('unread', {
 | 
			
		||||
    unread_topic_counter: {
 | 
			
		||||
@@ -270,6 +276,7 @@ function generate_topic_data(topic_info_array) {
 | 
			
		||||
            invite_only: false,
 | 
			
		||||
            is_web_public: true,
 | 
			
		||||
            last_msg_time: 'Just now',
 | 
			
		||||
            full_last_msg_date_time: "date time",
 | 
			
		||||
            senders: [
 | 
			
		||||
                1,
 | 
			
		||||
                2,
 | 
			
		||||
 
 | 
			
		||||
@@ -157,6 +157,7 @@ function format_topic(topic_data) {
 | 
			
		||||
    const topic = last_msg.topic;
 | 
			
		||||
    const time = new XDate(last_msg.timestamp * 1000);
 | 
			
		||||
    const last_msg_time = timerender.last_seen_status_from_date(time);
 | 
			
		||||
    const full_datetime = timerender.get_full_datetime(time);
 | 
			
		||||
 | 
			
		||||
    // We hide the row according to filters or if it's muted.
 | 
			
		||||
    // We only supply the data to the topic rows and let jquery
 | 
			
		||||
@@ -191,6 +192,7 @@ function format_topic(topic_data) {
 | 
			
		||||
        muted: muted,
 | 
			
		||||
        topic_muted: topic_muted,
 | 
			
		||||
        participated: topic_data.participated,
 | 
			
		||||
        full_last_msg_date_time: full_datetime.date + ' ' + full_datetime.time,
 | 
			
		||||
    };
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -39,7 +39,7 @@
 | 
			
		||||
            {{/each}}
 | 
			
		||||
        </ul>
 | 
			
		||||
    </td>
 | 
			
		||||
    <td class="recent_topic_timestamp">
 | 
			
		||||
    <td class="recent_topic_timestamp" title="{{this.full_last_msg_date_time}}">
 | 
			
		||||
        {{ last_msg_time }}
 | 
			
		||||
    </td>
 | 
			
		||||
</tr>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user