mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-24 11:55:50 +01:00
Use file upload service for file uploads
This commit is contained in:
parent
0fabda65e7
commit
99f8fdb4e9
@ -105,12 +105,12 @@ const tokenService = new TokenService(storageService);
|
|||||||
const appIdService = new AppIdService(storageService);
|
const appIdService = new AppIdService(storageService);
|
||||||
const apiService = new ApiService(tokenService, platformUtilsService,
|
const apiService = new ApiService(tokenService, platformUtilsService,
|
||||||
async (expired: boolean) => messagingService.send('logout', { expired: expired }));
|
async (expired: boolean) => messagingService.send('logout', { expired: expired }));
|
||||||
const fileUploadService: FileUploadServiceAbstraction = new FileUploadService(logService, apiService);
|
|
||||||
const userService = new UserService(tokenService, storageService);
|
const userService = new UserService(tokenService, storageService);
|
||||||
const settingsService = new SettingsService(userService, storageService);
|
const settingsService = new SettingsService(userService, storageService);
|
||||||
export let searchService: SearchService = null;
|
export let searchService: SearchService = null;
|
||||||
|
const fileUploadService = new FileUploadService(logService, apiService);
|
||||||
const cipherService = new CipherService(cryptoService, userService, settingsService,
|
const cipherService = new CipherService(cryptoService, userService, settingsService,
|
||||||
apiService, storageService, i18nService, () => searchService);
|
apiService, fileUploadService, storageService, i18nService, () => searchService);
|
||||||
const folderService = new FolderService(cryptoService, userService, apiService, storageService,
|
const folderService = new FolderService(cryptoService, userService, apiService, storageService,
|
||||||
i18nService, cipherService);
|
i18nService, cipherService);
|
||||||
const collectionService = new CollectionService(cryptoService, userService, storageService, i18nService);
|
const collectionService = new CollectionService(cryptoService, userService, storageService, i18nService);
|
||||||
@ -224,6 +224,7 @@ export function initFactory(): Function {
|
|||||||
{ provide: SendServiceAbstraction, useValue: sendService },
|
{ provide: SendServiceAbstraction, useValue: sendService },
|
||||||
{ provide: CryptoFunctionServiceAbstraction, useValue: cryptoFunctionService },
|
{ provide: CryptoFunctionServiceAbstraction, useValue: cryptoFunctionService },
|
||||||
{ provide: NativeMessagingService, useValue: nativeMessagingService },
|
{ provide: NativeMessagingService, useValue: nativeMessagingService },
|
||||||
|
{ provide: FileUploadServiceAbstraction, useValue: fileUploadService },
|
||||||
{
|
{
|
||||||
provide: APP_INITIALIZER,
|
provide: APP_INITIALIZER,
|
||||||
useFactory: initFactory,
|
useFactory: initFactory,
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
import { ApiService } from 'jslib/abstractions/api.service';
|
||||||
import { CipherService } from 'jslib/abstractions/cipher.service';
|
import { CipherService } from 'jslib/abstractions/cipher.service';
|
||||||
import { CryptoService } from 'jslib/abstractions/crypto.service';
|
import { CryptoService } from 'jslib/abstractions/crypto.service';
|
||||||
import { I18nService } from 'jslib/abstractions/i18n.service';
|
import { I18nService } from 'jslib/abstractions/i18n.service';
|
||||||
@ -15,7 +16,7 @@ import { AttachmentsComponent as BaseAttachmentsComponent } from 'jslib/angular/
|
|||||||
export class AttachmentsComponent extends BaseAttachmentsComponent {
|
export class AttachmentsComponent extends BaseAttachmentsComponent {
|
||||||
constructor(cipherService: CipherService, i18nService: I18nService,
|
constructor(cipherService: CipherService, i18nService: I18nService,
|
||||||
cryptoService: CryptoService, userService: UserService,
|
cryptoService: CryptoService, userService: UserService,
|
||||||
platformUtilsService: PlatformUtilsService) {
|
platformUtilsService: PlatformUtilsService, apiService: ApiService) {
|
||||||
super(cipherService, i18nService, cryptoService, userService, platformUtilsService, window);
|
super(cipherService, i18nService, cryptoService, userService, platformUtilsService, apiService, window);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -431,7 +431,7 @@
|
|||||||
"message": "Select a file."
|
"message": "Select a file."
|
||||||
},
|
},
|
||||||
"maxFileSize": {
|
"maxFileSize": {
|
||||||
"message": "Maximum file size is 100 MB."
|
"message": "Maximum file size is 500 MB."
|
||||||
},
|
},
|
||||||
"updateKey": {
|
"updateKey": {
|
||||||
"message": "You cannot use this feature until you update your encryption key."
|
"message": "You cannot use this feature until you update your encryption key."
|
||||||
|
Loading…
Reference in New Issue
Block a user