All user data for FoundryVTT. Includes worlds, systems, modules, and any asset in the "foundryuserdata" directory. Does NOT include the FoundryVTT installation itself.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
3.0 KiB

  1. import { SettingsMenuDorakoUX } from "./menu.js";
  2. export class OtherSettings extends SettingsMenuDorakoUX {
  3. static namespace = "other";
  4. static SETTINGS = [
  5. "enable-rolltype-indication",
  6. "enable-player-tags",
  7. "control-size",
  8. "sidebar-tab-size",
  9. "send-to-chat",
  10. "skin-crb-journal",
  11. ];
  12. rerenderChatMessages() {}
  13. static get settings() {
  14. return {
  15. "send-to-chat": {
  16. name: "pf2e-dorako-ux.settings.send-to-chat.name",
  17. hint: "pf2e-dorako-ux.settings.send-to-chat.hint",
  18. scope: "world",
  19. config: true,
  20. default: true,
  21. type: Boolean,
  22. requiresReload: false,
  23. },
  24. "skin-crb-journal": {
  25. name: "pf2e-dorako-ux.settings.skin-crb-journal.name",
  26. hint: "pf2e-dorako-ux.settings.skin-crb-journal.hint",
  27. scope: "world",
  28. type: Boolean,
  29. default: false,
  30. config: true,
  31. requiresReload: false,
  32. },
  33. "control-size": {
  34. name: "pf2e-dorako-ux.settings.control-size.name",
  35. hint: "pf2e-dorako-ux.settings.control-size.hint",
  36. scope: "client",
  37. type: Number,
  38. default: 36,
  39. range: {
  40. min: 18,
  41. max: 72,
  42. step: 1,
  43. },
  44. config: true,
  45. requiresReload: false,
  46. onChange: (value) => {
  47. const root = document.querySelector(":root").style;
  48. root.setProperty("--control-size", `${value}px`);
  49. },
  50. },
  51. "sidebar-tab-size": {
  52. name: "pf2e-dorako-ux.settings.sidebar-tab-size.name",
  53. hint: "pf2e-dorako-ux.settings.sidebar-tab-size.hint",
  54. scope: "client",
  55. type: Number,
  56. default: 22,
  57. range: {
  58. min: 14,
  59. max: 48,
  60. step: 1,
  61. },
  62. config: true,
  63. requiresReload: false,
  64. onChange: (value) => {
  65. const root = document.querySelector(":root").style;
  66. root.setProperty("--sidebar-tab-size", `${value}px`);
  67. },
  68. },
  69. "enable-player-tags": {
  70. name: "pf2e-dorako-ux.settings.enable-player-tags.name",
  71. hint: "pf2e-dorako-ux.settings.enable-player-tags.hint",
  72. scope: "client",
  73. config: true,
  74. default: true,
  75. type: Boolean,
  76. requiresReload: false,
  77. onChange: () => {
  78. const messages = game.messages.filter((m) => m instanceof ChatMessage);
  79. for (const message of messages) {
  80. ui.chat.updateMessage(message);
  81. }
  82. },
  83. },
  84. "enable-rolltype-indication": {
  85. name: "pf2e-dorako-ux.settings.enable-rolltype-indication.name",
  86. hint: "pf2e-dorako-ux.settings.enable-rolltype-indication.hint",
  87. scope: "client",
  88. type: Boolean,
  89. default: true,
  90. config: true,
  91. requiresReload: false,
  92. onChange: () => {
  93. const messages = game.messages.filter((m) => m instanceof ChatMessage);
  94. for (const message of messages) {
  95. ui.chat.updateMessage(message);
  96. }
  97. },
  98. },
  99. };
  100. }
  101. }