<commit_before><template>

  <div>
    <div
      v-if="channelsAreAvailable"
      class="top-matter"
    >
      <div class="channels dib">
        <h1>{{ channelsTitle }}</h1>
        <p>{{ $tr('channelsAvailable', { channels: numberOfAvailableChannels }) }}</p>
      </div>
      <div class="filters dib">
        <k-select
          :options="languageFilterOptions"
          v-model="languageFilter"
          :label="$tr('languageFilterLabel')"
          :inline="true"
        />
        <k-filter-textbox
          :placeholder="$tr('titleFilterPlaceholder')"
          v-model="titleFilter"
          class="title-filter"
        />
      </div>
    </div>

    <k-linear-loader
      v-if="channelsAreLoading"
      type="indeterminate"
      :delay="false"
    />

    <!-- Similar code in channels-grid -->
    <div v-if="channelsAreAvailable">
      <div class="channel-list-header">
        {{ $tr('channelHeader') }}
      </div>

      <div class="channels-list">
        <channel-list-item
          v-for="channel in availableChannels"
          v-show="showChannel(channel)"
          :channel="channel"
          :key="channel.id"
          :onDevice="channelIsOnDevice(channel)"
          @clickselect="goToChannel(channel)"
          class="channel-list-item"
          :mode="channelListItemMode"
        />
      </div>
    </div>

    <section
      class="unlisted-channels"
      v-if="showUnlistedChannels"
    >
      <channel-token-modal
        v-if="showTokenModal"
        @closemodal="showTokenModal=false"
        @channelfound="goToChannel"
      />
      <span>{{ $tr('channelNotListedExplanation') }}&nbsp;</span>

      <k-button
        :text="$tr('channelTokenButtonLabel')"
        appearance="basic-link"
        name="showtokenmodal"
        @click="showTokenModal=true"
      />
    </section>
  </div>

</template>


<script>

  import kLinearLoader from 'kolibri.coreVue.components.kLinearLoader';
  import kSelect from 'kolibri.coreVue.components.kSelect';
  import immersiveFullScreen from 'kolibri.coreVue.components.immersiveFullScreen';
  import kFilterTextbox from 'kolibri.coreVue.components.kFilterTextbox';
  import kButton from 'kolibri.coreVue.components.kButton';
  import uniqBy from 'lodash/uniqBy';
  import channelTokenModal from '../available-channels-page/channel-token-modal';
  import subpageContainer from '../containers/subpage-container';
  import channelListItem from '../manage-content-page/channel-list-item';
  import {
    installedChannelList,
    installedChannelsWithResources,
    wizardState,
  } from '../../state/getters';
  import { showSelectContentPage } from '../../state/actions/contentWizardActions';<commit_msg>Move unlisted channels section to top of page<commit_after><template>

  <div>
    <div
      v-if="channelsAreAvailable"
      class="top-matter"
    >
      <div class="channels dib">
        <h1>{{ channelsTitle }}</h1>
        <p>{{ $tr('channelsAvailable', { channels: numberOfAvailableChannels }) }}</p>
      </div>
      <div class="filters dib">
        <k-select
          :options="languageFilterOptions"
          v-model="languageFilter"
          :label="$tr('languageFilterLabel')"
          :inline="true"
        />
        <k-filter-textbox
          :placeholder="$tr('titleFilterPlaceholder')"
          v-model="titleFilter"
          class="title-filter"
        />
      </div>
    </div>

    <section
      class="unlisted-channels"
      v-if="showUnlistedChannels"
    >
      <channel-token-modal
        v-if="showTokenModal"
        @closemodal="showTokenModal=false"
        @channelfound="goToChannel"
      />
      <span>{{ $tr('channelNotListedExplanation') }}&nbsp;</span>

      <k-button
        :text="$tr('channelTokenButtonLabel')"
        appearance="basic-link"
        name="showtokenmodal"
        @click="showTokenModal=true"
      />
    </section>

    <k-linear-loader
      v-if="channelsAreLoading"
      type="indeterminate"
      :delay="false"
    />

    <!-- Similar code in channels-grid -->
    <div v-if="channelsAreAvailable">
      <div class="channel-list-header">
        {{ $tr('channelHeader') }}
      </div>

      <div class="channels-list">
        <channel-list-item
          v-for="channel in availableChannels"
          v-show="showChannel(channel)"
          :channel="channel"
          :key="channel.id"
          :onDevice="channelIsOnDevice(channel)"
          @clickselect="goToChannel(channel)"
          class="channel-list-item"
          :mode="channelListItemMode"
        />
      </div>
    </div>
  </div>

</template>


<script>

  import kLinearLoader from 'kolibri.coreVue.components.kLinearLoader';
  import kSelect from 'kolibri.coreVue.components.kSelect';
  import immersiveFullScreen from 'kolibri.coreVue.components.immersiveFullScreen';
  import kFilterTextbox from 'kolibri.coreVue.components.kFilterTextbox';
  import kButton from 'kolibri.coreVue.components.kButton';
  import uniqBy from 'lodash/uniqBy';
  import channelTokenModal from '../available-channels-page/channel-token-modal';
  import subpageContainer from '../containers/subpage-container';
  import channelListItem from '../manage-content-page/channel-list-item';
  import {
    installedChannelList,
    installedChannelsWithResources,
    wizardState,
  } from '../../state/getters';
  import { showSelectContentPage } from '../../state/actions/contentWizardActions';
{'fraction_non_alphanumeric': 0.14275202354672553, 'fraction_numerical': 0.0007358351729212656, 'mean_word_length': 2.6637466307277626, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 67, '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': '4116111', 'n_tokens_mistral': 1641, 'n_tokens_neox': 1618, 'n_words': 256}