integrations.html 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. {{ define "title"}}{{ t "page.integrations.title" }}{{ end }}
  2. {{ define "content"}}
  3. <section class="page-header">
  4. <h1>{{ t "page.integrations.title" }}</h1>
  5. {{ template "settings_menu" dict "user" .user }}
  6. </section>
  7. <form method="post" autocomplete="off" action="{{ route "updateIntegration" }}">
  8. <input type="hidden" name="csrf" value="{{ .csrf }}">
  9. {{ if .errorMessage }}
  10. <div class="alert alert-error">{{ t .errorMessage }}</div>
  11. {{ end }}
  12. <h3>Fever</h3>
  13. <div class="form-section">
  14. <label>
  15. <input type="checkbox" name="fever_enabled" value="1" {{ if .form.FeverEnabled }}checked{{ end }}> {{ t "form.integration.fever_activate" }}
  16. </label>
  17. <label for="form-fever-username">{{ t "form.integration.fever_username" }}</label>
  18. <input type="text" name="fever_username" id="form-fever-username" value="{{ .form.FeverUsername }}" autocomplete="username">
  19. <label for="form-fever-password">{{ t "form.integration.fever_password" }}</label>
  20. <input type="password" name="fever_password" id="form-fever-password" value="{{ .form.FeverPassword }}" autocomplete="new-password">
  21. <p>{{ t "form.integration.fever_endpoint" }} <strong>{{ rootURL }}{{ route "feverEndpoint" }}</strong></p>
  22. <div class="buttons">
  23. <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button>
  24. </div>
  25. </div>
  26. <h3>Pinboard</h3>
  27. <div class="form-section">
  28. <label>
  29. <input type="checkbox" name="pinboard_enabled" value="1" {{ if .form.PinboardEnabled }}checked{{ end }}> {{ t "form.integration.pinboard_activate" }}
  30. </label>
  31. <label for="form-pinboard-token">{{ t "form.integration.pinboard_token" }}</label>
  32. <input type="password" name="pinboard_token" id="form-pinboard-token" value="{{ .form.PinboardToken }}" autocomplete="new-password">
  33. <label for="form-pinboard-tags">{{ t "form.integration.pinboard_tags" }}</label>
  34. <input type="text" name="pinboard_tags" id="form-pinboard-tags" value="{{ .form.PinboardTags }}">
  35. <label>
  36. <input type="checkbox" name="pinboard_mark_as_unread" value="1" {{ if .form.PinboardMarkAsUnread }}checked{{ end }}> {{ t "form.integration.pinboard_bookmark" }}
  37. </label>
  38. <div class="buttons">
  39. <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button>
  40. </div>
  41. </div>
  42. <h3>Instapaper</h3>
  43. <div class="form-section">
  44. <label>
  45. <input type="checkbox" name="instapaper_enabled" value="1" {{ if .form.InstapaperEnabled }}checked{{ end }}> {{ t "form.integration.instapaper_activate" }}
  46. </label>
  47. <label for="form-instapaper-username">{{ t "form.integration.instapaper_username" }}</label>
  48. <input type="text" name="instapaper_username" id="form-instapaper-username" value="{{ .form.InstapaperUsername }}">
  49. <label for="form-instapaper-password">{{ t "form.integration.instapaper_password" }}</label>
  50. <input type="password" name="instapaper_password" id="form-instapaper-password" value="{{ .form.InstapaperPassword }}" autocomplete="new-password">
  51. <div class="buttons">
  52. <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button>
  53. </div>
  54. </div>
  55. <h3>Pocket</h3>
  56. <div class="form-section">
  57. <label>
  58. <input type="checkbox" name="pocket_enabled" value="1" {{ if .form.PocketEnabled }}checked{{ end }}> {{ t "form.integration.pocket_activate" }}
  59. </label>
  60. {{ if not .hasPocketConsumerKeyConfigured }}
  61. <label for="form-pocket-consumer-key">{{ t "form.integration.pocket_consumer_key" }}</label>
  62. <input type="text" name="pocket_consumer_key" id="form-pocket-consumer-key" value="{{ .form.PocketConsumerKey }}">
  63. {{ end }}
  64. <label for="form-pocket-access-token">{{ t "form.integration.pocket_access_token" }}</label>
  65. <input type="password" name="pocket_access_token" id="form-pocket-access-token" value="{{ .form.PocketAccessToken }}" autocomplete="new-password">
  66. {{ if not .form.PocketAccessToken }}
  67. <p><a href="{{ route "pocketAuthorize" }}">{{ t "form.integration.pocket_connect_link" }}</a></p>
  68. {{ end }}
  69. <div class="buttons">
  70. <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button>
  71. </div>
  72. </div>
  73. <h3>Wallabag</h3>
  74. <div class="form-section">
  75. <label>
  76. <input type="checkbox" name="wallabag_enabled" value="1" {{ if .form.WallabagEnabled }}checked{{ end }}> {{ t "form.integration.wallabag_activate" }}
  77. </label>
  78. <label for="form-wallabag-url">{{ t "form.integration.wallabag_endpoint" }}</label>
  79. <input type="url" name="wallabag_url" id="form-wallabag-url" value="{{ .form.WallabagURL }}" placeholder="http://v2.wallabag.org/">
  80. <label for="form-wallabag-client-id">{{ t "form.integration.wallabag_client_id" }}</label>
  81. <input type="text" name="wallabag_client_id" id="form-wallabag-client-id" value="{{ .form.WallabagClientID }}">
  82. <label for="form-wallabag-client-secret">{{ t "form.integration.wallabag_client_secret" }}</label>
  83. <input type="password" name="wallabag_client_secret" id="form-wallabag-client-secret" value="{{ .form.WallabagClientSecret }}" autocomplete="new-password">
  84. <label for="form-wallabag-username">{{ t "form.integration.wallabag_username" }}</label>
  85. <input type="text" name="wallabag_username" id="form-wallabag-username" value="{{ .form.WallabagUsername }}">
  86. <label for="form-wallabag-password">{{ t "form.integration.wallabag_password" }}</label>
  87. <input type="password" name="wallabag_password" id="form-wallabag-password" value="{{ .form.WallabagPassword }}" autocomplete="new-password">
  88. <div class="buttons">
  89. <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button>
  90. </div>
  91. </div>
  92. <h3>Nunux Keeper</h3>
  93. <div class="form-section">
  94. <label>
  95. <input type="checkbox" name="nunux_keeper_enabled" value="1" {{ if .form.NunuxKeeperEnabled }}checked{{ end }}> {{ t "form.integration.nunux_keeper_activate" }}
  96. </label>
  97. <label for="form-nunux-keeper-url">{{ t "form.integration.nunux_keeper_endpoint" }}</label>
  98. <input type="url" name="nunux_keeper_url" id="form-nunux-keeper-url" value="{{ .form.NunuxKeeperURL }}" placeholder="https://api.nunux.org/keeper">
  99. <label for="form-nunux-keeper-api-key">{{ t "form.integration.nunux_keeper_api_key" }}</label>
  100. <input type="text" name="nunux_keeper_api_key" id="form-nunux-keeper-api-key" value="{{ .form.NunuxKeeperAPIKey }}">
  101. <div class="buttons">
  102. <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button>
  103. </div>
  104. </div>
  105. </form>
  106. <h3>{{ t "page.integration.bookmarklet" }}</h3>
  107. <div class="panel">
  108. <p>{{ t "page.integration.bookmarklet.help" }}</p>
  109. <div class="bookmarklet">
  110. <a href="javascript:location.href='{{ rootURL }}{{ route "bookmarklet" }}?uri='+encodeURIComponent(window.location.href)">{{ t "page.integration.bookmarklet.name" }}</a>
  111. </div>
  112. <p>{{ t "page.integration.bookmarklet.instructions" }}</p>
  113. </div>
  114. {{ end }}