Skip to content

Commit

Permalink
Fix breake of old installations (remove lovelace- profix from eleme…
Browse files Browse the repository at this point in the history
…nt name)
  • Loading branch information
Alia5 committed Sep 28, 2024
1 parent 9b504dc commit ed8022e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Card.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-->
<svelte:options customElement="lovelace-expander-sub-card" />
<svelte:options customElement="expander-sub-card" />

<script lang="ts">
import type { HomeAssistant, LovelaceCardConfig } from 'custom-card-helpers';
Expand Down
4 changes: 2 additions & 2 deletions src/ExpanderCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<!-- eslint-disable-next-line svelte/valid-compile -->
<svelte:options customElement={{
tag: 'lovelace-expander-card',
tag: 'expander-card',
extend: (customElementConstructor) => class extends customElementConstructor {
// re-declare props used in customClass.
public config!: ExpanderConfig;
Expand All @@ -29,7 +29,7 @@
}

public static getConfigElement() {
return document.createElement(`lovelace-expander-card-editor${devMode ? '-dev' : ''}`);
return document.createElement(`expander-card-editor${devMode ? '-dev' : ''}`);
};

public static getStubConfig(){
Expand Down
2 changes: 1 addition & 1 deletion src/ExpanderCardEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ limitations under the License.
-->
<!-- eslint-disable-next-line svelte/valid-compile -->
<svelte:options customElement={{
tag: 'lovelace-expander-card-editor',
tag: 'expander-card-editor',
extend: (customElementConstructor) => class extends customElementConstructor {
public config!: ExpanderConfig;
public self!: HTMLElement;
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const devMode = import.meta.env.MODE === 'dev';
window.customCards = window.customCards || [];
window.customCards.push(...[
{
type: `lovelace-expander-card${devMode ? '-dev' : ''}`,
type: `expander-card${devMode ? '-dev' : ''}`,
name: `Expander Card${devMode ? '-dev' : ''}`,
preview: true,
description: `Expander Card${devMode ? ' Dev' : ''}`
Expand Down

0 comments on commit ed8022e

Please sign in to comment.