Skip to content

Commit

Permalink
Merge 2d3ea66 into 0235b65
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-hoehn committed Feb 19, 2023
2 parents 0235b65 + 2d3ea66 commit 397887d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
18 changes: 18 additions & 0 deletions bundles/org.openhab.ui/web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bundles/org.openhab.ui/web/package.json
Expand Up @@ -63,6 +63,7 @@
"dependencies": {
"@blockly/field-slider": "^4.0.3",
"@blockly/plugin-cross-tab-copy-paste": "^2.0.4",
"@blockly/plugin-workspace-search": "^6.0.7",
"@blockly/theme-dark": "^4.0.1",
"@blockly/zoom-to-fit": "^3.0.3",
"@jsep-plugin/arrow": "^1.0.5",
Expand Down
Expand Up @@ -1019,10 +1019,16 @@
stroke inherit
.blocklyDropDownDiv
z-index 9000
.blockly-ws-search
background var(--blockly-ws-search-bg-color)
border-color var(--blockly-ws-search-border-color)
box-shadow none
color var(--blockly-ws-search-text-color)
</style>

<script>
import Blockly from 'blockly'
import { WorkspaceSearch } from '@blockly/plugin-workspace-search'
import { javascriptGenerator } from 'blockly/javascript'
import DarkTheme from '@blockly/theme-dark'
import { CrossTabCopyPaste } from '@blockly/plugin-cross-tab-copy-paste'
Expand Down Expand Up @@ -1061,6 +1067,15 @@ export default {
this.initBlockly(this.blockLibraries)
}
},
computed: {
cssVars () {
return {
'--blockly-ws-search-bg-color': this.$f7.data.themeOptions.dark === 'dark' ? '#1e1e1e' : 'white',
'--blockly-ws-search-border-color': this.$f7.data.themeOptions.dark === 'dark' ? 'lightgrey' : 'grey',
'--blockly-ws-search-text-color': this.$f7.data.themeOptions.dark === 'dark' ? 'white' : 'black'
}
}
},
mounted () {
this.load()
},
Expand Down Expand Up @@ -1130,6 +1145,8 @@ export default {
},
trashcan: false
})
const workspaceSearch = new WorkspaceSearch(this.workspace)
workspaceSearch.init()
Blockly.HSV_SATURATION = 0.45 // default
Blockly.HSV_VALUE = 0.65 // a little bit more contract for the different colors
Expand Down

0 comments on commit 397887d

Please sign in to comment.