Merge pull request 'Create missing audio directory' (#53) from no-text-input-for-wifi-password into dev

Reviewed-on: https://codeberg.org/RhemaWave-Technologies/RhemaWave/pulls/53
This commit is contained in:
NeilClack
2026-06-27 21:29:15 +02:00
5 changed files with 29 additions and 63 deletions
+19
View File
@@ -0,0 +1,19 @@
* Virtual Machine Testing
To be completed after updating rhemawave-dev, deleting nixos.qcow2, and building rhemawavekiosk-dev
- [ ] Closure builds
- [ ] VM Starts
- [ ] RadiantWave starts
- [ ] WiFi screen does NOT appear (no wifi nic in vm)
- [ ] Email Address scren appears
- [ ] I can type an email address
- [ ] I cannot submit an incomplete email
- [ ] I can submit a complete email
- [ ] License Key screen appears
- [ ] I can type a license key
- [ ] I cannot submit an incomplete license
- [ ] I can submit a complete license
- [ ] Home screen appears
- [ ] Version string is correct
- [ ] Status: Downloading files
-
+1
View File
@@ -0,0 +1 @@
nclack@muninn.28787:1782524461
+2 -31
View File
@@ -1,31 +1,2 @@
- [X] Networks listed
- [X] Cursor moves between networks
- [X] Enter opens a password prompt for a protected network
- [X] You can type and see what you are typing
- [X] Email address page appears
- [X] Can type in email
- [X] Can submit email
- [X] License Key page appears
- [X] Can type in license key
- [X] Can submit license key
- [X] Version string is correct
- [X] Status: Downloading Assets
- [X] F3 navigates to settings
- [X] Cursor moves
- [X] Can view application logs
- [X] No logs are leaking proprietary information
- [X] WiFi setup shows connected to a network
- [X] License Key shows current license key
- [X] I can backspace the license key
- [X] I cannot submit an incomplete key
- [X] I can type in the box
- [X] I can submit the new key
- [X] License Key shows updated key
- [X] Email address shows current email
- [X] I can backspace characters
- [X] I cannot submit an incomplete email
- [X] I can type in the box
- [X] I can submit the new email
- [X] Email address shows new email
- [X] Audio page loads
- [ ] I can toggle the audio on and off
* Virtual Machine Testing
To be completed after updating rhemawave-dev, deleting nixos.qcow2, and building rhemawavekiosk-dev
+7
View File
@@ -189,6 +189,13 @@ func Run() {
audioDir := filepath.Join(config.AssetsDir, "audio")
_, err = os.Stat(audioDir)
if os.IsNotExist(err) {
if err = os.MkdirAll(audioDir, 0740); err != nil {
logger.Error("unable to create audio directory: %v", err)
}
}
go download.DownloadAudioFiles(app.PageRouter.Context.MessageChannel, audioDir, "https://files.radiantwavetech.com/audio/")
app.runEventLoop()
-32
View File
@@ -194,19 +194,6 @@ func fileMD5(path string) (string, error) {
return fmt.Sprintf("%x", h.Sum(nil)), nil
}
// remoteFileSize does a HEAD request and returns Content-Length.
func remoteFileSize(url string) (int64, error) {
resp, err := http.Head(url)
if err != nil {
return 0, err
}
resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return 0, fmt.Errorf("HEAD %s: %s", url, resp.Status)
}
return resp.ContentLength, nil
}
// downloadFile streams url to destPath, calling onChunk(n) after each write
// with the number of bytes just written. Returns total bytes downloaded.
func downloadFile(url, destPath string, onChunk func(int64)) (int64, error) {
@@ -250,22 +237,3 @@ func downloadFile(url, destPath string, onChunk func(int64)) (int64, error) {
return total, nil
}
// ensureDir creates path and all parents if they don't exist.
func ensureDir(path string) error {
info, err := os.Stat(path)
if err == nil {
if !info.IsDir() {
return fmt.Errorf("path exists but is not a directory: %s", path)
}
return nil
}
if !os.IsNotExist(err) {
return fmt.Errorf("stat %s: %w", path, err)
}
if err := os.MkdirAll(path, 0o750); err != nil {
return fmt.Errorf("mkdir %s: %w", path, err)
}
logger.Info("download: created directory %s", path)
return nil
}