diff --git a/jslib b/jslib index 3454d93fef..af43232567 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 3454d93fef76f84c7351990089f7b155b88580f8 +Subproject commit af43232567fa63911725929d549f2b01927fa243 diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 4d85e85855..07075049b0 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -14,6 +14,8 @@ import { LoginComponent } from './accounts/login.component'; import { RegisterComponent } from './accounts/register.component'; import { TwoFactorComponent } from './accounts/two-factor.component'; +import { VaultComponent as OrganizationVaultComponent } from './organizations/vault.component'; + import { AccountComponent } from './settings/account.component'; import { CreateOrganizationComponent } from './settings/create-organization.component'; import { DomainRulesComponent } from './settings/domain-rules.component'; @@ -84,10 +86,11 @@ const routes: Routes = [ ], }, { - path: 'organization/:organizationId', + path: 'organizations/:organizationId', component: OrganizationLayoutComponent, children: [ - { path: 'vault', component: VaultComponent, canActivate: [AuthGuardService] }, + { path: '', pathMatch: 'full', redirectTo: 'vault' }, + { path: 'vault', component: OrganizationVaultComponent, canActivate: [AuthGuardService] }, ], }, { path: '**', redirectTo: '' }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 6ba5a85a4b..55b77758b2 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -11,6 +11,7 @@ import { FormsModule } from '@angular/forms'; import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { OrganizationsModule } from './organizations/organizations.module'; import { ServicesModule } from './services/services.module'; import { AppComponent } from './app.component'; @@ -99,6 +100,7 @@ import { SearchCiphersPipe } from 'jslib/angular/pipes/search-ciphers.pipe'; BrowserAnimationsModule, FormsModule, AppRoutingModule, + OrganizationsModule, ServicesModule, Angulartics2Module.forRoot([Angulartics2GoogleAnalytics], { pageTracking: { diff --git a/src/app/organizations/organizations.module.ts b/src/app/organizations/organizations.module.ts new file mode 100644 index 0000000000..a6c1adf02f --- /dev/null +++ b/src/app/organizations/organizations.module.ts @@ -0,0 +1,12 @@ +import { NgModule } from '@angular/core'; + +import { VaultComponent } from './vault.component'; + +@NgModule({ + declarations: [ + VaultComponent, + ], + entryComponents: [], + providers: [], +}) +export class OrganizationsModule { } diff --git a/src/app/organizations/vault.component.html b/src/app/organizations/vault.component.html new file mode 100644 index 0000000000..ff047b25ca --- /dev/null +++ b/src/app/organizations/vault.component.html @@ -0,0 +1 @@ +Org vault!! diff --git a/src/app/organizations/vault.component.ts b/src/app/organizations/vault.component.ts new file mode 100644 index 0000000000..d02243bf59 --- /dev/null +++ b/src/app/organizations/vault.component.ts @@ -0,0 +1,11 @@ +import { + Component +} from '@angular/core'; + +@Component({ + selector: 'app-org-vault', + templateUrl: 'vault.component.html', +}) +export class VaultComponent { + +} diff --git a/src/app/vault/organizations.component.html b/src/app/vault/organizations.component.html index 202d0b69a2..134f74bc71 100644 --- a/src/app/vault/organizations.component.html +++ b/src/app/vault/organizations.component.html @@ -4,13 +4,14 @@ - - {{o.name}} + + {{o.name}} + {{'noOrganizationsList' | i18n}} - + {{'newOrganization' | i18n}} diff --git a/src/app/vault/organizations.component.ts b/src/app/vault/organizations.component.ts index e7e67e5bd6..acf7a6cf4b 100644 --- a/src/app/vault/organizations.component.ts +++ b/src/app/vault/organizations.component.ts @@ -13,19 +13,13 @@ import { Organization } from 'jslib/models/domain/organization'; templateUrl: 'organizations.component.html', }) export class OrganizationsComponent { - @Output() onOrganizationClicked = new EventEmitter(); organizations: Organization[]; loaded: boolean = false; - constructor(private userService: UserService) { - } + constructor(private userService: UserService) { } async load() { this.organizations = await this.userService.getAllOrganizations(); this.loaded = true; } - - selectOrganization(o: Organization) { - this.onOrganizationClicked.emit(o); - } } diff --git a/src/app/vault/vault.component.html b/src/app/vault/vault.component.html index 499ab5a277..329d87617b 100644 --- a/src/app/vault/vault.component.html +++ b/src/app/vault/vault.component.html @@ -59,8 +59,7 @@ Organizations - - + diff --git a/src/app/vault/vault.component.ts b/src/app/vault/vault.component.ts index 4f6412208e..2e8c954276 100644 --- a/src/app/vault/vault.component.ts +++ b/src/app/vault/vault.component.ts @@ -14,7 +14,6 @@ import { import { CipherType } from 'jslib/enums/cipherType'; import { CipherView } from 'jslib/models/view/cipherView'; -import { FolderView } from 'jslib/models/view/folderView'; import { ModalComponent } from '../modal.component';
{{'noOrganizationsList' | i18n}}