mirror of
				https://github.com/TheAnachronism/docspell.git
				synced 2025-10-30 21:40:12 +00:00 
			
		
		
		
	Add version info back to frontend
This commit is contained in:
		| @@ -6,7 +6,6 @@ module App.Data exposing | ||||
|     ) | ||||
|  | ||||
| import Api.Model.AuthResult exposing (AuthResult) | ||||
| import Api.Model.BasicResult exposing (BasicResult) | ||||
| import Api.Model.VersionInfo exposing (VersionInfo) | ||||
| import Browser exposing (UrlRequest) | ||||
| import Browser.Navigation exposing (Key) | ||||
|   | ||||
| @@ -152,7 +152,7 @@ styleMain = | ||||
|  | ||||
|  | ||||
| dataMenu : AuthResult -> Model -> Html Msg | ||||
| dataMenu acc model = | ||||
| dataMenu _ model = | ||||
|     div [ class "relative" ] | ||||
|         [ a | ||||
|             [ class dropdownLink | ||||
| @@ -374,7 +374,7 @@ viewLogin model = | ||||
|     [ Html.map LoginMsg | ||||
|         (Login.viewSidebar model.sidebarVisible model.flags model.uiSettings model.loginModel) | ||||
|     , Html.map LoginMsg | ||||
|         (Login.viewContent model.flags model.uiSettings model.loginModel) | ||||
|         (Login.viewContent model.flags model.version model.uiSettings model.loginModel) | ||||
|     ] | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -11,6 +11,7 @@ module Comp.Basic exposing | ||||
|     , secondaryBasicButton | ||||
|     , secondaryButton | ||||
|     , stats | ||||
|     , tooltipRight | ||||
|     ) | ||||
|  | ||||
| import Html exposing (..) | ||||
| @@ -264,6 +265,17 @@ inputRequired = | ||||
|         ] | ||||
|  | ||||
|  | ||||
| tooltipRight : Bool -> String -> Html msg | ||||
| tooltipRight show msg = | ||||
|     div | ||||
|         [ class "absolute bottom-0 right-5 px-2 py-2 rounded-lg z-50 w-40" | ||||
|         , class "bg-white border" | ||||
|         , class "text-sm font-thin" | ||||
|         ] | ||||
|         [ text msg | ||||
|         ] | ||||
|  | ||||
|  | ||||
|  | ||||
| --- Helpers | ||||
|  | ||||
|   | ||||
| @@ -1,5 +1,6 @@ | ||||
| module Page.Login.View2 exposing (viewContent, viewSidebar) | ||||
|  | ||||
| import Api.Model.VersionInfo exposing (VersionInfo) | ||||
| import Data.Flags exposing (Flags) | ||||
| import Data.UiSettings exposing (UiSettings) | ||||
| import Html exposing (..) | ||||
| @@ -19,8 +20,8 @@ viewSidebar _ _ _ _ = | ||||
|         [] | ||||
|  | ||||
|  | ||||
| viewContent : Flags -> UiSettings -> Model -> Html Msg | ||||
| viewContent flags _ model = | ||||
| viewContent : Flags -> VersionInfo -> UiSettings -> Model -> Html Msg | ||||
| viewContent flags versionInfo _ model = | ||||
|     div | ||||
|         [ id "content" | ||||
|         , class "h-full flex flex-col items-center justify-center w-full" | ||||
| @@ -136,6 +137,21 @@ viewContent flags _ model = | ||||
|                     ] | ||||
|                 ] | ||||
|             ] | ||||
|         , a | ||||
|             [ class "inline-flex items-center mt-4 text-xs opacity-50 hover:opacity-90" | ||||
|             , href "https://docspell.org" | ||||
|             , target "_new" | ||||
|             ] | ||||
|             [ img | ||||
|                 [ src (flags.config.docspellAssetPath ++ "/img/logo-mc-96.png") | ||||
|                 , class "w-3 h-3 mr-1" | ||||
|                 ] | ||||
|                 [] | ||||
|             , span [] | ||||
|                 [ text "Docspell " | ||||
|                 , text versionInfo.version | ||||
|                 ] | ||||
|             ] | ||||
|         ] | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user