settings.jet.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <div class="container" data-hx-boost="false">
  2. <h1>Settings</h1>
  3. <p>
  4. PixivFE uses <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies">cookies</a> to store your
  5. preferences, which you can change on this page to customize your experience on this instance.
  6. </p>
  7. <details>
  8. <summary>
  9. <h2>Current cookie values</h2>
  10. </summary>
  11. <div>
  12. <h3>Cookie list</h3>
  13. Please note that some cookies here such as ShowArtR18,
  14. ShowArtR18G, and ShowArtAI are for features still under development.
  15. </div>
  16. {{ range CookieList }}
  17. <div class="settings-set-cookie">
  18. <h3>{{.Key}}</h3>
  19. <form action="/settings/set-cookie" method="post">
  20. <input type="hidden" name="key" value="{{.Key}}" />
  21. <input type="text" name="value" value="{{.Value}}" />
  22. <input type="submit" value="Set" />
  23. </form>
  24. </div>
  25. {{ end }}
  26. <div>
  27. <h3>Raw settings</h3>
  28. <p>
  29. You can save your current cookie values to quickly set your settings on other compatible instances,
  30. or if the current instance's cookies went expired.
  31. </p>
  32. <p>Invalid values will be ignored.</p>
  33. <form action="/settings/raw" method="post">
  34. <textarea name="raw" rows="10" cols="80">{{range CookieList}}
  35. {{.Key}}={{.Value}}{{end}}
  36. </textarea>
  37. <input type="submit" value="Set raw settings" />
  38. </form>
  39. </div>
  40. </details>
  41. <form action="/settings/reset-all" method="post">
  42. <input class="critical" type="submit" value="Reset all cookies/preferences" />
  43. </form>
  44. <hr />
  45. <h2 id="login">Login</h2>
  46. <p>Supported features (for now):</p>
  47. <ul>
  48. <li>Discovery page</li>
  49. <li>Landing page</li>
  50. <li>Like/Bookmark</li>
  51. </ul>
  52. <p>
  53. Log in with your Pixiv account's cookie to access features above.
  54. To learn how to obtain your cookie, please see
  55. <a href="https://pixivfe.pages.dev/obtaining-pixivfe-token/">the guide on obtaining your PixivFE token</a>.
  56. </p>
  57. <p>
  58. Keep in mind that logins will expire whenever the server is updated, so you
  59. may need to log in again if the server has been restarted recently.
  60. </p>
  61. <form action="/settings/token" method="post">
  62. <input type="text" name="token" autocomplete="off" />
  63. <input type="submit" value="Remember account cookie (until next server restart)" />
  64. </form>
  65. <hr />
  66. <h2>Logout</h2>
  67. <p>
  68. To securely end your session, click the 'Logout!' button. This will
  69. immediately remove your session token.
  70. </p>
  71. <form action="/settings/logout" method="post">
  72. <input type="submit" value="Logout!" />
  73. </form>
  74. <hr />
  75. <h2>Image proxy server</h2>
  76. <p>
  77. Choose how images are loaded in PixivFE by selecting either the built-in
  78. proxy or one of the provided external proxy servers. If you prefer, you can
  79. also specify a custom proxy server by entering its URL and clicking 'Use
  80. Custom Proxy'.
  81. </p>
  82. <div class="form-field">
  83. <form action="/settings/imageServer" method="post">
  84. <label>
  85. <input type="radio" name="image-proxy" required="true" value="" />
  86. No (use built-in proxy)
  87. </label>
  88. {{ range ProxyList }}
  89. <label>
  90. <input type="radio" name="image-proxy" required="true" value="{{.}}" />
  91. {{.}}
  92. </label>
  93. {{ end }}
  94. <input type="submit" value="Use selected proxy" />
  95. </form>
  96. <br />
  97. <form action="/settings/imageServer" method="post">
  98. <label for="image-proxy">
  99. Custom image proxy server
  100. <input type="text" name="image-proxy" required="true" placeholder="https://example.com" autocomplete="off" />
  101. </label>
  102. <input type="submit" value="Use custom proxy" />
  103. </form>
  104. </div>
  105. </div>