Skip to content

Commit

Permalink
fix: disabled space votes privacy on testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Jan 18, 2024
1 parent 503cd95 commit 2509e1b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
13 changes: 10 additions & 3 deletions src/components/BaseModalSelectItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,28 @@ defineProps<{
title: string;
tag?: string;
description?: string;
disabled?: boolean;
}>();
</script>

<template>
<BaseBlock
:class="[
'cursor-pointer transition-colors hover:border-skin-text',
{ '!border-skin-link': selected }
'transition-colors hover:border-skin-text cursor-pointer',
{
'!border-skin-link': selected,
'hover:!border-skin-border cursor-not-allowed': disabled
}
]"
>
<div class="relative inset-y-0 flex items-center">
<div :class="['w-full text-left', { 'pr-[44px]': selected }]">
<div class="mb-2 flex items-center gap-2">
<h3
:class="['mb-0 truncate', { 'mt-0': description }]"
:class="[
'mb-0 truncate',
{ 'mt-0': description, 'text-skin-text': disabled }
]"
v-text="title"
/>
<BasePill>{{ tag }}</BasePill>
Expand Down
9 changes: 8 additions & 1 deletion src/components/ModalVotingPrivacy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ defineProps<{
const emit = defineEmits(['close', 'update:selected']);
const { env } = useApp();
const types = ['shutter'];
function select(id) {
Expand All @@ -31,8 +33,13 @@ function select(id) {
:title="$t('privacy.none')"
/>
</a>
<a v-for="(type, key) in types" :key="key" @click="select(type)">
<a
v-for="(type, key) in types"
:key="key"
@click="env === 'demo' ? null : select(type)"
>
<BaseModalSelectItem
:disabled="env === 'demo'"
:selected="type === selected"
:title="$t(`privacy.${type}.label`)"
:description="$t(`privacy.${type}.description`)"
Expand Down

0 comments on commit 2509e1b

Please sign in to comment.