Skip to content

Commit

Permalink
feat(configuration): disable inputs if not admin
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-IS authored Sep 12, 2023
2 parents c94e30a + 81b7b39 commit e7e20cb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/components/dao/settings-plans-billing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ export default {
nav.q-mt-xl.full-width.row.justify-end
q-btn.q-px-xl.rounded-border.text-bold.q-ml-xs(
:disable="!isAdmin"
:label="$t('configuration.settings-plans-billing.plan.cta')"
@click="state = STATES.UPDATING_PLAIN"
color="secondary"
Expand Down
9 changes: 5 additions & 4 deletions src/components/dao/settings-tokens.vue
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ export default {
label.h-label {{ $t('configuration.settings-tokens.tresury.form.name.label') }}
q-input.q-my-xs(
:debounce="200"
:disable="selectedDao.hasCustomToken"
:filled="selectedDao.hasCustomToken"
:disable="selectedDao.hasCustomToken || !isAdmin"
:filled="selectedDao.hasCustomToken || !isAdmin"
:placeholder="$t('configuration.settings-tokens.utility.form.name.placeholder')"
:rules="[rules.required]"
color="accent"
Expand All @@ -199,8 +199,8 @@ export default {
label.h-label {{ $t('configuration.settings-tokens.tresury.form.symbol.label') }}
q-input.q-my-xs(
:debounce="200"
:disable="selectedDao.hasCustomToken"
:filled="selectedDao.hasCustomToken"
:disable="selectedDao.hasCustomToken || !isAdmin"
:filled="selectedDao.hasCustomToken || !isAdmin"
:placeholder="$t('configuration.settings-tokens.utility.form.symbol.placeholder')"
:rules="[rules.required, rules.isTokenAvailable]"
dense
Expand All @@ -217,6 +217,7 @@ export default {
.col-12(:class="{ 'invisible': selectedDao.hasCustomToken }")
label.h-label {{ $t('configuration.settings-tokens.tresury.form.currency.label') }}
q-select.q-my-xs(
:disable="!isAdmin"
:options="currencies"
:rules="[rules.required]"
:style='{"min-height":"60px"}'
Expand Down
4 changes: 4 additions & 0 deletions src/components/dao/widget-circles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ widget(:title="$t('configuration.settings-structure.circles.title')" titleImage=
label.h-label {{ $t('configuration.settings-structure.circles.form.name.label') }}
q-input.q-my-xs(
:debounce="200"
:disable="!isAdmin"
:placeholder="$t('configuration.settings-structure.circles.form.name.placeholder')"
bg-color="white"
color="accent"
Expand All @@ -285,6 +286,7 @@ widget(:title="$t('configuration.settings-structure.circles.title')" titleImage=
label.h-label {{ $t('configuration.settings-structure.circles.form.description.label') }}
q-input.q-my-xs(
:debounce="200"
:disable="!isAdmin"
:input-style="{ 'resize': 'none' }"
:placeholder="$t('configuration.settings-structure.circles.form.description.placeholder')"
bg-color="white"
Expand All @@ -302,6 +304,7 @@ widget(:title="$t('configuration.settings-structure.circles.title')" titleImage=
nav.full-width.q-my-xl.row.justify-end
q-btn.col-auto.q-px-xl.rounded-border.text-bold.q-mr-xs(
:disable="!isAdmin"
:label="$t('configuration.settings-structure.circles.form.cancel')"
@click="state = STATES.WAITING"
color="white"
Expand All @@ -311,6 +314,7 @@ widget(:title="$t('configuration.settings-structure.circles.title')" titleImage=
unelevated
)
q-btn.col-auto.q-px-xl.rounded-border.text-bold.q-ml-xs(
:disable="!isAdmin"
:label="$t('configuration.settings-structure.circles.form.submit')"
@click="_createCircle({...circle})"
color="secondary"
Expand Down

0 comments on commit e7e20cb

Please sign in to comment.