logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://anongit.hacktivis.me/git/pleroma-fe.git/

virtual_directives_tab.vue (2539B)


  1. <script src="./virtual_directives_tab.js"></script>
  2. <template>
  3. <div class="setting-item list-editor variables-editor">
  4. <label
  5. class="list-select-label"
  6. for="variables-selector"
  7. >
  8. {{ $t('settings.style.themes3.editor.variables.label') }}
  9. {{ ' ' }}
  10. </label>
  11. <Select
  12. id="variables-selector"
  13. v-model="selectedVirtualDirectiveId"
  14. class="list-select"
  15. size="20"
  16. >
  17. <option
  18. v-for="(p, index) in modelValue"
  19. :key="p.name"
  20. :value="index"
  21. >
  22. {{ p.name }}
  23. </option>
  24. </Select>
  25. <SelectMotion
  26. class="list-select-movement"
  27. :model-value="modelValue"
  28. :selected-id="selectedVirtualDirectiveId"
  29. :get-add-value="getNewVirtualDirective"
  30. @update:modelValue="e => emit('update:modelValue', e)"
  31. @update:selectedId="e => selectedVirtualDirectiveId = e"
  32. />
  33. <div class="list-edit-area">
  34. <div class="variable-selector">
  35. <label
  36. class="variable-name-label"
  37. for="variables-selector"
  38. >
  39. {{ $t('settings.style.themes3.editor.variables.name_label') }}
  40. {{ ' ' }}
  41. </label>
  42. <input
  43. v-model="selectedVirtualDirective.name"
  44. class="input"
  45. >
  46. <label
  47. class="variable-type-label"
  48. for="variables-selector"
  49. >
  50. {{ $t('settings.style.themes3.editor.variables.type_label') }}
  51. {{ ' ' }}
  52. </label>
  53. <Select
  54. v-model="selectedVirtualDirectiveValType"
  55. >
  56. <option value="shadow">
  57. {{ $t('settings.style.themes3.editor.variables.type_shadow') }}
  58. </option>
  59. <option value="color">
  60. {{ $t('settings.style.themes3.editor.variables.type_color') }}
  61. </option>
  62. <option value="generic">
  63. {{ $t('settings.style.themes3.editor.variables.type_generic') }}
  64. </option>
  65. </Select>
  66. </div>
  67. <ShadowControl
  68. v-if="selectedVirtualDirectiveValType === 'shadow'"
  69. v-model="draftVirtualDirective"
  70. :static-vars="staticVars"
  71. :compact="true"
  72. />
  73. <ColorInput
  74. v-if="selectedVirtualDirectiveValType === 'color'"
  75. v-model="draftVirtualDirective"
  76. name="virtual-directive-color"
  77. :fallback="computeColor(draftVirtualDirective)"
  78. :label="$t('settings.style.themes3.editor.variables.virtual_color')"
  79. :hide-optional-checkbox="true"
  80. />
  81. </div>
  82. </div>
  83. </template>