Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
Signed-off-by: Dafnik <git@dafnik.me>
  • Loading branch information
Dafnik committed Apr 29, 2024
1 parent 84a79dd commit 325870c
Show file tree
Hide file tree
Showing 23 changed files with 227 additions and 247 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"allowArgumentsExplicitlyTypedAsAny": true
}
],
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
Expand All @@ -44,6 +45,7 @@
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/no-extraneous-class": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@angular-eslint/prefer-standalone": "off",
"@angular-eslint/sort-ngmodule-metadata-arrays": "error",
"@angular-eslint/component-class-suffix": "off",
"@angular-eslint/use-component-selector": "off",
Expand Down
2 changes: 1 addition & 1 deletion src/app/_shared/form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function injectOnSubmit<CreateDTOType, UpdateDTOType extends IHasID<Updat
}

obs$.subscribe((response) => {
if (continuousCreation && continuousCreation.enabled()) {
if (continuousCreation?.enabled()) {
continuousCreation.patch(dto);
} else {
if (method === 'CREATE' && openOnCreate) {
Expand Down
10 changes: 9 additions & 1 deletion src/app/_shared/notifications/toasts-container.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,15 @@ import {NotificationService, Toast} from './notification.service';
</ngb-toast>
}
`,
styles: [':host { position: fixed; bottom: 25px; right: 0; margin: 0.5em; z-index: 1200;}'],
styles: `
:host {
position: fixed;
bottom: 25px;
right: 0;
margin: 0.5em;
z-index: 1200;
}
`,
selector: 'app-toasts',
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [NgTemplateOutlet, NgbToast, AsyncPipe],
Expand Down
2 changes: 1 addition & 1 deletion src/app/_shared/params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function p_add(
}
}
} else {
params = params.append(name, `${newParams}`);
params = params.append(name, newParams);
}
}
return params;
Expand Down
24 changes: 11 additions & 13 deletions src/app/_shared/ui/app-download-btn-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,19 @@ export interface appDownload {
</div>
}
`,
styles: [
`
.customLogo img:last-child {
display: none;
}
styles: `
.customLogo img:last-child {
display: none;
}
.customLogo:hover img:last-child {
display: inline-block;
}
.customLogo:hover img:last-child {
display: inline-block;
}
.customLogo:hover img:first-child {
display: none;
}
`,
],
.customLogo:hover img:first-child {
display: none;
}
`,
selector: 'app-download-btn-list',
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
Expand Down
66 changes: 32 additions & 34 deletions src/app/_shared/ui/footer/footer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,45 +82,43 @@ import {injectWindow} from 'dfx-helper';
</div>
</footer>
`,
styles: [
`
.heart {
color: red;
margin-top: -5px;
}
styles: `
.heart {
color: red;
margin-top: -5px;
}
.heart:hover {
transform: scale(1.4);
}
.heart:hover {
transform: scale(1.4);
}
.name:hover {
cursor: pointer;
position: relative;
font-weight: 500;
}
.name:hover:after {
transform: scale(0.3);
width: 128px;
height: 128px;
display: block;
position: absolute;
left: -90px;
top: -196px; /* change this value to one that suits you */
}
.name:hover {
cursor: pointer;
position: relative;
font-weight: 500;
}
.name:hover:after {
transform: scale(0.3);
width: 128px;
height: 128px;
display: block;
position: absolute;
left: -90px;
top: -196px; /* change this value to one that suits you */
}
.dominik:hover:after {
content: url('/assets/people/dominik.png');
}
.dominik:hover:after {
content: url('/assets/people/dominik.png');
}
.alex:hover:after {
content: url('/assets/people/alex.png');
}
.alex:hover:after {
content: url('/assets/people/alex.png');
}
.fabian:hover:after {
content: url('/assets/people/fabian.png');
}
`,
],
.fabian:hover:after {
content: url('/assets/people/fabian.png');
}
`,
selector: 'app-footer',
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
Expand Down
20 changes: 9 additions & 11 deletions src/app/_shared/ui/loading/app-spinner-row.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@ import {booleanAttribute, ChangeDetectionStrategy, Component, Input} from '@angu
</div>
}
`,
styles: [
`
.b-spinner-row {
display: flex;
align-items: center;
justify-content: center;
margin-top: 30px;
margin-bottom: 30px;
}
`,
],
styles: `
.b-spinner-row {
display: flex;
align-items: center;
justify-content: center;
margin-top: 30px;
margin-bottom: 30px;
}
`,
selector: 'app-spinner-row',
standalone: true,
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
22 changes: 10 additions & 12 deletions src/app/home/_admin/dead-letters/dead-letter-view.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,16 @@ import {DeadLettersService} from './dead-letters.service';
<app-spinner-row />
}
`,
styles: [
`
.json-box {
padding: 15px;
background-color: black;
border-radius: 5px;
}
#json-data {
margin-bottom: 0;
}
`,
],
styles: `
.json-box {
padding: 15px;
background-color: black;
border-radius: 5px;
}
#json-data {
margin-bottom: 0;
}
`,
selector: 'app-dead-letter-view',
imports: [TranslocoPipe, BiComponent, ScrollableToolbarComponent, AppBackButtonComponent, AppSpinnerRowComponent, DatePipe],
standalone: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,48 +98,46 @@ import {TmpNotificationsService} from './tmp-notifications.service';
</div>
}
`,
styles: [
`
.json-box {
padding: 15px;
background-color: black;
border-radius: 5px;
}
.json-data {
margin-bottom: 0;
white-space: pre-wrap;
word-wrap: break-word; /* Allows words to break and wrap */
}
/** Style email **/
.container {
display: flex;
flex-direction: column;
gap: 0.75rem;
margin-top: -100px;
max-width: unset;
line-height: unset;
}
.container > ul {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.logo-row {
display: flex;
justify-content: center;
align-items: center;
gap: 1rem;
}
.logo {
max-width: 96px;
height: auto;
}
`,
],
styles: `
.json-box {
padding: 15px;
background-color: black;
border-radius: 5px;
}
.json-data {
margin-bottom: 0;
white-space: pre-wrap;
word-wrap: break-word; /* Allows words to break and wrap */
}
/** Style email **/
.container {
display: flex;
flex-direction: column;
gap: 0.75rem;
margin-top: -100px;
max-width: unset;
line-height: unset;
}
.container > ul {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.logo-row {
display: flex;
justify-content: center;
align-items: center;
gap: 1rem;
}
.logo {
max-width: 96px;
height: auto;
}
`,
selector: 'app-tmp-notification-view',
imports: [
TranslocoPipe,
Expand Down
2 changes: 1 addition & 1 deletion src/app/home/_layout/home.layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ <h5>{{ 'NAV_USER_SETTINGS_WELCOME' | transloco }} {{ user.firstname }},</h5>
<bi name="file-lock" />
{{ 'NAV_USER_SESSIONS' | transloco }}
</a>
<button type="button" ngbDropdownItem (click)="this.authService.logout()" class="d-flex gap-2 align-items-center">
<button type="button" ngbDropdownItem class="d-flex gap-2 align-items-center" (click)="this.authService.logout()">
<bi name="box-arrow-left" />
{{ 'NAV_LOGOUT' | transloco }}
</button>
Expand Down
16 changes: 7 additions & 9 deletions src/app/home/_shared/components/color/color-picker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,13 @@ import {AppIsLightColorPipe} from './app-is-light-color.pipe';
</div>
</ng-template>
`,
styles: [
`
.color-btn {
border: none;
width: 33px;
height: 33px;
}
`,
],
styles: `
.color-btn {
border: none;
width: 33px;
height: 33px;
}
`,
standalone: true,
selector: 'app-color-picker',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {ScrollableToolbarComponent} from '../scrollable-toolbar.component';
],
changeDetection: ChangeDetectionStrategy.OnPush,
templateUrl: './app-navbar-scrollable.component.html',
styleUrls: ['./app-navbar-scrollable.component.css'],
styleUrl: './app-navbar-scrollable.component.css',
})
export class AppNavbarScrollableComponent implements AfterViewInit {
@Input({transform: booleanAttribute}) isMobile = false;
Expand Down
38 changes: 18 additions & 20 deletions src/app/home/_shared/components/scrollable-toolbar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,27 @@ import {AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, ViewChild
<ng-content />
</div>
`,
styles: [
`
#overflow-container {
scroll-snap-type: y mandatory;
scroll-behavior: smooth;
}
styles: `
#overflow-container {
scroll-snap-type: y mandatory;
scroll-behavior: smooth;
}
.overflow-auto::-webkit-scrollbar {
display: none;
}
.overflow-auto::-webkit-scrollbar {
display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.overflow-auto {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
/* Hide scrollbar for IE, Edge and Firefox */
.overflow-auto {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
:host(scrollable-toolbar)::ng-deep.btn {
word-break: keep-all;
white-space: nowrap;
}
`,
],
:host(scrollable-toolbar)::ng-deep.btn {
word-break: keep-all;
white-space: nowrap;
}
`,
selector: 'scrollable-toolbar',
standalone: true,
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down

0 comments on commit 325870c

Please sign in to comment.