mirror of
https://github.com/MisskeyIO/misskey
synced 2024-11-27 14:28:49 +09:00
fix(client): An error occurs when you press the Play button of Misskey Play
Fix #10381
This commit is contained in:
parent
78a3d78a7f
commit
24a3a0bbff
@ -471,7 +471,7 @@ export function registerAsUiLib(components: Ref<AsUiComponent>[], done: (root: R
|
|||||||
components.push(component);
|
components.push(component);
|
||||||
const instance = values.OBJ(new Map([
|
const instance = values.OBJ(new Map([
|
||||||
['id', values.STR(_id)],
|
['id', values.STR(_id)],
|
||||||
['update', values.FN_NATIVE(async ([def], opts) => {
|
['update', values.FN_NATIVE(([def], opts) => {
|
||||||
utils.assertObject(def);
|
utils.assertObject(def);
|
||||||
const updates = getOptions(def, call);
|
const updates = getOptions(def, call);
|
||||||
for (const update of def.value.keys()) {
|
for (const update of def.value.keys()) {
|
||||||
@ -491,13 +491,13 @@ export function registerAsUiLib(components: Ref<AsUiComponent>[], done: (root: R
|
|||||||
return {
|
return {
|
||||||
'Ui:root': rootInstance,
|
'Ui:root': rootInstance,
|
||||||
|
|
||||||
'Ui:patch': values.FN_NATIVE(async ([id, val], opts) => {
|
'Ui:patch': values.FN_NATIVE(([id, val], opts) => {
|
||||||
utils.assertString(id);
|
utils.assertString(id);
|
||||||
utils.assertArray(val);
|
utils.assertArray(val);
|
||||||
patch(id.value, val.value, opts.call);
|
patch(id.value, val.value, opts.call);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
'Ui:get': values.FN_NATIVE(async ([id], opts) => {
|
'Ui:get': values.FN_NATIVE(([id], opts) => {
|
||||||
utils.assertString(id);
|
utils.assertString(id);
|
||||||
const instance = instances[id.value];
|
const instance = instances[id.value];
|
||||||
if (instance) {
|
if (instance) {
|
||||||
@ -508,7 +508,7 @@ export function registerAsUiLib(components: Ref<AsUiComponent>[], done: (root: R
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
// Ui:root.update({ children: [...] }) の糖衣構文
|
// Ui:root.update({ children: [...] }) の糖衣構文
|
||||||
'Ui:render': values.FN_NATIVE(async ([children], opts) => {
|
'Ui:render': values.FN_NATIVE(([children], opts) => {
|
||||||
utils.assertArray(children);
|
utils.assertArray(children);
|
||||||
|
|
||||||
rootComponent.value.children = children.value.map(v => {
|
rootComponent.value.children = children.value.map(v => {
|
||||||
@ -517,51 +517,51 @@ export function registerAsUiLib(components: Ref<AsUiComponent>[], done: (root: R
|
|||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
|
||||||
'Ui:C:container': values.FN_NATIVE(async ([def, id], opts) => {
|
'Ui:C:container': values.FN_NATIVE(([def, id], opts) => {
|
||||||
return createComponentInstance('container', def, id, getContainerOptions, opts.call);
|
return createComponentInstance('container', def, id, getContainerOptions, opts.call);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
'Ui:C:text': values.FN_NATIVE(async ([def, id], opts) => {
|
'Ui:C:text': values.FN_NATIVE(([def, id], opts) => {
|
||||||
return createComponentInstance('text', def, id, getTextOptions, opts.call);
|
return createComponentInstance('text', def, id, getTextOptions, opts.call);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
'Ui:C:mfm': values.FN_NATIVE(async ([def, id], opts) => {
|
'Ui:C:mfm': values.FN_NATIVE(([def, id], opts) => {
|
||||||
return createComponentInstance('mfm', def, id, getMfmOptions, opts.call);
|
return createComponentInstance('mfm', def, id, getMfmOptions, opts.call);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
'Ui:C:textarea': values.FN_NATIVE(async ([def, id], opts) => {
|
'Ui:C:textarea': values.FN_NATIVE(([def, id], opts) => {
|
||||||
return createComponentInstance('textarea', def, id, getTextareaOptions, opts.call);
|
return createComponentInstance('textarea', def, id, getTextareaOptions, opts.call);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
'Ui:C:textInput': values.FN_NATIVE(async ([def, id], opts) => {
|
'Ui:C:textInput': values.FN_NATIVE(([def, id], opts) => {
|
||||||
return createComponentInstance('textInput', def, id, getTextInputOptions, opts.call);
|
return createComponentInstance('textInput', def, id, getTextInputOptions, opts.call);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
'Ui:C:numberInput': values.FN_NATIVE(async ([def, id], opts) => {
|
'Ui:C:numberInput': values.FN_NATIVE(([def, id], opts) => {
|
||||||
return createComponentInstance('numberInput', def, id, getNumberInputOptions, opts.call);
|
return createComponentInstance('numberInput', def, id, getNumberInputOptions, opts.call);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
'Ui:C:button': values.FN_NATIVE(async ([def, id], opts) => {
|
'Ui:C:button': values.FN_NATIVE(([def, id], opts) => {
|
||||||
return createComponentInstance('button', def, id, getButtonOptions, opts.call);
|
return createComponentInstance('button', def, id, getButtonOptions, opts.call);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
'Ui:C:buttons': values.FN_NATIVE(async ([def, id], opts) => {
|
'Ui:C:buttons': values.FN_NATIVE(([def, id], opts) => {
|
||||||
return createComponentInstance('buttons', def, id, getButtonsOptions, opts.call);
|
return createComponentInstance('buttons', def, id, getButtonsOptions, opts.call);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
'Ui:C:switch': values.FN_NATIVE(async ([def, id], opts) => {
|
'Ui:C:switch': values.FN_NATIVE(([def, id], opts) => {
|
||||||
return createComponentInstance('switch', def, id, getSwitchOptions, opts.call);
|
return createComponentInstance('switch', def, id, getSwitchOptions, opts.call);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
'Ui:C:select': values.FN_NATIVE(async ([def, id], opts) => {
|
'Ui:C:select': values.FN_NATIVE(([def, id], opts) => {
|
||||||
return createComponentInstance('select', def, id, getSelectOptions, opts.call);
|
return createComponentInstance('select', def, id, getSelectOptions, opts.call);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
'Ui:C:folder': values.FN_NATIVE(async ([def, id], opts) => {
|
'Ui:C:folder': values.FN_NATIVE(([def, id], opts) => {
|
||||||
return createComponentInstance('folder', def, id, getFolderOptions, opts.call);
|
return createComponentInstance('folder', def, id, getFolderOptions, opts.call);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
'Ui:C:postFormButton': values.FN_NATIVE(async ([def, id], opts) => {
|
'Ui:C:postFormButton': values.FN_NATIVE(([def, id], opts) => {
|
||||||
return createComponentInstance('postFormButton', def, id, getPostFormButtonOptions, opts.call);
|
return createComponentInstance('postFormButton', def, id, getPostFormButtonOptions, opts.call);
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user