mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-07-04 16:48:26 +00:00
First version of new ui based on tailwind
This drops fomantic-ui as css toolkit and introduces tailwindcss. With tailwind there are no predefined components, but it's very easy to create those. So customizing the look&feel is much simpler, most of the time no additional css is needed. This requires a complete rewrite of the markup + styles. Luckily all logic can be kept as is. The now old ui is not removed, it is still available by using a request header `Docspell-Ui` with a value of `1` for the old ui and `2` for the new ui. Another addition is "dev mode", where docspell serves assets with a no-cache header, to disable browser caching. This makes developing a lot easier.
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
module Page.Queue.Data exposing
|
||||
( Model
|
||||
, Msg(..)
|
||||
, QueueView(..)
|
||||
, emptyModel
|
||||
, getDuration
|
||||
, getRunningTime
|
||||
@ -27,9 +28,18 @@ type alias Model =
|
||||
, showLog : Maybe JobDetail
|
||||
, deleteConfirm : Comp.YesNoDimmer.Model
|
||||
, cancelJobRequest : Maybe String
|
||||
, queueView : QueueView
|
||||
}
|
||||
|
||||
|
||||
type QueueView
|
||||
= CurrentJobs
|
||||
| QueueAll
|
||||
| QueueWaiting
|
||||
| QueueError
|
||||
| QueueSuccess
|
||||
|
||||
|
||||
emptyModel : Model
|
||||
emptyModel =
|
||||
{ state = Api.Model.JobQueueState.empty
|
||||
@ -41,6 +51,7 @@ emptyModel =
|
||||
, showLog = Nothing
|
||||
, deleteConfirm = Comp.YesNoDimmer.emptyModel
|
||||
, cancelJobRequest = Nothing
|
||||
, queueView = CurrentJobs
|
||||
}
|
||||
|
||||
|
||||
@ -55,6 +66,7 @@ type Msg
|
||||
| DimmerMsg JobDetail Comp.YesNoDimmer.Msg
|
||||
| CancelResp (Result Http.Error BasicResult)
|
||||
| ChangePrio String Priority
|
||||
| SetQueueView QueueView
|
||||
|
||||
|
||||
getRunningTime : Model -> JobDetail -> Maybe String
|
||||
|
Reference in New Issue
Block a user