ancora su Typescript...

suddiviso i ts dai html e scss
This commit is contained in:
paolo
2018-11-07 22:42:22 +01:00
parent 7c1d07797e
commit 6811202571
31 changed files with 8875 additions and 314 deletions

8
src/model/glob.ts Normal file
View 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
View 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
View File

@@ -0,0 +1 @@
export type KeyValue = { key: string, value: string };

View 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
View 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
}