<commit_before>import Taro, { Component } from '@tarojs/taro'
import { View, Navigator, Image, Text, Ad } from '@tarojs/components'

import './about.less'

class About extends Component {

  config = {
    navigationBarTitleText: 'About'
  }

  constructor(props) {
    super(props)
    this.state = {
      loadAd: true
    }
  }

  componentWillReceiveProps (nextProps) {
    console.log(this.props, nextProps)
  }

  componentWillMount() {
  }

  componentDidMount() {
  }

  componentWillUnmount () { }

  componentDidShow () { }

  componentDidHide () { }

  logout() {

    Taro.showModal({
      content: 'Are you sure?',
      showCancel: true,
      cancelText: 'No',
      cancelColor: '#7f7f7f',
      confirmText: 'Yeah',
      confirmColor: '#2d8cf0',
      success(res) {
        if (res.confirm) {
          Taro.setStorageSync('Authorization', '')
          Taro.setStorageSync('userInfo', null)
          Taro.navigateBack()
        } else if (res.cancel) {
          console.log('用户点击取消')
        }
      }
    })

  }

  loadError(event) {
    this.setState({
      loadAd: false
    })
    console.log(event.detail)
  }

  render () {
    const { loadAd } = this.state
    let api = 'https://api.github.com/repos/huangjianke/Gitter'
    let url = '/pages/repo/repo?url=' + decodeURI(api)
    return (
      <View className='content'>
        <Image mode='aspectFit'
               className='logo'
               src={require('../../assets/images/logo.png')}/>
        <Text className='version'>
          Gitter v1.2.0
        </Text>
        <Navigator url={url}>
          <Text className='link'>
            https://github.com/huangjianke/Gitter
          </Text>
        </Navigator>
        <View className='logout' onClick={this.logout.bind(this)}>
          Logout
        </View>
        {
          loadAd && (<commit_msg>修改版本号<commit_after>import Taro, { Component } from '@tarojs/taro'
import { View, Navigator, Image, Text, Ad } from '@tarojs/components'

import './about.less'

class About extends Component {

  config = {
    navigationBarTitleText: 'About'
  }

  constructor(props) {
    super(props)
    this.state = {
      loadAd: true
    }
  }

  componentWillReceiveProps (nextProps) {
    console.log(this.props, nextProps)
  }

  componentWillMount() {
  }

  componentDidMount() {
  }

  componentWillUnmount () { }

  componentDidShow () { }

  componentDidHide () { }

  logout() {

    Taro.showModal({
      content: 'Are you sure?',
      showCancel: true,
      cancelText: 'No',
      cancelColor: '#7f7f7f',
      confirmText: 'Yeah',
      confirmColor: '#2d8cf0',
      success(res) {
        if (res.confirm) {
          Taro.setStorageSync('Authorization', '')
          Taro.setStorageSync('userInfo', null)
          Taro.navigateBack()
        } else if (res.cancel) {
          console.log('用户点击取消')
        }
      }
    })

  }

  loadError(event) {
    this.setState({
      loadAd: false
    })
    console.log(event.detail)
  }

  render () {
    const { loadAd } = this.state
    let api = 'https://api.github.com/repos/huangjianke/Gitter'
    let url = '/pages/repo/repo?url=' + decodeURI(api)
    return (
      <View className='content'>
        <Image mode='aspectFit'
               className='logo'
               src={require('../../assets/images/logo.png')}/>
        <Text className='version'>
          Gitter v1.2.5
        </Text>
        <Navigator url={url}>
          <Text className='link'>
            https://github.com/huangjianke/Gitter
          </Text>
        </Navigator>
        <View className='logout' onClick={this.logout.bind(this)}>
          Logout
        </View>
        {
          loadAd && (
{'fraction_non_alphanumeric': 0.1444805194805195, 'fraction_numerical': 0.00487012987012987, 'mean_word_length': 2.0731504571903576, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 4, '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': '1330990', 'n_tokens_mistral': 1217, 'n_tokens_neox': 1193, 'n_words': 208}