Domain list: change the order of the elements.
This commit is contained in:
		
							parent
							
								
									e1c069c497
								
							
						
					
					
						commit
						06a52e6480
					
				
					 1 changed files with 59 additions and 42 deletions
				
			
		| 
						 | 
				
			
			@ -181,51 +181,68 @@ render :: forall m. State -> H.ComponentHTML Action () m
 | 
			
		|||
render { accepted_domains, my_domains, newDomainForm, askDomainTransferForm, deletion_modal }
 | 
			
		||||
  = Bulma.section_small
 | 
			
		||||
      [ case deletion_modal of
 | 
			
		||||
          Nothing -> Bulma.columns_
 | 
			
		||||
            [ Bulma.column_ [ Bulma.h3 "New domain", render_add_domain_form
 | 
			
		||||
                            , Bulma.hr
 | 
			
		||||
                            , Bulma.h3 "Get the ownership of a domain"
 | 
			
		||||
                            , Bulma.simple_quote """
 | 
			
		||||
                                Someone wants to give you (or share with you) the ownership of a domain.
 | 
			
		||||
                                Please enter the UUID of the transfer.
 | 
			
		||||
                                """
 | 
			
		||||
                            , render_ask_domain_transfer_form
 | 
			
		||||
                            , Bulma.hr
 | 
			
		||||
                            , Bulma.h3 "Share the ownership of a domain"
 | 
			
		||||
                            , Bulma.simple_quote """
 | 
			
		||||
                                Ask for a "share token" for your domain and give it to other users.
 | 
			
		||||
                                All the owners be able to make modifications to the domain.
 | 
			
		||||
                                """
 | 
			
		||||
                            , Bulma.hr
 | 
			
		||||
                            , Bulma.h3 "Transfer the ownership of a domain"
 | 
			
		||||
                            , Bulma.simple_quote """
 | 
			
		||||
                                Ask for a transfer token for your domain and give it to the new owner.
 | 
			
		||||
                                """
 | 
			
		||||
                            ]
 | 
			
		||||
            , Bulma.column_ [ Bulma.h3 "My domains"
 | 
			
		||||
                            , Bulma.simple_quote "You are the exclusive owner of the following domains."
 | 
			
		||||
                            , if A.length domains_i_exclusively_own > 0
 | 
			
		||||
                              then Bulma.table [] [ Bulma.table_header_owned_domains
 | 
			
		||||
                                                  , HH.tbody_ $ map owned_domain_row domains_i_exclusively_own
 | 
			
		||||
                                                  ]
 | 
			
		||||
                              else Bulma.p "No domain yet."
 | 
			
		||||
                            , Bulma.hr
 | 
			
		||||
                            , Bulma.h3 "Shared domains"
 | 
			
		||||
                            , Bulma.simple_quote """
 | 
			
		||||
                                The following domains are shared with other users.
 | 
			
		||||
                                In case you are the last owner, you can "unshare" it and gain exclusive ownership.
 | 
			
		||||
                                """
 | 
			
		||||
                            , if A.length domains_i_share > 0
 | 
			
		||||
                              then Bulma.table [] [ Bulma.table_header_shared_domains
 | 
			
		||||
                                                  , HH.tbody_ $ map shared_domain_row domains_i_share
 | 
			
		||||
                                                  ]
 | 
			
		||||
                              else Bulma.p "No domain yet."
 | 
			
		||||
                            ]
 | 
			
		||||
            ]
 | 
			
		||||
          Nothing -> HH.div_ [ Bulma.columns_ domain_line
 | 
			
		||||
                             , Bulma.hr
 | 
			
		||||
                             , Bulma.columns_ new_domain_line
 | 
			
		||||
                             , Bulma.hr
 | 
			
		||||
                             , Bulma.columns_ explanations_line
 | 
			
		||||
                             ]
 | 
			
		||||
          Just domain -> Bulma.modal "Deleting a domain"
 | 
			
		||||
            [warning_message domain] [modal_delete_button domain, modal_cancel_button]
 | 
			
		||||
      ]
 | 
			
		||||
  where
 | 
			
		||||
    c = Bulma.column_
 | 
			
		||||
 | 
			
		||||
    domain_line       = [ c render_my_domains,                  c render_my_shared_domains ]
 | 
			
		||||
    new_domain_line   = [ c render_new_domain,                  c render_gain_ownership ]
 | 
			
		||||
    explanations_line = [ c render_share_ownership_explanation, c render_transfer_ownership_explanation ]
 | 
			
		||||
 | 
			
		||||
    render_my_domains =
 | 
			
		||||
      [ Bulma.h3 "My domains"
 | 
			
		||||
      , Bulma.simple_quote "You are the exclusive owner of the following domains."
 | 
			
		||||
      , if A.length domains_i_exclusively_own > 0
 | 
			
		||||
        then Bulma.table [] [ Bulma.table_header_owned_domains
 | 
			
		||||
                            , HH.tbody_ $ map owned_domain_row domains_i_exclusively_own
 | 
			
		||||
                            ]
 | 
			
		||||
        else Bulma.p "No domain yet."
 | 
			
		||||
      ]
 | 
			
		||||
    render_my_shared_domains =
 | 
			
		||||
      [ Bulma.h3 "Shared domains"
 | 
			
		||||
      , Bulma.simple_quote """
 | 
			
		||||
          The following domains are shared with other users.
 | 
			
		||||
          In case you are the last owner, you can "unshare" it and gain exclusive ownership.
 | 
			
		||||
          """
 | 
			
		||||
      , if A.length domains_i_share > 0
 | 
			
		||||
        then Bulma.table [] [ Bulma.table_header_shared_domains
 | 
			
		||||
                            , HH.tbody_ $ map shared_domain_row domains_i_share
 | 
			
		||||
                            ]
 | 
			
		||||
        else Bulma.p "No domain yet."
 | 
			
		||||
      ]
 | 
			
		||||
    render_new_domain = [ Bulma.h3 "New domain", render_add_domain_form ]
 | 
			
		||||
 | 
			
		||||
    render_gain_ownership =
 | 
			
		||||
      [ Bulma.h3 "Get the ownership of a domain"
 | 
			
		||||
      , Bulma.simple_quote """
 | 
			
		||||
          Someone wants to give you (or share with you) the ownership of a domain.
 | 
			
		||||
          Please enter the UUID of the transfer.
 | 
			
		||||
          """
 | 
			
		||||
      , render_ask_domain_transfer_form
 | 
			
		||||
      ]
 | 
			
		||||
    render_share_ownership_explanation =
 | 
			
		||||
      [ Bulma.h3 "Share the ownership of a domain"
 | 
			
		||||
      , Bulma.simple_quote """
 | 
			
		||||
          Ask for a "share token" for your domain and give it to other users.
 | 
			
		||||
          All the owners be able to make modifications to the domain.
 | 
			
		||||
          """
 | 
			
		||||
      ]
 | 
			
		||||
 | 
			
		||||
    render_transfer_ownership_explanation =
 | 
			
		||||
      [ Bulma.h3 "Transfer the ownership of a domain"
 | 
			
		||||
      , Bulma.simple_quote """
 | 
			
		||||
          Ask for a transfer token for your domain and give it to the new owner.
 | 
			
		||||
          """
 | 
			
		||||
      ]
 | 
			
		||||
 | 
			
		||||
    modal_delete_button domain = Bulma.alert_btn "Delete the domain" (RemoveDomain domain)
 | 
			
		||||
    modal_cancel_button = Bulma.cancel_button CancelModal
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -278,7 +295,7 @@ render { accepted_domains, my_domains, newDomainForm, askDomainTransferForm, del
 | 
			
		|||
 | 
			
		||||
    render_ask_domain_transfer_form = HH.form
 | 
			
		||||
      [ HE.onSubmit AskDomainTransferAttempt ]
 | 
			
		||||
      [ Bulma.box_input "idTransferToken" "Transfer Token" "UUID of the domain"
 | 
			
		||||
      [ Bulma.box_input "idTransferToken" "Token" "UUID of the domain"
 | 
			
		||||
          AskDomainTransferUUIDInput
 | 
			
		||||
          askDomainTransferForm.uuid
 | 
			
		||||
      , Bulma.btn_validation_ "ask for a domain transfer"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue