mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-22 05:45:32 +02:00
wip
This commit is contained in:
@@ -287,11 +287,11 @@ function getRgb(hex: string | number): [number, number, number] | null {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function save() {
|
function save() {
|
||||||
localStorage.setItem('roomData', JSON.stringify(controller.roomState));
|
localStorage.setItem('roomData', JSON.stringify(controller.roomState.value));
|
||||||
}
|
}
|
||||||
|
|
||||||
function expor() {
|
function expor() {
|
||||||
const dataStr = 'data:text/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(controller.roomState));
|
const dataStr = 'data:text/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(controller.roomState.value));
|
||||||
const dlAnchorElem = window.document.createElement('a');
|
const dlAnchorElem = window.document.createElement('a');
|
||||||
dlAnchorElem.setAttribute('href', dataStr);
|
dlAnchorElem.setAttribute('href', dataStr);
|
||||||
dlAnchorElem.setAttribute('download', 'room.json');
|
dlAnchorElem.setAttribute('download', 'room.json');
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ export class RoomController {
|
|||||||
|
|
||||||
this.engine.on('changeRoomState', ({ roomState }) => {
|
this.engine.on('changeRoomState', ({ roomState }) => {
|
||||||
this.roomState.value = roomState;
|
this.roomState.value = roomState;
|
||||||
|
triggerRef(this.selected);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.engine.on('playSfxUrl', ({ url, options }) => {
|
this.engine.on('playSfxUrl', ({ url, options }) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user