Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
lgc2333 committed Feb 16, 2024
1 parent 37c00bf commit 6d4e14e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 4 deletions.
4 changes: 3 additions & 1 deletion lib/FormAPIEx.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var version = "0.5.0";
var version = "0.5.1";

const NAME = 'FormAPIEx';
const VERSION = (version.split('.').map((v) => Number(v)));
Expand Down Expand Up @@ -583,6 +583,8 @@ class SimpleFormOperational {
}
async sendAsync(player) {
const form = new SimpleFormEx(this.buttons);
form.title = this.title;
form.content = this.content;
form.formatter = ({ text, image }) => [text, image];
const res = await form.sendAsync(player);
if (res === FormClose)
Expand Down
4 changes: 3 additions & 1 deletion lib/FormAPIEx.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var version = "0.5.0";
var version = "0.5.1";

const NAME = 'FormAPIEx';
const VERSION = (version.split('.').map((v) => Number(v)));
Expand Down Expand Up @@ -581,6 +581,8 @@ class SimpleFormOperational {
}
async sendAsync(player) {
const form = new SimpleFormEx(this.buttons);
form.title = this.title;
form.content = this.content;
form.formatter = ({ text, image }) => [text, image];
const res = await form.sendAsync(player);
if (res === FormClose)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "form-api-ex",
"version": "0.5.0",
"version": "0.5.1",
"description": "Work with LLSE forms easily!",
"main": "lib/FormAPIEx.cjs",
"module": "lib/FormAPIEx.mjs",
Expand Down
4 changes: 4 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ QQ:3076823485

## 更新日志

### 0.5.1

- 修复 `SimpleFormOperational``title``content` 不生效的 Bug

### 0.5.0

- 使用 `FormClose` 表示玩家手动关闭表单或表单发送失败
Expand Down
2 changes: 2 additions & 0 deletions src/simple-operational.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export class SimpleFormOperational<R> {

async sendAsync(player: Player): Promise<R | FormClose> {
const form = new SimpleFormEx(this.buttons);
form.title = this.title;
form.content = this.content;
form.formatter = ({ text, image }) => [text, image];
const res = await form.sendAsync(player);
if (res === FormClose) return FormClose;
Expand Down
2 changes: 1 addition & 1 deletion tooth.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://raw.githubusercontent.com/lippkg/lip/main/schemas/tooth.v2.schema.json",
"format_version": 2,
"tooth": "github.com/lgc-LLDev/FormAPIEx",
"version": "0.5.0",
"version": "0.5.1",
"info": {
"name": "FormAPIEx",
"description": "Work with LSE forms easily!",
Expand Down

0 comments on commit 6d4e14e

Please sign in to comment.