Browse Source

fix: move the community icons to spreadsheetNavDrawer.vue

Signed-off-by: Naveen MR <oof1lab@gmail.com>
pull/1884/head
Naveen MR 2 years ago
parent
commit
0a76da2c4c
  1. 103
      packages/nc-gui/components/ProjectTreeView.vue
  2. 12
      packages/nc-gui/components/project/spreadsheet/components/extras.vue
  3. 5
      packages/nc-gui/components/project/spreadsheet/components/spreadsheetNavDrawer.vue

103
packages/nc-gui/components/ProjectTreeView.vue

@ -17,7 +17,7 @@
>
{{ $store.getters["project/GtrProjectName"] }}
</h3>
<github-star-btn v-else />
<github-star-btn v-else/>
</div>
<v-navigation-drawer
ref="drawer"
@ -183,7 +183,8 @@
class="body-2 font-weight-medium"
v-on="on"
>
{{ $t("objects.tables")
{{
$t("objects.tables")
}}<template
v-if="item.children && item.children.length"
>
@ -210,7 +211,8 @@
v-if="item.type === 'tableDir'"
class="body-2 font-weight-medium"
>
{{ $t("objects.tables")
{{
$t("objects.tables")
}}<template
v-if="item.children && item.children.length"
>
@ -228,7 +230,7 @@
</template>
</v-list-item-title>
<v-spacer />
<v-spacer/>
<v-tooltip bottom>
<template #activator="{ on }">
@ -346,7 +348,7 @@
<span v-else class="caption">{{ child.name }}</span>
</v-list-item-title>
<template v-if="child.type === 'table'">
<v-spacer />
<v-spacer/>
<div class="action d-flex" @click.stop>
<v-menu>
<template #activator="{ on }">
@ -481,7 +483,7 @@
/>
</div>
<div class="pr-3 advance-menu d-none" :class="{ 'pl-3': !mini }">
<v-divider v-if="_isUIAllowed('treeViewProjectSettings')" />
<v-divider v-if="_isUIAllowed('treeViewProjectSettings')"/>
<v-list
v-if="_isUIAllowed('treeViewProjectSettings')"
@ -619,7 +621,7 @@
</v-tooltip>
</template>
</v-list>
<v-divider />
<v-divider/>
<v-list v-if="_isUIAllowed('previewAs') || previewAs" dense>
<v-list-item>
@ -676,10 +678,23 @@
</v-list>
</div>
<template v-if="_isUIAllowed('settings')">
<v-divider />
<div class="pt-3 pl-5 pr-3 d-flex align-center pb-2">
<v-divider/>
<div
v-t="['e:api-docs']"
class="caption pointer nc-docs pb-2 pl-5 pr-3 pt-2 d-flex align-center"
@click="openLink(apiLink)"
>
<v-icon small class="mr-2">
mdi-api
</v-icon>
{{ $t('title.apiDocs') }}
</div>
<template v-if="_isUIAllowed('settings')">
<div class="pl-5 pr-3 d-flex align-center pb-2">
<settings-modal>
<template #default="{ click }">
<div
@ -697,18 +712,9 @@
</div>
</template>
<div
v-t="['e:api-docs']"
class="caption pointer nc-docs pb-3 pl-5 pr-3 pt-2 d-flex align-center"
@click="openLink(apiLink)"
>
<v-icon small class="mr-2">
mdi-api
</v-icon>
{{ $t('title.apiDocs') }}
</div>
<v-divider />
<extras class="pl-1" />
<!-- <v-divider/>-->
<!-- <extras class="pl-1"/>-->
</div>
</v-navigation-drawer>
@ -776,7 +782,7 @@
<script>
/* eslint-disable */
import { mapMutations, mapGetters, mapActions } from "vuex";
import {mapMutations, mapGetters, mapActions} from "vuex";
import rightClickOptions from "../helpers/rightClickOptions";
import rightClickOptionsSub from "../helpers/rightClickOptionsSub";
@ -784,11 +790,11 @@ import icons from "../helpers/treeViewIcons";
import textDlgSubmitCancel from "./utils/dlgTextSubmitCancel";
import dlgLabelSubmitCancel from "./utils/dlgLabelSubmitCancel";
import { copyTextToClipboard } from "../helpers/xutils";
import {copyTextToClipboard} from "../helpers/xutils";
import DlgTableCreate from "@/components/utils/dlgTableCreate";
import DlgViewCreate from "@/components/utils/dlgViewCreate";
import SponsorMini from "@/components/sponsorMini";
import { validateTableName } from "~/helpers";
import {validateTableName} from "~/helpers";
import ExcelImport from "~/components/import/excelImport";
import draggable from "vuedraggable";
@ -831,9 +837,9 @@ export default {
commenter: "mdi-comment-account-outline",
},
rolesList: [
{ title: "editor" },
{ title: "commenter" },
{ title: "viewer" },
{title: "editor"},
{title: "commenter"},
{title: "viewer"},
],
showSqlClient: false,
nestedMenu: {},
@ -862,7 +868,7 @@ export default {
x: 0,
y: 0,
menuItem: null,
menu: [{ title: "Execute" }],
menu: [{title: "Execute"}],
icons,
tree: [],
active: [],
@ -906,7 +912,7 @@ export default {
},
}),
computed: {
apiLink(){
apiLink() {
return new URL(`/api/v1/db/meta/projects/${this.projectId}/swagger`, this.$store.state.project.projectInfo && this.$store.state.project.projectInfo.ncSiteUrl)
},
previewAs: {
@ -1051,7 +1057,7 @@ export default {
name: "App Store",
key: `appStore`,
};
item._nodes = { env: "_noco" };
item._nodes = {env: "_noco"};
item._nodes.type = "appStore";
this.$store.dispatch("tabs/ActAddTab", item);
}
@ -1092,7 +1098,7 @@ export default {
name: `${this.$t("title.teamAndAuth")} `,
key: `roles`,
};
item._nodes = { env: "_noco" };
item._nodes = {env: "_noco"};
item._nodes.type = "roles";
this.$store.dispatch("tabs/ActAddTab", item);
}
@ -1108,7 +1114,7 @@ export default {
name: `${this.$t("title.metaMgmt")}`,
key: `disableOrEnableModel`,
};
item._nodes = { env: "_noco" };
item._nodes = {env: "_noco"};
item._nodes.type = "disableOrEnableModel";
this.$store.dispatch("tabs/ActAddTab", item);
}
@ -1332,12 +1338,12 @@ export default {
(n) => n.type === `${this.$route.query.type}Dir`
);
await this.addTab(
{ ...(node || this.listViewArr[0]) },
{...(node || this.listViewArr[0])},
false,
true
);
} else {
await this.addTab({ ...this.listViewArr[0] }, false, true);
await this.addTab({...this.listViewArr[0]}, false, true);
}
}
} catch (error) {
@ -1515,7 +1521,7 @@ export default {
dbAlias: item._nodes.dbAlias,
},
func,
{ tn: item.name },
{tn: item.name},
]);
if (result && result.data) {
copyTextToClipboard(result.data, "selection");
@ -1523,7 +1529,7 @@ export default {
copyTextToClipboard("Example String", "selection");
}
let sqlClientNode = { ...item._nodes };
let sqlClientNode = {...item._nodes};
let newItem = {
_nodes: sqlClientNode,
};
@ -1833,7 +1839,7 @@ export default {
dbAlias: item._nodes.dbAlias,
},
"viewRead",
{ view_name: item._nodes.view_name },
{view_name: item._nodes.view_name},
]);
await this.$store.dispatch("sqlMgr/ActSqlOpPlus", [
@ -1942,7 +1948,8 @@ export default {
this.loadDefaultTabs(true);
// this.loadRoles();
},
beforeCreate() {},
beforeCreate() {
},
mounted() {
// this.setBorderWidth();
// this.setEvents();
@ -2021,9 +2028,9 @@ export default {
}
/deep/
.v-list-group
.v-list-group__header
.v-list-item__icon.v-list-group__header__append-icon {
.v-list-group
.v-list-group__header
.v-list-item__icon.v-list-group__header__append-icon {
min-width: auto;
}
@ -2045,16 +2052,16 @@ export default {
}
/deep/
.nc-table-list-filter.theme--light.v-text-field
> .v-input__control
> .v-input__slot:before {
.nc-table-list-filter.theme--light.v-text-field
> .v-input__control
> .v-input__slot:before {
border-top-color: rgba(0, 0, 0, 0.12) !important;
}
/deep/
.nc-table-list-filter.theme--dark.v-text-field
> .v-input__control
> .v-input__slot:before {
.nc-table-list-filter.theme--dark.v-text-field
> .v-input__control
> .v-input__slot:before {
border-top-color: rgba(255, 255, 255, 0.12) !important;
}

12
packages/nc-gui/components/project/spreadsheet/components/extras.vue

@ -31,20 +31,20 @@
dense
>
<v-list-item>
<div class="d-flex justify-space-between d-100 pr-2">
<v-icon v-t="['e:community:discord']" class="mr-1" size="22" :color="textColors[0]" @click="open('https://discord.gg/5RgZmkW')">
<div class="justify-space-between d-100 pr-2">
<v-icon v-t="['e:community:discord']" size="22" :color="textColors[0]" @click="open('https://discord.gg/5RgZmkW')">
mdi-discord
</v-icon>
<v-icon v-t="['e:community:discourse']" class="mr-1 discourse" size="22" :color="textColors[0]" @click="open('https://community.nocodb.com/')">
<v-icon v-t="['e:community:discourse']" class=" discourse" size="22" :color="textColors[0]" @click="open('https://community.nocodb.com/')">
mdi-discourse
</v-icon>
<v-icon v-t="['e:community:reddit']" class="mr-1" size="22" color="#ff4600" @click="open('https://www.reddit.com/r/NocoDB/')">
<v-icon v-t="['e:community:reddit']" size="22" color="#ff4600" @click="open('https://www.reddit.com/r/NocoDB/')">
mdi-reddit
</v-icon>
<v-icon v-t="['e:community:twitter']" class="mr-1" size="22" :color="textColors[1]" @click="open('https://twitter.com/NocoDB')">
<v-icon v-t="['e:community:twitter']" size="22" :color="textColors[1]" @click="open('https://twitter.com/NocoDB')">
mdi-twitter
</v-icon>
<v-icon v-t="['e:community:book-demo']" class="mr-1" size="22" :color="textColors[3]" @click="open('https://calendly.com/nocodb-meeting')">
<v-icon v-t="['e:community:book-demo']" size="22" :color="textColors[3]" @click="open('https://calendly.com/nocodb-meeting')">
mdi-calendar-month
</v-icon>
</div>

5
packages/nc-gui/components/project/spreadsheet/components/spreadsheetNavDrawer.vue

@ -270,7 +270,10 @@
</v-icon>
<!-- <extras />-->
<sponsor-mini nav />
<v-divider/>
<extras class="pl-1"/>
<!-- <sponsor-mini nav />-->
</div>
<!--<div class="text-center">
<v-hover >

Loading…
Cancel
Save