Skip to content

Commit

Permalink
fix popup dimensions and envjs issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis-Florin Rendler authored and rendler-denis committed Jun 9, 2020
1 parent c4c04f2 commit 0615ccd
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion configs/.safenotes.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static-site:
{"value": "1h", "label": "1 hour"},
{"value": "24h", "label": "1 day"},
{"value": "48h", "label": "2 days"},
{"value": "168h", "label": "7 days"},
{"value": "168h", "label": "7 days"}
]
},
"theme": {
Expand Down
2 changes: 1 addition & 1 deletion staticsite/staticsite.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (sw StaticSite) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// envJS serve the env.js config for the React SPA
// It helps make the SPA app more configurable
func (sw StaticSite) envJs(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.Header().Set("Content-Type", "application/javascript")

w.Write([]byte(sw.config.EnvJs))
}
3 changes: 2 additions & 1 deletion webapp/react/.env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ HTTPS=true
PUBLIC_URL=https://localhost:3000/app
ENV=dev

REACT_APP_SAFENOTE_BASE_PATH=/app
REACT_APP_SAFENOTES_NEXT_RELEASE_VERSION=0.4.0
REACT_APP_SAFENOTES_BASE_PATH=/app
2 changes: 1 addition & 1 deletion webapp/react/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<script src="%PUBLIC_URL%/env.js"></script>

<title>SafeNotes v0.2.0</title>
<title>SafeNotes %REACT_APP_SAFENOTES_NEXT_RELEASE_VERSION%</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
2 changes: 1 addition & 1 deletion webapp/react/src/SafeNotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const SafeNotes = () => {
const { theme } = useContext(ConfigContext);

return (
<Router basename={process.env.REACT_APP_SAFENOTE_BASE_PATH}>
<Router basename={process.env.REACT_APP_SAFENOTES_BASE_PATH}>
<Layout classes={['safe-notes', 'container', 'mx-auto', 'px-2']}>

<Header classes={['flex']}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const ModalMessage = ({ rootEl, reset, children }) => {
const content = <>
<div className="flex flex-wrap items-center fixed pin bg-semi-75">
<div className="flex-1 self-end md:px-10 ">
<div className="bg-white mx-auto w-full sm:w-10/12 lg:w-6/12 border shadow-sm relative p-3 rounded-sm ">
<div className="bg-white mx-auto w-full md:w-11/12 lg:w-8/12 xl:w-6/12 border shadow-sm relative p-3 rounded-sm ">
<span className="absolute top-0 right-0 p-2 z-50">
<svg className="h-6 w-6 fill-current text-grey hover:text-grey-darkest" role="button" onClick={reset} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<title>Close</title>
Expand Down

0 comments on commit 0615ccd

Please sign in to comment.