<commit_before><template>
  <div class="h-panel">
    <router-link to="/user/tokens" class="h-card-group users">
      <template v-if="userToken.id">
        <img v-if="userToken.photo_100" :src="userToken.photo_100" :alt="userToken.last_name" :title="userToken.last_name">
        <div v-else class="no-image"></div>
        <div class="h-name">{{ userToken.first_name + ' ' + userToken.last_name }}</div>
        <a class="h-clear" @click.prevent="clearSelectedUserToken()" title="Убрать"></a>
      </template>
      <template v-else>
        <div class="no-image"></div>
        <div class="h-name">Выберите пользователя</div>
      </template>
    </router-link>
    <router-link to="/groups" class="h-card-group groups">
      <template v-if="group.id">
        <img v-if="group.photo_100" :src="group.photo_100" :alt="group.name" :title="group.name">
        <div v-else class="no-image"></div>
        <div class="h-name">{{ group.name }}</div>
        <a class="h-clear" @click.prevent="clearSelectedGroup()" title="Убрать"></a>
      </template>
      <template v-else>
        <div class="no-image"></div>
        <div class="h-name">Выберите группу</div>
      </template>
    </router-link>
  </div>
</template>

<script>
export default {
  computed: {
    group () {
      return this.$store.state.groups.selected
    },
    userToken () {
      return this.$store.state.userTokens.selected
    }
  },
  methods: {
    clearSelectedUserToken () {

    },
    clearSelectedGroup () {
      this.$store.dispatch('clearSelectedGroup')
    }
  }
}
</script>

<style lang="scss" scoped>
.h-panel {
  display: flex;
  align-items: center;
}

.h-card-group {
  display: flex;
  flex-direction: row;
  max-width: 250px;
  min-width: 150px;
  background: #fff;
  height: 35px;
  align-items: center;
  cursor: pointer;
  padding: 0 10px 0 5px;
  box-shadow: 0 0 8px 1px #989898;
  position: relative;
  text-decoration: none;
  transition: .2s;
  &:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #fff !important;
    box-shadow: 0 0 2px 0;
    > .h-name {
      color: #fff;
    }
    > .h-clear {
      display: block;
    }
  }
  > img {
    border-radius: 50%;
    max-height: 27px;
  }
  > .no-image {
    height: 27px;
    width: 27px;
    border: 1px solid #d2d2d2;
    border-radius: 50%;
  }
  &.users {
    margin-right: 15px;
  }
}

.h-name {
  position: relative;
  align-items: center;
  text-indent: 14px;
  color: #525252;
  font-family: monospace;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  &::before {
    content: "";
    position: absolute;
    background: #7d7d7d;
    top: 0;
    bottom: 0;
    left: 7px;
    width: 1px;
  }
}

.h-clear {
  display: none;
  position: absolute;
  right: 5px;
  top: 9px;
  width: 18px;
  height: 18px;
  opacity: 0.3;
  &:hover {
    opacity: 1;
  }
  &::before, &::after {
    position: absolute;
    left: 8px;
    content: ' ';
    height: 18px;
    width: 2px;
    background-color: #fff;
  }
  &:before {
    transform: rotate(45deg);
  }
  &:after {
    transform: rotate(-45deg);
  }
}
</style><commit_msg>Added cron button (header)<commit_after><template>
  <div class="h-header">
    <div class="h-panel">
      <router-link to="/user/tokens" class="h-card-group users">
        <template v-if="userToken.id">
          <img v-if="userToken.photo_100" :src="userToken.photo_100" :alt="userToken.last_name" :title="userToken.last_name">
          <div v-else class="no-image"></div>
          <div class="h-name">{{ userToken.first_name + ' ' + userToken.last_name }}</div>
          <a class="h-clear" @click.prevent="clearSelectedUserToken()" title="Убрать"></a>
        </template>
        <template v-else>
          <div class="no-image"></div>
          <div class="h-name">Выберите токен</div>
        </template>
      </router-link>
      <router-link to="/groups" class="h-card-group groups">
        <template v-if="group.id">
          <img v-if="group.photo_100" :src="group.photo_100" :alt="group.name" :title="group.name">
          <div v-else class="no-image"></div>
          <div class="h-name">{{ group.name }}</div>
          <a class="h-clear" @click.prevent="clearSelectedGroup()" title="Убрать"></a>
        </template>
        <template v-else>
          <div class="no-image"></div>
          <div class="h-name">Выберите группу</div>
        </template>
      </router-link>
    </div>
    <div class="h-buttons">
      <el-button @click="routeCron()" size="mini" icon="el-icon-setting" />
    </div>
  </div>
</template>

<script>
export default {
  computed: {
    group () {
      return this.$store.state.groups.selected
    },
    userToken () {
      return this.$store.state.userTokens.selected
    }
  },
  methods: {
    clearSelectedUserToken () {

    },
    clearSelectedGroup () {
      this.$store.dispatch('clearSelectedGroup')
    },
    routeCron () {
      this.$router.push({ name: 'cron' })
    }
  }
}
</script>

<style lang="scss" scoped>
.h-header {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.h-panel {
  display: flex;
  align-items: center;
}

.h-card-group {
  display: flex;
  flex-direction: row;
  max-width: 250px;
  min-width: 150px;
  background: #fff;
  height: 35px;
  align-items: center;
  cursor: pointer;
  padding: 0 10px 0 5px;
  box-shadow: 0 0 8px 1px #989898;
  position: relative;
  text-decoration: none;
  transition: .2s;
  &:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #fff !important;
    box-shadow: 0 0 2px 0;
    > .h-name {
      color: #fff;
    }
    > .h-clear {
      display: block;
    }
  }
  > img {
    border-radius: 50%;
    max-height: 27px;
  }
  > .no-image {
    height: 27px;
    width: 27px;
    border: 1px solid #d2d2d2;
    border-radius: 50%;
  }
  &.users {
    margin-right: 15px;
  }
}

.h-name {
  position: relative;
  align-items: center;
  text-indent: 14px;
  color: #525252;
  font-family: monospace;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  &::before {
    content: "";
    position: absolute;
    background: #7d7d7d;
    top: 0;
    bottom: 0;
    left: 7px;
    width: 1px;
  }
}

.h-clear {
  display: none;
  position: absolute;
  right: 5px;
  top: 9px;
  width: 18px;
  height: 18px;
  opacity: 0.3;
  &:hover {
    opacity: 1;
  }
  &::before, &::after {
    position: absolute;
    left: 8px;
    content: ' ';
    height: 18px;
    width: 2px;
    background-color: #fff;
  }
  &:before {
    transform: rotate(45deg);
  }
  &:after {
    transform: rotate(-45deg);
  }
}

.h-buttons {
  display: flex;
}
</style>
{'fraction_non_alphanumeric': 0.17466323596185865, 'fraction_numerical': 0.028606023914030575, 'mean_word_length': 2.531801175841796, 'pattern_counts': {'":': 0, '<': 92, '<?xml version=': 0, '>': 100, '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': '1864335', 'n_tokens_mistral': 2616, 'n_tokens_neox': 2461, 'n_words': 496}