microboard-ui-temp 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-dy5ccdyb.js → chunk-bdkn78st.js} +38 -21
- package/dist/example.html +1 -1
- package/dist/index.html +1 -1
- package/dist/index.js +38 -21
- package/dist/spa.js +38 -21
- package/dist/titlePanel.js +1 -1
- package/dist/types/shared/Lang/index.d.ts +10 -0
- package/package.json +1 -1
|
@@ -319826,7 +319826,12 @@ Upgrade to Plus to increase the limit and keep working`,
|
|
|
319826
319826
|
myBoards: "My boards",
|
|
319827
319827
|
notAvailable: "No boards available yet"
|
|
319828
319828
|
},
|
|
319829
|
-
addNew: "Add new"
|
|
319829
|
+
addNew: "Add new",
|
|
319830
|
+
itemsList: "Items list",
|
|
319831
|
+
itemsTitle: "Items",
|
|
319832
|
+
itemsSearch: "Search...",
|
|
319833
|
+
itemsEmpty: "No items",
|
|
319834
|
+
itemsNotFound: "Nothing found"
|
|
319830
319835
|
},
|
|
319831
319836
|
contextMenu: {
|
|
319832
319837
|
delete: "Delete",
|
|
@@ -321084,7 +321089,12 @@ var ru_default = {
|
|
|
321084
321089
|
myBoards: "Мои доски",
|
|
321085
321090
|
notAvailable: "Досок пока нет"
|
|
321086
321091
|
},
|
|
321087
|
-
addNew: "Добавить"
|
|
321092
|
+
addNew: "Добавить",
|
|
321093
|
+
itemsList: "Список предметов",
|
|
321094
|
+
itemsTitle: "Предметы",
|
|
321095
|
+
itemsSearch: "Поиск...",
|
|
321096
|
+
itemsEmpty: "Нет элементов",
|
|
321097
|
+
itemsNotFound: "Ничего не найдено"
|
|
321088
321098
|
},
|
|
321089
321099
|
contextMenu: {
|
|
321090
321100
|
delete: "Удалить",
|
|
@@ -370878,6 +370888,7 @@ function BoardItemsList({
|
|
|
370878
370888
|
}) {
|
|
370879
370889
|
const { board } = useAppContext();
|
|
370880
370890
|
const forceUpdate = useForceUpdate();
|
|
370891
|
+
const { t: t10 } = useTranslation();
|
|
370881
370892
|
useAppSubscription({
|
|
370882
370893
|
subjects: ["items"],
|
|
370883
370894
|
observer: forceUpdate
|
|
@@ -370891,7 +370902,7 @@ function BoardItemsList({
|
|
|
370891
370902
|
if (matched.length === 0) {
|
|
370892
370903
|
return /* @__PURE__ */ import_react205.default.createElement("div", {
|
|
370893
370904
|
className: BoardItemsList_module_default.empty
|
|
370894
|
-
}, "
|
|
370905
|
+
}, t10("sidePanel.itemsNotFound"));
|
|
370895
370906
|
}
|
|
370896
370907
|
return /* @__PURE__ */ import_react205.default.createElement("div", {
|
|
370897
370908
|
className: BoardItemsList_module_default.list
|
|
@@ -370906,7 +370917,7 @@ function BoardItemsList({
|
|
|
370906
370917
|
if (topLevelItems.length === 0) {
|
|
370907
370918
|
return /* @__PURE__ */ import_react205.default.createElement("div", {
|
|
370908
370919
|
className: BoardItemsList_module_default.empty
|
|
370909
|
-
}, "
|
|
370920
|
+
}, t10("sidePanel.itemsEmpty"));
|
|
370910
370921
|
}
|
|
370911
370922
|
return /* @__PURE__ */ import_react205.default.createElement("div", {
|
|
370912
370923
|
className: BoardItemsList_module_default.list
|
|
@@ -371173,7 +371184,7 @@ function SidePanel() {
|
|
|
371173
371184
|
iconName: "ArrowLeft1"
|
|
371174
371185
|
})), /* @__PURE__ */ import_react208.default.createElement("h3", {
|
|
371175
371186
|
className: SidePanel_module_default.title
|
|
371176
|
-
}, "
|
|
371187
|
+
}, t10("sidePanel.itemsTitle")), /* @__PURE__ */ import_react208.default.createElement(UiButton, {
|
|
371177
371188
|
onClick: toggleSideMenu,
|
|
371178
371189
|
variant: "secondary",
|
|
371179
371190
|
className: SidePanel_module_default.close
|
|
@@ -371188,7 +371199,7 @@ function SidePanel() {
|
|
|
371188
371199
|
className: SidePanel_module_default.itemsSearchIcon
|
|
371189
371200
|
}), /* @__PURE__ */ import_react208.default.createElement("input", {
|
|
371190
371201
|
className: SidePanel_module_default.itemsSearchInput,
|
|
371191
|
-
placeholder: "
|
|
371202
|
+
placeholder: t10("sidePanel.itemsSearch"),
|
|
371192
371203
|
ref: itemsSearchRef,
|
|
371193
371204
|
value: itemsQuery,
|
|
371194
371205
|
onChange: (e15) => setItemsQuery(e15.target.value)
|
|
@@ -371246,7 +371257,7 @@ function SidePanel() {
|
|
|
371246
371257
|
iconName: "Stack",
|
|
371247
371258
|
width: 16,
|
|
371248
371259
|
height: 16
|
|
371249
|
-
}), /* @__PURE__ */ import_react208.default.createElement("span", null, "
|
|
371260
|
+
}), /* @__PURE__ */ import_react208.default.createElement("span", null, t10("sidePanel.itemsList"))), /* @__PURE__ */ import_react208.default.createElement("button", {
|
|
371250
371261
|
className: SidePanel_module_default.add,
|
|
371251
371262
|
onClick: handleAddNewMenu
|
|
371252
371263
|
}, /* @__PURE__ */ import_react208.default.createElement(Icon, {
|
|
@@ -445786,6 +445797,25 @@ var BoardPage = () => {
|
|
|
445786
445797
|
});
|
|
445787
445798
|
app.render();
|
|
445788
445799
|
});
|
|
445800
|
+
} else if (window.opener) {
|
|
445801
|
+
boardsList.createBoard().then((boardId) => {
|
|
445802
|
+
app.openBoard(boardId).then(() => {
|
|
445803
|
+
navigate(`/boards/${boardId}`, { replace: true });
|
|
445804
|
+
app.render();
|
|
445805
|
+
console.log("[import] board ready, sending snapshot-ready to opener");
|
|
445806
|
+
window.opener.postMessage({ type: "microboard-snapshot-ready" }, "*");
|
|
445807
|
+
const onMessage = (event) => {
|
|
445808
|
+
if (event.data?.type !== "microboard-snapshot")
|
|
445809
|
+
return;
|
|
445810
|
+
window.removeEventListener("message", onMessage);
|
|
445811
|
+
const { html: html5 } = event.data;
|
|
445812
|
+
console.log("[import] received snapshot, html length:", html5.length);
|
|
445813
|
+
const added = app.getBoard().deserializeHTMLAndEmit(html5);
|
|
445814
|
+
console.log("[import] deserializeHTMLAndEmit added ids:", added);
|
|
445815
|
+
};
|
|
445816
|
+
window.addEventListener("message", onMessage);
|
|
445817
|
+
});
|
|
445818
|
+
});
|
|
445789
445819
|
} else {
|
|
445790
445820
|
const lastSeenBoard = localStorage.getItem(LAST_BOARD_KEY);
|
|
445791
445821
|
const isFirstVisit = !api7.get("first_visit");
|
|
@@ -445810,21 +445840,8 @@ var BoardPage = () => {
|
|
|
445810
445840
|
} else {
|
|
445811
445841
|
boardsList.createBoard().then((boardId) => {
|
|
445812
445842
|
app.openBoard(boardId).then(() => {
|
|
445813
|
-
navigate(`/boards/${boardId}`, {
|
|
445814
|
-
replace: true
|
|
445815
|
-
});
|
|
445843
|
+
navigate(`/boards/${boardId}`, { replace: true });
|
|
445816
445844
|
app.render();
|
|
445817
|
-
if (window.opener) {
|
|
445818
|
-
window.opener.postMessage({ type: "microboard-snapshot-ready" }, "*");
|
|
445819
|
-
const onMessage = (event) => {
|
|
445820
|
-
if (event.data?.type !== "microboard-snapshot")
|
|
445821
|
-
return;
|
|
445822
|
-
window.removeEventListener("message", onMessage);
|
|
445823
|
-
const { html: html5 } = event.data;
|
|
445824
|
-
app.getBoard().deserializeHTMLAndEmit(html5);
|
|
445825
|
-
};
|
|
445826
|
-
window.addEventListener("message", onMessage);
|
|
445827
|
-
}
|
|
445828
445845
|
});
|
|
445829
445846
|
});
|
|
445830
445847
|
}
|
package/dist/example.html
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
/>
|
|
33
33
|
|
|
34
34
|
<link rel="stylesheet" crossorigin href="/chunk-f0mvcsbm.css"><script src="/env.js"></script>
|
|
35
|
-
<script type="module" crossorigin src="/chunk-
|
|
35
|
+
<script type="module" crossorigin src="/chunk-bdkn78st.js"></script></head>
|
|
36
36
|
|
|
37
37
|
<body
|
|
38
38
|
style="
|
package/dist/index.html
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
/>
|
|
33
33
|
|
|
34
34
|
<link rel="stylesheet" crossorigin href="/chunk-f0mvcsbm.css"><script src="/env.js"></script>
|
|
35
|
-
<script type="module" crossorigin src="/chunk-
|
|
35
|
+
<script type="module" crossorigin src="/chunk-bdkn78st.js"></script></head>
|
|
36
36
|
|
|
37
37
|
<body
|
|
38
38
|
style="
|
package/dist/index.js
CHANGED
|
@@ -319826,7 +319826,12 @@ Upgrade to Plus to increase the limit and keep working`,
|
|
|
319826
319826
|
myBoards: "My boards",
|
|
319827
319827
|
notAvailable: "No boards available yet"
|
|
319828
319828
|
},
|
|
319829
|
-
addNew: "Add new"
|
|
319829
|
+
addNew: "Add new",
|
|
319830
|
+
itemsList: "Items list",
|
|
319831
|
+
itemsTitle: "Items",
|
|
319832
|
+
itemsSearch: "Search...",
|
|
319833
|
+
itemsEmpty: "No items",
|
|
319834
|
+
itemsNotFound: "Nothing found"
|
|
319830
319835
|
},
|
|
319831
319836
|
contextMenu: {
|
|
319832
319837
|
delete: "Delete",
|
|
@@ -321084,7 +321089,12 @@ var ru_default = {
|
|
|
321084
321089
|
myBoards: "Мои доски",
|
|
321085
321090
|
notAvailable: "Досок пока нет"
|
|
321086
321091
|
},
|
|
321087
|
-
addNew: "Добавить"
|
|
321092
|
+
addNew: "Добавить",
|
|
321093
|
+
itemsList: "Список предметов",
|
|
321094
|
+
itemsTitle: "Предметы",
|
|
321095
|
+
itemsSearch: "Поиск...",
|
|
321096
|
+
itemsEmpty: "Нет элементов",
|
|
321097
|
+
itemsNotFound: "Ничего не найдено"
|
|
321088
321098
|
},
|
|
321089
321099
|
contextMenu: {
|
|
321090
321100
|
delete: "Удалить",
|
|
@@ -370878,6 +370888,7 @@ function BoardItemsList({
|
|
|
370878
370888
|
}) {
|
|
370879
370889
|
const { board } = useAppContext();
|
|
370880
370890
|
const forceUpdate = useForceUpdate();
|
|
370891
|
+
const { t: t10 } = useTranslation();
|
|
370881
370892
|
useAppSubscription({
|
|
370882
370893
|
subjects: ["items"],
|
|
370883
370894
|
observer: forceUpdate
|
|
@@ -370891,7 +370902,7 @@ function BoardItemsList({
|
|
|
370891
370902
|
if (matched.length === 0) {
|
|
370892
370903
|
return /* @__PURE__ */ import_react205.default.createElement("div", {
|
|
370893
370904
|
className: BoardItemsList_module_default.empty
|
|
370894
|
-
}, "
|
|
370905
|
+
}, t10("sidePanel.itemsNotFound"));
|
|
370895
370906
|
}
|
|
370896
370907
|
return /* @__PURE__ */ import_react205.default.createElement("div", {
|
|
370897
370908
|
className: BoardItemsList_module_default.list
|
|
@@ -370906,7 +370917,7 @@ function BoardItemsList({
|
|
|
370906
370917
|
if (topLevelItems.length === 0) {
|
|
370907
370918
|
return /* @__PURE__ */ import_react205.default.createElement("div", {
|
|
370908
370919
|
className: BoardItemsList_module_default.empty
|
|
370909
|
-
}, "
|
|
370920
|
+
}, t10("sidePanel.itemsEmpty"));
|
|
370910
370921
|
}
|
|
370911
370922
|
return /* @__PURE__ */ import_react205.default.createElement("div", {
|
|
370912
370923
|
className: BoardItemsList_module_default.list
|
|
@@ -371173,7 +371184,7 @@ function SidePanel() {
|
|
|
371173
371184
|
iconName: "ArrowLeft1"
|
|
371174
371185
|
})), /* @__PURE__ */ import_react208.default.createElement("h3", {
|
|
371175
371186
|
className: SidePanel_module_default.title
|
|
371176
|
-
}, "
|
|
371187
|
+
}, t10("sidePanel.itemsTitle")), /* @__PURE__ */ import_react208.default.createElement(UiButton, {
|
|
371177
371188
|
onClick: toggleSideMenu,
|
|
371178
371189
|
variant: "secondary",
|
|
371179
371190
|
className: SidePanel_module_default.close
|
|
@@ -371188,7 +371199,7 @@ function SidePanel() {
|
|
|
371188
371199
|
className: SidePanel_module_default.itemsSearchIcon
|
|
371189
371200
|
}), /* @__PURE__ */ import_react208.default.createElement("input", {
|
|
371190
371201
|
className: SidePanel_module_default.itemsSearchInput,
|
|
371191
|
-
placeholder: "
|
|
371202
|
+
placeholder: t10("sidePanel.itemsSearch"),
|
|
371192
371203
|
ref: itemsSearchRef,
|
|
371193
371204
|
value: itemsQuery,
|
|
371194
371205
|
onChange: (e15) => setItemsQuery(e15.target.value)
|
|
@@ -371246,7 +371257,7 @@ function SidePanel() {
|
|
|
371246
371257
|
iconName: "Stack",
|
|
371247
371258
|
width: 16,
|
|
371248
371259
|
height: 16
|
|
371249
|
-
}), /* @__PURE__ */ import_react208.default.createElement("span", null, "
|
|
371260
|
+
}), /* @__PURE__ */ import_react208.default.createElement("span", null, t10("sidePanel.itemsList"))), /* @__PURE__ */ import_react208.default.createElement("button", {
|
|
371250
371261
|
className: SidePanel_module_default.add,
|
|
371251
371262
|
onClick: handleAddNewMenu
|
|
371252
371263
|
}, /* @__PURE__ */ import_react208.default.createElement(Icon, {
|
|
@@ -445786,6 +445797,25 @@ var BoardPage = () => {
|
|
|
445786
445797
|
});
|
|
445787
445798
|
app.render();
|
|
445788
445799
|
});
|
|
445800
|
+
} else if (window.opener) {
|
|
445801
|
+
boardsList.createBoard().then((boardId) => {
|
|
445802
|
+
app.openBoard(boardId).then(() => {
|
|
445803
|
+
navigate(`/boards/${boardId}`, { replace: true });
|
|
445804
|
+
app.render();
|
|
445805
|
+
console.log("[import] board ready, sending snapshot-ready to opener");
|
|
445806
|
+
window.opener.postMessage({ type: "microboard-snapshot-ready" }, "*");
|
|
445807
|
+
const onMessage = (event) => {
|
|
445808
|
+
if (event.data?.type !== "microboard-snapshot")
|
|
445809
|
+
return;
|
|
445810
|
+
window.removeEventListener("message", onMessage);
|
|
445811
|
+
const { html: html5 } = event.data;
|
|
445812
|
+
console.log("[import] received snapshot, html length:", html5.length);
|
|
445813
|
+
const added = app.getBoard().deserializeHTMLAndEmit(html5);
|
|
445814
|
+
console.log("[import] deserializeHTMLAndEmit added ids:", added);
|
|
445815
|
+
};
|
|
445816
|
+
window.addEventListener("message", onMessage);
|
|
445817
|
+
});
|
|
445818
|
+
});
|
|
445789
445819
|
} else {
|
|
445790
445820
|
const lastSeenBoard = localStorage.getItem(LAST_BOARD_KEY);
|
|
445791
445821
|
const isFirstVisit = !api7.get("first_visit");
|
|
@@ -445810,21 +445840,8 @@ var BoardPage = () => {
|
|
|
445810
445840
|
} else {
|
|
445811
445841
|
boardsList.createBoard().then((boardId) => {
|
|
445812
445842
|
app.openBoard(boardId).then(() => {
|
|
445813
|
-
navigate(`/boards/${boardId}`, {
|
|
445814
|
-
replace: true
|
|
445815
|
-
});
|
|
445843
|
+
navigate(`/boards/${boardId}`, { replace: true });
|
|
445816
445844
|
app.render();
|
|
445817
|
-
if (window.opener) {
|
|
445818
|
-
window.opener.postMessage({ type: "microboard-snapshot-ready" }, "*");
|
|
445819
|
-
const onMessage = (event) => {
|
|
445820
|
-
if (event.data?.type !== "microboard-snapshot")
|
|
445821
|
-
return;
|
|
445822
|
-
window.removeEventListener("message", onMessage);
|
|
445823
|
-
const { html: html5 } = event.data;
|
|
445824
|
-
app.getBoard().deserializeHTMLAndEmit(html5);
|
|
445825
|
-
};
|
|
445826
|
-
window.addEventListener("message", onMessage);
|
|
445827
|
-
}
|
|
445828
445845
|
});
|
|
445829
445846
|
});
|
|
445830
445847
|
}
|
package/dist/spa.js
CHANGED
|
@@ -319826,7 +319826,12 @@ Upgrade to Plus to increase the limit and keep working`,
|
|
|
319826
319826
|
myBoards: "My boards",
|
|
319827
319827
|
notAvailable: "No boards available yet"
|
|
319828
319828
|
},
|
|
319829
|
-
addNew: "Add new"
|
|
319829
|
+
addNew: "Add new",
|
|
319830
|
+
itemsList: "Items list",
|
|
319831
|
+
itemsTitle: "Items",
|
|
319832
|
+
itemsSearch: "Search...",
|
|
319833
|
+
itemsEmpty: "No items",
|
|
319834
|
+
itemsNotFound: "Nothing found"
|
|
319830
319835
|
},
|
|
319831
319836
|
contextMenu: {
|
|
319832
319837
|
delete: "Delete",
|
|
@@ -321084,7 +321089,12 @@ var ru_default = {
|
|
|
321084
321089
|
myBoards: "Мои доски",
|
|
321085
321090
|
notAvailable: "Досок пока нет"
|
|
321086
321091
|
},
|
|
321087
|
-
addNew: "Добавить"
|
|
321092
|
+
addNew: "Добавить",
|
|
321093
|
+
itemsList: "Список предметов",
|
|
321094
|
+
itemsTitle: "Предметы",
|
|
321095
|
+
itemsSearch: "Поиск...",
|
|
321096
|
+
itemsEmpty: "Нет элементов",
|
|
321097
|
+
itemsNotFound: "Ничего не найдено"
|
|
321088
321098
|
},
|
|
321089
321099
|
contextMenu: {
|
|
321090
321100
|
delete: "Удалить",
|
|
@@ -370878,6 +370888,7 @@ function BoardItemsList({
|
|
|
370878
370888
|
}) {
|
|
370879
370889
|
const { board } = useAppContext();
|
|
370880
370890
|
const forceUpdate = useForceUpdate();
|
|
370891
|
+
const { t: t10 } = useTranslation();
|
|
370881
370892
|
useAppSubscription({
|
|
370882
370893
|
subjects: ["items"],
|
|
370883
370894
|
observer: forceUpdate
|
|
@@ -370891,7 +370902,7 @@ function BoardItemsList({
|
|
|
370891
370902
|
if (matched.length === 0) {
|
|
370892
370903
|
return /* @__PURE__ */ import_react205.default.createElement("div", {
|
|
370893
370904
|
className: BoardItemsList_module_default.empty
|
|
370894
|
-
}, "
|
|
370905
|
+
}, t10("sidePanel.itemsNotFound"));
|
|
370895
370906
|
}
|
|
370896
370907
|
return /* @__PURE__ */ import_react205.default.createElement("div", {
|
|
370897
370908
|
className: BoardItemsList_module_default.list
|
|
@@ -370906,7 +370917,7 @@ function BoardItemsList({
|
|
|
370906
370917
|
if (topLevelItems.length === 0) {
|
|
370907
370918
|
return /* @__PURE__ */ import_react205.default.createElement("div", {
|
|
370908
370919
|
className: BoardItemsList_module_default.empty
|
|
370909
|
-
}, "
|
|
370920
|
+
}, t10("sidePanel.itemsEmpty"));
|
|
370910
370921
|
}
|
|
370911
370922
|
return /* @__PURE__ */ import_react205.default.createElement("div", {
|
|
370912
370923
|
className: BoardItemsList_module_default.list
|
|
@@ -371173,7 +371184,7 @@ function SidePanel() {
|
|
|
371173
371184
|
iconName: "ArrowLeft1"
|
|
371174
371185
|
})), /* @__PURE__ */ import_react208.default.createElement("h3", {
|
|
371175
371186
|
className: SidePanel_module_default.title
|
|
371176
|
-
}, "
|
|
371187
|
+
}, t10("sidePanel.itemsTitle")), /* @__PURE__ */ import_react208.default.createElement(UiButton, {
|
|
371177
371188
|
onClick: toggleSideMenu,
|
|
371178
371189
|
variant: "secondary",
|
|
371179
371190
|
className: SidePanel_module_default.close
|
|
@@ -371188,7 +371199,7 @@ function SidePanel() {
|
|
|
371188
371199
|
className: SidePanel_module_default.itemsSearchIcon
|
|
371189
371200
|
}), /* @__PURE__ */ import_react208.default.createElement("input", {
|
|
371190
371201
|
className: SidePanel_module_default.itemsSearchInput,
|
|
371191
|
-
placeholder: "
|
|
371202
|
+
placeholder: t10("sidePanel.itemsSearch"),
|
|
371192
371203
|
ref: itemsSearchRef,
|
|
371193
371204
|
value: itemsQuery,
|
|
371194
371205
|
onChange: (e15) => setItemsQuery(e15.target.value)
|
|
@@ -371246,7 +371257,7 @@ function SidePanel() {
|
|
|
371246
371257
|
iconName: "Stack",
|
|
371247
371258
|
width: 16,
|
|
371248
371259
|
height: 16
|
|
371249
|
-
}), /* @__PURE__ */ import_react208.default.createElement("span", null, "
|
|
371260
|
+
}), /* @__PURE__ */ import_react208.default.createElement("span", null, t10("sidePanel.itemsList"))), /* @__PURE__ */ import_react208.default.createElement("button", {
|
|
371250
371261
|
className: SidePanel_module_default.add,
|
|
371251
371262
|
onClick: handleAddNewMenu
|
|
371252
371263
|
}, /* @__PURE__ */ import_react208.default.createElement(Icon, {
|
|
@@ -445786,6 +445797,25 @@ var BoardPage = () => {
|
|
|
445786
445797
|
});
|
|
445787
445798
|
app.render();
|
|
445788
445799
|
});
|
|
445800
|
+
} else if (window.opener) {
|
|
445801
|
+
boardsList.createBoard().then((boardId) => {
|
|
445802
|
+
app.openBoard(boardId).then(() => {
|
|
445803
|
+
navigate(`/boards/${boardId}`, { replace: true });
|
|
445804
|
+
app.render();
|
|
445805
|
+
console.log("[import] board ready, sending snapshot-ready to opener");
|
|
445806
|
+
window.opener.postMessage({ type: "microboard-snapshot-ready" }, "*");
|
|
445807
|
+
const onMessage = (event) => {
|
|
445808
|
+
if (event.data?.type !== "microboard-snapshot")
|
|
445809
|
+
return;
|
|
445810
|
+
window.removeEventListener("message", onMessage);
|
|
445811
|
+
const { html: html5 } = event.data;
|
|
445812
|
+
console.log("[import] received snapshot, html length:", html5.length);
|
|
445813
|
+
const added = app.getBoard().deserializeHTMLAndEmit(html5);
|
|
445814
|
+
console.log("[import] deserializeHTMLAndEmit added ids:", added);
|
|
445815
|
+
};
|
|
445816
|
+
window.addEventListener("message", onMessage);
|
|
445817
|
+
});
|
|
445818
|
+
});
|
|
445789
445819
|
} else {
|
|
445790
445820
|
const lastSeenBoard = localStorage.getItem(LAST_BOARD_KEY);
|
|
445791
445821
|
const isFirstVisit = !api7.get("first_visit");
|
|
@@ -445810,21 +445840,8 @@ var BoardPage = () => {
|
|
|
445810
445840
|
} else {
|
|
445811
445841
|
boardsList.createBoard().then((boardId) => {
|
|
445812
445842
|
app.openBoard(boardId).then(() => {
|
|
445813
|
-
navigate(`/boards/${boardId}`, {
|
|
445814
|
-
replace: true
|
|
445815
|
-
});
|
|
445843
|
+
navigate(`/boards/${boardId}`, { replace: true });
|
|
445816
445844
|
app.render();
|
|
445817
|
-
if (window.opener) {
|
|
445818
|
-
window.opener.postMessage({ type: "microboard-snapshot-ready" }, "*");
|
|
445819
|
-
const onMessage = (event) => {
|
|
445820
|
-
if (event.data?.type !== "microboard-snapshot")
|
|
445821
|
-
return;
|
|
445822
|
-
window.removeEventListener("message", onMessage);
|
|
445823
|
-
const { html: html5 } = event.data;
|
|
445824
|
-
app.getBoard().deserializeHTMLAndEmit(html5);
|
|
445825
|
-
};
|
|
445826
|
-
window.addEventListener("message", onMessage);
|
|
445827
|
-
}
|
|
445828
445845
|
});
|
|
445829
445846
|
});
|
|
445830
445847
|
}
|
package/dist/titlePanel.js
CHANGED
|
@@ -198,7 +198,7 @@ async function handleShare(ev) {
|
|
|
198
198
|
if (event.data?.type === "microboard-snapshot-ready") {
|
|
199
199
|
window.removeEventListener("message", onMessage);
|
|
200
200
|
clearTimeout(timeout);
|
|
201
|
-
importWindow.postMessage({ type: "microboard-snapshot", html, name },
|
|
201
|
+
importWindow.postMessage({ type: "microboard-snapshot", html, name }, "https://app.microboard.io");
|
|
202
202
|
resolve();
|
|
203
203
|
}
|
|
204
204
|
}
|
|
@@ -719,6 +719,11 @@ export declare const resources: {
|
|
|
719
719
|
notAvailable: string;
|
|
720
720
|
};
|
|
721
721
|
addNew: string;
|
|
722
|
+
itemsList: string;
|
|
723
|
+
itemsTitle: string;
|
|
724
|
+
itemsSearch: string;
|
|
725
|
+
itemsEmpty: string;
|
|
726
|
+
itemsNotFound: string;
|
|
722
727
|
};
|
|
723
728
|
contextMenu: {
|
|
724
729
|
delete: string;
|
|
@@ -1951,6 +1956,11 @@ export declare const resources: {
|
|
|
1951
1956
|
notAvailable: string;
|
|
1952
1957
|
};
|
|
1953
1958
|
addNew: string;
|
|
1959
|
+
itemsList: string;
|
|
1960
|
+
itemsTitle: string;
|
|
1961
|
+
itemsSearch: string;
|
|
1962
|
+
itemsEmpty: string;
|
|
1963
|
+
itemsNotFound: string;
|
|
1954
1964
|
};
|
|
1955
1965
|
contextMenu: {
|
|
1956
1966
|
delete: string;
|