mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-13 14:05:35 +02:00
wip
This commit is contained in:
@@ -287,11 +287,11 @@ function getRgb(hex: string | number): [number, number, number] | null {
|
||||
}
|
||||
|
||||
function save() {
|
||||
localStorage.setItem('roomData', JSON.stringify(controller.roomState));
|
||||
localStorage.setItem('roomData', JSON.stringify(controller.roomState.value));
|
||||
}
|
||||
|
||||
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');
|
||||
dlAnchorElem.setAttribute('href', dataStr);
|
||||
dlAnchorElem.setAttribute('download', 'room.json');
|
||||
|
||||
@@ -68,6 +68,7 @@ export class RoomController {
|
||||
|
||||
this.engine.on('changeRoomState', ({ roomState }) => {
|
||||
this.roomState.value = roomState;
|
||||
triggerRef(this.selected);
|
||||
});
|
||||
|
||||
this.engine.on('playSfxUrl', ({ url, options }) => {
|
||||
|
||||
Reference in New Issue
Block a user