updated colors
This commit is contained in:
26
config.go
26
config.go
@@ -12,12 +12,26 @@ var Cfg *Config
|
|||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
General struct {
|
General struct {
|
||||||
DeleteLogFileAtStart bool `yaml:"delete_log_file_at_start"`
|
DeleteLogFileAtStart bool `yaml:"delete_log_file_at_start"`
|
||||||
LogToFile bool `yaml:"log_to_file"`
|
LogToFile bool `yaml:"log_to_file"`
|
||||||
Callsign string `yaml:"callsign"`
|
Callsign string `yaml:"callsign"`
|
||||||
LogLevel string `yaml:"log_level"`
|
LogLevel string `yaml:"log_level"`
|
||||||
TelnetServer bool `yaml:"telnetserver"`
|
TelnetServer bool `yaml:"telnetserver"`
|
||||||
FlexRadioSpot bool `yaml:"flexradiospot"`
|
FlexRadioSpot bool `yaml:"flexradiospot"`
|
||||||
|
SpotColorNewEntity string `yaml:"spot_color_new_entity"`
|
||||||
|
BackgroundColorNewEntity string `yaml:"background_color_new_entity"`
|
||||||
|
SpotColorNewBand string `yaml:"spot_color_new_band"`
|
||||||
|
BackgroundColorNewBand string `yaml:"background_color_new_band"`
|
||||||
|
SpotColorNewMode string `yaml:"spot_color_new_mode"`
|
||||||
|
BackgroundColorNewMode string `yaml:"background_color_new_mode"`
|
||||||
|
SpotColorNewBandMode string `yaml:"spot_color_new_band_mode"`
|
||||||
|
BackgroundColorNewBandMode string `yaml:"background_color_new_band_mode"`
|
||||||
|
SpotColorNewSlot string `yaml:"spot_color_new_slot"`
|
||||||
|
BackgroundColorNewSlot string `yaml:"background_color_new_slot"`
|
||||||
|
SpotColorMyCallsign string `yaml:"spot_color_my_callsign"`
|
||||||
|
BackgroundColorMyCallsign string `yaml:"background_color_my_callsign"`
|
||||||
|
SpotColorWorked string `yaml:"spot_color_worked"`
|
||||||
|
BackgroundColorWorked string `yaml:"background_color_worked"`
|
||||||
} `yaml:"general"`
|
} `yaml:"general"`
|
||||||
|
|
||||||
Database struct {
|
Database struct {
|
||||||
|
15
config.yml
15
config.yml
@@ -5,6 +5,21 @@ general:
|
|||||||
log_level: DEBUG # INFO or DEBUG or WARN
|
log_level: DEBUG # INFO or DEBUG or WARN
|
||||||
telnetserver: true # not in use for now
|
telnetserver: true # not in use for now
|
||||||
flexradiospot: true # not in use for now
|
flexradiospot: true # not in use for now
|
||||||
|
# Spot colors, if empty then default, colors in HEX AARRGGBB format
|
||||||
|
spot_color_new_entity:
|
||||||
|
background_color_new_entity:
|
||||||
|
spot_color_new_band:
|
||||||
|
background_color_new_band:
|
||||||
|
spot_color_new_mode:
|
||||||
|
background_color_new_mode:
|
||||||
|
spot_color_new_band_mode:
|
||||||
|
background_color_new_band_mode:
|
||||||
|
spot_color_new_slot:
|
||||||
|
background_color_new_slot:
|
||||||
|
spot_color_my_callsign:
|
||||||
|
background_color_my_callsign:
|
||||||
|
spot_color_worked:
|
||||||
|
background_color_worked:
|
||||||
database:
|
database:
|
||||||
mysql: false #only one of the two can be true
|
mysql: false #only one of the two can be true
|
||||||
sqlite: true
|
sqlite: true
|
||||||
|
45
flexradio.go
45
flexradio.go
@@ -175,29 +175,54 @@ func (fc *FlexClient) SendSpottoFlex(spot TelnetSpot) {
|
|||||||
|
|
||||||
// If new DXCC
|
// If new DXCC
|
||||||
if spot.NewDXCC {
|
if spot.NewDXCC {
|
||||||
flexSpot.Color = "#ff3bf908"
|
|
||||||
flexSpot.Priority = "1"
|
flexSpot.Priority = "1"
|
||||||
flexSpot.BackgroundColor = "#ff000000"
|
|
||||||
flexSpot.Comment = flexSpot.Comment + " [New DXCC]"
|
flexSpot.Comment = flexSpot.Comment + " [New DXCC]"
|
||||||
|
if Cfg.General.SpotColorNewEntity != "" && Cfg.General.BackgroundColorNewEntity != "" {
|
||||||
|
flexSpot.Color = Cfg.General.SpotColorNewEntity
|
||||||
|
flexSpot.BackgroundColor = Cfg.General.BackgroundColorNewEntity
|
||||||
|
} else {
|
||||||
|
flexSpot.Color = "#ff3bf908"
|
||||||
|
flexSpot.BackgroundColor = "#ff000000"
|
||||||
|
}
|
||||||
} else if spot.DX == Cfg.General.Callsign {
|
} else if spot.DX == Cfg.General.Callsign {
|
||||||
flexSpot.Color = "#ffff0000"
|
|
||||||
flexSpot.Priority = "1"
|
flexSpot.Priority = "1"
|
||||||
flexSpot.BackgroundColor = "#ff000000"
|
if Cfg.General.SpotColorMyCallsign != "" && Cfg.General.BackgroundColorMyCallsign != "" {
|
||||||
|
flexSpot.Color = Cfg.General.SpotColorMyCallsign
|
||||||
|
flexSpot.BackgroundColor = Cfg.General.BackgroundColorMyCallsign
|
||||||
|
} else {
|
||||||
|
flexSpot.Color = "#ffff0000"
|
||||||
|
flexSpot.BackgroundColor = "#ff000000"
|
||||||
|
}
|
||||||
} else if spot.CallsignWorked {
|
} else if spot.CallsignWorked {
|
||||||
flexSpot.Color = "#ffeaeaea"
|
|
||||||
flexSpot.BackgroundColor = "#ff00c0c0"
|
|
||||||
flexSpot.Priority = "5"
|
flexSpot.Priority = "5"
|
||||||
flexSpot.Comment = flexSpot.Comment + " [Worked]"
|
flexSpot.Comment = flexSpot.Comment + " [Worked]"
|
||||||
|
if Cfg.General.SpotColorWorked != "" && Cfg.General.BackgroundColorWorked != "" {
|
||||||
|
flexSpot.Color = Cfg.General.SpotColorWorked
|
||||||
|
flexSpot.BackgroundColor = Cfg.General.BackgroundColorWorked
|
||||||
|
} else {
|
||||||
|
flexSpot.Color = "#ff000000" //#ffeaeaea
|
||||||
|
flexSpot.BackgroundColor = "#ff00c0c0"
|
||||||
|
}
|
||||||
} else if spot.NewMode && spot.NewBand {
|
} else if spot.NewMode && spot.NewBand {
|
||||||
flexSpot.Color = "#ffc603fc"
|
|
||||||
flexSpot.Priority = "1"
|
flexSpot.Priority = "1"
|
||||||
flexSpot.BackgroundColor = "#ff000000"
|
|
||||||
flexSpot.Comment = flexSpot.Comment + " [New Band & Mode]"
|
flexSpot.Comment = flexSpot.Comment + " [New Band & Mode]"
|
||||||
|
if Cfg.General.SpotColorNewBandMode != "" && Cfg.General.BackgroundColorNewBandMode != "" {
|
||||||
|
flexSpot.Color = Cfg.General.SpotColorNewBandMode
|
||||||
|
flexSpot.BackgroundColor = Cfg.General.BackgroundColorNewBandMode
|
||||||
|
} else {
|
||||||
|
flexSpot.Color = "#ffc603fc"
|
||||||
|
flexSpot.BackgroundColor = "#ff000000"
|
||||||
|
}
|
||||||
} else if spot.NewMode && !spot.NewBand {
|
} else if spot.NewMode && !spot.NewBand {
|
||||||
flexSpot.Color = "#fff9a908"
|
|
||||||
flexSpot.Priority = "2"
|
flexSpot.Priority = "2"
|
||||||
flexSpot.BackgroundColor = "#ff000000"
|
|
||||||
flexSpot.Comment = flexSpot.Comment + " [New Mode]"
|
flexSpot.Comment = flexSpot.Comment + " [New Mode]"
|
||||||
|
if Cfg.General.SpotColorNewMode != "" && Cfg.General.BackgroundColorNewMode != "" {
|
||||||
|
flexSpot.Color = Cfg.General.SpotColorNewMode
|
||||||
|
flexSpot.BackgroundColor = Cfg.General.BackgroundColorNewMode
|
||||||
|
} else {
|
||||||
|
flexSpot.Color = "#fff9a908"
|
||||||
|
flexSpot.BackgroundColor = "#ff000000"
|
||||||
|
}
|
||||||
} else if spot.NewBand && !spot.NewMode {
|
} else if spot.NewBand && !spot.NewMode {
|
||||||
flexSpot.Color = "#fff9f508"
|
flexSpot.Color = "#fff9f508"
|
||||||
flexSpot.Priority = "3"
|
flexSpot.Priority = "3"
|
||||||
|
Reference in New Issue
Block a user