Skip to content

Commit

Permalink
Feature/text fixes (#173)
Browse files Browse the repository at this point in the history
* remove admin stylesheet link

* add z-pool-tool to footer

---------

Co-authored-by: Timo Huber <[email protected]>
  • Loading branch information
timohuber and timohuber authored Aug 2, 2023
1 parent 24a7355 commit ea05bb4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 0 additions & 2 deletions pool/web/view/layout/layout.ml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ module Tenant = struct
(match tenant.styles with
| Some _ -> [ `GlobalStylesheet; `TenantStylesheet ]
| None -> [ `GlobalStylesheet ])
|> (fun global ->
if user_is_admin user then global @ [ `AdminStylesheet ] else global)
|> CCList.map css_link_tag
in
let scripts =
Expand Down
7 changes: 2 additions & 5 deletions pool/web/view/layout/layout_utils.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ open Tyxml.Html
let assets = function
| `GlobalStylesheet -> "/assets/index.css"
| `TenantStylesheet -> "/custom/assets/index.css"
| `AdminStylesheet -> "/assets/admin.css"
| `IndexJs -> "/assets/index.js"
| `AdminJs -> "/assets/admin.js"
| `RootFavicon -> "/assets/images/favicon.png"
Expand All @@ -29,9 +28,7 @@ let js_script_tag (file : [ `IndexJs | `AdminJs ]) =
script ~a:[ a_src source_path; a_defer () ] (txt "")
;;

let css_link_tag
(file : [ `AdminStylesheet | `GlobalStylesheet | `TenantStylesheet ])
=
let css_link_tag (file : [ `GlobalStylesheet | `TenantStylesheet ]) =
link
~rel:[ `Stylesheet ]
~href:(Http_utils.externalized_path_with_version (assets file))
Expand Down Expand Up @@ -63,7 +60,7 @@ module App = struct
;;

let footer title =
let version = Version.to_string in
let version = Format.asprintf "Z-Pool-Tool %s" Version.to_string in
let title = span [ txt title ] in
let content = [ title; span [ txt "|" ]; txt version ] in
footer
Expand Down

0 comments on commit ea05bb4

Please sign in to comment.