diff --git a/enum/messages.ts b/enum/messages.ts index 1ee2afd..2338e31 100644 --- a/enum/messages.ts +++ b/enum/messages.ts @@ -5,7 +5,8 @@ export enum Messages { • use \`/notion create\` to create page or record • use \`/notion create db\` to create database • use \`/notion workspace\` to change workspace - • use \`/notion share\` to share pages + • use \`/notion share\` to share pages + • use \`/notion view\` to view database content `, HELPER_TEXT = `Need some help with \`/notion\`?`, diff --git a/enum/modals/NotionPageOrRecord.ts b/enum/modals/NotionPageOrRecord.ts index 1fb3dab..6e6b907 100644 --- a/enum/modals/NotionPageOrRecord.ts +++ b/enum/modals/NotionPageOrRecord.ts @@ -7,12 +7,12 @@ export enum NotionPageOrRecord { CLOSE = "Close", CLOSE_ACTION = "close-page-or-record-action-id", CLOSE_BLOCK = "close-page-or-record-block-id", - TITLE_PLACEHOLDER = "Enter Title of Page or Record", + TITLE_PLACEHOLDER = "Enter Title of Page", TITLE_LABEL = "Title *", TITLE_BLOCK = "title-page-or-record-block-id", TITLE_ACTION = "title-page-or-record-action-id", - CHANGE_DATABASE_TEXT = "Change Database", - CHANGE_DATABASE_ACTION = "create-page-or-record-change-database-action-id", + CHANGE_SELECTION_TEXT = "Change Selection", + CHANGE_SELECTION_ACTION = "create-page-or-record-change-selection-action-id", PROPERTY_SELECTED_BLOCK_ELEMENT = "property-selected-element-create-page-or-record-block-id", OVERFLOW_CHANGE_TO_PAGE_ACTION = "create-notion-page-overflow-menu-action-id", OVERFLOW_CHANGE_TO_PAGE_TEXT = "Create Page or Record", diff --git a/src/handlers/ExecuteBlockActionHandler.ts b/src/handlers/ExecuteBlockActionHandler.ts index 01bfec3..93d673a 100644 --- a/src/handlers/ExecuteBlockActionHandler.ts +++ b/src/handlers/ExecuteBlockActionHandler.ts @@ -805,7 +805,7 @@ export class ExecuteBlockActionHandler { const OverFlowActions = [ DatabaseModal.OVERFLOW_CHANGE_WORKSPACE_ACTION.toString(), DatabaseModal.OVERFLOW_MENU_ACTION_CREATE_DB.toString(), - NotionPageOrRecord.CHANGE_DATABASE_ACTION.toString(), + NotionPageOrRecord.CHANGE_SELECTION_ACTION.toString(), NotionPageOrRecord.OVERFLOW_CHANGE_TO_PAGE_ACTION.toString(), ]; @@ -847,7 +847,7 @@ export class ExecuteBlockActionHandler { break; } - case NotionPageOrRecord.CHANGE_DATABASE_ACTION: { + case NotionPageOrRecord.CHANGE_SELECTION_ACTION: { await handler.createNotionPageOrRecord(true); break; } diff --git a/src/handlers/ExecuteViewSubmitHandler.ts b/src/handlers/ExecuteViewSubmitHandler.ts index 05a9d5f..bd28b85 100644 --- a/src/handlers/ExecuteViewSubmitHandler.ts +++ b/src/handlers/ExecuteViewSubmitHandler.ts @@ -502,7 +502,7 @@ export class ExecuteViewSubmitHandler { ]; const { fields, url, pageId } = createdRecord; - message = `Created [**${title}**](${url}) in [**${databasename}**](${databaselink})`; + message = `Created a new record with title [**${title}**](${url}) in the database [**${databasename}**](${databaselink})`; const messageId = await sendMessageWithAttachments( this.read, diff --git a/src/modals/createPageOrRecordModal.ts b/src/modals/createPageOrRecordModal.ts index 2007d02..9ea2a8e 100644 --- a/src/modals/createPageOrRecordModal.ts +++ b/src/modals/createPageOrRecordModal.ts @@ -75,10 +75,10 @@ export async function createPageOrRecordModal( if (parent) { overFlowMenuText.unshift( - NotionPageOrRecord.CHANGE_DATABASE_TEXT.toString() + NotionPageOrRecord.CHANGE_SELECTION_TEXT.toString() ); overFlowMenuValue.unshift( - NotionPageOrRecord.CHANGE_DATABASE_ACTION.toString() + NotionPageOrRecord.CHANGE_SELECTION_ACTION.toString() ); }