REST Service for POPCORN - ILIAS
alex
2025-08-13 c7bb3d470433e1722212d3819cf3676fe4c0c155
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<script setup>
 
import {reindex, apiTokenValid, deleteApiToken, routerBase} from "../lib/api"
 
async function doReindex () {
   await reindex()
   location.reload()
}
 
</script>
 
<template>
 
   <div class="header">
      <div>Globus-ILIAS-REST</div>
      <div>|</div>
      <RouterLink :to="`${routerBase}/ui/user`">Users</RouterLink>
      <RouterLink :to="`${routerBase}/ui/kurs`">Courses</RouterLink>
      <div style="flex-grow: 1" />
      <div>
         <button type="button" title="reindex search index" @click="doReindex">♻</button>
      </div>
      <div v-if="apiTokenValid">
         <button type="button" @click="deleteApiToken()">logout</button>
      </div>
   </div>
 
</template>
 
<style scoped lang="stylus">
 
.header
   color #ccc
   background-color #555
   padding .33em .66em
   display flex;
   gap 1em
 
   a
      color #ddd
      text-decoration none;
      &:hover
         color #eee
 
</style>