integrations.html 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. {{ define "title"}}{{ t "Integrations" }}{{ end }}
  2. {{ define "content"}}
  3. <section class="page-header">
  4. <h1>{{ t "Integrations" }}</h1>
  5. <ul>
  6. <li>
  7. <a href="{{ route "settings" }}">{{ t "Settings" }}</a>
  8. </li>
  9. <li>
  10. <a href="{{ route "sessions" }}">{{ t "Sessions" }}</a>
  11. </li>
  12. {{ if .user.IsAdmin }}
  13. <li>
  14. <a href="{{ route "users" }}">{{ t "Users" }}</a>
  15. </li>
  16. {{ end }}
  17. <li>
  18. <a href="{{ route "about" }}">{{ t "About" }}</a>
  19. </li>
  20. </ul>
  21. </section>
  22. <form method="post" autocomplete="off" action="{{ route "updateIntegration" }}">
  23. <input type="hidden" name="csrf" value="{{ .csrf }}">
  24. {{ if .errorMessage }}
  25. <div class="alert alert-error">{{ t .errorMessage }}</div>
  26. {{ end }}
  27. <h3>Fever</h3>
  28. <div class="form-section">
  29. <label>
  30. <input type="checkbox" name="fever_enabled" value="1" {{ if .form.FeverEnabled }}checked{{ end }}> {{ t "Activate Fever API" }}
  31. </label>
  32. <label for="form-fever-username">{{ t "Fever Username" }}</label>
  33. <input type="text" name="fever_username" id="form-fever-username" value="{{ .form.FeverUsername }}">
  34. <label for="form-fever-password">{{ t "Fever Password" }}</label>
  35. <input type="password" name="fever_password" id="form-fever-password" value="{{ .form.FeverPassword }}" autocomplete="new-password">
  36. <p>{{ t "Fever API endpoint:" }} <strong>{{ rootURL }}{{ route "feverEndpoint" }}</strong></p>
  37. </div>
  38. <h3>Pinboard</h3>
  39. <div class="form-section">
  40. <label>
  41. <input type="checkbox" name="pinboard_enabled" value="1" {{ if .form.PinboardEnabled }}checked{{ end }}> {{ t "Save articles to Pinboard" }}
  42. </label>
  43. <label for="form-pinboard-token">{{ t "Pinboard API Token" }}</label>
  44. <input type="password" name="pinboard_token" id="form-pinboard-token" value="{{ .form.PinboardToken }}" autocomplete="new-password">
  45. <label for="form-pinboard-tags">{{ t "Pinboard Tags" }}</label>
  46. <input type="text" name="pinboard_tags" id="form-pinboard-tags" value="{{ .form.PinboardTags }}">
  47. <label>
  48. <input type="checkbox" name="pinboard_mark_as_unread" value="1" {{ if .form.PinboardMarkAsUnread }}checked{{ end }}> {{ t "Mark bookmark as unread" }}
  49. </label>
  50. </div>
  51. <h3>Instapaper</h3>
  52. <div class="form-section">
  53. <label>
  54. <input type="checkbox" name="instapaper_enabled" value="1" {{ if .form.InstapaperEnabled }}checked{{ end }}> {{ t "Save articles to Instapaper" }}
  55. </label>
  56. <label for="form-instapaper-username">{{ t "Instapaper Username" }}</label>
  57. <input type="text" name="instapaper_username" id="form-instapaper-username" value="{{ .form.InstapaperUsername }}">
  58. <label for="form-instapaper-password">{{ t "Instapaper Password" }}</label>
  59. <input type="password" name="instapaper_password" id="form-instapaper-password" value="{{ .form.InstapaperPassword }}" autocomplete="new-password">
  60. </div>
  61. <h3>Pocket</h3>
  62. <div class="form-section">
  63. <label>
  64. <input type="checkbox" name="pocket_enabled" value="1" {{ if .form.PocketEnabled }}checked{{ end }}> {{ t "Save articles to Pocket" }}
  65. </label>
  66. {{ if not .hasPocketConsumerKeyConfigured }}
  67. <label for="form-pocket-consumer-key">{{ t "Pocket Consumer Key" }}</label>
  68. <input type="text" name="pocket_consumer_key" id="form-pocket-consumer-key" value="{{ .form.PocketConsumerKey }}">
  69. {{ end }}
  70. <label for="form-pocket-access-token">{{ t "Pocket Access Token" }}</label>
  71. <input type="password" name="pocket_access_token" id="form-pocket-access-token" value="{{ .form.PocketAccessToken }}" autocomplete="new-password">
  72. {{ if not .form.PocketAccessToken }}
  73. <p><a href="{{ route "pocketAuthorize" }}">{{ t "Connect your Pocket account" }}</a></p>
  74. {{ end }}
  75. </div>
  76. <h3>Wallabag</h3>
  77. <div class="form-section">
  78. <label>
  79. <input type="checkbox" name="wallabag_enabled" value="1" {{ if .form.WallabagEnabled }}checked{{ end }}> {{ t "Save articles to Wallabag" }}
  80. </label>
  81. <label for="form-wallabag-url">{{ t "Wallabag API Endpoint" }}</label>
  82. <input type="url" name="wallabag_url" id="form-wallabag-url" value="{{ .form.WallabagURL }}" placeholder="http://v2.wallabag.org/">
  83. <label for="form-wallabag-client-id">{{ t "Wallabag Client ID" }}</label>
  84. <input type="text" name="wallabag_client_id" id="form-wallabag-client-id" value="{{ .form.WallabagClientID }}">
  85. <label for="form-wallabag-client-secret">{{ t "Wallabag Client Secret" }}</label>
  86. <input type="password" name="wallabag_client_secret" id="form-wallabag-client-secret" value="{{ .form.WallabagClientSecret }}" autocomplete="new-password">
  87. <label for="form-wallabag-username">{{ t "Wallabag Username" }}</label>
  88. <input type="text" name="wallabag_username" id="form-wallabag-username" value="{{ .form.WallabagUsername }}">
  89. <label for="form-wallabag-password">{{ t "Wallabag Password" }}</label>
  90. <input type="password" name="wallabag_password" id="form-wallabag-password" value="{{ .form.WallabagPassword }}" autocomplete="new-password">
  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 "Save articles to Nunux Keeper" }}
  96. </label>
  97. <label for="form-nunux-keeper-url">{{ t "Nunux Keeper API 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 "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>
  102. <div class="buttons">
  103. <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Update" }}</button>
  104. </div>
  105. </form>
  106. <h3>{{ t "Miniflux API" }}</h3>
  107. <div class="panel">
  108. <ul>
  109. <li>
  110. {{ t "API Endpoint" }} = <strong>{{ baseURL }}/v1/</strong>
  111. </li>
  112. <li>
  113. {{ t "Username" }} = <strong>{{ .user.Username }}</strong>
  114. </li>
  115. <li>
  116. {{ t "Password" }} = <strong>{{ t "Your account password" }}</strong>
  117. </li>
  118. </ul>
  119. </div>
  120. <h3>{{ t "Bookmarklet" }}</h3>
  121. <div class="panel">
  122. <p>{{ t "This special link allows you to subscribe to a website directly by using a bookmark in your web browser." }}</p>
  123. <div class="bookmarklet">
  124. <a href="javascript:location.href='{{ rootURL }}{{ route "bookmarklet" }}?uri='+encodeURIComponent(window.location.href)">{{ t "Add to Miniflux" }}</a>
  125. </div>
  126. <p>{{ t "Drag and drop this link to your bookmarks." }}</p>
  127. </div>
  128. {{ end }}