fix(general): some fixes and improvements of Play visibility (#14384)
* fix(backend): missing `visibility` param in packing flash * fix(frontend): use `visibility` value got from API * enhance(frontend): change preview appearance of private Play * Update CHANGELOG.md
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { AISCRIPT_VERSION } from '@syuilo/aiscript';
|
||||
import type { entities } from 'misskey-js'
|
||||
|
||||
export function abuseUserReport() {
|
||||
@@ -114,6 +115,40 @@ export function file(isSensitive = false) {
|
||||
};
|
||||
}
|
||||
|
||||
const script = `/// @ ${AISCRIPT_VERSION}
|
||||
|
||||
var name = ""
|
||||
|
||||
Ui:render([
|
||||
Ui:C:textInput({
|
||||
label: "Your name"
|
||||
onInput: @(v) { name = v }
|
||||
})
|
||||
Ui:C:button({
|
||||
text: "Hello"
|
||||
onClick: @() {
|
||||
Mk:dialog(null, \`Hello, {name}!\`)
|
||||
}
|
||||
})
|
||||
])
|
||||
`;
|
||||
|
||||
export function flash(): entities.Flash {
|
||||
return {
|
||||
id: 'someflashid',
|
||||
createdAt: '2016-12-28T22:49:51.000Z',
|
||||
updatedAt: '2016-12-28T22:49:51.000Z',
|
||||
userId: 'someuserid',
|
||||
user: userLite(),
|
||||
title: 'Some Play title',
|
||||
summary: 'Some Play summary',
|
||||
script,
|
||||
visibility: 'public',
|
||||
likedCount: 0,
|
||||
isLiked: false,
|
||||
};
|
||||
}
|
||||
|
||||
export function folder(id = 'somefolderid', name = 'Some Folder', parentId: string | null = null): entities.DriveFolder {
|
||||
return {
|
||||
id,
|
||||
|
Reference in New Issue
Block a user