Skip to content

Commit

Permalink
style: cleanup - format all
Browse files Browse the repository at this point in the history
  • Loading branch information
guiseek committed Dec 7, 2024
1 parent 49f4a41 commit 6e17b20
Show file tree
Hide file tree
Showing 29 changed files with 141 additions and 55 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to registry
uses: docker/login-action@v2
with:
registry: https://devmx.azurecr.io/
username: ${{ secrets.AzureAppService_ContainerUsername_947982706eed46ce985090481ab47364 }}
password: ${{ secrets.AzureAppService_ContainerPassword_86f3c94c1b5143be904bfc1de2add431 }}

- name: Build and push container image to registry
uses: docker/build-push-action@v3
with:
Expand All @@ -83,11 +83,11 @@ jobs:
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'devpr'
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_36a287a711bf47e6a54130170298549c }}
images: 'devmx.azurecr.io/${{ secrets.AzureAppService_ContainerUsername_947982706eed46ce985090481ab47364 }}/devmx-server:${{ github.sha }}'
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'devpr'
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_36a287a711bf47e6a54130170298549c }}
images: 'devmx.azurecr.io/${{ secrets.AzureAppService_ContainerUsername_947982706eed46ce985090481ab47364 }}/devmx-server:${{ github.sha }}'
2 changes: 1 addition & 1 deletion apps/devmx/src/scss/components/_layout.theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
}
}

.mat-expansion-panel-header-title {
.mat-drawer-inner-container .mat-expansion-panel-header-title {
opacity: 0.4;
}

Expand Down
12 changes: 6 additions & 6 deletions packages/academy/data-access/src/lib/providers/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export * from './course';
export * from './facades';
export * from './nistitution';
export * from './services';
export * from './subject';
export * from './use-cases';
export * from './course';
export * from './facades';
export * from './nistitution';
export * from './services';
export * from './subject';
export * from './use-cases';
6 changes: 3 additions & 3 deletions packages/account/feature-about/src/lib/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from './user-presentations/user-presentations.component';
export * from './user-events/user-events.component';
export * from './user-skills/user-skills.component';
export * from './user-presentations/user-presentations.component';
export * from './user-events/user-events.component';
export * from './user-skills/user-skills.component';
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h2>{{user.displayName}}</h2>
@if (user.visibility?.email) {
<a [href]="'mailto:' + user.contact.email">
<devmx-icon name="message/mail" />
<span>{{user.contact.email}}</span>
<span>{{user.contact.email | shadow: 'email'}}</span>
</a>
}

Expand All @@ -33,7 +33,7 @@ <h2>{{user.displayName}}</h2>
@if (user.visibility?.phone) {
<a [href]="'tel://' + user.contact.phone">
<devmx-icon name="tech/phone" />
<span>{{user.contact.phone}}</span>
<span>{{user.contact.phone | shadow:'phone'}}</span>
</a>
}
</nav>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
}

section {

}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import { PresentationFacade } from '@devmx/presentation-data-access';
import { AuthenticationFacade } from '@devmx/account-data-access';
import { IconComponent } from '@devmx/shared-ui-global/icon';
import { ShadowPipe } from '@devmx/shared-ui-global/shadow';
import { MatButtonModule } from '@angular/material/button';
import { markdownToText } from '@devmx/shared-util-data';
import { EventFacade } from '@devmx/event-data-access';
Expand Down Expand Up @@ -38,6 +39,7 @@ import {
MatProgressBarModule,
MatButtonModule,
IconComponent,
ShadowPipe,
AsyncPipe,
],
standalone: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@

<mat-list>
@for (album of data(); track album.id) {
<a
mat-list-item
[routerLink]="['/', 'albuns', album.id]"
>
<a mat-list-item [routerLink]="['/', 'albuns', album.id]">
<devmx-icon matListItemIcon name="photo" />
<div matListItemTitle>{{ album.title }}</div>
<div matListItemLine>{{ album.createdAt | date : 'longDate' }}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,28 @@
[cdkDragData]="item"
[formGroupName]="index"
>
<mat-expansion-panel-header>
<div *cdkDragPlaceholder></div>
<mat-panel-title> {{ item.value.skill?.name }} </mat-panel-title>
<mat-panel-description class="skill-weight"> {{ item.value.weight }}% </mat-panel-description>
<devmx-icon name="drag/indicator" cdkDragHandle />
<mat-expansion-panel-header class="skill-header">
<div class="drag-placeholder" *cdkDragPlaceholder></div>

<mat-panel-title class="skill-title">
<devmx-icon name="drag/indicator" cdkDragHandle />

<span>
{{ item.value.skill?.name }}
</span>
</mat-panel-title>

<mat-panel-description class="skill-weight">
{{ item.value.weight }}%
</mat-panel-description>

<button
type="button"
mat-icon-button
(click)="form.skills.removeAt(index)"
>
<devmx-icon name="trash" />
</button>
</mat-expansion-panel-header>

<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,36 @@
display: flex;
flex-direction: column;
}

.skill-header {
flex: 1;
display: flex;
justify-content: space-between;
align-items: center;

.skill-title {
gap: 0.4em;
display: flex;

span {
opacity: 0.4;
}
}

.drag-placeholder {
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
background-color: #666;
min-height: 60px;
}

.cdk-drag-handle {
cursor: grab;

&:active {
cursor: grabbing;
}
}
}
}

