mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 19:08: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:
@ -103,6 +103,8 @@ type alias Model =
|
||||
, customFieldThrottle : Throttle Msg
|
||||
, allTags : List Tag
|
||||
, allPersons : Dict String Person
|
||||
, attachmentDropdownOpen : Bool
|
||||
, editMenuTabsOpen : Set String
|
||||
}
|
||||
|
||||
|
||||
@ -134,7 +136,7 @@ emptyModel =
|
||||
, attachMenuOpen = False
|
||||
, menuOpen = False
|
||||
, tagModel =
|
||||
Util.Tag.makeDropdownModel
|
||||
Util.Tag.makeDropdownModel2
|
||||
, directionModel =
|
||||
Comp.Dropdown.makeSingleList
|
||||
{ makeOption =
|
||||
@ -195,7 +197,7 @@ emptyModel =
|
||||
, pdfNativeView = Nothing
|
||||
, deleteAttachConfirm = Comp.YesNoDimmer.emptyModel
|
||||
, addFilesOpen = False
|
||||
, addFilesModel = Comp.Dropzone.init Comp.Dropzone.defaultSettings
|
||||
, addFilesModel = Comp.Dropzone.init []
|
||||
, selectedFiles = []
|
||||
, completed = Set.empty
|
||||
, errored = Set.empty
|
||||
@ -209,6 +211,8 @@ emptyModel =
|
||||
, customFieldThrottle = Throttle.create 1
|
||||
, allTags = []
|
||||
, allPersons = Dict.empty
|
||||
, attachmentDropdownOpen = False
|
||||
, editMenuTabsOpen = Set.empty
|
||||
}
|
||||
|
||||
|
||||
@ -297,6 +301,9 @@ type Msg
|
||||
| CustomFieldMsg Comp.CustomFieldMultiInput.Msg
|
||||
| CustomFieldSaveResp CustomField String (Result Http.Error BasicResult)
|
||||
| CustomFieldRemoveResp String (Result Http.Error BasicResult)
|
||||
| ToggleAttachmentDropdown
|
||||
| ToggleAkkordionTab String
|
||||
| ToggleOpenAllAkkordionTabs
|
||||
|
||||
|
||||
type SaveNameState
|
||||
|
Reference in New Issue
Block a user