|
|
@ -1,105 +1,109 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="d-100"> |
|
|
|
<div class="d-100"> |
|
|
|
<v-container> |
|
|
|
<v-container class="d-flex"> |
|
|
|
<v-simple-table dense style="min-width: 600px;"> |
|
|
|
<v-spacer /> |
|
|
|
<thead> |
|
|
|
<div> |
|
|
|
<tr class=""> |
|
|
|
<v-simple-table dense style="min-width: 600px; width:auto; margin:0 auto"> |
|
|
|
<th class="caption grey--text"> |
|
|
|
<thead> |
|
|
|
View name |
|
|
|
<tr class=""> |
|
|
|
</th> |
|
|
|
<th class="caption grey--text"> |
|
|
|
<th class="caption grey--text"> |
|
|
|
View name |
|
|
|
View Link |
|
|
|
</th> |
|
|
|
</th> |
|
|
|
<th class="caption grey--text"> |
|
|
|
<th class="caption grey--text"> |
|
|
|
View Link |
|
|
|
Password |
|
|
|
</th> |
|
|
|
</th> |
|
|
|
<th class="caption grey--text"> |
|
|
|
<th class="caption grey--text"> |
|
|
|
Password |
|
|
|
Actions |
|
|
|
</th> |
|
|
|
</th> |
|
|
|
<th class="caption grey--text"> |
|
|
|
</tr> |
|
|
|
Actions |
|
|
|
</thead> |
|
|
|
</th> |
|
|
|
<tbody> |
|
|
|
</tr> |
|
|
|
<tr v-if="currentView"> |
|
|
|
</thead> |
|
|
|
<td class="font-weight-bold caption text-left"> |
|
|
|
<tbody> |
|
|
|
<v-icon v-if="viewIcons[currentView.view_type]" small :color="viewIcons[currentView.view_type].color"> |
|
|
|
<tr v-if="currentView"> |
|
|
|
{{ viewIcons[currentView.view_type].icon }} |
|
|
|
<td class="font-weight-bold caption text-left"> |
|
|
|
</v-icon> |
|
|
|
<v-icon v-if="viewIcons[currentView.view_type]" small :color="viewIcons[currentView.view_type].color"> |
|
|
|
|
|
|
|
{{ viewIcons[currentView.view_type].icon }} |
|
|
|
{{ currentView.view_name }} |
|
|
|
|
|
|
|
</td> |
|
|
|
|
|
|
|
<td class="caption text-left"> |
|
|
|
|
|
|
|
<nuxt-link :to="sharedViewUrl(currentView)"> |
|
|
|
|
|
|
|
{{ `${dashboardUrl}#${sharedViewUrl(currentView)}` }} |
|
|
|
|
|
|
|
</nuxt-link> |
|
|
|
|
|
|
|
</td> |
|
|
|
|
|
|
|
<td class="caption"> |
|
|
|
|
|
|
|
<template v-if="currentView.password"> |
|
|
|
|
|
|
|
<span>{{ currentView.showPassword ? currentView.password : '***************************' }}</span> |
|
|
|
|
|
|
|
<v-icon small @click="$set(currentView, 'showPassword' , !currentView.showPassword)"> |
|
|
|
|
|
|
|
{{ currentView.showPassword ? 'visibility_off' : 'visibility' }} |
|
|
|
|
|
|
|
</v-icon> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</td> |
|
|
|
|
|
|
|
<td class="caption"> |
|
|
|
|
|
|
|
<v-icon small @click="copyLink(currentView)"> |
|
|
|
|
|
|
|
mdi-content-copy |
|
|
|
|
|
|
|
</v-icon> |
|
|
|
|
|
|
|
<v-icon small @click="deleteLink(currentView.id)"> |
|
|
|
|
|
|
|
mdi-delete-outline |
|
|
|
|
|
|
|
</v-icon> |
|
|
|
|
|
|
|
</td> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr v-else> |
|
|
|
|
|
|
|
<td colspan="4" class="text-center caption info--text"> |
|
|
|
|
|
|
|
Current view is not shared! |
|
|
|
|
|
|
|
</td> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
<template v-if="allSharedLinks"> |
|
|
|
|
|
|
|
<tr v-for="link of viewsList" :key="link.id"> |
|
|
|
|
|
|
|
<td class="caption text-left"> |
|
|
|
|
|
|
|
<v-icon v-if="viewIcons[link.view_type]" small :color="viewIcons[link.view_type].color"> |
|
|
|
|
|
|
|
{{ viewIcons[link.view_type].icon }} |
|
|
|
|
|
|
|
</v-icon> |
|
|
|
</v-icon> |
|
|
|
|
|
|
|
|
|
|
|
{{ link.view_name }} |
|
|
|
{{ currentView.view_name }} |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
<td class="caption text-left"> |
|
|
|
<td class="caption text-left"> |
|
|
|
<nuxt-link :to="sharedViewUrl(link)"> |
|
|
|
<nuxt-link :to="sharedViewUrl(currentView)"> |
|
|
|
{{ `${dashboardUrl}#${sharedViewUrl(link)}` }} |
|
|
|
{{ `${dashboardUrl}#${sharedViewUrl(currentView)}` }} |
|
|
|
</nuxt-link> |
|
|
|
</nuxt-link> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
<td class="caption"> |
|
|
|
<td class="caption"> |
|
|
|
<template v-if="link.password"> |
|
|
|
<template v-if="currentView.password"> |
|
|
|
<span>{{ link.showPassword ? link.password : '***************************' }}</span> |
|
|
|
<span>{{ currentView.showPassword ? currentView.password : '***************************' }}</span> |
|
|
|
<v-icon small @click="$set(link, 'showPassword' , !link.showPassword)"> |
|
|
|
<v-icon small @click="$set(currentView, 'showPassword' , !currentView.showPassword)"> |
|
|
|
{{ link.showPassword ? 'visibility_off' : 'visibility' }} |
|
|
|
{{ currentView.showPassword ? 'visibility_off' : 'visibility' }} |
|
|
|
</v-icon> |
|
|
|
</v-icon> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
<td class="caption"> |
|
|
|
<td class="caption"> |
|
|
|
<v-icon small @click="copyLink(link)"> |
|
|
|
<v-icon small @click="copyLink(currentView)"> |
|
|
|
mdi-content-copy |
|
|
|
mdi-content-copy |
|
|
|
</v-icon> |
|
|
|
</v-icon> |
|
|
|
<v-icon small @click="deleteLink(link.id)"> |
|
|
|
<v-icon small @click="deleteLink(currentView.id)"> |
|
|
|
mdi-delete-outline |
|
|
|
mdi-delete-outline |
|
|
|
</v-icon> |
|
|
|
</v-icon> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
</template> |
|
|
|
|
|
|
|
</tbody> |
|
|
|
<tr v-else> |
|
|
|
</v-simple-table> |
|
|
|
<td colspan="4" class="text-center caption info--text"> |
|
|
|
<div class="mt-1 pl-2"> |
|
|
|
Current view is not shared! |
|
|
|
<v-switch |
|
|
|
</td> |
|
|
|
v-model="allSharedLinks" |
|
|
|
</tr> |
|
|
|
class="nc-switch-show-all" |
|
|
|
<template v-if="allSharedLinks"> |
|
|
|
hide-details |
|
|
|
<tr v-for="link of viewsList" :key="link.id"> |
|
|
|
> |
|
|
|
<td class="caption text-left"> |
|
|
|
<template #label> |
|
|
|
<v-icon v-if="viewIcons[link.view_type]" small :color="viewIcons[link.view_type].color"> |
|
|
|
<span class="caption"> Show all shared views of this table</span> |
|
|
|
{{ viewIcons[link.view_type].icon }} |
|
|
|
</template> |
|
|
|
</v-icon> |
|
|
|
</v-switch> |
|
|
|
|
|
|
|
|
|
|
|
{{ link.view_name }} |
|
|
|
|
|
|
|
</td> |
|
|
|
|
|
|
|
<td class="caption text-left"> |
|
|
|
|
|
|
|
<nuxt-link :to="sharedViewUrl(link)"> |
|
|
|
|
|
|
|
{{ `${dashboardUrl}#${sharedViewUrl(link)}` }} |
|
|
|
|
|
|
|
</nuxt-link> |
|
|
|
|
|
|
|
</td> |
|
|
|
|
|
|
|
<td class="caption"> |
|
|
|
|
|
|
|
<template v-if="link.password"> |
|
|
|
|
|
|
|
<span>{{ link.showPassword ? link.password : '***************************' }}</span> |
|
|
|
|
|
|
|
<v-icon small @click="$set(link, 'showPassword' , !link.showPassword)"> |
|
|
|
|
|
|
|
{{ link.showPassword ? 'visibility_off' : 'visibility' }} |
|
|
|
|
|
|
|
</v-icon> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</td> |
|
|
|
|
|
|
|
<td class="caption"> |
|
|
|
|
|
|
|
<v-icon small @click="copyLink(link)"> |
|
|
|
|
|
|
|
mdi-content-copy |
|
|
|
|
|
|
|
</v-icon> |
|
|
|
|
|
|
|
<v-icon small @click="deleteLink(link.id)"> |
|
|
|
|
|
|
|
mdi-delete-outline |
|
|
|
|
|
|
|
</v-icon> |
|
|
|
|
|
|
|
</td> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</tbody> |
|
|
|
|
|
|
|
</v-simple-table> |
|
|
|
|
|
|
|
<div class="mt-1 pl-2"> |
|
|
|
|
|
|
|
<v-switch |
|
|
|
|
|
|
|
v-model="allSharedLinks" |
|
|
|
|
|
|
|
class="nc-switch-show-all" |
|
|
|
|
|
|
|
hide-details |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<template #label> |
|
|
|
|
|
|
|
<span class="caption"> Show all shared views of this table</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</v-switch> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<v-spacer /> |
|
|
|
</v-container> |
|
|
|
</v-container> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|