update the readme and changelog

This commit is contained in:
Jiaxin Peng
2024-01-29 11:53:18 +00:00
parent 8c6aea8250
commit 0198898086
4 changed files with 84 additions and 30 deletions

View File

@@ -42,7 +42,7 @@ export class CustomModal extends Modal {
this.properties[propertyIndex].customType = value; // Update the customType of the specific property
});
}
)
)
} else {
propertyLine
.setName("Property " + (propertyIndex))
@@ -64,19 +64,19 @@ export class CustomModal extends Modal {
.addOption("select", "Select")
.addOption("multi_select", "Multi-Select")
.addOption("date", "Date")
.addOption("person", "Person")
// .addOption("person", "Person")
.addOption("file", "Files & Media")
.addOption("checkbox", "Checkbox")
.addOption("url", "URL")
.addOption("email", "Email")
.addOption("phone_number", "Phone Number")
.addOption("formula", "Formula")
.addOption("relation", "Relation")
.addOption("rollup", "Rollup")
.addOption("created_time", "Created time")
.addOption("created_by", "Created by")
.addOption("last_edited_time", "Last Edited Time")
.addOption("last_edited_by", "Last Edited By")
// .addOption("formula", "Formula")
// .addOption("relation", "Relation")
// .addOption("rollup", "Rollup")
// .addOption("created_time", "Created time")
// .addOption("created_by", "Created by")
// .addOption("last_edited_time", "Last Edited Time")
// .addOption("last_edited_by", "Last Edited By")
.setValue("text")
.onChange(async (value) => {
this.properties[propertyIndex].customType = value; // Update the customType of the specific property

View File

@@ -159,6 +159,44 @@ export class Upload2NotionCustom extends UploadBaseCustom {
start: value || new Date().toISOString(),
},
};
case "number":
return {
number: Number(value),
};
case "phone_number":
return {
phone_number: value,
};
case "email":
return {
email: value,
};
case "url":
return {
url: value,
};
case "files":
return {
files: Array.isArray(value) ? value.map(url => ({
name: url,
type: "external",
external: {
url: url,
},
})) : [
{
name: value,
type: "external",
external: {
url: value,
},
},
],
};
case "checkbox":
return {
checkbox: Boolean(value) || false,
};
case "select":
return {
select: {