Skip to content

Commit 87b4795

Browse files
committed
Update feedback message and add button to close it
1 parent a81d731 commit 87b4795

File tree

1 file changed

+25
-9
lines changed

1 file changed

+25
-9
lines changed

frontend/src/Main.elm

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ init _ url key =
8787
initialModel =
8888
Model Common.Prod key url stepsState route False Nothing Nothing
8989
in
90-
( initialModel, Cmd.batch [ Cmd.map StepsMsg stepsCmd, getLocalStorage "feedbackDialogDismissed1", getCurrentTime () ] )
90+
( initialModel, Cmd.batch [ Cmd.map StepsMsg stepsCmd, getLocalStorage "feedbackDialogDismissed2", getCurrentTime () ] )
9191

9292

9393

@@ -140,12 +140,12 @@ update msg model =
140140
let
141141
timestampValue = "temporary:" ++ String.fromFloat currentTime
142142
in
143-
( { model | showFeedbackDialog = False }, setLocalStorageWithValue { key = "feedbackDialogDismissed1", value = timestampValue } )
143+
( { model | showFeedbackDialog = False }, setLocalStorageWithValue { key = "feedbackDialogDismissed2", value = timestampValue } )
144144
Nothing ->
145145
( { model | showFeedbackDialog = False }, getCurrentTime () )
146146

147147
DismissFeedbackDialogPermanent ->
148-
( { model | showFeedbackDialog = False }, setLocalStorageWithValue { key = "feedbackDialogDismissed1", value = "permanent" } )
148+
( { model | showFeedbackDialog = False }, setLocalStorageWithValue { key = "feedbackDialogDismissed2", value = "permanent" } )
149149

150150
CurrentTimeReceived time ->
151151
let
@@ -272,15 +272,31 @@ feedbackDialog model =
272272
, Css.boxShadow5 (Css.px 0) (Css.px 10) (Css.px 25) (Css.px 0) (Css.rgba 0 0 0 0.1)
273273
]
274274
]
275-
[ div [ css [ Tw.flex, Tw.items_center, Tw.mb_4 ] ]
276-
[ img [ src "static/gopher.png", height 40, css [ Tw.mr_3 ] ] []
277-
, h2 [ css [ Tw.text_xl, Tw.font_semibold, Tw.m_0 ] ]
278-
[ text "Welcome to GoTutor!" ]
275+
[ div [ css [ Tw.flex, Tw.items_center, Tw.justify_between, Tw.mb_4 ] ]
276+
[ div [ css [ Tw.flex, Tw.items_center ] ]
277+
[ img [ src "static/gopher.png", height 40, css [ Tw.mr_3 ] ] []
278+
, h2 [ css [ Tw.text_xl, Tw.font_semibold, Tw.m_0 ] ]
279+
[ text "Welcome to GoTutor!" ]
280+
]
281+
, button
282+
[ onClick DismissFeedbackDialogTemporary
283+
, css
284+
[ Tw.p_2
285+
, Tw.border_0
286+
, Tw.bg_color Tw.transparent
287+
, Tw.text_color Tw.gray_500
288+
, Tw.cursor_pointer
289+
, Css.hover [ Tw.text_color Tw.gray_700 ]
290+
, Tw.text_xl
291+
, Tw.leading_none
292+
]
293+
]
294+
[ text "×" ]
279295
]
280296
, subscriptionForm model
281297
, p [ css [ Tw.mb_5, Css.lineHeight (Css.num 1.5), Tw.text_color Tw.gray_700 ] ]
282-
[ text "Thank you for trying GoTutor! Your feedback is incredibly valuable to help improve this tool. "
283-
, text "Please Give a star on GitHub and share your thoughts, suggestions, or report any issues you encounter."
298+
[ text "Thank you for trying GoTutor! I'm currently running this project on AWS free tier and need your support to keep it alive. "
299+
, text "Without community backing, the project may need to be closed. Please consider giving a star on GitHub and supporting the project!"
284300
]
285301
, div [ css [ Tw.flex, Tw.justify_between, Tw.items_center ] ]
286302
[

0 commit comments

Comments
 (0)