Various code fixes (#1704)

* fix typings and missing lib

* fix i18n typo, add typings

* code improvements

* fix missing awaits

* more fixes

* fix bug in the evaluators, simplify code

* more fixes
This commit is contained in:
Denys Vuika
2020-10-04 18:09:27 +01:00
committed by GitHub
parent bf11489e0f
commit 9c7ac17161
46 changed files with 133 additions and 142 deletions

View File

@@ -103,7 +103,7 @@ export function isShared(context: RuleContext): boolean {
return true;
}
if ((navigation.isNotTrashcan(context), !context.selection.isEmpty && context.selection.file)) {
if (navigation.isNotTrashcan(context) && !context.selection.isEmpty && context.selection.file) {
return !!(context.selection.file.entry && context.selection.file.entry.properties && context.selection.file.entry.properties['qshare:sharedId']);
}

View File

@@ -126,6 +126,7 @@ export class ContentApiService {
/**
* Gets information about a user identified by their username.
* @param personId ID of the target user
* @param options Api options
* @returns User information
*/
getPerson(personId: string, options?: { fields?: Array<string> }): Observable<PersonEntry> {
@@ -138,6 +139,7 @@ export class ContentApiService {
* @param nodeId The id of the node to be copied
* @param targetParentId The id of the folder-node where the node have to be copied to
* @param name The new name for the copy that would be added on the destination folder
* @param opts Api options
*/
copyNode(nodeId: string, targetParentId: string, name?: string, opts?: { include?: Array<string>; fields?: Array<string> }): Observable<NodeEntry> {
return from(this.api.nodesApi.copyNode(nodeId, { targetParentId, name }, opts));

View File

@@ -77,9 +77,9 @@ describe('RouterExtensionService', () => {
]
});
extensionService = TestBed.get(ExtensionService);
service = TestBed.get(RouterExtensionService);
router = TestBed.get(Router);
extensionService = TestBed.inject(ExtensionService);
service = TestBed.inject(RouterExtensionService);
router = TestBed.inject(Router);
router.config = [
{ path: 'login', component: {} as Type<any> },
{ path: 'settings', component: {} as Type<any> },