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 Language from '~/src/constants/language'
import DefaultFonts from '@/utils/fonts' import DefaultFonts from '@/utils/fonts'
import { RootState } from '@/store' import { RootState } from '@/store'
import { Notify } from '~/src/types/notify'
export interface Notify {
reply: boolean,
reblog: boolean,
favourite: boolean,
follow: boolean
}
export interface AppState { export interface AppState {
theme: ThemeType, theme: ThemeType,

View File

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

View File

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

View File

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