Skip to content

Commit

Permalink
fix: disabled space votes privacy on testnet (#4518)
Browse files Browse the repository at this point in the history
* fix: disabled space votes privacy on testnet

* fix: fix cursor
  • Loading branch information
wa0x6e committed Jan 20, 2024
1 parent c3d3b72 commit a011287
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 hover:!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 a011287

Please sign in to comment.