Skip to content

Commit

Permalink
add typescript formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
F43nd1r committed Dec 15, 2024
1 parent b4d89a4 commit 63ac140
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 29 deletions.
12 changes: 6 additions & 6 deletions acrarium/frontend/elements/box.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* (C) Copyright 2019 Lukas Morawietz (https://github.com/F43nd1r)
* (C) Copyright 2019-2024 Lukas Morawietz (https://github.com/F43nd1r)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -14,8 +14,8 @@
* limitations under the License.
*/

import {css, html, LitElement} from 'lit-element'
import {customElement} from "lit/decorators.js"
import {css, html, LitElement} from "lit-element";
import {customElement} from "lit/decorators.js";

@customElement("acrarium-box")
export default class Box extends LitElement {
Expand All @@ -36,7 +36,7 @@ export default class Box extends LitElement {
flex-direction: column;
flex: 1;
}
`
`;
}

render() {
Expand All @@ -46,6 +46,6 @@ export default class Box extends LitElement {
<slot name="details"></slot>
</div>
<slot name="action"></slot>
`
`;
}
}
18 changes: 9 additions & 9 deletions acrarium/frontend/elements/card.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* (C) Copyright 2019 Lukas Morawietz (https://github.com/F43nd1r)
* (C) Copyright 2019-2024 Lukas Morawietz (https://github.com/F43nd1r)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -14,14 +14,14 @@
* limitations under the License.
*/

import {css, html, LitElement} from 'lit-element'
import {customElement, property} from "lit/decorators.js"
import {css, html, LitElement} from "lit-element";
import {customElement, property} from "lit/decorators.js";

@customElement("acrarium-card")
export default class Card extends LitElement {
@property() canCollapse: Boolean = false
@property() isCollapsed: Boolean = false
@property() divider: Boolean = false
@property() canCollapse: Boolean = false;
@property() isCollapsed: Boolean = false;
@property() divider: Boolean = false;

static get styles() {
return css`
Expand Down Expand Up @@ -66,7 +66,7 @@ export default class Card extends LitElement {
border-top: 1px solid var(--lumo-contrast-20pct);
margin-top: 0.5em;
}
`
`;
}

render() {
Expand All @@ -75,7 +75,7 @@ export default class Card extends LitElement {
<div class="acrarium-card-content-wrapper ${this.isCollapsed ? "collapse" : this.divider ? "divider" : ""}">
<slot class="acrarium-card-content"></slot>
</div>
`
`;
}

handleClick() {
Expand Down
12 changes: 6 additions & 6 deletions acrarium/frontend/elements/dialog-content.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* (C) Copyright 2019 Lukas Morawietz (https://github.com/F43nd1r)
* (C) Copyright 2019-2024 Lukas Morawietz (https://github.com/F43nd1r)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -14,8 +14,8 @@
* limitations under the License.
*/

import {css, html, LitElement} from 'lit-element'
import {customElement} from "lit/decorators.js"
import {css, html, LitElement} from "lit-element";
import {customElement} from "lit/decorators.js";

@customElement("acrarium-dialog-content")
export default class DialogContent extends LitElement {
Expand Down Expand Up @@ -47,7 +47,7 @@ export default class DialogContent extends LitElement {
slot[name="header"]::slotted(*) {
margin-top: var(--lumo-space-s) !important;
}
`
`;
}

render() {
Expand All @@ -63,6 +63,6 @@ export default class DialogContent extends LitElement {
<div class="spacer"></div>
<slot name="positive"></slot>
</div>
`
`;
}
}
16 changes: 8 additions & 8 deletions acrarium/frontend/elements/image-with-label.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* (C) Copyright 2019 Lukas Morawietz (https://github.com/F43nd1r)
* (C) Copyright 2019-2024 Lukas Morawietz (https://github.com/F43nd1r)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -14,13 +14,13 @@
* limitations under the License.
*/

import {css, html, LitElement} from 'lit-element'
import {customElement, property} from "lit/decorators.js"
import {css, html, LitElement} from "lit-element";
import {customElement, property} from "lit/decorators.js";

@customElement("acrarium-image-with-label")
export default class ImageWithLabel extends LitElement {
@property() image: String = ""
@property() label: String = ""
@property() image: String = "";
@property() label: String = "";

static get styles() {
return css`
Expand All @@ -38,13 +38,13 @@ export default class ImageWithLabel extends LitElement {
label {
padding-left: var(--lumo-space-s);
}
`
`;
}

render() {
return html`
<img src="${this.image}" alt="${this.label}">
<label>${this.label}</label>
`
`;
}
}
4 changes: 4 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ subprojects {
target("src/**/*.yml")
licenseHeader(buildLicenseHeader("#", "# ", "#"), "[^#].*:.*")
}
typescript {
target("frontend/**/*.ts")
licenseHeader(buildLicenseHeader("/*", " * ", " */"), "(?!(/\\*| \\*| \\*/)).*")
}
format("properties") {
target("src/**/*.properties")
licenseHeader(buildLicenseHeader("#", "# ", "#"), "[^#].*=.*")
Expand Down

0 comments on commit 63ac140

Please sign in to comment.