ancora su Typescript...
suddiviso i ts dai html e scss
This commit is contained in:
8
src/model/glob.ts
Normal file
8
src/model/glob.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export interface IGlobState {
|
||||
conta: number
|
||||
isLoginPage: boolean
|
||||
layoutNeeded: boolean
|
||||
mobileMode: boolean
|
||||
menuCollapse: boolean
|
||||
posts: string[]
|
||||
}
|
||||
4
src/model/index.ts
Normal file
4
src/model/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export * from './user'
|
||||
export * from './glob'
|
||||
export * from './signup-option'
|
||||
export * from './key-value'
|
||||
1
src/model/key-value.ts
Normal file
1
src/model/key-value.ts
Normal file
@@ -0,0 +1 @@
|
||||
export type KeyValue = { key: string, value: string };
|
||||
8
src/model/signup-option.ts
Normal file
8
src/model/signup-option.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
export interface ISignupOptions {
|
||||
email?: string
|
||||
username: string
|
||||
password?: string
|
||||
lang?: string
|
||||
repeatPassword?: string
|
||||
}
|
||||
28
src/model/user.ts
Normal file
28
src/model/user.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { IToken } from '@/types'
|
||||
|
||||
export const DefaultUser = <IUserState>{
|
||||
email: '',
|
||||
username: '',
|
||||
idapp: process.env.APP_ID,
|
||||
password: '',
|
||||
lang: 'it'
|
||||
}
|
||||
|
||||
export interface IUserState {
|
||||
_id?: string
|
||||
email?: string
|
||||
username: string
|
||||
idapp?: any
|
||||
password?: string
|
||||
lang?: string
|
||||
repeatPassword?: string
|
||||
|
||||
idToken?: string
|
||||
userId?: number
|
||||
|
||||
tokens?: IToken[]
|
||||
|
||||
verifiedEmail?: boolean
|
||||
|
||||
tokenforgot?: string
|
||||
}
|
||||
Reference in New Issue
Block a user