mirror of
https://github.com/abhinavxd/libredesk.git
synced 2025-11-02 13:03:35 +00:00
Compare commits
5 Commits
562babf222
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d76cce66a | ||
|
|
4b8f30184a | ||
|
|
e4018ddab8 | ||
|
|
02e8a43587 | ||
|
|
f3acc37405 |
@@ -10,8 +10,6 @@ Modern, open source, self-hosted customer support desk. Single binary app.
|
||||
|
||||
Visit [libredesk.io](https://libredesk.io) for more info. Check out the [**Live demo**](https://demo.libredesk.io/).
|
||||
|
||||
> **CAUTION:** This project is currently in **alpha**. Features and APIs may change and are not yet fully tested.
|
||||
|
||||
## Features
|
||||
|
||||
- **Multi Shared Inbox**
|
||||
@@ -85,11 +83,6 @@ __________________
|
||||
## Developers
|
||||
If you are interested in contributing, refer to the [developer setup](https://docs.libredesk.io/contributing/developer-setup). The backend is written in Go and the frontend is Vue js 3 with Shadcn for UI components.
|
||||
|
||||
## Development Status
|
||||
|
||||
Libredesk is under active development.
|
||||
Track roadmap and progress on the GitHub Project Board: [https://github.com/users/abhinavxd/projects/1](https://github.com/users/abhinavxd/projects/1)
|
||||
|
||||
|
||||
## Translators
|
||||
You can help translate Libredesk into your language on [Crowdin](https://crowdin.com/project/libredesk).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "libredesk",
|
||||
"version": "0.6.0-alpha",
|
||||
"version": "0.8.0-beta",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
import { format, differenceInMinutes, differenceInHours, differenceInDays, differenceInYears } from 'date-fns'
|
||||
import { format, differenceInMinutes, differenceInHours, differenceInDays, differenceInMonths, differenceInYears } from 'date-fns'
|
||||
|
||||
export function getRelativeTime (timestamp, now = new Date()) {
|
||||
try {
|
||||
const mins = differenceInMinutes(now, timestamp)
|
||||
const hours = differenceInHours(now, timestamp)
|
||||
const days = differenceInDays(now, timestamp)
|
||||
const months = differenceInMonths(now, timestamp)
|
||||
const years = differenceInYears(now, timestamp)
|
||||
|
||||
if (mins === 0) return 'now'
|
||||
if (mins < 60) return `${mins}m`
|
||||
if (hours < 24) return `${hours}h`
|
||||
if (days < 365) return `${days}d`
|
||||
if (days < 31) return `${days}d`
|
||||
if (months < 12) return `${months}mo`
|
||||
return `${years}y`
|
||||
} catch (error) {
|
||||
console.error('Error parsing time', error, 'timestamp', timestamp)
|
||||
|
||||
Reference in New Issue
Block a user