-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Integrate knora-api-js-lib (#215) * chore: First steps to use knora-api-js-lib and new core module * chore(landing page): Update knora app title * Revert "chore(landing page): Update knora app title" This reverts commit 8a9482b. * refactor(main): Update app title * chore(main): New method to get projecs * fix(help): Get knora version with new config * chore(project): New method to get projec * chore(project): New method to get project * refactor(project): Clean up * feat(header): Login / logout * refactor: Clean up @knora/api imports * chore(user): Update user status * chore: More on knora-api-js-lib integration * chore: More on knora-api-js-lib integration * chore: Update config * chore: More on knora-api-js-lib integration * chore: More on knora-api-js-lib integration * chore: More on knora-api-js-lib integration * refactor: Response instead of result * refactor: Clean up imports * test: Refactor test settings * test: Refactor test settings * chore: Using latest knora-ui/core module * chore: Using latest knora-ui/core module * chore: Project form * refactor: Delete unused session validation * test: Update travis config * test: Update travis config * test: Update travis config * test: Try to fix test * style(user): No margin in tab * fix: Make service method angular conform * chore: Set title with "Knora App" * fix: Update project (hack) * fix: Update project (hack) * fix: Session validation * refactor(user): Remove console.log * refactor: Remove @knora/authentication * chore(admin): Try to create or edit user and project * fix(user): Create / update user * fix: Using @knora/api wip/100-optional-properties * fix: Project form to edit / create projects * fix: Project form to edit / create projects * test: Update travis and circleci config * test: Fix some tests * refactor: Clean up code * style: Fix header style issue on mobile device * chore(workspace): Show res toolbar * docs: Update README and config * test: Improve tests * style(search): Style fix for FF * feat: Project admin is able to add existing users * fix: Disable project admin to create system admin * chore: Fix new @knora/core implementation * fix: Bug fix in user profile * feat: Show sysAdmin info on user profile * test: Fix tests * feat: Show own project admin status in list of projects * fix: Bug fix after deactivate own account * chore: Update footer * test: Fix broken tests * fix: Fix typo error * Integrate admin lists (#222) * fix(list): Get labels value * feat(list): Replace ListsService and class definitions by the corresponding ones from the lib * fix(list): Fix response type * chore: Update travis + circle-ci for tests * chore: Reverse the previous modifications in travis + circle-ci for tests * chore(list): Remove console.log * fix: Update list info * refactor: Remove console.logs * Improvements on landing and help page (#226) * fix: Resolves #148 * chore: Update landing page and footer * test: Update CI config * refactor: Removed console.logs * fix: Fix broken links * Pre-release v2.0.0 (#227) * chore: Update @knora module packages * test: Update CI config * docs: Update knora-api version * fix: Bug fix project cache in edit and create mode * test: Fix travis ci config Co-authored-by: Flavie L. <[email protected]>
- Loading branch information
1 parent
8dcd8ac
commit 985a69a
Showing
100 changed files
with
2,036 additions
and
2,935 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,87 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { KuiCoreConfig } from '@knora/core'; | ||
|
||
|
||
export interface IAppConfig { | ||
|
||
env: { | ||
name: string; | ||
}; | ||
ontologyIRI: string; | ||
apiURL: string; | ||
externalApiURL: string; | ||
iiifURL: string; | ||
appURL: string; | ||
appName: string; | ||
localData: string; | ||
pagingLimit: number; | ||
startComponent: string; | ||
} | ||
import { KnoraApiConfig, KnoraApiConnection } from '@knora/api'; | ||
import { KuiConfig } from '@knora/core'; | ||
|
||
@Injectable() | ||
export class AppInitService { | ||
|
||
static settings: IAppConfig; | ||
static coreConfig: KuiCoreConfig; | ||
static knoraApiConnection: KnoraApiConnection; | ||
|
||
constructor() { | ||
} | ||
static knoraApiConfig: KnoraApiConfig; | ||
|
||
static kuiConfig: KuiConfig; | ||
|
||
Init() { | ||
constructor() { } | ||
|
||
init() { | ||
|
||
return new Promise<void>((resolve, reject) => { | ||
// console.log('AppInitService.init() called'); | ||
// do your initialisation stuff here | ||
|
||
const data = <IAppConfig>window['tempConfigStorage']; | ||
// console.log('AppInitService: json', data); | ||
AppInitService.settings = data; | ||
// init knora-ui configuration | ||
AppInitService.kuiConfig = window['tempConfigStorage'] as KuiConfig; | ||
|
||
AppInitService.coreConfig = <KuiCoreConfig>{ | ||
name: AppInitService.settings.appName, | ||
api: AppInitService.settings.apiURL, | ||
media: AppInitService.settings.iiifURL, | ||
app: AppInitService.settings.appURL, | ||
ontologyIRI: AppInitService.settings.ontologyIRI | ||
}; | ||
// init knora-api configuration | ||
AppInitService.knoraApiConfig = new KnoraApiConfig( | ||
AppInitService.kuiConfig.knora.apiProtocol, | ||
AppInitService.kuiConfig.knora.apiHost, | ||
AppInitService.kuiConfig.knora.apiPort | ||
); | ||
|
||
// console.log('AppInitService: finished'); | ||
// set knora-api connection configuration | ||
AppInitService.knoraApiConnection = new KnoraApiConnection(AppInitService.knoraApiConfig); | ||
|
||
resolve(); | ||
}); | ||
} | ||
} | ||
|
||
|
||
|
||
// import { Injectable } from '@angular/core'; | ||
// import { KnoraApiConfig, KnoraApiConnection } from '@knora/api'; | ||
// import { KuiConfig } from '@knora/core'; | ||
|
||
// @Injectable() | ||
// export class AppInitService { | ||
|
||
// // we cannot make readonly properties because we assign them later, so make properties that are only accessible in this class! | ||
// private _knoraApiConnection: KnoraApiConnection; | ||
// get knoraApiConnection(): KnoraApiConnection { | ||
// return this._knoraApiConnection; | ||
// } | ||
|
||
// private _knoraApiConfig: KnoraApiConfig; | ||
// get knoraApiConfig(): KnoraApiConfig { | ||
// return this._knoraApiConfig; | ||
// } | ||
|
||
// private _kuiConfig: KuiConfig; | ||
// get kuiConfig(): KuiConfig { | ||
// return this._kuiConfig; | ||
// } | ||
|
||
// constructor() { } | ||
|
||
// // small i, TypeScript convention | ||
// init() { | ||
|
||
// return new Promise<void>((resolve, reject) => { | ||
|
||
// // init knora-ui configuration | ||
// this._kuiConfig = window['tempConfigStorage'] as KuiConfig; | ||
// // consider the use of json2typescript here, it can throw errors for you if there is a config issue | ||
|
||
// // init knora-api configuration | ||
// this._knoraApiConfig = new KnoraApiConfig( | ||
// this._kuiConfig.knora.apiProtocol, | ||
// this._kuiConfig.knora.apiHost, | ||
// this._kuiConfig.knora.apiPort | ||
// ); | ||
|
||
// // set knora-api connection configuration | ||
// this._knoraApiConnection = new KnoraApiConnection(this._knoraApiConfig); | ||
|
||
// resolve(); | ||
// }); | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.