Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions enum/modals/NotionDatabase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export enum DatabaseModal {
SELECT_PROPERTY_OPTION_NAME = "select-property-option-name-action",
PROPERTY_TYPE_TITLE = "title",
OVERFLOW_MENU_ACTION = "create-notion-database-overflow-menu-action-id",
Comment thread
Sayan4444 marked this conversation as resolved.
Outdated
OVERFLOW_MENU_TEXT = "Create Database",
OVERFLOW_MENU_TEXT_CREATE_DB = "Create Database",
OVERFLOW_MENU_ACTION_CREATE_DB = "create-notion-database-overflow-menu-action-id",
OVERFLOW_CHANGE_WORKSPACE_ACTION = "change-notion-workspace-overflow-menu-action-id",
OVERFLOW_CHANGE_WORKSPACE_TEXT = "Change Workspace"
OVERFLOW_CHANGE_WORKSPACE_TEXT = "Change Workspace",
}
10 changes: 5 additions & 5 deletions src/handlers/ExecuteBlockActionHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -805,8 +805,9 @@ export class ExecuteBlockActionHandler {
const OverFlowActions = [
DatabaseModal.OVERFLOW_MENU_ACTION.toString(),
Comment thread
Sayan4444 marked this conversation as resolved.
Outdated
DatabaseModal.OVERFLOW_CHANGE_WORKSPACE_ACTION.toString(),
DatabaseModal.OVERFLOW_MENU_ACTION_CREATE_DB.toString(),
NotionPageOrRecord.CHANGE_DATABASE_ACTION.toString(),
NotionPageOrRecord.OVERFLOW_CHANGE_TO_PAGE_ACTION.toString()
NotionPageOrRecord.OVERFLOW_CHANGE_TO_PAGE_ACTION.toString(),
];

if (!OverFlowActions.includes(value)) {
Expand All @@ -832,17 +833,17 @@ export class ExecuteBlockActionHandler {
});

switch (value) {
case DatabaseModal.OVERFLOW_MENU_ACTION: {
case DatabaseModal.OVERFLOW_MENU_ACTION_CREATE_DB: {
await handler.createNotionDatabase();
break;
}

case DatabaseModal.OVERFLOW_CHANGE_WORKSPACE_ACTION:{
case DatabaseModal.OVERFLOW_CHANGE_WORKSPACE_ACTION: {
await handler.changeNotionWorkspace();
break;
}

case NotionPageOrRecord.OVERFLOW_CHANGE_TO_PAGE_ACTION:{
case NotionPageOrRecord.OVERFLOW_CHANGE_TO_PAGE_ACTION: {
await handler.createNotionPageOrRecord();
break;
}
Expand Down Expand Up @@ -945,7 +946,6 @@ export class ExecuteBlockActionHandler {
const tokenInfo = await oAuth2Storage.getCurrentWorkspace(user.id);
const roomId = await roomInteractionStorage.getInteractionRoomId();
const room = (await this.read.getRoomReader().getById(roomId)) as IRoom;

Comment thread
Sayan4444 marked this conversation as resolved.
if (!tokenInfo) {
await sendNotificationWithConnectBlock(
this.app,
Expand Down
10 changes: 8 additions & 2 deletions src/modals/createPageOrRecordModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,14 @@ export async function createPageOrRecordModal(
const divider = blockBuilder.createDividerBlock();
const blocks: Block[] = [];
const appId = app.getID();
const overFlowMenuText = [DatabaseModal.OVERFLOW_MENU_TEXT.toString()];
const overFlowMenuValue = [DatabaseModal.OVERFLOW_MENU_ACTION.toString()];
const overFlowMenuText = [
DatabaseModal.OVERFLOW_MENU_TEXT_CREATE_DB.toString(),
DatabaseModal.OVERFLOW_CHANGE_WORKSPACE_TEXT.toString(),
];
Comment thread
Sayan4444 marked this conversation as resolved.
const overFlowMenuValue = [
DatabaseModal.OVERFLOW_MENU_ACTION_CREATE_DB.toString(),
DatabaseModal.OVERFLOW_CHANGE_WORKSPACE_ACTION.toString(),
];
let properties: object | undefined;
let addedProperty: { data: Array<object> } | undefined;
let allUsers: object | undefined;
Expand Down