Browse Source

feat: more context menu

pull/6384/head
sreehari jayaraj 10 months ago
parent
commit
f6c7c5aaa4
  1. 2
      packages/nc-gui/components/dashboard/TreeView/ViewsNode.vue
  2. 20
      packages/nc-gui/components/smartsheet/grid/Table.vue
  3. 19
      packages/nocodb-sdk/src/lib/Api.ts

2
packages/nc-gui/components/dashboard/TreeView/ViewsNode.vue

@ -293,7 +293,7 @@ function onRef(el: HTMLElement) {
<NcDivider />
<template v-if="!vModel.is_default">
<NcMenuItem class="!text-red-500" l @click.stop="onDelete">
<NcMenuItem class="!text-red-500 !hover:bg-red-50" @click.stop="onDelete">
<GeneralIcon icon="delete" class="text-sm nc-view-delete-icon" />
<div class="-ml-0.25">Delete</div>
</NcMenuItem>

20
packages/nc-gui/components/smartsheet/grid/Table.vue

@ -1545,7 +1545,7 @@ const expandAndLooseFocus = (row: Row, col: Record<string, any>) => {
Clear
</div>
</a-menu-item>
<NcDivider class="!m-0" />
<a-menu-item
v-if="contextMenuTarget && (selectedRange.isSingleCell() || selectedRange.isSingleRow())"
@click="confirmDeleteRow(contextMenuTarget.row)"
@ -1556,14 +1556,16 @@ const expandAndLooseFocus = (row: Row, col: Record<string, any>) => {
{{ $t('activity.deleteRow') }}
</div>
</a-menu-item>
<a-menu-item v-else-if="contextMenuTarget && deleteRangeOfRows" @click="deleteSelectedRangeOfRows">
<div v-e="['a:row:delete']" class="nc-project-menu-item text-red-600">
<GeneralIcon icon="delete" class="text-gray-500 text-error" />
<!-- Delete Rows -->
Delete rows
</div>
</a-menu-item>
<div v-else-if="contextMenuTarget && deleteRangeOfRows">
<NcDivider class="!m-0" />
<a-menu-item @click="deleteSelectedRangeOfRows">
<div v-e="['a:row:delete']" class="nc-project-menu-item text-red-600">
<GeneralIcon icon="delete" class="text-gray-500 text-error" />
<!-- Delete Rows -->
Delete rows
</div>
</a-menu-item>
</div>
</a-menu>
</template>
</a-dropdown>

19
packages/nocodb-sdk/src/lib/Api.ts

@ -2903,6 +2903,25 @@ export class HttpClient<SecurityDataType = unknown> {
export class Api<
SecurityDataType extends unknown
> extends HttpClient<SecurityDataType> {
userProfile = {
/**
* @description Update User Profile
*
* @tags User profile
* @name Update
* @summary Update User Profile
* @request PATCH:/api/v1/user/profile
* @response `200` `UserType`
*/
update: (data: UserType, params: RequestParams = {}) =>
this.request<UserType, any>({
path: `/api/v1/user/profile`,
method: 'PATCH',
body: data,
type: ContentType.Json,
...params,
}),
};
auth = {
/**
* @description Create a new user with provided email and password and first user is marked as super admin.

Loading…
Cancel
Save