From b977a4828f2db18391307936d6dc4103588a5ee0 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Tue, 25 Feb 2025 08:58:50 +0100 Subject: [PATCH] chore: format templates --- templates/angular-example/juno.dev.config.js | 32 ++-- .../angular-example/src/app/app.component.ts | 14 +- .../angular-example/src/app/app.config.ts | 8 +- .../angular-example/src/app/app.routes.ts | 2 +- .../src/app/components/auth/auth.component.ts | 12 +- .../backdrop/backdrop.component.html | 6 +- .../components/backdrop/backdrop.component.ts | 6 +- .../background/background.component.html | 6 +- .../background/background.component.ts | 4 +- .../components/button/button.component.html | 7 +- .../app/components/button/button.component.ts | 6 +- .../components/delete/delete.component.html | 22 ++- .../app/components/delete/delete.component.ts | 22 +-- .../components/footer/footer.component.html | 146 ++++++++++++----- .../app/components/footer/footer.component.ts | 4 +- .../app/components/home/home.component.html | 16 +- .../src/app/components/home/home.component.ts | 22 ++- .../app/components/login/login.component.ts | 8 +- .../components/logout/logout.component.html | 9 +- .../app/components/logout/logout.component.ts | 6 +- .../app/components/modal/modal.component.html | 48 ++++-- .../app/components/modal/modal.component.ts | 32 ++-- .../app/components/table/table.component.html | 28 +++- .../app/components/table/table.component.ts | 14 +- .../src/app/services/auth.service.ts | 14 +- .../src/app/services/docs.service.ts | 24 ++- .../src/environments/environment.prod.ts | 2 +- .../src/environments/environment.ts | 4 +- templates/angular-example/src/index.html | 6 +- templates/angular-example/src/main.ts | 10 +- templates/angular-example/src/styles.css | 12 +- templates/angular-starter/juno.dev.config.js | 8 +- .../angular-starter/src/app/app.component.ts | 14 +- .../angular-starter/src/app/app.config.ts | 8 +- .../angular-starter/src/app/app.routes.ts | 2 +- .../components/article/article.component.html | 6 +- .../components/article/article.component.ts | 4 +- .../background/background.component.html | 5 +- .../background/background.component.ts | 4 +- .../components/footer/footer.component.html | 146 ++++++++++++----- .../app/components/footer/footer.component.ts | 4 +- .../app/components/hero/hero.component.html | 3 +- .../src/app/components/hero/hero.component.ts | 4 +- .../app/components/home/home.component.html | 24 ++- .../src/app/components/home/home.component.ts | 19 ++- .../src/environments/environment.prod.ts | 2 +- .../src/environments/environment.ts | 4 +- templates/angular-starter/src/index.html | 6 +- templates/angular-starter/src/main.ts | 10 +- templates/angular-starter/src/styles.css | 12 +- .../src/components/Article.astro | 4 +- .../src/components/Background.astro | 2 +- .../astro-starter/src/components/Footer.astro | 4 +- .../astro-starter/src/components/Hero.astro | 2 +- templates/astro-starter/src/pages/index.astro | 6 +- templates/astro-starter/src/styles/global.css | 2 +- templates/nextjs-example/juno.dev.config.ts | 32 ++-- templates/nextjs-example/next.config.mjs | 4 +- templates/nextjs-example/postcss.config.js | 4 +- templates/nextjs-example/src/app/globals.css | 12 +- templates/nextjs-example/src/app/layout.tsx | 18 +- templates/nextjs-example/src/app/page.tsx | 31 ++-- .../nextjs-example/src/components/auth.tsx | 16 +- .../src/components/backdrop.tsx | 8 +- .../src/components/background.tsx | 4 +- .../nextjs-example/src/components/button.tsx | 11 +- .../nextjs-example/src/components/delete.tsx | 32 ++-- .../nextjs-example/src/components/footer.tsx | 48 ++++-- .../nextjs-example/src/components/login.tsx | 4 +- .../nextjs-example/src/components/logout.tsx | 8 +- .../nextjs-example/src/components/modal.tsx | 97 +++++------ .../nextjs-example/src/components/table.tsx | 57 ++++--- templates/nextjs-example/src/types/note.ts | 2 +- templates/nextjs-starter/juno.dev.config.ts | 8 +- templates/nextjs-starter/next.config.mjs | 4 +- templates/nextjs-starter/postcss.config.js | 4 +- templates/nextjs-starter/src/app/globals.css | 12 +- templates/nextjs-starter/src/app/layout.tsx | 18 +- templates/nextjs-starter/src/app/page.tsx | 39 +++-- .../nextjs-starter/src/components/article.tsx | 9 +- .../src/components/background.tsx | 4 +- .../nextjs-starter/src/components/footer.tsx | 48 ++++-- .../nextjs-starter/src/components/hero.tsx | 7 +- templates/react-example/eslint.config.js | 41 ++--- templates/react-example/index.html | 6 +- templates/react-example/juno.dev.config.js | 32 ++-- templates/react-example/src/App.jsx | 29 ++-- .../react-example/src/components/Auth.jsx | 16 +- .../react-example/src/components/Backdrop.jsx | 12 +- .../src/components/Background.jsx | 2 +- .../react-example/src/components/Button.jsx | 9 +- .../react-example/src/components/Delete.jsx | 34 ++-- .../react-example/src/components/Footer.jsx | 48 ++++-- .../react-example/src/components/Login.jsx | 4 +- .../react-example/src/components/Logout.jsx | 8 +- .../react-example/src/components/Modal.jsx | 94 ++++++----- .../react-example/src/components/Table.jsx | 55 ++++--- templates/react-example/src/index.css | 12 +- templates/react-example/src/main.jsx | 12 +- templates/react-example/vite.config.js | 12 +- templates/react-starter/eslint.config.js | 41 ++--- templates/react-starter/index.html | 6 +- templates/react-starter/juno.dev.config.js | 8 +- templates/react-starter/src/App.jsx | 37 +++-- .../react-starter/src/components/Article.jsx | 11 +- .../src/components/Background.jsx | 2 +- .../react-starter/src/components/Footer.jsx | 48 ++++-- .../react-starter/src/components/Hero.jsx | 9 +- templates/react-starter/src/index.css | 12 +- templates/react-starter/src/main.jsx | 12 +- templates/react-starter/vite.config.js | 12 +- templates/react-ts-example/eslint.config.js | 43 ++--- templates/react-ts-example/index.html | 6 +- templates/react-ts-example/juno.dev.config.ts | 32 ++-- templates/react-ts-example/src/App.tsx | 29 ++-- .../react-ts-example/src/components/Auth.tsx | 20 ++- .../src/components/Backdrop.tsx | 11 +- .../src/components/Background.tsx | 4 +- .../src/components/Button.tsx | 7 +- .../src/components/Delete.tsx | 32 ++-- .../src/components/Footer.tsx | 50 ++++-- .../react-ts-example/src/components/Login.tsx | 6 +- .../src/components/Logout.tsx | 10 +- .../react-ts-example/src/components/Modal.tsx | 94 ++++++----- .../react-ts-example/src/components/Table.tsx | 57 ++++--- templates/react-ts-example/src/index.css | 12 +- templates/react-ts-example/src/main.tsx | 12 +- templates/react-ts-example/src/types/note.ts | 2 +- templates/react-ts-example/tsconfig.json | 5 +- templates/react-ts-example/vite.config.ts | 12 +- templates/react-ts-starter/eslint.config.js | 29 ++-- templates/react-ts-starter/index.html | 6 +- templates/react-ts-starter/juno.dev.config.ts | 8 +- templates/react-ts-starter/src/App.tsx | 37 +++-- .../src/components/Article.tsx | 9 +- .../src/components/Background.tsx | 4 +- .../src/components/Footer.tsx | 50 ++++-- .../react-ts-starter/src/components/Hero.tsx | 7 +- templates/react-ts-starter/src/index.css | 12 +- templates/react-ts-starter/src/main.tsx | 12 +- templates/react-ts-starter/tsconfig.json | 5 +- templates/react-ts-starter/vite.config.ts | 12 +- templates/react-workshop/README.md | 40 ++--- templates/react-workshop/eslint.config.js | 41 ++--- templates/react-workshop/index.html | 6 +- templates/react-workshop/juno.config.mjs | 8 +- templates/react-workshop/juno.dev.config.js | 32 ++-- templates/react-workshop/src/App.jsx | 21 +-- .../react-workshop/src/components/Auth.jsx | 14 +- .../src/components/Backdrop.jsx | 12 +- .../src/components/Background.jsx | 2 +- .../react-workshop/src/components/Button.jsx | 9 +- .../react-workshop/src/components/Delete.jsx | 34 ++-- .../react-workshop/src/components/Footer.jsx | 48 ++++-- .../react-workshop/src/components/Login.jsx | 2 +- .../react-workshop/src/components/Logout.jsx | 6 +- .../react-workshop/src/components/Modal.jsx | 78 ++++----- .../react-workshop/src/components/Table.jsx | 47 ++++-- templates/react-workshop/src/index.css | 12 +- templates/react-workshop/src/main.jsx | 12 +- templates/react-workshop/vite.config.js | 12 +- .../src/lib/components/Backdrop.svelte | 4 +- .../src/lib/components/Background.svelte | 2 +- .../src/lib/components/Button.svelte | 2 +- .../src/lib/components/Footer.svelte | 4 +- .../src/lib/components/Logout.svelte | 2 +- .../src/lib/components/Modal.svelte | 16 +- .../src/lib/components/Table.svelte | 10 +- .../src/routes/+layout.svelte | 6 +- .../src/lib/components/Article.svelte | 4 +- .../src/lib/components/Background.svelte | 2 +- .../src/lib/components/Footer.svelte | 4 +- .../src/lib/components/Hero.svelte | 2 +- .../src/routes/+layout.svelte | 6 +- templates/vanilla-js-example/index.html | 155 ++++++++++++------ .../vanilla-js-example/juno.dev.config.js | 32 ++-- .../src/components/content.js | 6 +- .../src/components/delete.js | 20 +-- .../src/components/login.js | 8 +- .../src/components/logout.js | 8 +- .../src/components/modal.js | 40 ++--- .../src/components/table.js | 24 +-- templates/vanilla-js-example/src/main.js | 16 +- templates/vanilla-js-example/src/style.css | 12 +- .../vanilla-js-example/src/utils/utils.js | 10 +- templates/vanilla-js-example/vite.config.js | 10 +- templates/vue-example/src/App.vue | 6 +- templates/vue-example/src/assets/main.css | 1 - .../vue-example/src/components/Backdrop.vue | 4 +- .../vue-example/src/components/Background.vue | 2 +- .../vue-example/src/components/Button.vue | 4 +- .../vue-example/src/components/Footer.vue | 4 +- .../vue-example/src/components/Logout.vue | 2 +- .../vue-example/src/components/Modal.vue | 16 +- .../vue-example/src/components/Table.vue | 10 +- templates/vue-starter/src/App.vue | 6 +- .../vue-starter/src/components/Article.vue | 4 +- .../vue-starter/src/components/Background.vue | 2 +- .../vue-starter/src/components/Footer.vue | 4 +- templates/vue-starter/src/components/Hero.vue | 2 +- 200 files changed, 2094 insertions(+), 1471 deletions(-) diff --git a/templates/angular-example/juno.dev.config.js b/templates/angular-example/juno.dev.config.js index 822145f9..914cd131 100644 --- a/templates/angular-example/juno.dev.config.js +++ b/templates/angular-example/juno.dev.config.js @@ -1,4 +1,4 @@ -import {defineDevConfig} from '@junobuild/config'; +import { defineDevConfig } from "@junobuild/config"; /** @type {import('@junobuild/config').JunoDevConfig} */ export default defineDevConfig(() => ({ @@ -6,22 +6,22 @@ export default defineDevConfig(() => ({ collections: { datastore: [ { - collection: 'notes', - read: 'managed', - write: 'managed', - memory: 'stable', - mutablePermissions: true - } + collection: "notes", + read: "managed", + write: "managed", + memory: "stable", + mutablePermissions: true, + }, ], storage: [ { - collection: 'images', - read: 'managed', - write: 'managed', - memory: 'stable', - mutablePermissions: true - } - ] - } - } + collection: "images", + read: "managed", + write: "managed", + memory: "stable", + mutablePermissions: true, + }, + ], + }, + }, })); diff --git a/templates/angular-example/src/app/app.component.ts b/templates/angular-example/src/app/app.component.ts index a31327e2..f440fa78 100644 --- a/templates/angular-example/src/app/app.component.ts +++ b/templates/angular-example/src/app/app.component.ts @@ -1,12 +1,12 @@ -import {Component} from '@angular/core'; -import {initSatellite} from '@junobuild/core'; -import {environment} from '../environments/environment'; -import {HomeComponent} from './components/home/home.component'; +import { Component } from '@angular/core'; +import { initSatellite } from '@junobuild/core'; +import { environment } from '../environments/environment'; +import { HomeComponent } from './components/home/home.component'; @Component({ selector: 'app-root', imports: [HomeComponent], - templateUrl: './app.component.html' + templateUrl: './app.component.html', }) export class AppComponent { title = 'Juno / Angular Example'; @@ -16,8 +16,8 @@ export class AppComponent { satelliteId: environment.satelliteId, container: environment.container, workers: { - auth: './assets/workers/auth.worker.js' - } + auth: './assets/workers/auth.worker.js', + }, }); } } diff --git a/templates/angular-example/src/app/app.config.ts b/templates/angular-example/src/app/app.config.ts index baf3e0c8..e7d665f8 100644 --- a/templates/angular-example/src/app/app.config.ts +++ b/templates/angular-example/src/app/app.config.ts @@ -1,8 +1,8 @@ -import {ApplicationConfig} from '@angular/core'; -import {provideRouter} from '@angular/router'; +import { ApplicationConfig } from '@angular/core'; +import { provideRouter } from '@angular/router'; -import {routes} from './app.routes'; +import { routes } from './app.routes'; export const appConfig: ApplicationConfig = { - providers: [provideRouter(routes)] + providers: [provideRouter(routes)], }; diff --git a/templates/angular-example/src/app/app.routes.ts b/templates/angular-example/src/app/app.routes.ts index 8b5e5fb2..dc39edb5 100644 --- a/templates/angular-example/src/app/app.routes.ts +++ b/templates/angular-example/src/app/app.routes.ts @@ -1,3 +1,3 @@ -import {Routes} from '@angular/router'; +import { Routes } from '@angular/router'; export const routes: Routes = []; diff --git a/templates/angular-example/src/app/components/auth/auth.component.ts b/templates/angular-example/src/app/components/auth/auth.component.ts index 06ed38f3..28fef210 100644 --- a/templates/angular-example/src/app/components/auth/auth.component.ts +++ b/templates/angular-example/src/app/components/auth/auth.component.ts @@ -1,13 +1,13 @@ -import {NgIf} from '@angular/common'; -import {Component, inject} from '@angular/core'; -import {AuthService} from '../../services/auth.service'; -import {LoginComponent} from '../login/login.component'; -import {LogoutComponent} from '../logout/logout.component'; +import { NgIf } from '@angular/common'; +import { Component, inject } from '@angular/core'; +import { AuthService } from '../../services/auth.service'; +import { LoginComponent } from '../login/login.component'; +import { LogoutComponent } from '../logout/logout.component'; @Component({ selector: 'app-auth', imports: [LoginComponent, LogoutComponent, NgIf], - templateUrl: './auth.component.html' + templateUrl: './auth.component.html', }) export class AuthComponent { private readonly authService = inject(AuthService); diff --git a/templates/angular-example/src/app/components/backdrop/backdrop.component.html b/templates/angular-example/src/app/components/backdrop/backdrop.component.html index 029e90ef..a1082833 100644 --- a/templates/angular-example/src/app/components/backdrop/backdrop.component.html +++ b/templates/angular-example/src/app/components/backdrop/backdrop.component.html @@ -1,6 +1,8 @@
+ class="dark:bg-lavender-blue-200/40 fixed inset-0 z-40 flex items-center justify-center bg-white/30 backdrop-blur-xl" +>
+ class="border-lavender-blue-600 h-12 w-12 animate-spin rounded-full border-[3px] border-solid border-t-transparent" + >
diff --git a/templates/angular-example/src/app/components/backdrop/backdrop.component.ts b/templates/angular-example/src/app/components/backdrop/backdrop.component.ts index 5b2a8df9..93f0f959 100644 --- a/templates/angular-example/src/app/components/backdrop/backdrop.component.ts +++ b/templates/angular-example/src/app/components/backdrop/backdrop.component.ts @@ -1,10 +1,10 @@ -import {NgClass, NgIf} from '@angular/common'; -import {Component, Input} from '@angular/core'; +import { NgClass, NgIf } from '@angular/common'; +import { Component, Input } from '@angular/core'; @Component({ selector: 'app-backdrop', imports: [NgIf, NgClass], - templateUrl: './backdrop.component.html' + templateUrl: './backdrop.component.html', }) export class BackdropComponent { @Input() spinner = false; diff --git a/templates/angular-example/src/app/components/background/background.component.html b/templates/angular-example/src/app/components/background/background.component.html index 6ea0b1ec..b42914ab 100644 --- a/templates/angular-example/src/app/components/background/background.component.html +++ b/templates/angular-example/src/app/components/background/background.component.html @@ -1,8 +1,10 @@ diff --git a/templates/angular-example/src/app/components/background/background.component.ts b/templates/angular-example/src/app/components/background/background.component.ts index fa46f48f..5a48ef02 100644 --- a/templates/angular-example/src/app/components/background/background.component.ts +++ b/templates/angular-example/src/app/components/background/background.component.ts @@ -1,8 +1,8 @@ -import {Component} from '@angular/core'; +import { Component } from '@angular/core'; @Component({ selector: 'app-background', imports: [], - templateUrl: './background.component.html' + templateUrl: './background.component.html', }) export class BackgroundComponent {} diff --git a/templates/angular-example/src/app/components/button/button.component.html b/templates/angular-example/src/app/components/button/button.component.html index d2e6da26..bb45aae7 100644 --- a/templates/angular-example/src/app/components/button/button.component.html +++ b/templates/angular-example/src/app/components/button/button.component.html @@ -1,10 +1,11 @@ diff --git a/templates/angular-example/src/app/components/button/button.component.ts b/templates/angular-example/src/app/components/button/button.component.ts index 46a8a7d1..5c1031a7 100644 --- a/templates/angular-example/src/app/components/button/button.component.ts +++ b/templates/angular-example/src/app/components/button/button.component.ts @@ -1,10 +1,10 @@ -import {NgClass} from '@angular/common'; -import {Component, Input} from '@angular/core'; +import { NgClass } from '@angular/common'; +import { Component, Input } from '@angular/core'; @Component({ selector: 'app-button', imports: [NgClass], - templateUrl: './button.component.html' + templateUrl: './button.component.html', }) export class ButtonComponent { @Input() disabled!: boolean; diff --git a/templates/angular-example/src/app/components/delete/delete.component.html b/templates/angular-example/src/app/components/delete/delete.component.html index c1791297..b78ceeec 100644 --- a/templates/angular-example/src/app/components/delete/delete.component.html +++ b/templates/angular-example/src/app/components/delete/delete.component.html @@ -1,21 +1,31 @@ diff --git a/templates/angular-example/src/app/components/delete/delete.component.ts b/templates/angular-example/src/app/components/delete/delete.component.ts index 3ba1a5c7..11bb0085 100644 --- a/templates/angular-example/src/app/components/delete/delete.component.ts +++ b/templates/angular-example/src/app/components/delete/delete.component.ts @@ -1,14 +1,14 @@ -import {NgIf} from '@angular/common'; -import {Component, inject, Input} from '@angular/core'; -import {deleteAsset, deleteDoc, Doc} from '@junobuild/core'; -import {DocsService} from '../../services/docs.service'; -import {Note} from '../../types/note'; -import {BackdropComponent} from '../backdrop/backdrop.component'; +import { NgIf } from '@angular/common'; +import { Component, inject, Input } from '@angular/core'; +import { deleteAsset, deleteDoc, Doc } from '@junobuild/core'; +import { DocsService } from '../../services/docs.service'; +import { Note } from '../../types/note'; +import { BackdropComponent } from '../backdrop/backdrop.component'; @Component({ selector: 'app-delete', imports: [BackdropComponent, NgIf], - templateUrl: './delete.component.html' + templateUrl: './delete.component.html', }) export class DeleteComponent { private readonly docsServices = inject(DocsService); @@ -22,21 +22,21 @@ export class DeleteComponent { try { const { - data: {url} + data: { url }, } = this.doc; if (url !== undefined) { - const {pathname: fullPath} = new URL(url); + const { pathname: fullPath } = new URL(url); await deleteAsset({ collection: 'images', - fullPath + fullPath, }); } await deleteDoc({ collection: 'notes', - doc: this.doc + doc: this.doc, }); await this.docsServices.reload(); diff --git a/templates/angular-example/src/app/components/footer/footer.component.html b/templates/angular-example/src/app/components/footer/footer.component.html index 952dc428..2c950d49 100644 --- a/templates/angular-example/src/app/components/footer/footer.component.html +++ b/templates/angular-example/src/app/components/footer/footer.component.html @@ -1,21 +1,39 @@