File tree Expand file tree Collapse file tree 4 files changed +16
-3
lines changed Expand file tree Collapse file tree 4 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ const { form } = useFormSpaceSettings(props.context);
32
32
:label =" $t('settings.quorum.label')"
33
33
:hint =" $t('settings.quorum.information')"
34
34
:disabled =" isViewOnly"
35
- placeholder =" 1000 "
35
+ placeholder =" 0 "
36
36
type =" number"
37
37
@update:model-value =" value => (form.voting.quorum = Number(value))"
38
38
/>
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ const props = defineProps<{
5
5
space: ExtendedSpace ;
6
6
validationFailed: boolean ;
7
7
isValidAuthor: boolean ;
8
+ isValidSpace: boolean ;
8
9
validationName: string ;
9
10
containsShortUrl: boolean ;
10
11
}>();
@@ -43,6 +44,12 @@ const strategySymbolsString = computed(() => {
43
44
<div class =" mb-4 space-y-2" >
44
45
<MessageWarningHibernated v-if =" space.hibernated" :space =" space" />
45
46
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
+
46
53
<MessageWarningGnosisNetwork
47
54
v-else-if =" isGnosisAndNotSpaceNetwork"
48
55
:space =" space"
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ export function useProposals() {
54
54
55
55
const { apolloQuery } = useApolloQuery ( ) ;
56
56
async function getUserVotedProposalIds ( voter : string , proposals : string [ ] ) {
57
- if ( ! voter || ! proposals ) return ;
57
+ if ( ! voter || ! proposals ?. length ) return ;
58
58
const votes = await apolloQuery (
59
59
{
60
60
query : USER_VOTED_PROPOSAL_IDS_QUERY ,
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ const { isGnosisAndNotSpaceNetwork } = useGnosis(props.space);
47
47
const { isSnapshotLoading } = useSnapshot ();
48
48
const { apolloQuery, queryLoading } = useApolloQuery ();
49
49
const { containsShortUrl } = useShortUrls ();
50
+ const { isValid : isValidSpaceSettings, populateForm } =
51
+ useFormSpaceSettings (' settings' );
50
52
51
53
const {
52
54
form,
@@ -413,6 +415,8 @@ onBeforeRouteLeave(async () => {
413
415
resetForm ();
414
416
}
415
417
});
418
+
419
+ onMounted (() => populateForm (props .space ));
416
420
</script >
417
421
418
422
<template >
@@ -433,6 +437,7 @@ onBeforeRouteLeave(async () => {
433
437
:space =" space"
434
438
:validation-failed =" hasAuthorValidationFailed"
435
439
:is-valid-author =" isValidAuthor"
440
+ :is-valid-space =" isValidSpaceSettings"
436
441
:validation-name =" validationName"
437
442
:contains-short-url =" formContainsShortUrl"
438
443
data-testid =" create-proposal-connect-wallet-warning"
@@ -505,7 +510,8 @@ onBeforeRouteLeave(async () => {
505
510
hasAuthorValidationFailed ||
506
511
validationLoading ||
507
512
isGnosisAndNotSpaceNetwork ||
508
- space.hibernated
513
+ space.hibernated ||
514
+ !isValidSpaceSettings
509
515
"
510
516
primary
511
517
:data-testid ="
You can’t perform that action at this time.
0 commit comments