Skip to content

Commit

Permalink
Ericbrehault/sc 9166/deprecate desktop app (#1378)
Browse files Browse the repository at this point in the history
* do not allow sync if no folders selected

* update link to doc

* deprecation warning in desktop app
  • Loading branch information
ebrehault authored Mar 6, 2024
1 parent 77ad0ab commit 8b0bb71
Show file tree
Hide file tree
Showing 14 changed files with 131 additions and 14 deletions.
5 changes: 5 additions & 0 deletions apps/desktop/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ export class AppComponent implements OnInit {
}

ngOnInit(): void {
this.modalService.openConfirm({
title: 'home.deprecated.title',
description: 'home.deprecated.message',
onlyConfirm: true,
});
if (this.config.getVersion()) {
this.version = `${pkg['version']} - ${this.config.getVersion()}`;
}
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/app/login/login.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
left: 0;
height: 100%;
width: 100%;
z-index: 10050;
z-index: 1000;
background-color: $color-dark-stronger;
}

Expand Down
3 changes: 3 additions & 0 deletions libs/sync/src/assets/i18n/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"history.source": "Origen",
"history.title": "Historial de pujades",
"home.active-connectors": "o comproveu els vostres connectors actius a la llista de l'esquerra.",
"home.deprecated.message": "L'aplicació Nuclia Desktop està obsoleta. Utilitzeu el <a href=\"https://docs.nuclia.dev/docs/docs/using/sync-agent\">Nuclia Sync Agent</a>.",
"home.deprecated.title": "Avís de depreciació",
"home.new-connector": "Feu clic al botó següent per afegir un nou connector al vostre compte de Nuclia",
"home.welcome": "Benvingut/da",
"login.button": "Accedir",
Expand All @@ -31,6 +33,7 @@
"upload.activity.error": "La sincronització ha fallat",
"upload.activity.event": "Missatge",
"upload.activity.help": "Totes les sincronitzacions s'activen automàticament cada 60 minuts.",
"upload.activity.no-folders": "Encara no s'ha seleccionat cap carpeta. Aneu a la pestanya Carpetes per seleccionar les carpetes que voleu sincronitzar.",
"upload.activity.sync-now": "Sincronitza ara",
"upload.add-connector": "Afegir connector",
"upload.authentication.fail": "L'autenticació ha fallat",
Expand Down
3 changes: 3 additions & 0 deletions libs/sync/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"history.source": "Source",
"history.title": "Upload history",
"home.active-connectors": "or check your active connectors in the list on the the left.",
"home.deprecated.message": "The Nuclia Desktop Application is deprecated. Please use the <a href=\"https://docs.nuclia.dev/docs/docs/using/sync-agent\">Nuclia Sync Agent</a>.",
"home.deprecated.title": "Deprecation warning",
"home.new-connector": "Click the button below to add a new connector to your Nuclia account",
"home.welcome": "Welcome",
"login.button": "Log in",
Expand All @@ -31,6 +33,7 @@
"upload.activity.error": "Sync failed",
"upload.activity.event": "Message",
"upload.activity.help": "All syncs are triggered automatically every 60 minutes.",
"upload.activity.no-folders": "No folders selected yet. Go to the Folders tab to select the folders you want to sync.",
"upload.activity.sync-now": "Sync now",
"upload.add-connector": "Add connector",
"upload.authentication.fail": "Authentication failed",
Expand Down
3 changes: 3 additions & 0 deletions libs/sync/src/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"history.source": "Origen",
"history.title": "Historial de subidas",
"home.active-connectors": "o verifique sus conectores activos en la lista de la izquierda.",
"home.deprecated.message": "La aplicación Nuclia Desktop está en desuso. Utilice el <a href=\"https://docs.nuclia.dev/docs/docs/using/sync-agent\">Nuclia Sync Agent</a>.",
"home.deprecated.title": "Advertencia de obsolescencia",
"home.new-connector": "Haga clic en el botón a continuación para agregar un nuevo conector a tu cuenta de Nuclia",
"home.welcome": "Bienvenido/a",
"login.button": "Iniciar sesión",
Expand All @@ -31,6 +33,7 @@
"upload.activity.error": "Sincronización fallida",
"upload.activity.event": "Mensaje",
"upload.activity.help": "Todas las sincronizaciones se activan automáticamente cada 60 minutos.",
"upload.activity.no-folders": "Aún no hay carpetas seleccionadas. Vaya a la pestaña Carpetas para seleccionar las carpetas que desea sincronizar.",
"upload.activity.sync-now": "Sincronizar ahora",
"upload.add-connector": "Añadir conector",
"upload.authentication.fail": "Autenticación fallida",
Expand Down
3 changes: 3 additions & 0 deletions libs/sync/src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"history.source": "Source",
"history.title": "Historique des téléchargements",
"home.active-connectors": "ou vérifiez vos connecteurs actifs dans la liste de gauche.",
"home.deprecated.message": "L'application Nuclia Desktop est obsolète. Veuillez utiliser le <a href=\"https://docs.nuclia.dev/docs/docs/using/sync-agent\">Nuclia Sync Agent</a>.",
"home.deprecated.title": "Avertissement de dépréciation",
"home.new-connector": "Cliquez sur le bouton ci-dessous pour ajouter un nouveau connecteur à votre compte Nuclia",
"home.welcome": "Bienvenu/e",
"login.button": "Se connecter",
Expand All @@ -31,6 +33,7 @@
"upload.activity.error": "Échec de la synchronisation",
"upload.activity.event": "Message",
"upload.activity.help": "Toutes les synchronisations sont déclenchées automatiquement toutes les 60 minutes.",
"upload.activity.no-folders": "Aucun dossier sélectionné pour l'instant. Allez dans l'onglet Dossiers pour sélectionner les dossiers que vous souhaitez synchroniser.",
"upload.activity.sync-now": "Synchroniser maintenant",
"upload.add-connector": "Ajouter un connecteur",
"upload.authentication.fail": "Échec de l'authentification",
Expand Down
2 changes: 1 addition & 1 deletion libs/sync/src/lib/sync/sources/confluence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const ConfluenceConnector: SourceConnectorDefinition = {
title: 'Confluence',
logo: `${baseLogoPath}/confluence.svg`,
description: 'Collaboration platform developed by Atlassian',
helpUrl: 'https://docs.nuclia.dev/docs/docs/using/nda#confluence-connector-usage',
helpUrl: 'https://docs.nuclia.dev/docs/docs/using/sync-agent#confluence-connector-usage',
factory: () => of(new ConfluenceImpl()),
};

Expand Down
20 changes: 10 additions & 10 deletions libs/sync/src/lib/upload/sync.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ <h2>
[active]="selectedTab === 'activity'">
{{ 'upload.tabs.activity' | translate }}
</pa-tab>
<pa-tab
(click)="selectedTab = 'settings'"
[active]="selectedTab === 'settings'">
{{ 'upload.tabs.settings' | translate }}
</pa-tab>
@if (canSelectFiles | async) {
<pa-tab
(click)="selectedTab = 'folders'"
Expand All @@ -43,17 +38,17 @@ <h2>
[active]="selectedTab === 'labels'">
{{ 'upload.tabs.labels' | translate }}
</pa-tab>
<pa-tab
(click)="selectedTab = 'settings'"
[active]="selectedTab === 'settings'">
{{ 'upload.tabs.settings' | translate }}
</pa-tab>
</pa-tabs>
@if (selectedTab === 'activity') {
<section>
<nsy-activity></nsy-activity>
</section>
}
@if (selectedTab === 'settings') {
<section>
<nsy-edit-settings (done)="done()"></nsy-edit-settings>
</section>
}
@if (selectedTab === 'folders') {
<section><nsy-edit-folders (done)="done()"></nsy-edit-folders></section>
}
Expand All @@ -63,3 +58,8 @@ <h2>
@if (selectedTab === 'labels') {
<section><nsy-edit-labels (done)="done()"></nsy-edit-labels></section>
}
@if (selectedTab === 'settings') {
<section>
<nsy-edit-settings (done)="done()"></nsy-edit-settings>
</section>
}
10 changes: 9 additions & 1 deletion libs/sync/src/lib/upload/tabs/activity.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
<p>{{ 'upload.activity.help' | translate }}</p>
@if ((canSelectFiles | async) && (noFolderSelected | async)) {
<div class="warning-container">
<pa-icon name="warning"></pa-icon>
<div class="title-xxs">
{{ 'upload.activity.no-folders' | translate }}
</div>
</div>
}
<pa-button
(click)="triggerSync()"
[disabled]="syncing">
[disabled]="syncing || ((canSelectFiles | async) && (noFolderSelected | async))">
{{ 'upload.activity.sync-now' | translate }}
</pa-button>
<pa-table columns="48px 200px auto">
Expand Down
11 changes: 11 additions & 0 deletions libs/sync/src/lib/upload/tabs/activity.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@import 'apps/dashboard/src/variables';

.warning-container {
display: flex;
align-items: center;
background: $color-secondary-regular;
color: $color-dark-stronger;
margin-bottom: rhythm(2);
padding: rhythm(2);
gap: rhythm(2);
}
5 changes: 5 additions & 0 deletions libs/sync/src/lib/upload/tabs/activity.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ export class SyncActivityComponent implements OnInit, OnDestroy {
currentIndex = 0;
logs: { index: number; date: string; message: string; icon: string }[] = [];
syncing = false;
currentSync = this.syncService.getCurrentSync();
canSelectFiles = this.syncService.currentSourceId.pipe(
map((sourceId) => this.syncService.canSelectFiles(sourceId || '')),
);
noFolderSelected = this.currentSync.pipe(map((sync) => !sync.foldersToSync || sync.foldersToSync.length === 0));

constructor(
private syncService: SyncService,
Expand Down
2 changes: 2 additions & 0 deletions libs/sync/src/lib/upload/tabs/edit-folders.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class EditSyncFoldersComponent implements OnInit, AfterViewInit {
resources: Observable<SyncItem[]> = this.triggerSearch.pipe(
tap(() => {
this.loading = true;
this.cdr.markForCheck();
}),
switchMap(() => this.currentSource.pipe(take(1))),
switchMap((source) =>
Expand All @@ -53,6 +54,7 @@ export class EditSyncFoldersComponent implements OnInit, AfterViewInit {
.pipe(
tap(() => {
this.loading = false;
this.cdr.markForCheck();
}),
scan((acc, current) => acc.concat(current.items), [] as SyncItem[]),
),
Expand Down
74 changes: 74 additions & 0 deletions libs/sync/sync.babel
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,57 @@
</translation>
</translations>
</concept_node>
<folder_node>
<name>deprecated</name>
<children>
<concept_node>
<name>message</name>
<description/>
<comment/>
<translations>
<translation>
<language>ca-ES</language>
<approved>false</approved>
</translation>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-ES</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-FR</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node>
<name>title</name>
<description/>
<comment/>
<translations>
<translation>
<language>ca-ES</language>
<approved>false</approved>
</translation>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-ES</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-FR</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
</children>
</folder_node>
<concept_node>
<name>new-connector</name>
<description/>
Expand Down Expand Up @@ -801,6 +852,29 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>no-folders</name>
<description/>
<comment/>
<translations>
<translation>
<language>ca-ES</language>
<approved>false</approved>
</translation>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-ES</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-FR</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node>
<name>sync-now</name>
<description/>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nuclia",
"version": "2.7.8",
"version": "2.7.9",
"license": "MIT",
"author": "Nuclia.cloud",
"description": "Nuclia frontend apps and libs",
Expand Down

0 comments on commit 8b0bb71

Please sign in to comment.