<commit_before><template>

  <div>

    <template v-if="isSuperuser">
      <component v-if="pageState.wizardState.shown" :is="wizardComponent"/>

      <div v-if="pageState.taskList.length" class="main alert-bg">
        <task-status
          :type="pageState.taskList[0].type"
          :status="pageState.taskList[0].status"
          :percentage="pageState.taskList[0].percentage"
          :id="pageState.taskList[0].id"
        />
      </div>

      <div class="main light-bg">
        <div class="table-title">
          <h1 class="page-title">{{$tr('title')}}</h1>
          <div class="button-wrapper" v-if="!pageState.taskList.length">
            <icon-button
              :text="$tr('import')"
              class="button"
              @click="startImportWizard"
              :primary="true">
              <mat-svg category="content" name="add"/>
            </icon-button>
            <icon-button
              :text="$tr('export')"
              class="button"
              :primary="true"
              @click="startExportWizard">
              <ion-svg name="ios-upload-outline"/>
            </icon-button>
          </div>
        </div>
        <hr>
        <p class="core-text-alert" v-if="!sortedChannels.length">{{$tr('noChannels')}}</p>
        <table>
          <tbody>
            <tr v-for="channel in sortedChannels">
              <th scope="row" class="table-cell" width="70%">
                <span class="channel-name">
                  {{ channel.title }}
                </span>
              </th>
            </tr>
          </tbody>
        </table>
      </div>
    </template>
    <auth-message v-else :details="$tr('notAdmin')" />

  </div>

</template>


<script>

  const isSuperuser = require('kolibri.coreVue.vuex.getters').isSuperuser;
  const actions = require('../../state/actions');
  const ContentWizardPages = require('../../constants').ContentWizardPages;
  const orderBy = require('lodash/orderBy');

  module.exports = {
    $trNameSpace: 'manageContentState',
    $trs: {
      title: 'My channels',
      import: 'Import',
      export: 'Export',
      noChannels: 'No channels installed',
      notAdmin: 'You need to sign in as the Device Owner to manage content. (This is the account originally created in the Setup Wizard.)',
    },<commit_msg>Fix auth-message in content-management-page<commit_after><template>

  <div>

    <template v-if="isSuperuser">
      <component v-if="pageState.wizardState.shown" :is="wizardComponent"/>

      <div v-if="pageState.taskList.length" class="main alert-bg">
        <task-status
          :type="pageState.taskList[0].type"
          :status="pageState.taskList[0].status"
          :percentage="pageState.taskList[0].percentage"
          :id="pageState.taskList[0].id"
        />
      </div>

      <div class="main light-bg">
        <div class="table-title">
          <h1 class="page-title">{{$tr('title')}}</h1>
          <div class="button-wrapper" v-if="!pageState.taskList.length">
            <icon-button
              :text="$tr('import')"
              class="button"
              @click="startImportWizard"
              :primary="true">
              <mat-svg category="content" name="add"/>
            </icon-button>
            <icon-button
              :text="$tr('export')"
              class="button"
              :primary="true"
              @click="startExportWizard">
              <ion-svg name="ios-upload-outline"/>
            </icon-button>
          </div>
        </div>
        <hr>
        <p class="core-text-alert" v-if="!sortedChannels.length">{{$tr('noChannels')}}</p>
        <table>
          <tbody>
            <tr v-for="channel in sortedChannels">
              <th scope="row" class="table-cell" width="70%">
                <span class="channel-name">
                  {{ channel.title }}
                </span>
              </th>
            </tr>
          </tbody>
        </table>
      </div>
    </template>
    <auth-message v-else :header="$tr('notAdminHeader')" :details="$tr('notAdminDetails')" />

  </div>

</template>


<script>

  const isSuperuser = require('kolibri.coreVue.vuex.getters').isSuperuser;
  const actions = require('../../state/actions');
  const ContentWizardPages = require('../../constants').ContentWizardPages;
  const orderBy = require('lodash/orderBy');

  module.exports = {
    $trNameSpace: 'manageContentState',
    $trs: {
      title: 'My channels',
      import: 'Import',
      export: 'Export',
      noChannels: 'No channels installed',
      notAdminHeader: 'You need to sign in as the Device Owner to manage content',
      notAdminDetails: 'The Device Owner is the account originally created in the Setup Wizard',
    },
{'fraction_non_alphanumeric': 0.16444726273515112, 'fraction_numerical': 0.0033819488480236735, 'mean_word_length': 2.0275111964171466, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 81, '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': '6204590', 'n_tokens_mistral': 1428, 'n_tokens_neox': 1392, 'n_words': 259}