<commit_before>import ServerboardView from 'app/components/project'
import store from 'app/utils/store'
import { projects_update_info } from 'app/actions/project'

var Project=store.connect({
  state(state){
    if (state.project.current != "/" && localStorage.last_project != state.project.current){
      localStorage.last_project = state.project.current
    }
    return {
      shortname: state.project.current,
      project: state.project.project,
      projects_count: (state.project.projects || []).length
    }
  },
  handlers: (dispatch, props) => ({
    goto(url){
      console.log(url)
      store.goto(url.pathname, url.state)
    },
    onAdd(){ dispatch( store.set_modal("project.add") ) },
    onUpdate(){ dispatch( projects_update_info(props.params.project) ) }
  }),
  store_enter: (state, props) => [
    () => projects_update_info(state.project.current),
  ],
  store_exit: (state, props) => [
    () => projects_update_info(),
  ],
  subscriptions: ["service.updated"],
  watch: ["shortname"]
}, ServerboardView)<commit_msg>Fix goto simple sections at sidebar<commit_after>import ServerboardView from 'app/components/project'
import store from 'app/utils/store'
import { projects_update_info } from 'app/actions/project'

var Project=store.connect({
  state(state){
    if (state.project.current != "/" && localStorage.last_project != state.project.current){
      localStorage.last_project = state.project.current
    }
    return {
      shortname: state.project.current,
      project: state.project.project,
      projects_count: (state.project.projects || []).length
    }
  },
  handlers: (dispatch, props) => ({
    goto(url){
      console.log(url)
      store.goto(url.pathname || url, url.state)
    },
    onAdd(){ dispatch( store.set_modal("project.add") ) },
    onUpdate(){ dispatch( projects_update_info(props.params.project) ) }
  }),
  store_enter: (state, props) => [
    () => projects_update_info(state.project.current),
  ],
  store_exit: (state, props) => [
    () => projects_update_info(),
  ],
  subscriptions: ["service.updated"],
  watch: ["shortname"]
}, ServerboardView)
{'fraction_non_alphanumeric': 0.15652993870815654, 'fraction_numerical': 0.0, 'mean_word_length': 3.8227272727272728, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '4728986', 'n_tokens_mistral': 653, 'n_tokens_neox': 650, 'n_words': 115}