Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
samuveth committed Nov 17, 2023
1 parent f99f05d commit a5eb1dc
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
12 changes: 7 additions & 5 deletions src/components/MessageWarningHibernated.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ onMounted(async () => {
</script>

<template>
<BaseMessageBlock v-if="space.hibernated" level="warning" is-responsive>
{{ $t('create.errorSpaceHibernated') }}
<BaseMessageBlock v-if="space.hibernated" level="warning-red" is-responsive>
{{
isAuthorized
? $t('create.errorSpaceHibernatedAdmin')
: $t('create.errorSpaceHibernatedUsers')
}}
<BaseLink
v-if="isAuthorized"
link="https://docs.snapshot.org/user-guides/spaces/space-hibernation"
Expand All @@ -32,9 +36,7 @@ onMounted(async () => {

<p v-if="isAuthorized" class="mt-3">
<router-link :to="{ name: 'spaceSettings' }">
<BaseButton>
{{ $t('reactivateSpace') }}
</BaseButton>
<BaseButton> Go to Settings </BaseButton>
</router-link>
</p>
</BaseMessageBlock>
Expand Down
9 changes: 7 additions & 2 deletions src/components/SpaceSettingsMessageHibernated.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { ExtendedSpace } from '@/helpers/interfaces';
defineProps<{
space: ExtendedSpace;
isViewOnly: boolean;
isSending: boolean;
isValid: boolean;
}>();
Expand All @@ -25,7 +24,13 @@ onMounted(() => {
{{ $t('settings.reactivatingHibernatedSpace.disabledInformation') }}
</div>

<BaseButton :loading="isSending" :disabled="!isValid" class="mt-3 whitespace-nowrap" @click="emit('reactivateSpace')">
<BaseButton
primary
:loading="isSending"
:disabled="!isValid"
class="mt-3 whitespace-nowrap"
@click="emit('reactivateSpace')"
>
{{ $t('reactivateSpace') }}
</BaseButton>
</BaseMessageBlock>
Expand Down
5 changes: 3 additions & 2 deletions src/locales/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@
"markdown": "Styling with Markdown is supported",
"errorGettingSnapshot": "We encountered an error while fetching the snapshot block number which is needed to calculate your voting power. Please try again later.",
"errorTimeInPast": "Entered time is in the past. Please select a future time.",
"errorSpaceHibernated": "This space has been hibernated due to a lack of activity, and proposals creation has been disabled until the space is reactivated by an admin."
"errorSpaceHibernatedAdmin": "Admins your attention is required. This space has been hibernated due to a lack of activity, and as a result, proposal creation is currently disabled. To re-enable your space, please go to the settings page and click \"Reactivate\".",
"errorSpaceHibernatedUsers": "This space has been hibernated due to a lack of activity. As a result, the creation of proposals has been temporarily disabled. To resume your ability to create proposals, the space needs to be reactivated by an admin. Please check back later or contact your space admin for further information."
},
"delegates": {
"header": "Delegates",
Expand Down Expand Up @@ -539,7 +540,7 @@
},
"reactivatingHibernatedSpace": {
"title": "Reactivating hibernated space",
"information": "Space Admins: Your space is currently in hibernation due to six months of inactivity. To re-enable proposal creation, please click the button below to reactivate your space. There are no penalties for hibernation, but the space will remain inactive for proposal creation until reactivation by an admin.",
"information": "Your space is currently in hibernation due to six months of inactivity. To re-enable proposal creation, please click the button below to reactivate your space. There are no penalties for hibernation, but the space will remain inactive for proposal creation until reactivation by an admin.",
"disabledInformation": "Your space contains invalid settings since your last update. Fix the errors below and your space will be reactivated automatically upon save."
}
},
Expand Down
1 change: 0 additions & 1 deletion src/views/SpaceProposals.vue
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ watch(spaceProposals, () => {

<BaseNoResults v-else-if="spaceProposals.length < 1" />
<div v-else class="mb-3 space-y-3">
<MessageWarningHibernated v-if="space.hibernated" :space="space" />
<template v-for="(proposal, i) in spaceProposals" :key="i">
<BaseBlock slim class="transition-colors">
<ProposalsItem
Expand Down

0 comments on commit a5eb1dc

Please sign in to comment.