GODT-2210: v3.0 splash screen.

Other: new splash screen content.
This commit is contained in:
Xavier Michelon
2023-01-19 13:37:50 +01:00
parent 1bfabf9a83
commit 24c68f100e
34 changed files with 2365 additions and 5255 deletions

View File

@ -446,6 +446,10 @@ func (bridge *Bridge) Close(ctx context.Context) {
if err := bridge.vault.SetLastVersion(bridge.curVersion); err != nil {
logrus.WithError(err).Error("Failed to save last version")
}
if err := bridge.vault.SetFirstStart(false); err != nil {
logrus.WithError(err).Error("Failed to save first start indicator")
}
}
func (bridge *Bridge) publish(event events.Event) {

View File

@ -324,18 +324,6 @@ func (bridge *Bridge) GetFirstStart() bool {
return bridge.vault.GetFirstStart()
}
func (bridge *Bridge) SetFirstStart(firstStart bool) error {
return bridge.vault.SetFirstStart(firstStart)
}
func (bridge *Bridge) GetFirstStartGUI() bool {
return bridge.vault.GetFirstStartGUI()
}
func (bridge *Bridge) SetFirstStartGUI(firstStart bool) error {
return bridge.vault.SetFirstStartGUI(firstStart)
}
func (bridge *Bridge) GetColorScheme() string {
return bridge.vault.GetColorScheme()
}

View File

@ -162,26 +162,7 @@ func TestBridge_Settings_FirstStart(t *testing.T) {
// By default, first start is true.
require.True(t, bridge.GetFirstStart())
// Set first start to false.
require.NoError(t, bridge.SetFirstStart(false))
// Get the new setting.
require.False(t, bridge.GetFirstStart())
})
})
}
func TestBridge_Settings_FirstStartGUI(t *testing.T) {
withEnv(t, func(ctx context.Context, s *server.Server, netCtl *proton.NetCtl, locator bridge.Locator, storeKey []byte) {
withBridge(ctx, t, s.GetHostURL(), netCtl, locator, storeKey, func(bridge *bridge.Bridge, mocks *bridge.Mocks) {
// By default, first start is true.
require.True(t, bridge.GetFirstStartGUI())
// Set first start to false.
require.NoError(t, bridge.SetFirstStartGUI(false))
// Get the new setting.
require.False(t, bridge.GetFirstStartGUI())
// the setting of the first start value is managed by bridge itself, so the setter is not exported.
})
})
}