settings

package
v0.29.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const (
	CwtchStarted         = event.Type("CwtchStarted")
	CwtchStartError      = event.Type("CwtchStartError")
	UpdateGlobalSettings = event.Type("UpdateGlobalSettings")
)
View Source
const (
	NotificationPolicyMute       = NotificationPolicy("NotificationPolicy.Mute")
	NotificationPolicyOptIn      = NotificationPolicy("NotificationPolicy.OptIn")
	NotificationPolicyDefaultAll = NotificationPolicy("NotificationPolicy.DefaultAll")
)
View Source
const GlobalSettingsFilename = "ui.globals"

Variables

View Source
var DefaultGlobalSettings = GlobalSettings{
	Locale:                  "en",
	Theme:                   "cwtch",
	ThemeMode:               "dark",
	ThemeImages:             false,
	PreviousPid:             -1,
	ExperimentsEnabled:      false,
	Experiments:             map[string]bool{constants.MessageFormattingExperiment: true},
	StateRootPane:           0,
	FirstTime:               true,
	BlockUnknownConnections: false,
	StreamerMode:            false,
	UIColumnModePortrait:    "DualpaneMode.Single",
	UIColumnModeLandscape:   "DualpaneMode.CopyPortrait",
	NotificationPolicy:      "NotificationPolicy.Mute",
	NotificationContent:     "NotificationContent.SimpleEvent",
	DownloadPath:            "",
	AllowAdvancedTorConfig:  false,
	CustomTorrc:             "",
	UseCustomTorrc:          false,
	CustomSocksPort:         -1,
	CustomControlPort:       -1,
	UseTorCache:             false,
	TorCacheDir:             "",
	BlodeuweddPath:          "",
	FontScaling:             1.0,
	DefaultSaveHistory:      false,
}

Functions

This section is empty.

Types

type GlobalSettings

type GlobalSettings struct {
	Locale                  string
	Theme                   string
	ThemeMode               string
	ThemeImages             bool
	PreviousPid             int64
	ExperimentsEnabled      bool
	Experiments             map[string]bool
	BlockUnknownConnections bool
	NotificationPolicy      NotificationPolicy
	NotificationContent     string
	StreamerMode            bool
	StateRootPane           int
	FirstTime               bool
	UIColumnModePortrait    string
	UIColumnModeLandscape   string
	DownloadPath            string
	AllowAdvancedTorConfig  bool
	CustomTorrc             string
	UseCustomTorrc          bool
	UseExternalTor          bool
	CustomSocksPort         int
	CustomControlPort       int
	UseTorCache             bool
	TorCacheDir             string
	BlodeuweddPath          string
	FontScaling             float64
	DefaultSaveHistory      bool
}

func GenerateDefaultSettings added in v0.29.1

func GenerateDefaultSettings() GlobalSettings

type GlobalSettingsFile

type GlobalSettingsFile struct {
	v1.FileStore
}

func InitGlobalSettingsFile

func InitGlobalSettingsFile(directory string, password string) (*GlobalSettingsFile, error)

func (*GlobalSettingsFile) ReadGlobalSettings

func (globalSettingsFile *GlobalSettingsFile) ReadGlobalSettings() GlobalSettings

func (*GlobalSettingsFile) WriteGlobalSettings

func (globalSettingsFile *GlobalSettingsFile) WriteGlobalSettings(globalSettings GlobalSettings)

type NotificationPolicy

type NotificationPolicy string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL