Skip to content

Commit 994f55f

Browse files
author
david
committed
Merge remote-tracking branch 'upstream/master' into add-osnap-plugin
2 parents 6c0a1fd + f83c1c1 commit 994f55f

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

src/components/SettingsVotingBlock.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const { form } = useFormSpaceSettings(props.context);
3232
:label="$t('settings.quorum.label')"
3333
:hint="$t('settings.quorum.information')"
3434
:disabled="isViewOnly"
35-
placeholder="1000"
35+
placeholder="0"
3636
type="number"
3737
@update:model-value="value => (form.voting.quorum = Number(value))"
3838
/>

src/components/SpaceCreateWarnings.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const props = defineProps<{
55
space: ExtendedSpace;
66
validationFailed: boolean;
77
isValidAuthor: boolean;
8+
isValidSpace: boolean;
89
validationName: string;
910
containsShortUrl: boolean;
1011
}>();
@@ -43,6 +44,12 @@ const strategySymbolsString = computed(() => {
4344
<div class="mb-4 space-y-2">
4445
<MessageWarningHibernated v-if="space.hibernated" :space="space" />
4546

47+
<BaseMessageBlock v-else-if="!isValidSpace" level="warning">
48+
Proposal creation is blocked due to invalid space settings. Please contact
49+
a space admin or if you are an admin head over to the settings page and
50+
save them again.
51+
</BaseMessageBlock>
52+
4653
<MessageWarningGnosisNetwork
4754
v-else-if="isGnosisAndNotSpaceNetwork"
4855
:space="space"

src/composables/useProposals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function useProposals() {
5454

5555
const { apolloQuery } = useApolloQuery();
5656
async function getUserVotedProposalIds(voter: string, proposals: string[]) {
57-
if (!voter || !proposals) return;
57+
if (!voter || !proposals?.length) return;
5858
const votes = await apolloQuery(
5959
{
6060
query: USER_VOTED_PROPOSAL_IDS_QUERY,

src/views/SpaceCreate.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ const { isGnosisAndNotSpaceNetwork } = useGnosis(props.space);
4747
const { isSnapshotLoading } = useSnapshot();
4848
const { apolloQuery, queryLoading } = useApolloQuery();
4949
const { containsShortUrl } = useShortUrls();
50+
const { isValid: isValidSpaceSettings, populateForm } =
51+
useFormSpaceSettings('settings');
5052
5153
const {
5254
form,
@@ -413,6 +415,8 @@ onBeforeRouteLeave(async () => {
413415
resetForm();
414416
}
415417
});
418+
419+
onMounted(() => populateForm(props.space));
416420
</script>
417421

418422
<template>
@@ -433,6 +437,7 @@ onBeforeRouteLeave(async () => {
433437
:space="space"
434438
:validation-failed="hasAuthorValidationFailed"
435439
:is-valid-author="isValidAuthor"
440+
:is-valid-space="isValidSpaceSettings"
436441
:validation-name="validationName"
437442
:contains-short-url="formContainsShortUrl"
438443
data-testid="create-proposal-connect-wallet-warning"
@@ -505,7 +510,8 @@ onBeforeRouteLeave(async () => {
505510
hasAuthorValidationFailed ||
506511
validationLoading ||
507512
isGnosisAndNotSpaceNetwork ||
508-
space.hibernated
513+
space.hibernated ||
514+
!isValidSpaceSettings
509515
"
510516
primary
511517
:data-testid="

0 commit comments

Comments
 (0)