@things-factory/board-ui 8.0.5 → 8.0.13

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.
@@ -2,9 +2,11 @@ import '@operato/i18n/ox-i18n.js'
2
2
 
3
3
  import { css, html, LitElement, nothing } from 'lit'
4
4
  import { customElement, property, state } from 'lit/decorators.js'
5
+ import { connect } from 'pwa-helpers/connect-mixin.js'
5
6
 
6
7
  import { ScrollbarStyles } from '@operato/styles'
7
8
  import { i18next } from '@operato/i18n'
9
+ import { getPathInfo } from '@operato/utils'
8
10
  import { OxPrompt } from '@operato/popup/ox-prompt.js'
9
11
 
10
12
  @customElement('board-template-builder')
@@ -70,6 +72,7 @@ export class BoardTemplateBuilder extends LitElement {
70
72
  render() {
71
73
  const name = this.name || this.board?.name || ''
72
74
  const description = this.description || this.board?.description || ''
75
+ const { domain } = getPathInfo(window.location.pathname)
73
76
 
74
77
  return html`
75
78
  <div template>
@@ -95,9 +98,7 @@ export class BoardTemplateBuilder extends LitElement {
95
98
  .value=${this.visibility}
96
99
  >
97
100
  <option value="private">${i18next.t('label.visibility-private')}</option>
98
- ${window.location.pathname.startsWith('/domain/')
99
- ? html` <option value="domain">${i18next.t('label.visibility-domain')}</option> `
100
- : nothing}
101
+ ${domain ? html` <option value="domain">${i18next.t('label.visibility-domain')}</option> ` : nothing}
101
102
  <option value="public">${i18next.t('label.visibility-public')}</option>
102
103
  </select>
103
104