panel-screen.vue 1.2 KB
Newer Older
1
<template>
2
3
4
  <aside class="bg-white border-r">
    <div class="sticky top-0 left-0">
      <div class="flex items-center mb-2 border-b">
5
        <router-link
6
          class="flex items-center flex-grow p-2 text-sm text-blue-600 transition border-r hover:bg-blue-600 hover:text-white focus:ring hover:border-blue-600"
7
          :to="{ name: 'ScreenCreateComponent', params: { idWorkspace: idWorkspace, idForm: idForm } }"
8
9
        >
          <icon name="add" />
10
          <span class="ml-2">{{ $t('screen.add') }}</span>
11
        </router-link>
12
13
14
15
        <button
          class="flex items-center p-2 text-red-600 transition hover:bg-red-600 focus:ring hover:text-red-100"
          @click="showConfirm = true"
        >
16
17
          <icon name="trash" />
        </button>
18
19
20
21
22
23
24
        <confirm
          v-if="showConfirm"
          :title="$t('screen.label.delete')"
          :confirmLabel="$t('button.delete')"
          @cancel="showConfirm = false"
          @confirm="deleteScreen"
        />
25
      </div>
26
      <dnd-list :screenList="screenList" :idScreen="idScreen" @update="updateScreenIndex" @selectScreen="selectScreen" :key="dndKey" />
27
28
    </div>
  </aside>
29
30
</template>

31
<script lang="ts" src="./panel-screen.component.ts" />