Skip to content

Commit

Permalink
Merge 4e08aea into cf18968
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs authored Oct 15, 2024
2 parents cf18968 + 4e08aea commit 33a392d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 23 deletions.
6 changes: 3 additions & 3 deletions webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@
"mermaid": "^10.1.0",
"primeicons": "^7.0.0",
"primevue": "^4.0.0",
"qrcode-vue3": "^1.6.8",
"serve": "^14.2.1",
"stream-browserify": "^3.0.0",
"tinymce": "^5.10.9",
"vue": "^3.2.4",
"vue-qrcode-reader": "^5.5.7",
"vue-router": "^4.0.0-0",
"vue-select": "^4.0.0-beta.6",
"vue3-easy-data-table": "^1.5.45",
"vuex": "^4.0.0-0",
"qrcode-vue3": "^1.6.8",
"vue-qrcode-reader": "^5.5.7"
"vuex": "^4.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.24.8",
Expand Down
6 changes: 4 additions & 2 deletions webapp/src/components/datablocks/DataBlockBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
/>
<input v-model="BlockTitle" class="form-control-plaintext block-title" type="text" />
<span class="blocktype-label ml-auto mr-3">{{ blockType }}</span>
<span class="block-header-icon"><StyledBlockInfo :block-info="blockInfo" /></span>
<span v-if="blockInfo" class="block-header-icon"
><StyledBlockInfo :block-info="blockInfo"
/></span>
<font-awesome-icon
:icon="['fa', 'sync']"
class="block-header-icon"
Expand Down Expand Up @@ -170,7 +172,7 @@ export default {
return this.$store.state.updatingDelayed[this.block_id];
},
blockInfo() {
return this.$store.state.blocksInfos[this.blockType];
return this.$store.state.blocksInfos?.[this.blockType];
},
BlockTitle: createComputedSetterForBlockField("title"),
BlockDescription: createComputedSetterForBlockField("freeform_comment"),
Expand Down
5 changes: 4 additions & 1 deletion webapp/src/components/datablocks/NotImplementedBlock.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<template>
<DataBlockBase>
<div class="alert alert-danger">This block type has not been implemented!</div>
<div class="alert alert-danger">
This block type is not implemented/installed for this <i>datalab</i> instance. Please contact
your <i>datalab</i> administrator.
</div>
</DataBlockBase>
</template>

Expand Down
17 changes: 3 additions & 14 deletions webapp/src/views/EditPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ export default {
return this.$store.state.files;
},
blocksInfos() {
if (Object.keys(this.$store.state.blocksInfos).length == 0) {
getBlocksInfos();
}
return this.$store.state.blocksInfos;
},
itemApiUrl() {
Expand All @@ -202,7 +205,6 @@ export default {
},
},
created() {
getBlocksInfos();
this.getSampleData();
this.interval = setInterval(() => this.setLastModified(), 30000);
},
Expand Down Expand Up @@ -250,19 +252,6 @@ export default {
behavior: "smooth",
});
},
change_a_block(event, block_id) {
let item_id = this.item_id;
let new_data = {
block_id: 7,
a_new_field: "foo bar",
};
console.log(new_data);
this.$store.commit("updateBlockData", {
item_id,
block_id,
block_data: new_data,
});
},
getBlockDisplayType(block_id) {
var type = this.blocks[block_id].blocktype;
if (type in blockTypes) {
Expand Down
6 changes: 3 additions & 3 deletions webapp/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3945,9 +3945,9 @@ caniuse-api@^3.0.0:
lodash.uniq "^4.5.0"

caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001517, caniuse-lite@^1.0.30001520, caniuse-lite@^1.0.30001640:
version "1.0.30001641"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001641.tgz#3572862cd18befae3f637f2a1101cc033c6782ac"
integrity sha512-Phv5thgl67bHYo1TtMY/MurjkHhV4EDaCosezRXgZ8jzA/Ub+wjxAvbGvjoFENStinwi5kCyOYV3mi5tOGykwA==
version "1.0.30001668"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001668.tgz"
integrity sha512-nWLrdxqCdblixUO+27JtGJJE/txpJlyUy5YN1u53wLZkP0emYCo5zgS6QYft7VUYR42LGgi/S5hdLZTrnyIddw==

case-sensitive-paths-webpack-plugin@^2.3.0:
version "2.4.0"
Expand Down

0 comments on commit 33a392d

Please sign in to comment.