refs #850 Add define types for notify, sound, and timeline

This commit is contained in:
AkiraFukushima 2019-04-15 22:37:57 +09:00
parent ef219fce2b
commit be651b3014
7 changed files with 20 additions and 26 deletions

View File

@ -8,13 +8,7 @@ import TimeFormat from '~/src/constants/timeFormat'
import Language from '~/src/constants/language'
import DefaultFonts from '@/utils/fonts'
import { RootState } from '@/store'
export interface Notify {
reply: boolean,
reblog: boolean,
favourite: boolean,
follow: boolean
}
import { Notify } from '~/src/types/notify'
export interface AppState {
theme: ThemeType,

View File

@ -1,17 +1,8 @@
import { ipcRenderer } from 'electron'
import { Module, MutationTree, ActionTree } from 'vuex'
import { RootState } from '@/store'
interface Sound {
fav_rb: boolean,
toot: boolean
}
interface Timeline {
cw: boolean,
nfsw: boolean,
hideAllAttachments: boolean
}
import { Sound } from '~/src/types/sound'
import { Timeline } from '~/src/types/timeline'
interface GeneralSet {
sound: Sound,

View File

@ -1,13 +1,7 @@
import { ipcRenderer } from 'electron'
import { Module, MutationTree, ActionTree } from 'vuex'
import { RootState } from '@/store'
interface Notify {
reply: boolean,
reblog: boolean,
favourite: boolean,
follow: boolean
}
import { Notify } from '~/src/types/notify'
interface Notification {
notify: Notify

View File

@ -9,7 +9,7 @@ import router from '@/router'
import unreadSettings from '~/src/constants/unreadNotification'
import { Module, MutationTree, ActionTree } from 'vuex'
import LocalAccount from '~/src/types/localAccount'
import { Notify } from './App'
import { Notify } from '~/src/types/notify'
import { RootState } from '@/store'
import { UnreadNotification } from '~/src/types/unreadNotification'

6
src/types/notify.ts Normal file
View File

@ -0,0 +1,6 @@
export type Notify = {
reply: boolean,
reblog: boolean,
favourite: boolean,
follow: boolean
}

4
src/types/sound.ts Normal file
View File

@ -0,0 +1,4 @@
export type Sound = {
fav_rb: boolean,
toot: boolean
}

5
src/types/timeline.ts Normal file
View File

@ -0,0 +1,5 @@
export type Timeline = {
cw: boolean,
nfsw: boolean,
hideAllAttachments: boolean
}