logo

pleroma-fe

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

unit_setting.vue (1198B)


  1. <template>
  2. <span
  3. v-if="matchesExpertLevel"
  4. class="UnitSetting"
  5. >
  6. <label
  7. :for="path"
  8. class="size-label"
  9. >
  10. <slot />
  11. </label>
  12. {{ ' ' }}
  13. <span class="no-break">
  14. <input
  15. :id="path"
  16. class="input number-input"
  17. type="number"
  18. :step="step"
  19. :disabled="disabled"
  20. :min="min || 0"
  21. :value="stateValue"
  22. @change="updateValue"
  23. >
  24. <Select
  25. :id="path"
  26. :model-value="stateUnit"
  27. :disabled="disabled"
  28. class="unit-input unstyled"
  29. @change="updateUnit"
  30. >
  31. <option
  32. v-for="option in units"
  33. :key="option"
  34. :value="option"
  35. >
  36. {{ getUnitString(option) }}
  37. </option>
  38. </Select>
  39. </span>
  40. {{ ' ' }}
  41. <ModifiedIndicator
  42. :changed="isChanged"
  43. :onclick="reset"
  44. />
  45. </span>
  46. </template>
  47. <script src="./unit_setting.js"></script>
  48. <style lang="scss">
  49. .UnitSetting {
  50. .no-break {
  51. display: inline-block;
  52. }
  53. .number-input {
  54. max-width: 6.5em;
  55. text-align: right;
  56. }
  57. .unit-input,
  58. .unit-input select {
  59. min-width: 4em;
  60. width: auto;
  61. }
  62. }
  63. </style>