github.com/pf-qiu/concourse/v6@v6.7.3-0.20201207032516-1f455d73275f/web/elm/src/FlySuccess/Text.elm (about) 1 module FlySuccess.Text exposing 2 ( Paragraph 3 , copyTokenButton 4 , copyTokenInput 5 , firstParagraph 6 , flyLoginLinkDescription 7 , flyLoginLinkText 8 , pending 9 , secondParagraph 10 , sendTokenButton 11 , title 12 ) 13 14 import FlySuccess.Models as Models exposing (ButtonState) 15 16 17 title : String 18 title = 19 "login successful!" 20 21 22 pending : String 23 pending = 24 "sending token to fly..." 25 26 27 type alias Line = 28 String 29 30 31 type alias Paragraph = 32 List Line 33 34 35 firstParagraph : Models.TokenTransfer -> Paragraph 36 firstParagraph tokenTransfer = 37 case tokenTransfer of 38 Models.Pending -> 39 [] 40 41 Models.Success -> 42 [ "your token has been transferred to fly." ] 43 44 Models.NetworkTrouble -> 45 [ "however, your token could not be" 46 , "sent to fly." 47 ] 48 49 Models.BlockedByBrowser -> 50 [ "however, your token could not be sent" 51 , "to fly because your browser blocked" 52 , "the attempt." 53 ] 54 55 Models.NoFlyPort -> 56 [ "however, your token could not be" 57 , "sent to fly." 58 ] 59 60 61 secondParagraph : Models.TokenTransfer -> Paragraph 62 secondParagraph error = 63 case error of 64 Models.Pending -> 65 [] 66 67 Models.Success -> 68 [ "you may now close this window." ] 69 70 Models.NetworkTrouble -> 71 [ "after copying, return to fly and paste" 72 , "your token into the prompt." 73 ] 74 75 Models.BlockedByBrowser -> 76 [ "if that fails, you will need to copy" 77 , "the token to your clipboard, return" 78 , "to fly, and paste your token into" 79 , "the prompt." 80 ] 81 82 Models.NoFlyPort -> 83 [ "could not find a valid fly port to send to." 84 , "maybe your URL is broken?" 85 ] 86 87 88 copyTokenButton : ButtonState -> String 89 copyTokenButton buttonState = 90 if Models.isClicked buttonState then 91 "token copied" 92 93 else 94 "copy token to clipboard" 95 96 97 copyTokenInput : String 98 copyTokenInput = 99 "copy token here" 100 101 102 sendTokenButton : String 103 sendTokenButton = 104 "send token to fly directly" 105 106 107 flyLoginLinkDescription : Line 108 flyLoginLinkDescription = 109 "Or try manually sending the token to fly:" 110 111 112 flyLoginLinkText : Line 113 flyLoginLinkText = 114 "send token to fly directly"