@selfcommunity/react-ui 0.7.0-alpha.340 → 0.7.0-alpha.341

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,13 +45,11 @@ const classes = {
45
45
  };
46
46
  const Root = (0, styles_1.styled)(material_1.Dialog, {
47
47
  name: constants_1.PREFIX,
48
- slot: 'Root',
49
- overridesResolver: (props, styles) => styles.root
48
+ slot: 'Root'
50
49
  })(() => ({}));
51
50
  const LayerTransitionRoot = (0, styles_1.styled)(material_1.Slide, {
52
51
  name: constants_1.PREFIX,
53
- slot: 'LayerTransitionRoot',
54
- overridesResolver: (props, styles) => styles.layerTransitionRoot
52
+ slot: 'LayerTransitionRoot'
55
53
  })(({ theme }) => ({}));
56
54
  const COMPOSER_INITIAL_STATE = {
57
55
  id: null,
@@ -365,7 +363,7 @@ function Composer(inProps) {
365
363
  medias: medias.map((m) => m.id),
366
364
  categories: _categories.filter((item, index) => _categories.indexOf(item) === index)
367
365
  };
368
- if (preferences[react_core_1.SCPreferences.ADDONS_POLLS_ENABLED].value && hasPoll) {
366
+ if ((preferences[react_core_1.SCPreferences.ADDONS_POLLS_ENABLED].value || react_core_1.UserUtils.isStaff(scUserContext.user)) && hasPoll) {
369
367
  data.poll = poll;
370
368
  }
371
369
  if (preferences[react_core_1.SCPreferences.ADDONS_POST_GEOLOCATION_ENABLED].value && location) {
@@ -43,13 +43,11 @@ const classes = {
43
43
  };
44
44
  const Root = styled(Dialog, {
45
45
  name: PREFIX,
46
- slot: 'Root',
47
- overridesResolver: (props, styles) => styles.root
46
+ slot: 'Root'
48
47
  })(() => ({}));
49
48
  const LayerTransitionRoot = styled(Slide, {
50
49
  name: PREFIX,
51
- slot: 'LayerTransitionRoot',
52
- overridesResolver: (props, styles) => styles.layerTransitionRoot
50
+ slot: 'LayerTransitionRoot'
53
51
  })(({ theme }) => ({}));
54
52
  const COMPOSER_INITIAL_STATE = {
55
53
  id: null,
@@ -363,7 +361,7 @@ export default function Composer(inProps) {
363
361
  medias: medias.map((m) => m.id),
364
362
  categories: _categories.filter((item, index) => _categories.indexOf(item) === index)
365
363
  };
366
- if (preferences[SCPreferences.ADDONS_POLLS_ENABLED].value && hasPoll) {
364
+ if ((preferences[SCPreferences.ADDONS_POLLS_ENABLED].value || UserUtils.isStaff(scUserContext.user)) && hasPoll) {
367
365
  data.poll = poll;
368
366
  }
369
367
  if (preferences[SCPreferences.ADDONS_POST_GEOLOCATION_ENABLED].value && location) {