Compare commits
3 Commits
d6bbeec655
...
75483db66a
Author | SHA1 | Date | |
---|---|---|---|
75483db66a | |||
b455c3dfee | |||
6a4754b1ea |
31
README.md
Normal file
31
README.md
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<div align="center" style="text:align:center">
|
||||||
|
<img src="docs/media/logo.png" width="60%">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
Available:
|
||||||
|
|
||||||
|
- Markdown support (Github flavored)
|
||||||
|
- Note version history
|
||||||
|
- Automatic note expiration via `@exp:` title prefixes
|
||||||
|
- Keyboard navigation support
|
||||||
|
- User account administration
|
||||||
|
|
||||||
|
Waiting to be implemented:
|
||||||
|
|
||||||
|
- (Bulk) import/export (Markdown, PDF)
|
||||||
|
- Webhooks
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
The Dockerized app can be run in fullstack (`docker-compose-full.yml`) and backend (`docker-compose-back.yml`) modes. In backend mode only the Golang server (and the Postgres database) are containerized and the frontend can be run separately for quicker development (`npm run dev`). The default fullstack setup defaults to exposing port 3000.
|
||||||
|
|
||||||
|
The `./scripts/run_dev.sh -h` output can be used as reference of running each of the available modes (or purging data from previous test runs with `-p` or `-q`):
|
||||||
|
|
||||||
|
```
|
||||||
|
[?] usage: ./scripts/run_dev.sh [-h|-f|-p]
|
||||||
|
-f run both frontend and backend (default: false)
|
||||||
|
-p purge any existing database artifacts (default: false)
|
||||||
|
-q only purge old data without building/spawning any new containers (default: false)
|
||||||
|
```
|
BIN
docs/media/logo.png
Normal file
BIN
docs/media/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
@ -225,6 +225,7 @@ func parseTitleExpiration(title *string) (*time.Time, error) {
|
|||||||
|
|
||||||
// Set midnight at the end of the specified day (+0000 UTC)
|
// Set midnight at the end of the specified day (+0000 UTC)
|
||||||
expiresAt = time.Date(expiresAt.Year(), expiresAt.Month(), expiresAt.Day(), 23, 59, 59, 0, time.UTC)
|
expiresAt = time.Date(expiresAt.Year(), expiresAt.Month(), expiresAt.Day(), 23, 59, 59, 0, time.UTC)
|
||||||
|
log.Debug().Msgf("Parsed absolute expiration date '%s' from input '%s'", expiresAt, dateStr)
|
||||||
|
|
||||||
return &expiresAt, nil
|
return &expiresAt, nil
|
||||||
}
|
}
|
||||||
@ -261,6 +262,7 @@ func parseTitleExpiration(title *string) (*time.Time, error) {
|
|||||||
|
|
||||||
// Set midnight at the end of the specified day (+0000 UTC)
|
// Set midnight at the end of the specified day (+0000 UTC)
|
||||||
expiresAt = time.Date(expiresAt.Year(), expiresAt.Month(), expiresAt.Day(), 23, 59, 59, 0, time.UTC)
|
expiresAt = time.Date(expiresAt.Year(), expiresAt.Month(), expiresAt.Day(), 23, 59, 59, 0, time.UTC)
|
||||||
|
log.Debug().Msgf("Parsed relative expiration date '%s' from input '%s%s'", expiresAt, amount, unit)
|
||||||
|
|
||||||
return &expiresAt, nil
|
return &expiresAt, nil
|
||||||
}
|
}
|
||||||
|
@ -224,7 +224,7 @@
|
|||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
on:click={toggleUserMenu}
|
on:click={toggleUserMenu}
|
||||||
class="sidebar-action-button flex-wrap justify-between px-4 py-4"
|
class="sidebar-action-button w-full flex-wrap justify-between px-4 py-4"
|
||||||
>
|
>
|
||||||
<div class="sidebar-user-button-content-container">
|
<div class="sidebar-user-button-content-container">
|
||||||
<User classString="h-6 w-6 flex-shrink-0" />
|
<User classString="h-6 w-6 flex-shrink-0" />
|
||||||
|
@ -17,17 +17,17 @@ export const formatDateLong = (dateString: string | Date): string => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export const formatDateShort = (dateString: string | Date): string => {
|
export const formatDateShort = (input: string | Date): string => {
|
||||||
if (!dateString) {
|
console.log(input)
|
||||||
|
|
||||||
|
if (!input) {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
const d = new Date(dateString)
|
const d = input instanceof Date ? input : new Date(input)
|
||||||
return d.toLocaleDateString(undefined, {
|
const utcDate = new Date(d.getTime())
|
||||||
weekday: "short",
|
|
||||||
year: "2-digit",
|
return `${utcDate.toLocaleString("en", { weekday: "short", day: "numeric", month: "short", year: "2-digit", timeZone: "UTC" })} UTC`
|
||||||
month: "short"
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const parseExpirationPrefix = (title: string): [string, string] => {
|
export const parseExpirationPrefix = (title: string): [string, string] => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user