Skip to content

Commit

Permalink
added copy to clipboard button for the token in the webapp
Browse files Browse the repository at this point in the history
  • Loading branch information
conoro committed May 1, 2016
1 parent 318d750 commit f536193
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ server_conf.json
podcasts
pkg
bin
ytpodders
ytpodders.exe
ffmpeg
ffmpeg.exe
ffprobe
ffprobe.exe


# Created by https://www.gitignore.io/api/node,go,windows,osx,linux,emacs,sublimetext

Expand Down
7 changes: 7 additions & 0 deletions static/js/clipboard.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 12 additions & 3 deletions templates/success.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
</head>
<body>
<script src="js/clipboard.min.js"></script>
<script>
var clipboard = new Clipboard('.btn');
</script>
<div class="container">
<div class="row">
<div class="col-lg-12">
Expand All @@ -17,9 +21,14 @@
<div class="bs-component">
<div class="alert alert-dismissible alert-success">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>Success!</strong> Please paste this token into the appropriate place in client_conf.json:
<br />
{{ .UserToken }}
<strong>Success!</strong> Please paste the token below into the appropriate place in client_conf.json
</div>
<div class="form-group">
<label for="usr">Token:</label>
<input type="text" class="form-control" id="copyme" readonly value={{ .UserToken }}>
</div>
<div>
<button class="btn btn-default" data-clipboard-action="copy" data-clipboard-target="#copyme">Copy to clipboard</button>
</div>
</div>
</div>
Expand Down

0 comments on commit f536193

Please sign in to comment.