mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-27 13:34:28 -04:00
Refactor login components and adjust login API routes (#1678)
* Refactor login components and adjust API routes Signed-off-by: Erik Michelson <github@erik.michelson.eu> * Adjust API /me response and redux state Signed-off-by: Erik Michelson <github@erik.michelson.eu> * Fix moved function Signed-off-by: Erik Michelson <github@erik.michelson.eu> * Update cypress tests Signed-off-by: Erik Michelson <github@erik.michelson.eu> * Adjust mock response Signed-off-by: Erik Michelson <github@erik.michelson.eu> * Integrate new common fields and hook into profile page Signed-off-by: Erik Michelson <github@erik.michelson.eu> * Remove openid Signed-off-by: Erik Michelson <github@erik.michelson.eu> * Fix config mock Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
fe640268c5
commit
eab189c3c6
44 changed files with 911 additions and 507 deletions
|
@ -22,8 +22,7 @@ export const initialState: Config = {
|
|||
google: false,
|
||||
saml: false,
|
||||
oauth2: false,
|
||||
internal: false,
|
||||
openid: false
|
||||
local: false
|
||||
},
|
||||
branding: {
|
||||
name: '',
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
import { DateTime } from 'luxon'
|
||||
import type { NoteDetails } from './types/note-details'
|
||||
import type { SlideOptions } from './types/slide-show-options'
|
||||
import { NoteTextDirection, NoteType } from './types/note-details'
|
||||
import type { SlideOptions } from './types/slide-show-options'
|
||||
|
||||
export const initialSlideOptions: SlideOptions = {
|
||||
transition: 'zoom',
|
||||
|
@ -30,7 +30,7 @@ export const initialState: NoteDetails = {
|
|||
createTime: DateTime.fromSeconds(0),
|
||||
lastChange: {
|
||||
timestamp: DateTime.fromSeconds(0),
|
||||
userName: ''
|
||||
username: ''
|
||||
},
|
||||
alias: '',
|
||||
viewCount: 0,
|
||||
|
|
|
@ -182,7 +182,7 @@ const convertNoteDtoToNoteDetails = (note: NoteDto): NoteDetails => {
|
|||
noteTitle: initialState.noteTitle,
|
||||
createTime: DateTime.fromISO(note.metadata.createTime),
|
||||
lastChange: {
|
||||
userName: note.metadata.updateUser.userName,
|
||||
username: note.metadata.updateUser.username,
|
||||
timestamp: DateTime.fromISO(note.metadata.updateTime)
|
||||
},
|
||||
firstHeading: initialState.firstHeading,
|
||||
|
|
|
@ -19,7 +19,7 @@ export interface NoteDetails {
|
|||
id: string
|
||||
createTime: DateTime
|
||||
lastChange: {
|
||||
userName: string
|
||||
username: string
|
||||
timestamp: DateTime
|
||||
}
|
||||
viewCount: number
|
||||
|
|
|
@ -23,8 +23,9 @@ export interface ClearUserAction extends Action<UserActionType> {
|
|||
}
|
||||
|
||||
export interface UserState {
|
||||
id: string
|
||||
name: string
|
||||
username: string
|
||||
displayName: string
|
||||
email: string
|
||||
photo: string
|
||||
provider: LoginProvider
|
||||
}
|
||||
|
@ -38,9 +39,8 @@ export enum LoginProvider {
|
|||
GOOGLE = 'google',
|
||||
SAML = 'saml',
|
||||
OAUTH2 = 'oauth2',
|
||||
INTERNAL = 'internal',
|
||||
LDAP = 'ldap',
|
||||
OPENID = 'openid'
|
||||
LOCAL = 'local',
|
||||
LDAP = 'ldap'
|
||||
}
|
||||
|
||||
export type OptionalUserState = UserState | null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue