Skip to content

Commit

Permalink
hide admin warning after proposal created
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Sep 25, 2024
1 parent 3e89da3 commit de82154
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/i18n/locales/bad/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,7 @@
"daoInfoWillRefresh": "bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad",
"daoNameAZ": "bad bad (bad → bad)",
"daoNameZA": "bad bad (bad → bad)",
"daoNotAdminProposalNotExecutable": "bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad",
"daoVetoerExplanation": "bad bad bad bad bad bad bad bad",
"daodaoLogo": "bad bad bad",
"daodaoWithVersion": "bad bad bad",
Expand Down Expand Up @@ -1052,7 +1053,6 @@
"nobleTariffApplied": "bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad",
"nominateContributorDescription": "bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad",
"none": "bad",
"notAdmin": "bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad bad",
"notInstalledWalletsTooltip": "bad bad bad bad bad bad bad bad",
"notMet": "bad bad",
"nothingFound": "bad bad",
Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/locales/dog/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@
"customActionDescription_wallet": "perform enie custym action",
"daoCreationProcessExplanation": "cre8ing ur da0 haz neber bin dis eezi:",
"daoInfoWillRefresh": "da0 infermashon may teek up 2 {{minutes}} minutes 2 updat on all peigez onse puppozal iz exacuted",
"daoNotAdminProposalNotExecutable": "yer da0 iz not da admin ov dis contracc. da puppozal wil not b execuuble wif dis iz da cace",
"daodaoLogo": "da0 da0 logo",
"daodaoWithVersion": "da0 da0 v{{version}}",
"daosLogo": "da0z Logo",
Expand Down Expand Up @@ -330,7 +331,6 @@
"noSubDaosYet": "no subda0z yit",
"noVote": "no",
"none": "none",
"notAdmin": "yer da0 iz not da admin ov dis contracc. da puppozal wil not b execuuble wif dis iz da cace",
"notMet": "not met",
"nothingFound": "nofink found ❤️",
"notificationsInInbox_one": "dere iz {{count}} open puppozal in ur inbox",
Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,7 @@
"daoInfoWillRefresh": "DAO information may take up to {{seconds}} seconds to update on all pages once proposal is executed.",
"daoNameAZ": "DAO name (A → Z)",
"daoNameZA": "DAO name (Z → A)",
"daoNotAdminProposalNotExecutable": "Your DAO is not the admin of this contract. The proposal will not be executable while this is the case.",
"daoRatingsDescription": "Once the submission window closes, the members of this DAO will be able to rate each submission. Choose when the ratings window closes, and add some guidelines for the raters.",
"daoStructureUnsupportedTooltip": "This DAO structure is not supported by the currently selected chain. Try changing the chain if you want to create this type of DAO.",
"daoVetoerExplanation": "A vetoer can veto proposals in the DAO.",
Expand Down Expand Up @@ -1240,7 +1241,6 @@
"nobleTariffApplied": "Noble applies a {{feePercent}} fee on {{tokenSymbol}} IBC transfers out of the chain, up to {{maxFee}} ${{tokenSymbol}}. This spend will cost {{fee}} ${{tokenSymbol}}, and the recipient will receive {{output}} ${{tokenSymbol}}.",
"nominateContributorDescription": "If you know of a contributor who deserves to be compensated but who did not submit a contribution this cycle, you can nominate them below. Doing so will allow them to be rated by the DAO members along with the rest of the contributors.",
"none": "None",
"notAdmin": "Your DAO is not the admin of this contract. The proposal will not be executable while this is the case.",
"notInstalledWalletsTooltip": "Wallets which do not seem to be installed.",
"notMemberForProposal": "You were not a member of {{daoName}} when this proposal was created, so you cannot vote on it.",
"notMet": "Not met",
Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,7 @@
"daoInfoWillRefresh": "La información de la DAO podría tomar hasta {{minutes}} minutos para actualizarce en todas las páginas una vez que la propuesta es ejecutada.",
"daoNameAZ": "Nombre del DAO (A → Z)",
"daoNameZA": "Nombre del DAO (Z → A)",
"daoNotAdminProposalNotExecutable": "Tu DAO no es el administrador de este contrato. La propuesta no será ejecutada mientras este sea el caso.",
"daoPaused": "La DAO está pausada. La governanza se reanudará en {{duration}}.",
"daoRatingsDescription": "Una vez que se cierre la ventana de presentación, los miembros de este DAO podrán calificar cada presentación. Elige cuándo se cierra la ventana de calificaciones y añade algunas pautas para los evaluadores.",
"daoStructureUnsupportedTooltip": "Esta estructura de DAO no es compatible con la cadena seleccionada actualmente. Intenta cambiar la cadena si deseas crear este tipo de DAO.",
Expand Down Expand Up @@ -1295,7 +1296,6 @@
"none": "Ninguno",
"notAMember": "No eres un miembro.",
"notAMemberYet": "Aún No eres un miembro.",
"notAdmin": "Tu DAO no es el administrador de este contrato. La propuesta no será ejecutada mientras este sea el caso.",
"notInstalledWalletsTooltip": "Billeteras que parecen no estar instaladas.",
"notMemberForProposal": "No eras miembro de {{daoName}} cuando se creó esta propuesta, por lo que no puedes votar en ella.",
"notMet": "No se cumple",
Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@
"creatingDao": "Création du DAO...",
"daoAddress": "DAO",
"daoInfoWillRefresh": "Les informations du DAO peuvent prendre jusqu'à {{minutes}} minutes pour être mises à jour sur toutes les pages une fois la proposition exécutée.",
"daoNotAdminProposalNotExecutable": "Votre DAO n'est pas l'administrateur de ce contrat. La proposition ne sera pas exécutable tant que ce sera le cas.",
"daoPaused": "Le DAO est en pause. La gouvernance reprendra dans {{durée}}.",
"daodaoBetaV": "dao dao <1>beta</1> v{{version}}",
"daodaoLogo": "Logo DAO DAO",
Expand Down Expand Up @@ -254,7 +255,6 @@
"none": "Aucun",
"notAMember": "Vous n'êtes pas un membre.",
"notAMemberYet": "Vous n'êtes pas encore un membre",
"notAdmin": "Votre DAO n'est pas l'administrateur de ce contrat. La proposition ne sera pas exécutable tant que ce sera le cas.",
"notMet": "Non atteint",
"nothingFound": "Rien trouvé.",
"numMembers_one": "{{count}} membres",
Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/locales/it/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
"copyWalletAddressTooltip": "Copia l'indirizzo del portafoglio",
"couldHaveMoreVotingPower": "Potresti avere più potere di voto.",
"daoAddress": "DAO",
"daoNotAdminProposalNotExecutable": "La tua DAO non è l'amministratore di questo contratto. La proposta non sarà eseguibile finchè sarà questo il caso.",
"daoPaused": "La DAO è in pausa. L'utilizzo verrà ripristinato in {{duration}}.",
"daodaoBetaV": "dao dao <1>beta</1> v{{version}}",
"daodaoLogo": "Il logo di DAO DAO",
Expand Down Expand Up @@ -229,7 +230,6 @@
"none": "Nessuno",
"notAMember": "Non sei un membro",
"notAMemberYet": "Non sei ancora un membro",
"notAdmin": "La tua DAO non è l'amministratore di questo contratto. La proposta non sarà eseguibile finchè sarà questo il caso.",
"notMet": "Non raggiunto",
"numMessages_one": "{{count}} messaggio",
"numMessages_other": "{{count}} messaggi",
Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/locales/ko/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@
"copyWalletAddressTooltip": "지갑 주소 복사",
"couldHaveMoreVotingPower": "더 많은 투표력을 가질 수 있습니다.",
"daoAddress": "DAO",
"daoNotAdminProposalNotExecutable": "귀하의 DAO는 이 계약의 관리자가 아닙니다. 이 경우 제안의 내용을 실행할 수 없습니다.",
"daoPaused": "DAO가 잠정 중단되었습니다. 거버넌스가 {{duration}} 후에 재개될 예정입니다.",
"daodaoBetaV": "dao dao <1>베타</1> v{{version}}",
"daodaoLogo": "DAO DAO 로고",
Expand Down Expand Up @@ -244,7 +245,6 @@
"none": "없습니다",
"notAMember": "회원이 아닙니다",
"notAMemberYet": "아직 회원이 아닙니다",
"notAdmin": "귀하의 DAO는 이 계약의 관리자가 아닙니다. 이 경우 제안의 내용을 실행할 수 없습니다.",
"notMet": "충족되지 않았습니다.",
"numMessages_one": "{{count}} 메세지",
"numMessages_other": "{{count}} 메세지",
Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/locales/pl/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"couldHaveMoreVotingPower": "Możesz mieć większą siłę głosu.",
"creatingDao": "Tworzenie Organizacji...",
"daoAddress": "Organizacja",
"daoNotAdminProposalNotExecutable": "Twoja Organizacja nie jest administratorem tego kontraktu. Ustawa nie będzie wykonywana w takim wypadku.",
"daoPaused": "Organizacja jest zapauzowana. Głosowanie będzie przywrócone w {{duration}}.",
"daodaoBetaV": "dao dao <1>beta</1> v{{version}}",
"daodaoLogo": "DAO DAO Logo",
Expand Down Expand Up @@ -248,7 +249,6 @@
"none": "Nic",
"notAMember": "Nie jesteś członkiem.",
"notAMemberYet": "Nie jesteś jeszcze członkiem.",
"notAdmin": "Twoja Organizacja nie jest administratorem tego kontraktu. Ustawa nie będzie wykonywana w takim wypadku.",
"notMet": "Nie osiągnięte",
"numMembers_one": "{{count}} członek",
"numMembers_other": "{{count}} członkowie",
Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/locales/zh-tw/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@
"creatingDao": "正在創立 DAO…",
"daoAddress": "DAO",
"daoInfoWillRefresh": "待議案執行後,這個 DAO 的資訊可能需要等 {{minutes}} 分鐘後才會在所有頁面上更新。",
"daoNotAdminProposalNotExecutable": "你的 DAO 並非此合約的管理員,只要一直如此這議案就不能被執行。",
"daoPaused": "DAO 已暫停,議政會等經過 {{duration}} 後恢復。",
"daodaoBetaV": "DAO DAO <1> 公測版 v{{version}}",
"daodaoLogo": "DAO DAO Logo",
Expand Down Expand Up @@ -253,7 +254,6 @@
"none": "",
"notAMember": "你不是成員",
"notAMemberYet": "你還不是成員",
"notAdmin": "你的 DAO 並非此合約的管理員,只要一直如此這議案就不能被執行。",
"notMet": "未滿足",
"nothingFound": "Nothing found.",
"numMembers_one": "{{count}} 個成員",
Expand Down
12 changes: 9 additions & 3 deletions packages/stateful/actions/core/actions/Migrate/Component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,15 @@ export const MigrateContractComponent: ActionComponent<MigrateOptions> = ({
</div>
</div>

{!!address && !!contractAdmin && contractAdmin !== address && (
<StatusCard content={t('info.notAdmin')} style="warning" />
)}
{isCreating &&
!!address &&
!!contractAdmin &&
contractAdmin !== address && (
<StatusCard
content={t('info.daoNotAdminProposalNotExecutable')}
style="warning"
/>
)}

<div className="flex flex-col gap-1">
<InputLabel name={t('form.migrateMessage')} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@ export const UpdateAdminComponent: ActionComponent<UpdateAdminOptions> = ({
</div>
</div>

{contractAdmin !== address && (
<StatusCard content={t('info.notAdmin')} style="warning" />
{isCreating && contractAdmin !== address && (
<StatusCard
content={t('info.daoNotAdminProposalNotExecutable')}
style="warning"
/>
)}
</>
)
Expand Down

0 comments on commit de82154

Please sign in to comment.