.skill-weight {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { RSVPButtonComponent, RSVPForm, ShowEventAddressPipe, ShowEventLinkPipe } from '@devmx/event-ui-shared';
import {
RSVPButtonComponent,
RSVPForm,
ShowEventAddressPipe,
ShowEventLinkPipe,
} from '@devmx/event-ui-shared';
import { MarkdownViewComponent } from '@devmx/shared-ui-global/markdown';
import { AuthenticationFacade } from '@devmx/account-data-access';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
Expand Down Expand Up @@ -55,7 +60,7 @@ export class EventDetailsContainer {

authFacade = inject(AuthenticationFacade);

eventFacade = inject(EventFacade)
eventFacade = inject(EventFacade);

rsvpFacade = inject(RSVPFacade);

Expand Down
2 changes: 1 addition & 1 deletion packages/shared/api-interfaces/src/server/envs/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export abstract class Env {

abstract mongo: {
uri: string;
}
};

abstract jwt: {
secret: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/data-source/src/lib/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function provideMongoURI() {
return {
provide: 'MONGO_URI',
useFactory(env: Env) {
const { user, pass, host, port, name, } = env.db;
const { user, pass, host, port, name } = env.db;
const { uri } = env.mongo;

if (env.production) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a mat-raised-button [href]="link()" target="_blank" rel="noopener,noreferrer">
<devmx-icon matPreffix name="calendar" size="22" />
<span>{{text()}}</span>
<span>{{ text() }}</span>
</a>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a mat-raised-button [href]="link()" target="_blank" rel="noopener,noreferrer">
<devmx-icon matPreffix name="transport/map-pin" size="22" />
<span>{{text()}}</span>
<span>{{ text() }}</span>
</a>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a mat-raised-button [href]="link()" target="_blank" rel="noopener,noreferrer">
<devmx-icon matPreffix name="social/whatsapp" size="24" />
<span>{{text()}}</span>
<span>{{ text() }}</span>
</a>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a mat-raised-button [href]="link()" target="_blank" rel="noopener,noreferrer">
<devmx-icon matPreffix name="social/youtube" size="22" />
<span>{{text()}}</span>
<span>{{ text() }}</span>
</a>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
export class YoutubeButtonComponent implements AfterViewInit {
data = input.required<EventPage>();

text = input('Abrir com YouTube')
text = input('Abrir com YouTube');

platform = inject(Platform);

Expand Down
3 changes: 3 additions & 0 deletions packages/shared/ui-global/shadow/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @devmx/shared-ui-global/shadow

Secondary entry point of `@devmx/shared-ui-global`. It can be used by importing from `@devmx/shared-ui-global/shadow`.
5 changes: 5 additions & 0 deletions packages/shared/ui-global/shadow/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"lib": {
"entryFile": "src/index.ts"
}
}
1 change: 1 addition & 0 deletions packages/shared/ui-global/shadow/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './lib/shadow.pipe';
24 changes: 24 additions & 0 deletions packages/shared/ui-global/shadow/src/lib/shadow.pipe.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Pipe, PipeTransform } from '@angular/core';

export type ShadowFor = 'phone' | 'email' | 'date' | 'name';

@Pipe({ name: 'shadow' })
export class ShadowPipe implements PipeTransform {
transform(value?: string | number, kind: ShadowFor = 'phone') {
if (!value) return;
switch (kind) {
default:
case 'phone': {
const obfuscated = '#'.repeat(Math.max(0, String(value).length - 6));
const visible = String(value).slice(-6);
return obfuscated + visible;
}
case 'email': {
const [user, domain] = String(value).split('@');
const shade = user[0] + '#'.repeat(user.length - 2);
const shadedUser = shade + user[user.length - 1];
return `${shadedUser}@${domain}`;
}
}
}
}
4 changes: 1 addition & 3 deletions packages/shared/util-data/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
"main": "packages/shared/util-data/src/index.ts",
"tsConfig": "packages/shared/util-data/tsconfig.lib.json",
"assets": [],
"additionalEntryPoints": [
"packages/shared/util-data/src/client.ts"
]
"additionalEntryPoints": ["packages/shared/util-data/src/client.ts"]
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/util-data/src/client.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './client/index'
export * from './client/index';
2 changes: 1 addition & 1 deletion packages/shared/util-data/src/client/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './providers';
export * from './providers';
8 changes: 4 additions & 4 deletions packages/shared/util-data/src/client/providers/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './create-client-provider';
export * from './create-facade-provider';
export * from './create-service-provder';
export * from './create-use-case-provider';
export * from './create-client-provider';
export * from './create-facade-provider';
export * from './create-service-provder';
export * from './create-use-case-provider';
2 changes: 1 addition & 1 deletion tools/plugin/dx-dev/src/generators/use-cases/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './normalize-options';
export * from './normalize-options';
4 changes: 2 additions & 2 deletions tools/plugin/dx-dev/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './get-all-names';
export * from './pluralize';
export * from './get-all-names';
export * from './pluralize';
7 changes: 6 additions & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@
"@devmx/shared-ui-global/search": [
"packages/shared/ui-global/search/src/index.ts"
],
"@devmx/shared-ui-global/shadow": [
"packages/shared/ui-global/shadow/src/index.ts"
],
"@devmx/shared-ui-global/sheet": [
"packages/shared/ui-global/sheet/src/index.ts"
],
Expand Down Expand Up @@ -259,7 +262,9 @@
"packages/shared/util-authn/src/types.ts"
],
"@devmx/shared-util-data": ["packages/shared/util-data/src/index.ts"],
"@devmx/shared-util-data/client": ["packages/shared/util-data/src/client.ts"],
"@devmx/shared-util-data/client": [
"packages/shared/util-data/src/client.ts"
],
"@devmx/shared-util-errors": ["packages/shared/util-errors/src/index.ts"]
}
},
Expand Down

0 comments on commit 6e17b20

Please sign in to comment.