Browse Source

feat: shared view list style update

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/679/head
Pranav C 3 years ago
parent
commit
006426ec8c
  1. 40
      packages/nc-gui/components/project/spreadsheet/components/sharedViewsList.vue

40
packages/nc-gui/components/project/spreadsheet/components/sharedViewsList.vue

@ -1,19 +1,19 @@
<template> <template>
<v-card max-width="900"> <v-card max-width="900">
<v-container> <v-container>
<v-simple-tables dense> <v-simple-table dense style="min-width: 600px;">
<thead> <thead>
<tr> <tr class="">
<th class="caption"> <th class="caption grey--text">
View name View name
</th> </th>
<th class="caption"> <th class="caption grey--text">
View Link View Link
</th> </th>
<th class="caption"> <th class="caption grey--text">
Password Password
</th> </th>
<th class="caption"> <th class="caption grey--text">
Actions Actions
</th> </th>
</tr> </tr>
@ -50,12 +50,12 @@
</td> </td>
</tr> </tr>
<tr> <tr v-else>
<td colspan="4" class="text-center caption text--grey"> <td colspan="4" class="text-center caption info--text">
Other views Current view is not shared!
</td> </td>
</tr> </tr>
<template> <template v-if="allSharedLinks">
<tr v-for="link of viewsList" :key="link.id"> <tr v-for="link of viewsList" :key="link.id">
<td class="caption text-left"> <td class="caption text-left">
<v-icon v-if="viewIcons[link.view_type]" small :color="viewIcons[link.view_type].color"> <v-icon v-if="viewIcons[link.view_type]" small :color="viewIcons[link.view_type].color">
@ -88,7 +88,18 @@
</tr> </tr>
</template> </template>
</tbody> </tbody>
</v-simple-tables> </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>
</v-container> </v-container>
</v-card> </v-card>
</template> </template>
@ -102,7 +113,8 @@ export default {
data: () => ({ data: () => ({
viewsList: null, viewsList: null,
currentView: null, currentView: null,
viewIcons viewIcons,
allSharedLinks: false
}), }),
computed: { computed: {
origin() { origin() {
@ -152,4 +164,8 @@ export default {
th, td { th, td {
padding: 0 5px; padding: 0 5px;
} }
/deep/ .nc-switch-show-all .v-input--selection-controls__input {
transform: scale(0.5) !important;
}
</style> </style>

Loading…
Cancel
Save