@fluxhub/fluxhub-lib 19.0.192 → 19.0.194
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -35258,6 +35258,33 @@ class FHHomeLauncherComponent {
|
|
|
35258
35258
|
columnWidth = 270;
|
|
35259
35259
|
/** Spazio tra colonne (px). */
|
|
35260
35260
|
columnGap = 48;
|
|
35261
|
+
// ---- Categorie "a box" (card) ----
|
|
35262
|
+
/**
|
|
35263
|
+
* Elenco di id_category da renderizzare "a box" (card) invece che come
|
|
35264
|
+
* elenco testuale. Es. [23] per la categoria Offerte. Accetta numeri o stringhe.
|
|
35265
|
+
*/
|
|
35266
|
+
boxCategoryIds = [];
|
|
35267
|
+
/** Icona Material Symbols mostrata nel box quando la categoria non ha un logo. */
|
|
35268
|
+
boxIcon = "grid_view";
|
|
35269
|
+
/** Etichetta dell'azione nel box (sotto al titolo). */
|
|
35270
|
+
boxActionLabel = "Apri";
|
|
35271
|
+
// ---- Preferiti utente (cuore sull'header categoria) ----
|
|
35272
|
+
/**
|
|
35273
|
+
* Abilita la gestione dei preferiti: ogni categoria mostra un cuore; le
|
|
35274
|
+
* categorie preferite sono renderizzate "a box". Le preferenze sono persistite
|
|
35275
|
+
* per utente (tabella wkf_user_category_prefs, JSON di id_category).
|
|
35276
|
+
* Quando true, l'aspetto a box è guidato dai preferiti dell'utente; se l'utente
|
|
35277
|
+
* non ha mai personalizzato, si usa [boxCategoryIds] come default.
|
|
35278
|
+
*/
|
|
35279
|
+
enableFavorites = false;
|
|
35280
|
+
/** Query (query.ini) che legge le preferenze: SELECT fav_categories WHERE username=@VAL1. */
|
|
35281
|
+
sqlCatPrefsGet = "SELECT_HOME_CAT_PREFS";
|
|
35282
|
+
/** Query (query.ini) di upsert: @VAL1=username, @VAL2=JSON array di id_category. */
|
|
35283
|
+
sqlCatPrefsSave = "UPSERT_HOME_CAT_PREFS";
|
|
35284
|
+
/** Tooltip del cuore quando la categoria NON è preferita. */
|
|
35285
|
+
favoriteTooltip = "Aggiungi ai preferiti";
|
|
35286
|
+
/** Tooltip del cuore quando la categoria È preferita. */
|
|
35287
|
+
unfavoriteTooltip = "Rimuovi dai preferiti";
|
|
35261
35288
|
// ---- Sfondo ----
|
|
35262
35289
|
/**
|
|
35263
35290
|
* Colore di sfondo della superficie del launcher.
|
|
@@ -35280,6 +35307,10 @@ class FHHomeLauncherComponent {
|
|
|
35280
35307
|
appOpen = new EventEmitter();
|
|
35281
35308
|
categories = [];
|
|
35282
35309
|
is_loaded = false;
|
|
35310
|
+
/** Set degli id_category preferiti (effettivi: salvati dall'utente o default). */
|
|
35311
|
+
favoriteIds = new Set();
|
|
35312
|
+
/** True se l'utente ha già personalizzato le preferenze (riga presente in DB). */
|
|
35313
|
+
hasUserPref = false;
|
|
35283
35314
|
constructor(appService, _service, _dataService, _utility, router) {
|
|
35284
35315
|
this.appService = appService;
|
|
35285
35316
|
this._service = _service;
|
|
@@ -35311,9 +35342,54 @@ class FHHomeLauncherComponent {
|
|
|
35311
35342
|
this.appService.user_isadmin = data.result_data[0].isadmin;
|
|
35312
35343
|
this.appService.user_roles = data.result_data[0].roles;
|
|
35313
35344
|
}
|
|
35314
|
-
this.
|
|
35345
|
+
if (this.enableFavorites)
|
|
35346
|
+
this.load_prefs_then_menu();
|
|
35347
|
+
else
|
|
35348
|
+
this.build_menu();
|
|
35349
|
+
});
|
|
35350
|
+
}
|
|
35351
|
+
// Carica le preferenze categorie dell'utente, poi costruisce il menu.
|
|
35352
|
+
// Riga presente -> uso il JSON salvato; riga assente -> default [boxCategoryIds].
|
|
35353
|
+
load_prefs_then_menu() {
|
|
35354
|
+
const p = new QParam();
|
|
35355
|
+
p.sql = this.sqlCatPrefsGet;
|
|
35356
|
+
p.values = [this.appService.user || ""];
|
|
35357
|
+
p.types = ["string"];
|
|
35358
|
+
this._dataService.doQuery(p).subscribe({
|
|
35359
|
+
next: (data) => {
|
|
35360
|
+
const row = (data?.result_msg === "OK" && data?.result_data?.length) ? data.result_data[0] : null;
|
|
35361
|
+
if (row && row.fav_categories != null) {
|
|
35362
|
+
this.hasUserPref = true;
|
|
35363
|
+
this.favoriteIds = this.parseFavorites(row.fav_categories);
|
|
35364
|
+
}
|
|
35365
|
+
else {
|
|
35366
|
+
this.hasUserPref = false;
|
|
35367
|
+
this.favoriteIds = new Set((this.boxCategoryIds || []).map((v) => Number(v)));
|
|
35368
|
+
}
|
|
35369
|
+
this.build_menu();
|
|
35370
|
+
},
|
|
35371
|
+
error: () => {
|
|
35372
|
+
this.hasUserPref = false;
|
|
35373
|
+
this.favoriteIds = new Set((this.boxCategoryIds || []).map((v) => Number(v)));
|
|
35374
|
+
this.build_menu();
|
|
35375
|
+
},
|
|
35315
35376
|
});
|
|
35316
35377
|
}
|
|
35378
|
+
/** Normalizza il valore fav_categories (JSON string o array già parsato) in un Set di numeri. */
|
|
35379
|
+
parseFavorites(raw) {
|
|
35380
|
+
let arr = raw;
|
|
35381
|
+
if (typeof raw === "string") {
|
|
35382
|
+
try {
|
|
35383
|
+
arr = JSON.parse(raw);
|
|
35384
|
+
}
|
|
35385
|
+
catch {
|
|
35386
|
+
arr = [];
|
|
35387
|
+
}
|
|
35388
|
+
}
|
|
35389
|
+
if (!Array.isArray(arr))
|
|
35390
|
+
arr = [];
|
|
35391
|
+
return new Set(arr.map((v) => Number(v)).filter((n) => !isNaN(n)));
|
|
35392
|
+
}
|
|
35317
35393
|
build_menu() {
|
|
35318
35394
|
const username = this.appService.user || "";
|
|
35319
35395
|
const isadmin = String(this.appService.user_isadmin ?? "") === "1";
|
|
@@ -35333,11 +35409,14 @@ class FHHomeLauncherComponent {
|
|
|
35333
35409
|
const dir = r.dir || "";
|
|
35334
35410
|
if (!current || current.title !== dir) {
|
|
35335
35411
|
current = {
|
|
35412
|
+
id: r.id_category != null ? Number(r.id_category) : null,
|
|
35336
35413
|
name: dir.toLowerCase().split(" ").join("_"),
|
|
35337
35414
|
title: dir,
|
|
35338
35415
|
faIcon: r.icon || "",
|
|
35339
35416
|
mdIcon: r.mdIcon || "",
|
|
35340
35417
|
color: r.color || "",
|
|
35418
|
+
logoUrl: r.logo_url || "",
|
|
35419
|
+
logoFilename: r.logo_filename || "",
|
|
35341
35420
|
apps: [],
|
|
35342
35421
|
};
|
|
35343
35422
|
grouped.push(current);
|
|
@@ -35346,10 +35425,49 @@ class FHHomeLauncherComponent {
|
|
|
35346
35425
|
continue;
|
|
35347
35426
|
current.apps.push({ id: r.id, title: r.name, link: r.url });
|
|
35348
35427
|
}
|
|
35349
|
-
|
|
35428
|
+
const cats = grouped.filter((c) => c.apps.length > 0);
|
|
35429
|
+
for (const c of cats)
|
|
35430
|
+
c.isBox = this.isBoxCat(c);
|
|
35431
|
+
this.categories = cats;
|
|
35350
35432
|
this.is_loaded = true;
|
|
35351
35433
|
});
|
|
35352
35434
|
}
|
|
35435
|
+
/**
|
|
35436
|
+
* True se la categoria va renderizzata "a box". Con i preferiti abilitati
|
|
35437
|
+
* dipende dai preferiti dell'utente (favoriteIds); altrimenti da [boxCategoryIds].
|
|
35438
|
+
*/
|
|
35439
|
+
isBoxCat(cat) {
|
|
35440
|
+
if (cat?.id == null)
|
|
35441
|
+
return false;
|
|
35442
|
+
if (this.enableFavorites)
|
|
35443
|
+
return this.favoriteIds.has(cat.id);
|
|
35444
|
+
if (!this.boxCategoryIds?.length)
|
|
35445
|
+
return false;
|
|
35446
|
+
return this.boxCategoryIds.some((v) => Number(v) === cat.id);
|
|
35447
|
+
}
|
|
35448
|
+
/** Toggle preferito su una categoria: aggiorna l'aspetto e persiste subito. */
|
|
35449
|
+
toggleFavorite(cat, ev) {
|
|
35450
|
+
ev.stopPropagation();
|
|
35451
|
+
ev.preventDefault();
|
|
35452
|
+
if (cat?.id == null)
|
|
35453
|
+
return;
|
|
35454
|
+
if (this.favoriteIds.has(cat.id))
|
|
35455
|
+
this.favoriteIds.delete(cat.id);
|
|
35456
|
+
else
|
|
35457
|
+
this.favoriteIds.add(cat.id);
|
|
35458
|
+
cat.isBox = this.favoriteIds.has(cat.id);
|
|
35459
|
+
this.save_prefs();
|
|
35460
|
+
}
|
|
35461
|
+
/** Persiste le preferenze correnti (upsert username + JSON array di id_category). */
|
|
35462
|
+
save_prefs() {
|
|
35463
|
+
this.hasUserPref = true;
|
|
35464
|
+
const json = JSON.stringify(Array.from(this.favoriteIds));
|
|
35465
|
+
const p = new QParam();
|
|
35466
|
+
p.sql = this.sqlCatPrefsSave;
|
|
35467
|
+
p.values = [this.appService.user || "", json];
|
|
35468
|
+
p.types = ["string", "string"];
|
|
35469
|
+
this._dataService.doQuery(p).subscribe(() => { });
|
|
35470
|
+
}
|
|
35353
35471
|
open_app(app) {
|
|
35354
35472
|
if (!app || !app.link)
|
|
35355
35473
|
return;
|
|
@@ -35372,7 +35490,7 @@ class FHHomeLauncherComponent {
|
|
|
35372
35490
|
this.appOpen.emit(app);
|
|
35373
35491
|
}
|
|
35374
35492
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHHomeLauncherComponent, deps: [{ token: AppService }, { token: AuthenticationService }, { token: QueryService }, { token: UtilityService }, { token: i3$2.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
35375
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: FHHomeLauncherComponent, isStandalone: true, selector: "FHHomeLauncher", inputs: { accent: "accent", accentDark: "accentDark", ink: "ink", showIndex: "showIndex", columnWidth: "columnWidth", columnGap: "columnGap", background: "background", showGridBackground: "showGridBackground", sqlUserAccess: "sqlUserAccess", sqlAllApps: "sqlAllApps", sqlApps: "sqlApps", sqlAccessLog: "sqlAccessLog", appVersion: "appVersion" }, outputs: { appOpen: "appOpen" }, host: { properties: { "style.--fh-home-accent": "this._a", "style.--fh-home-accent-dark": "this._ad", "style.--fh-home-ink": "this._ink" } }, ngImport: i0, template: `
|
|
35493
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: FHHomeLauncherComponent, isStandalone: true, selector: "FHHomeLauncher", inputs: { accent: "accent", accentDark: "accentDark", ink: "ink", showIndex: "showIndex", columnWidth: "columnWidth", columnGap: "columnGap", boxCategoryIds: "boxCategoryIds", boxIcon: "boxIcon", boxActionLabel: "boxActionLabel", enableFavorites: "enableFavorites", sqlCatPrefsGet: "sqlCatPrefsGet", sqlCatPrefsSave: "sqlCatPrefsSave", favoriteTooltip: "favoriteTooltip", unfavoriteTooltip: "unfavoriteTooltip", background: "background", showGridBackground: "showGridBackground", sqlUserAccess: "sqlUserAccess", sqlAllApps: "sqlAllApps", sqlApps: "sqlApps", sqlAccessLog: "sqlAccessLog", appVersion: "appVersion" }, outputs: { appOpen: "appOpen" }, host: { properties: { "style.--fh-home-accent": "this._a", "style.--fh-home-accent-dark": "this._ad", "style.--fh-home-ink": "this._ink" } }, ngImport: i0, template: `
|
|
35376
35494
|
<div
|
|
35377
35495
|
class="launcher"
|
|
35378
35496
|
[class.with-grid]="showGridBackground"
|
|
@@ -35384,22 +35502,57 @@ class FHHomeLauncherComponent {
|
|
|
35384
35502
|
<header class="cat-head">
|
|
35385
35503
|
<span class="cat-index" *ngIf="showIndex">{{ (i + 1).toString().padStart(2, "0") }}</span>
|
|
35386
35504
|
<h2 class="cat-title">{{ cat.title }}</h2>
|
|
35505
|
+
<button
|
|
35506
|
+
*ngIf="enableFavorites"
|
|
35507
|
+
type="button"
|
|
35508
|
+
class="cat-fav"
|
|
35509
|
+
[class.is-fav]="cat.isBox"
|
|
35510
|
+
(click)="toggleFavorite(cat, $event)"
|
|
35511
|
+
[attr.title]="cat.isBox ? unfavoriteTooltip : favoriteTooltip"
|
|
35512
|
+
[attr.aria-label]="(cat.isBox ? unfavoriteTooltip : favoriteTooltip) + ': ' + cat.title"
|
|
35513
|
+
[attr.aria-pressed]="cat.isBox"
|
|
35514
|
+
>
|
|
35515
|
+
<i class="material-symbols-outlined">{{ cat.isBox ? "favorite" : "favorite_border" }}</i>
|
|
35516
|
+
</button>
|
|
35387
35517
|
</header>
|
|
35388
|
-
|
|
35518
|
+
<!-- Categoria "a box" (card): aspetto evidenziato -->
|
|
35519
|
+
<div class="cat-boxes" *ngIf="cat.isBox; else textList">
|
|
35389
35520
|
<button
|
|
35390
35521
|
*ngFor="let app of cat.apps"
|
|
35391
35522
|
type="button"
|
|
35392
|
-
class="
|
|
35523
|
+
class="app-box"
|
|
35393
35524
|
(click)="open_app(app)"
|
|
35394
35525
|
>
|
|
35395
|
-
<span class="
|
|
35396
|
-
|
|
35526
|
+
<span class="app-box-top">
|
|
35527
|
+
<span class="app-box-icon">
|
|
35528
|
+
<img *ngIf="cat.logoUrl; else boxIco" [src]="cat.logoUrl" [alt]="cat.title" />
|
|
35529
|
+
<ng-template #boxIco><i class="material-symbols-outlined">{{ boxIcon }}</i></ng-template>
|
|
35530
|
+
</span>
|
|
35531
|
+
<span class="app-box-arrow"><i class="material-symbols-outlined">arrow_forward</i></span>
|
|
35532
|
+
</span>
|
|
35533
|
+
<span class="app-box-title">{{ app.title }}</span>
|
|
35534
|
+
<span class="app-box-go">{{ boxActionLabel }}</span>
|
|
35397
35535
|
</button>
|
|
35398
35536
|
</div>
|
|
35537
|
+
|
|
35538
|
+
<!-- Categoria standard (elenco testuale) -->
|
|
35539
|
+
<ng-template #textList>
|
|
35540
|
+
<div class="cat-apps">
|
|
35541
|
+
<button
|
|
35542
|
+
*ngFor="let app of cat.apps"
|
|
35543
|
+
type="button"
|
|
35544
|
+
class="cat-app"
|
|
35545
|
+
(click)="open_app(app)"
|
|
35546
|
+
>
|
|
35547
|
+
<span class="cat-app-label">{{ app.title }}</span>
|
|
35548
|
+
<i class="material-symbols-outlined cat-app-arrow">arrow_forward</i>
|
|
35549
|
+
</button>
|
|
35550
|
+
</div>
|
|
35551
|
+
</ng-template>
|
|
35399
35552
|
</section>
|
|
35400
35553
|
</div>
|
|
35401
35554
|
</div>
|
|
35402
|
-
`, isInline: true, styles: [":host{display:block;flex:0 0 auto}.launcher{width:100%;box-sizing:border-box;padding:12px 48px 18px}.launcher.with-grid{background-image:linear-gradient(rgba(22,18,18,.028) 1px,transparent 1px),linear-gradient(90deg,rgba(22,18,18,.028) 1px,transparent 1px);background-size:56px 56px;background-position:-1px -1px}.launcher-cols{column-width:270px;column-gap:48px}.cat{position:relative;break-inside:avoid;margin-bottom:22px;border-top:2px solid var(--fh-home-ink, #161212);padding-top:10px}.cat:after{content:\"\";position:absolute;top:-2px;left:0;width:30px;height:2px;background-color:var(--fh-home-accent, #63b345)}.cat-head{display:flex;align-items:baseline;gap:10px;margin-bottom:10px}.cat-index{font-family:Plus Jakarta Sans,sans-serif;font-size:11px;font-weight:700;letter-spacing:.06em;color:var(--fh-home-accent-dark, #549a3b)}.cat-title{flex:1 1 auto;margin:0;font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--fh-home-ink, #161212)}.cat-apps{display:flex;flex-direction:column}.cat-app{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 2px 7px 0;border:none;border-bottom:1px solid rgba(22,18,18,.07);background:transparent;cursor:pointer;text-align:left;font-family:Inter,sans-serif;font-size:14px;font-weight:500;color:#443d3d;transition:color .15s ease,padding-left .15s ease}.cat-app:last-child{border-bottom:none}.cat-app-arrow{font-size:16px;color:transparent;transition:color .15s ease,transform .15s ease}.cat-app:hover{color:var(--fh-home-accent-dark, #549a3b);padding-left:6px}.cat-app:hover .cat-app-arrow{color:var(--fh-home-accent-dark, #549a3b);transform:translate(2px)}@media (max-width: 768px){.launcher{padding:10px 20px 24px}.launcher-cols{column-width:auto!important;columns:1}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
35555
|
+
`, isInline: true, styles: [":host{display:block;flex:0 0 auto}.launcher{width:100%;box-sizing:border-box;padding:12px 48px 18px}.launcher.with-grid{background-image:linear-gradient(rgba(22,18,18,.028) 1px,transparent 1px),linear-gradient(90deg,rgba(22,18,18,.028) 1px,transparent 1px);background-size:56px 56px;background-position:-1px -1px}.launcher-cols{column-width:270px;column-gap:48px}.cat{position:relative;break-inside:avoid;margin-bottom:22px;border-top:2px solid var(--fh-home-ink, #161212);padding-top:10px}.cat:after{content:\"\";position:absolute;top:-2px;left:0;width:30px;height:2px;background-color:var(--fh-home-accent, #63b345)}.cat-head{display:flex;align-items:baseline;gap:10px;margin-bottom:10px}.cat-index{font-family:Plus Jakarta Sans,sans-serif;font-size:11px;font-weight:700;letter-spacing:.06em;color:var(--fh-home-accent-dark, #549a3b)}.cat-title{flex:1 1 auto;margin:0;font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--fh-home-ink, #161212)}.cat-fav{flex:0 0 auto;display:grid;place-items:center;width:28px;height:28px;padding:0;margin:-2px -4px 0 4px;border:none;border-radius:50%;background:transparent;cursor:pointer;color:color-mix(in srgb,var(--fh-home-ink, #161212) 32%,transparent);transition:color .18s ease,background .18s ease,transform .12s ease}.cat-fav i{font-size:19px;line-height:1;font-variation-settings:\"FILL\" 0,\"wght\" 500,\"opsz\" 24}.cat-fav:hover{background:color-mix(in srgb,var(--fh-home-accent, #63b345) 12%,transparent);color:var(--fh-home-accent-dark, #549a3b)}.cat-fav:active{transform:scale(.86)}.cat-fav:focus-visible{outline:2px solid var(--fh-home-accent, #63b345);outline-offset:1px}.cat-fav.is-fav{color:var(--fh-home-accent, #63b345)}.cat-fav.is-fav i{font-variation-settings:\"FILL\" 1,\"wght\" 500,\"opsz\" 24}.cat-fav.is-fav:hover{color:var(--fh-home-accent-dark, #549a3b)}.cat-apps{display:flex;flex-direction:column}.cat-app{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 2px 7px 0;border:none;border-bottom:1px solid rgba(22,18,18,.07);background:transparent;cursor:pointer;text-align:left;font-family:Inter,sans-serif;font-size:14px;font-weight:500;color:#443d3d;transition:color .15s ease,padding-left .15s ease}.cat-app:last-child{border-bottom:none}.cat-app-arrow{font-size:16px;color:transparent;transition:color .15s ease,transform .15s ease}.cat-app:hover{color:var(--fh-home-accent-dark, #549a3b);padding-left:6px}.cat-app:hover .cat-app-arrow{color:var(--fh-home-accent-dark, #549a3b);transform:translate(2px)}.cat-boxes{display:grid;grid-template-columns:repeat(auto-fill,minmax(186px,1fr));gap:14px}.app-box{position:relative;isolation:isolate;display:flex;flex-direction:column;gap:12px;padding:16px 16px 14px;border-radius:16px;cursor:pointer;text-align:left;border:1px solid rgba(22,18,18,.08);background:linear-gradient(180deg,#fff,color-mix(in srgb,var(--fh-home-accent, #63b345) 5%,#ffffff));box-shadow:0 1px 2px #1612120d;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;overflow:hidden}.app-box:before{content:\"\";position:absolute;top:0;left:0;right:0;height:3px;z-index:1;background:linear-gradient(90deg,var(--fh-home-accent, #63b345),var(--fh-home-accent-dark, #549a3b));transform:scaleX(0);transform-origin:left;transition:transform .25s ease}.app-box:hover{transform:translateY(-3px);box-shadow:0 12px 26px #1612121f;border-color:color-mix(in srgb,var(--fh-home-accent, #63b345) 55%,transparent)}.app-box:hover:before{transform:scaleX(1)}.app-box:focus-visible{outline:2px solid var(--fh-home-accent, #63b345);outline-offset:2px}.app-box-top{display:flex;align-items:center;justify-content:space-between}.app-box-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:color-mix(in srgb,var(--fh-home-accent, #63b345) 14%,#ffffff);color:var(--fh-home-accent-dark, #549a3b);transition:background .2s ease,color .2s ease}.app-box-icon i{font-size:23px;line-height:1}.app-box-icon img{width:26px;height:26px;object-fit:contain}.app-box:hover .app-box-icon{background:var(--fh-home-accent, #63b345);color:#fff}.app-box-arrow{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;color:var(--fh-home-accent-dark, #549a3b);background:transparent;transform:translate(-4px);opacity:0;transition:opacity .2s ease,transform .2s ease,background .2s ease,color .2s ease}.app-box-arrow i{font-size:18px}.app-box:hover .app-box-arrow{opacity:1;transform:translate(0);background:color-mix(in srgb,var(--fh-home-accent, #63b345) 16%,#ffffff)}.app-box-title{font-family:Plus Jakarta Sans,Inter,sans-serif;font-size:15px;font-weight:700;line-height:1.28;color:var(--fh-home-ink, #161212)}.app-box-go{font-family:Inter,sans-serif;font-size:11.5px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:color-mix(in srgb,var(--fh-home-ink, #161212) 45%,transparent);transition:color .2s ease}.app-box:hover .app-box-go{color:var(--fh-home-accent-dark, #549a3b)}@media (max-width: 768px){.launcher{padding:10px 20px 24px}.launcher-cols{column-width:auto!important;columns:1}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
35403
35556
|
}
|
|
35404
35557
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHHomeLauncherComponent, decorators: [{
|
|
35405
35558
|
type: Component,
|
|
@@ -35415,22 +35568,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
35415
35568
|
<header class="cat-head">
|
|
35416
35569
|
<span class="cat-index" *ngIf="showIndex">{{ (i + 1).toString().padStart(2, "0") }}</span>
|
|
35417
35570
|
<h2 class="cat-title">{{ cat.title }}</h2>
|
|
35571
|
+
<button
|
|
35572
|
+
*ngIf="enableFavorites"
|
|
35573
|
+
type="button"
|
|
35574
|
+
class="cat-fav"
|
|
35575
|
+
[class.is-fav]="cat.isBox"
|
|
35576
|
+
(click)="toggleFavorite(cat, $event)"
|
|
35577
|
+
[attr.title]="cat.isBox ? unfavoriteTooltip : favoriteTooltip"
|
|
35578
|
+
[attr.aria-label]="(cat.isBox ? unfavoriteTooltip : favoriteTooltip) + ': ' + cat.title"
|
|
35579
|
+
[attr.aria-pressed]="cat.isBox"
|
|
35580
|
+
>
|
|
35581
|
+
<i class="material-symbols-outlined">{{ cat.isBox ? "favorite" : "favorite_border" }}</i>
|
|
35582
|
+
</button>
|
|
35418
35583
|
</header>
|
|
35419
|
-
|
|
35584
|
+
<!-- Categoria "a box" (card): aspetto evidenziato -->
|
|
35585
|
+
<div class="cat-boxes" *ngIf="cat.isBox; else textList">
|
|
35420
35586
|
<button
|
|
35421
35587
|
*ngFor="let app of cat.apps"
|
|
35422
35588
|
type="button"
|
|
35423
|
-
class="
|
|
35589
|
+
class="app-box"
|
|
35424
35590
|
(click)="open_app(app)"
|
|
35425
35591
|
>
|
|
35426
|
-
<span class="
|
|
35427
|
-
|
|
35592
|
+
<span class="app-box-top">
|
|
35593
|
+
<span class="app-box-icon">
|
|
35594
|
+
<img *ngIf="cat.logoUrl; else boxIco" [src]="cat.logoUrl" [alt]="cat.title" />
|
|
35595
|
+
<ng-template #boxIco><i class="material-symbols-outlined">{{ boxIcon }}</i></ng-template>
|
|
35596
|
+
</span>
|
|
35597
|
+
<span class="app-box-arrow"><i class="material-symbols-outlined">arrow_forward</i></span>
|
|
35598
|
+
</span>
|
|
35599
|
+
<span class="app-box-title">{{ app.title }}</span>
|
|
35600
|
+
<span class="app-box-go">{{ boxActionLabel }}</span>
|
|
35428
35601
|
</button>
|
|
35429
35602
|
</div>
|
|
35603
|
+
|
|
35604
|
+
<!-- Categoria standard (elenco testuale) -->
|
|
35605
|
+
<ng-template #textList>
|
|
35606
|
+
<div class="cat-apps">
|
|
35607
|
+
<button
|
|
35608
|
+
*ngFor="let app of cat.apps"
|
|
35609
|
+
type="button"
|
|
35610
|
+
class="cat-app"
|
|
35611
|
+
(click)="open_app(app)"
|
|
35612
|
+
>
|
|
35613
|
+
<span class="cat-app-label">{{ app.title }}</span>
|
|
35614
|
+
<i class="material-symbols-outlined cat-app-arrow">arrow_forward</i>
|
|
35615
|
+
</button>
|
|
35616
|
+
</div>
|
|
35617
|
+
</ng-template>
|
|
35430
35618
|
</section>
|
|
35431
35619
|
</div>
|
|
35432
35620
|
</div>
|
|
35433
|
-
`, styles: [":host{display:block;flex:0 0 auto}.launcher{width:100%;box-sizing:border-box;padding:12px 48px 18px}.launcher.with-grid{background-image:linear-gradient(rgba(22,18,18,.028) 1px,transparent 1px),linear-gradient(90deg,rgba(22,18,18,.028) 1px,transparent 1px);background-size:56px 56px;background-position:-1px -1px}.launcher-cols{column-width:270px;column-gap:48px}.cat{position:relative;break-inside:avoid;margin-bottom:22px;border-top:2px solid var(--fh-home-ink, #161212);padding-top:10px}.cat:after{content:\"\";position:absolute;top:-2px;left:0;width:30px;height:2px;background-color:var(--fh-home-accent, #63b345)}.cat-head{display:flex;align-items:baseline;gap:10px;margin-bottom:10px}.cat-index{font-family:Plus Jakarta Sans,sans-serif;font-size:11px;font-weight:700;letter-spacing:.06em;color:var(--fh-home-accent-dark, #549a3b)}.cat-title{flex:1 1 auto;margin:0;font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--fh-home-ink, #161212)}.cat-apps{display:flex;flex-direction:column}.cat-app{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 2px 7px 0;border:none;border-bottom:1px solid rgba(22,18,18,.07);background:transparent;cursor:pointer;text-align:left;font-family:Inter,sans-serif;font-size:14px;font-weight:500;color:#443d3d;transition:color .15s ease,padding-left .15s ease}.cat-app:last-child{border-bottom:none}.cat-app-arrow{font-size:16px;color:transparent;transition:color .15s ease,transform .15s ease}.cat-app:hover{color:var(--fh-home-accent-dark, #549a3b);padding-left:6px}.cat-app:hover .cat-app-arrow{color:var(--fh-home-accent-dark, #549a3b);transform:translate(2px)}@media (max-width: 768px){.launcher{padding:10px 20px 24px}.launcher-cols{column-width:auto!important;columns:1}}\n"] }]
|
|
35621
|
+
`, styles: [":host{display:block;flex:0 0 auto}.launcher{width:100%;box-sizing:border-box;padding:12px 48px 18px}.launcher.with-grid{background-image:linear-gradient(rgba(22,18,18,.028) 1px,transparent 1px),linear-gradient(90deg,rgba(22,18,18,.028) 1px,transparent 1px);background-size:56px 56px;background-position:-1px -1px}.launcher-cols{column-width:270px;column-gap:48px}.cat{position:relative;break-inside:avoid;margin-bottom:22px;border-top:2px solid var(--fh-home-ink, #161212);padding-top:10px}.cat:after{content:\"\";position:absolute;top:-2px;left:0;width:30px;height:2px;background-color:var(--fh-home-accent, #63b345)}.cat-head{display:flex;align-items:baseline;gap:10px;margin-bottom:10px}.cat-index{font-family:Plus Jakarta Sans,sans-serif;font-size:11px;font-weight:700;letter-spacing:.06em;color:var(--fh-home-accent-dark, #549a3b)}.cat-title{flex:1 1 auto;margin:0;font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--fh-home-ink, #161212)}.cat-fav{flex:0 0 auto;display:grid;place-items:center;width:28px;height:28px;padding:0;margin:-2px -4px 0 4px;border:none;border-radius:50%;background:transparent;cursor:pointer;color:color-mix(in srgb,var(--fh-home-ink, #161212) 32%,transparent);transition:color .18s ease,background .18s ease,transform .12s ease}.cat-fav i{font-size:19px;line-height:1;font-variation-settings:\"FILL\" 0,\"wght\" 500,\"opsz\" 24}.cat-fav:hover{background:color-mix(in srgb,var(--fh-home-accent, #63b345) 12%,transparent);color:var(--fh-home-accent-dark, #549a3b)}.cat-fav:active{transform:scale(.86)}.cat-fav:focus-visible{outline:2px solid var(--fh-home-accent, #63b345);outline-offset:1px}.cat-fav.is-fav{color:var(--fh-home-accent, #63b345)}.cat-fav.is-fav i{font-variation-settings:\"FILL\" 1,\"wght\" 500,\"opsz\" 24}.cat-fav.is-fav:hover{color:var(--fh-home-accent-dark, #549a3b)}.cat-apps{display:flex;flex-direction:column}.cat-app{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 2px 7px 0;border:none;border-bottom:1px solid rgba(22,18,18,.07);background:transparent;cursor:pointer;text-align:left;font-family:Inter,sans-serif;font-size:14px;font-weight:500;color:#443d3d;transition:color .15s ease,padding-left .15s ease}.cat-app:last-child{border-bottom:none}.cat-app-arrow{font-size:16px;color:transparent;transition:color .15s ease,transform .15s ease}.cat-app:hover{color:var(--fh-home-accent-dark, #549a3b);padding-left:6px}.cat-app:hover .cat-app-arrow{color:var(--fh-home-accent-dark, #549a3b);transform:translate(2px)}.cat-boxes{display:grid;grid-template-columns:repeat(auto-fill,minmax(186px,1fr));gap:14px}.app-box{position:relative;isolation:isolate;display:flex;flex-direction:column;gap:12px;padding:16px 16px 14px;border-radius:16px;cursor:pointer;text-align:left;border:1px solid rgba(22,18,18,.08);background:linear-gradient(180deg,#fff,color-mix(in srgb,var(--fh-home-accent, #63b345) 5%,#ffffff));box-shadow:0 1px 2px #1612120d;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;overflow:hidden}.app-box:before{content:\"\";position:absolute;top:0;left:0;right:0;height:3px;z-index:1;background:linear-gradient(90deg,var(--fh-home-accent, #63b345),var(--fh-home-accent-dark, #549a3b));transform:scaleX(0);transform-origin:left;transition:transform .25s ease}.app-box:hover{transform:translateY(-3px);box-shadow:0 12px 26px #1612121f;border-color:color-mix(in srgb,var(--fh-home-accent, #63b345) 55%,transparent)}.app-box:hover:before{transform:scaleX(1)}.app-box:focus-visible{outline:2px solid var(--fh-home-accent, #63b345);outline-offset:2px}.app-box-top{display:flex;align-items:center;justify-content:space-between}.app-box-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:color-mix(in srgb,var(--fh-home-accent, #63b345) 14%,#ffffff);color:var(--fh-home-accent-dark, #549a3b);transition:background .2s ease,color .2s ease}.app-box-icon i{font-size:23px;line-height:1}.app-box-icon img{width:26px;height:26px;object-fit:contain}.app-box:hover .app-box-icon{background:var(--fh-home-accent, #63b345);color:#fff}.app-box-arrow{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;color:var(--fh-home-accent-dark, #549a3b);background:transparent;transform:translate(-4px);opacity:0;transition:opacity .2s ease,transform .2s ease,background .2s ease,color .2s ease}.app-box-arrow i{font-size:18px}.app-box:hover .app-box-arrow{opacity:1;transform:translate(0);background:color-mix(in srgb,var(--fh-home-accent, #63b345) 16%,#ffffff)}.app-box-title{font-family:Plus Jakarta Sans,Inter,sans-serif;font-size:15px;font-weight:700;line-height:1.28;color:var(--fh-home-ink, #161212)}.app-box-go{font-family:Inter,sans-serif;font-size:11.5px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:color-mix(in srgb,var(--fh-home-ink, #161212) 45%,transparent);transition:color .2s ease}.app-box:hover .app-box-go{color:var(--fh-home-accent-dark, #549a3b)}@media (max-width: 768px){.launcher{padding:10px 20px 24px}.launcher-cols{column-width:auto!important;columns:1}}\n"] }]
|
|
35434
35622
|
}], ctorParameters: () => [{ type: AppService }, { type: AuthenticationService }, { type: QueryService }, { type: UtilityService }, { type: i3$2.Router }], propDecorators: { accent: [{
|
|
35435
35623
|
type: Input
|
|
35436
35624
|
}], accentDark: [{
|
|
@@ -35452,6 +35640,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
35452
35640
|
type: Input
|
|
35453
35641
|
}], columnGap: [{
|
|
35454
35642
|
type: Input
|
|
35643
|
+
}], boxCategoryIds: [{
|
|
35644
|
+
type: Input
|
|
35645
|
+
}], boxIcon: [{
|
|
35646
|
+
type: Input
|
|
35647
|
+
}], boxActionLabel: [{
|
|
35648
|
+
type: Input
|
|
35649
|
+
}], enableFavorites: [{
|
|
35650
|
+
type: Input
|
|
35651
|
+
}], sqlCatPrefsGet: [{
|
|
35652
|
+
type: Input
|
|
35653
|
+
}], sqlCatPrefsSave: [{
|
|
35654
|
+
type: Input
|
|
35655
|
+
}], favoriteTooltip: [{
|
|
35656
|
+
type: Input
|
|
35657
|
+
}], unfavoriteTooltip: [{
|
|
35658
|
+
type: Input
|
|
35455
35659
|
}], background: [{
|
|
35456
35660
|
type: Input
|
|
35457
35661
|
}], showGridBackground: [{
|