This commit is contained in:
yumoqing 2024-07-29 19:35:40 +08:00
parent 300ac50050
commit 9a01410bd1
36 changed files with 7 additions and 5 deletions

BIN
bricks/.DS_Store vendored

Binary file not shown.

View File

@ -7,7 +7,7 @@ SOURCES=" page_data_loader.js factory.js uitypesdef.js utils.js uitype.js \
paging.js datagrid.js iframe.js cols.js echartsext.js \
floaticonbar.js miniform.js wterm.js dynamicaccordion.js \
llm_dialog.js llm.js websocket.js datarow.js tabular.js \
line.js pie.js bar.js "
line.js pie.js bar.js gobang.js "
echo ${SOURCES}
cat ${SOURCES} > ../dist/bricks.js
# uglifyjs --compress --mangle -- ../dist/bricks.js > ../dist/bricks.min.js

View File

@ -1,6 +1,6 @@
var bricks = window.bricks || {};
bricks.need_formdata_fields = ['file', 'image', 'video', 'audio'];
bricks.need_formdata_fields = ['file', 'video', 'audio'];
bricks.show_resp_message_or_error = async function(resp){
var desc = await resp.json();

BIN
bricks/imgs/bc_black.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
bricks/imgs/bc_empty.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
bricks/imgs/bc_white.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
bricks/imgs/bl_black.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
bricks/imgs/bl_empty.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
bricks/imgs/bl_white.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
bricks/imgs/br_black.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
bricks/imgs/br_empty.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
bricks/imgs/br_white.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
bricks/imgs/cc_black.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
bricks/imgs/cc_empty.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
bricks/imgs/cc_white.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
bricks/imgs/cl_black.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
bricks/imgs/cl_empty.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
bricks/imgs/cl_white.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
bricks/imgs/cr_black.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
bricks/imgs/cr_empty.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
bricks/imgs/cr_white.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
bricks/imgs/dot_empty.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
bricks/imgs/ii_black.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
bricks/imgs/ii_empty.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
bricks/imgs/ii_white.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
bricks/imgs/tc_black.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
bricks/imgs/tc_empty.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
bricks/imgs/tc_white.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
bricks/imgs/tl_black.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
bricks/imgs/tl_empty.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
bricks/imgs/tl_white.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
bricks/imgs/tr_black.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
bricks/imgs/tr_empty.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
bricks/imgs/tr_white.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@ -342,7 +342,7 @@ bricks.UiFile =class extends bricks.UiStr {
bricks.UiImage =class extends bricks.VBox {
constructor(opts){
opts.name = opts.name || 'image';
super(options);
super(opts);
this.uitype='image';
this.bind('drop', this.dropHandle.bind(this));
this.input = document.createElement('input');
@ -377,8 +377,8 @@ bricks.UiImage =class extends bricks.VBox {
reader.readAsDataURL(file);
}
getValue(){
ret = {}
if (! this.imgw){
var ret = {}
if (this.imgw){
ret[this.name] = this.imgw.base64()
} else {
ret[this.name] = null;

View File

@ -234,6 +234,8 @@ bricks.LlmIO = class extends bricks.VBox {
}
async handle_input(event){
var params = event.params;
if (params.prompt)
params.prompt = bricks.escapeSpecialChars(params.prompt);
await this.show_input(params);
for(var i=0;i<this.llmmodels.length;i++){
var lm = this.llmmodels[i];