<commit_before>kd              = require 'kd'
React           = require 'kd-react'
List            = require 'app/components/list'
Encoder         = require 'htmlencode'


module.exports = class HomeTeamSettingsView extends React.Component


  onClickLogo: (event) ->

    @input.click()


  render: ->

    <div>
      <div className='HomeAppView--uploadLogo'>
        <TeamLogo team={@props.team} logopath={@props.logopath} callback={@bound 'onClickLogo'}/>
        <div className='uploadInputWrapper'>
          <GenericButton className={'custom-link-view primary'} title={'UPLOAD LOGO'} callback={@props.onClickLogo} />
          <GenericButton className={'custom-link-view remove'} title={'REMOVE'} callback={@props.onRemoveLogo}/>
          <input ref={(input) => @input = input} accept='image/*' className='kdinput file' type='file' onChange={@props.onUploadInput} />
        </div>
      </div>
      <form>
        <div className='hor-flex'>
          <TeamName title={@props.team.get 'title'} teamName={@props.teamName} callback={@props.onTeamNameChanged} />
          <TeamDomain slug={@props.team.get 'slug'} />
        </div>
        <ActionBar canEdit={@props.canEdit} callback={@props.onUpdate} />
      </form>
    </div>


ActionBar = ({ canEdit, callback }) ->

  className = unless canEdit then 'hidden' else ''
  className = kd.utils.curry 'custom-link-view primary fr', className

  <fieldset className='HomeAppView--ActionBar'>
    <GenericButton title={'DELETE TEAM'}, callback={kd.noop} />
    <GenericButton className={className} title={'SAVE CHANGES'} callback={callback}/>
  </fieldset>

<commit_msg>home/teamsettings: remove delete team button<commit_after>kd              = require 'kd'
React           = require 'kd-react'
List            = require 'app/components/list'
Encoder         = require 'htmlencode'


module.exports = class HomeTeamSettingsView extends React.Component


  onClickLogo: (event) ->

    @input.click()


  render: ->

    <div>
      <div className='HomeAppView--uploadLogo'>
        <TeamLogo team={@props.team} logopath={@props.logopath} callback={@bound 'onClickLogo'}/>
        <div className='uploadInputWrapper'>
          <GenericButton className={'custom-link-view primary'} title={'UPLOAD LOGO'} callback={@props.onClickLogo} />
          <GenericButton className={'custom-link-view remove'} title={'REMOVE'} callback={@props.onRemoveLogo}/>
          <input ref={(input) => @input = input} accept='image/*' className='kdinput file' type='file' onChange={@props.onUploadInput} />
        </div>
      </div>
      <form>
        <div className='hor-flex'>
          <TeamName title={@props.team.get 'title'} teamName={@props.teamName} callback={@props.onTeamNameChanged} />
          <TeamDomain slug={@props.team.get 'slug'} />
        </div>
        <ActionBar canEdit={@props.canEdit} callback={@props.onUpdate} />
      </form>
    </div>


ActionBar = ({ canEdit, callback }) ->

  className = unless canEdit then 'hidden' else ''
  className = kd.utils.curry 'custom-link-view primary fr', className

  <fieldset className='HomeAppView--ActionBar'>
    <GenericButton className={className} title={'SAVE CHANGES'} callback={callback}/>
  </fieldset>


{'fraction_non_alphanumeric': 0.15802545793231915, 'fraction_numerical': 0.0, 'mean_word_length': 3.2675496688741723, 'pattern_counts': {'":': 0, '<': 44, '<?xml version=': 0, '>': 52, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6719228', 'n_tokens_mistral': 965, 'n_tokens_neox': 963, 'n_words': 194}