Skip to content

Commit

Permalink
Test pwas
Browse files Browse the repository at this point in the history
  • Loading branch information
easafe committed Jul 3, 2024
1 parent 8bcd3cc commit efe8eef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Server/Template.purs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ templateWith parameters@{ title, content, css, bundled, footer, favicon } =
, HE.meta [ HA.name "viewport", HA.content "width=device-width, initial-scale=1.0" ]
, HE.meta [ HA.name "description", HA.content "Chat to new people who also just want to chat. MeroChat is a text based chat site for having actual conversations" ]
, HE.link [ HA.id "favicon", HA.rel "shortcut icon", HA.type' "image/ico", HA.href favicon ]
, HE.link [ HA.rel "manifest", HA.href favicon, HA.href $ SP.resourcePath (Right Manifest) Json ]
, HE.link [ HA.rel "manifest", HA.href favicon, HA.href "/file/default/manifest.json" ]
, HE.title title
] <> styleSheets
)
Expand All @@ -82,7 +82,7 @@ templateWith parameters@{ title, content, css, bundled, footer, favicon } =
else
[ HE.script' [ HA.type' "text/javascript", HA.src $ SP.bundlePath Common Js ]
]
) <> [ HE.script [HA.type' "text/javascript"] "if (`serviceWorker` in navigator) navigator.serviceWorker.register(`/file/default/sw.js`);" ] <> parameters.javascript
) <> [ HE.script [ HA.type' "text/javascript" ] "if (`serviceWorker` in navigator) navigator.serviceWorker.register(`/file/default/sw.js`);" ] <> parameters.javascript

externalFooter a. Html a
externalFooter =
Expand Down
6 changes: 1 addition & 5 deletions src/Shared/Resource.purs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ bundleFolder = "bundle/"
defaultFolder String
defaultFolder = "default/"

data ResourceType = Css | Js | Png | Ico | Json | Ignore
data ResourceType = Css | Js | Png | Ico | Ignore

derive instance Eq ResourceType

Expand All @@ -57,7 +57,6 @@ data Bundle
| InternalHelp
| Landing
| Feedback
| Manifest
| KarmaPrivileges
| Login
| Profile
Expand Down Expand Up @@ -142,7 +141,6 @@ resourceName = case _ of
Right Profile"profile"
Right Recover"recover"
Right Settings"settings"
Right Manifest"manifest"
Left Logo3Small"logo-3-small"
Left LogoSmall"logo-small"
Left Logo"logo"
Expand Down Expand Up @@ -187,7 +185,6 @@ resourceType = case _ of
Js".bundle.js"
Css".css"
Png".png"
Json".json"
Ico".ico"
Ignore""

Expand All @@ -203,7 +200,6 @@ replacement bundle tp
External → reps ".[external-js-contenthash]" ".[external-css-contenthash]"
Help → reps ".[help-js-contenthash]" ".[help-css-contenthash]"
Im → reps ".[im-js-contenthash]" ".[im-css-contenthash]"
Manifest""
Feedback → reps ".[feedback-js-contenthash]" ".[feedback-css-contenthash]"
InternalHelp → reps ".[internalHelp-js-contenthash]" ".[internalHelp-css-contenthash]"
Landing → reps ".[landing-js-contenthash]" ".[landing-css-contenthash]"
Expand Down

0 comments on commit efe8eef

Please sign in to comment.