Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(store): add typing to default vals #730

Merged
merged 5 commits into from
Oct 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions src/lib/state/settings/default.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { EmojiFont, Font, Identicon, KeybindAction, KeybindState, Locale } from "$lib/enums"
import type { Keybind } from "$lib/types"
import type { FontOption, Keybind } from "$lib/types"
import type { ISettingsState } from "."

export let defaultKeybinds = [
export let defaultKeybinds: Keybind[] = [
{
action: KeybindAction.IncreaseFontSize,
key: ".",
Expand Down Expand Up @@ -64,7 +65,7 @@ export let defaultKeybinds = [
},
]

export const availableFonts = [
export const availableFonts: FontOption[] = [
{ text: Font.Poppins, value: Font.Poppins },
{ text: Font.SpaceMono, value: Font.SpaceMono },
{ text: Font.ChakraPetch, value: Font.ChakraPetch },
Expand All @@ -83,7 +84,7 @@ export const availableFonts = [
{ text: Font.OpenDyslexic, value: Font.OpenDyslexic },
]

export const availableIdenticons = [
export const availableIdenticons: FontOption[] = [
{ text: Identicon.Avataaars, value: Identicon.Avataaars },
{ text: Identicon.AvataaarsNeutral, value: Identicon.AvataaarsNeutral },
{ text: Identicon.Bots, value: Identicon.Bots },
Expand All @@ -98,20 +99,15 @@ export const availableIdenticons = [
{ text: Identicon.Shapes, value: Identicon.Shapes },
]

export const availableEmoji = [
export const availableEmoji: FontOption[] = [
{ text: EmojiFont.NotoEmoji.split(".")[0], value: EmojiFont.NotoEmoji },
{ text: EmojiFont.OpenMoji.split(".")[0], value: EmojiFont.OpenMoji },
{ text: EmojiFont.Blobmoji.split(".")[0], value: EmojiFont.Blobmoji },
{ text: EmojiFont.Twemoji.split(".")[0], value: EmojiFont.Twemoji },
{ text: EmojiFont.Fluent.split(".")[0], value: EmojiFont.Fluent },
]
export let defaultSettings = {
export let defaultSettings: ISettingsState = {
lang: Locale.EN_US,
friends: [],
favorites: [],
activeRequests: [],
blocked: [],
files: [],
widgets: {
show: false,
},
Expand All @@ -135,9 +131,7 @@ export let defaultSettings = {
},
audio: {
inputDevice: "Default",
videoInputDevice: "Default",
outputDevice: "Default",
echoCancellation: true,
interfaceSounds: false,
controlSounds: true,
messageSounds: true,
Expand Down