Skip to content

Commit

Permalink
Merge pull request #172 from jiro4989/feature/#171-selectable-tag
Browse files Browse the repository at this point in the history
ハッシュタグを切り替えられるように変更 #171
  • Loading branch information
jiro4989 committed Jul 2, 2020
2 parents aedd708 + c79a282 commit 91c5a8b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion websh_front/src/index.nim
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ var
outputElapsedTime = cstring"0milsec"
isProgress: bool
## シェルの実行中表示を切り替えるためのフラグ
hashTag = cstring"シェル芸"

proc respCb(httpStatus: int, response: cstring) =
let resp = fromJson[ResponseResult](response)
Expand Down Expand Up @@ -181,10 +182,17 @@ proc createDom(): VNode =
tdiv(class = "buttons"):
button(class="button is-primary", onclick = sendShellButtonOnClick):
text "Run (Ctrl + Enter)"
a(href = &"""https://twitter.com/intent/tweet?hashtags=シェル芸&text={encodeUrl($inputShell, false)}&ref_src=twsrc%5Etfw""",
a(href = &"""https://twitter.com/intent/tweet?hashtags={encodeUrl($hashTag, false)}&text={encodeUrl($inputShell, false)}&ref_src=twsrc%5Etfw""",
class = "button twitter-share-button is-link",
`data-show-count` = "false"):
text "Tweet"
tdiv(class = "select"):
select:
proc onchange(ev: Event, n: VNode) =
hashTag = $n.value
for elem in @[cstring"シェル芸", cstring"shellgei", cstring"ゆるシェル", cstring"危険シェル芸", ]:
option(value = $elem):
text $elem
tdiv(class = "column"):
tdiv(class = "tile is-ancestor"):
tdiv(class = "tile is-parent is-vertical"):
Expand Down

0 comments on commit 91c5a8b

Please sign in to comment.