Commit Graph

10 Commits

Author SHA1 Message Date
FreddleSpl0it
3e40bbc603
Merge remote-tracking branch 'origin/staging' into feat/f2b-banlist 2023-12-11 12:27:14 +01:00
Patrick Schult
9caaaa6498
Merge pull request #5403 from FELDSAM-INC/feldsam/css-fixes
[Web] BS5 styling fixes and enhancements
2023-09-08 15:29:47 +02:00
Kristian Feldsam
3540075b61 [Web] dark mode logo support
Signed-off-by: Kristian Feldsam <feldsam@gmail.com>
2023-09-03 18:49:12 +02:00
Kristian Feldsam
d0ba061f7a [Web] mobile devices - scroll window to opened tab
This feature was in versions before BS5

Signed-off-by: Kristian Feldsam <feldsam@gmail.com>
2023-09-03 18:36:39 +02:00
Kristian Feldsam
871ae5d7d2 [Web] mobile devices styling fixes and enhancements
Signed-off-by: Kristian Feldsam <feldsam@gmail.com>
2023-09-03 18:36:32 +02:00
FreddleSpl0it
e2e8fbe313
[Web] add f2b_banlist endpoint 2023-07-10 13:54:23 +02:00
FreddleSpl0it
cf1cc24e33
[Web] Fix temporary email aliases sorting 2023-04-21 12:26:50 +02:00
FreddleSpl0it
099db33e44 [Web] disable datatable default row click listener 2023-01-16 11:41:34 +01:00
FreddleSpl0it
c928948b15 [Web] use saved password policy for pwgen 2023-01-06 13:18:59 +01:00
Tom Udding
240b2c63f6
Fix timestamps not sorting in datatables
Timestamps retrieved from the API were always converted to a browser
local format. The format specified for moment.js added in
5160eff294 did not work because of this.

Additionally, the format specified used `dd` which looks for two letter
days, such as "Mo", "Tu", "We", etc. Furthermore, `mm` is used for
minutes, not months.

Because the locale formatted datetime can vary a lot, it is not easy to
get this into moment.js to enable the sorting of datetimes in the
datatables. In other words, there is no conversion from an
`Intl.DateTimeFormat` specifier string to moment.js. Adding many
`$.fn.dataTable.moment(format);` with different `format`s is not useful.

I have fixed this rewriting how the timestamps from the API are added
to the tables. It still uses the locale of the browser, because not
everyone wants to use ISO 8601, but no longer requires moment.js (which
has been removed).

Two data attributes are added to the `td`s of the timestamps:
- `data-order`
- `data-sort`

The values of these are the timestamps as returned by the server, which
are very easily sorted (as they are just UNIX timestamps). Then, when
creating the cell in the table, it will be converted to what the locale
of the browser specified (this has not changed).
2022-12-24 17:35:31 +01:00