Skip to content

Commit 65c64f5

Browse files
authored
Merge pull request #391 from BetterDiscord/wails-update-frontend
Update the frontend on the wails branch to use proper Sveltekit with Svelte5 and TypeScript
2 parents abde9e7 + 11787ba commit 65c64f5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1726
-4027
lines changed

backend/utils/paths.go

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,30 @@ func DiscordPath(channel string) string {
4848
}
4949
}
5050

51+
// TODO: make this check and attempt to return the base path when full path doesn't exist
5152
func BrowsePath(channel string) string {
5253
var channelName = GetChannelName(channel)
53-
54+
var candidate = ""
5455
switch op := runtime.GOOS; op {
5556
case "windows":
56-
return filepath.Join(os.Getenv("LOCALAPPDATA"), channelName)
57+
candidate = filepath.Join(os.Getenv("LOCALAPPDATA"), channelName)
5758
case "darwin", "linux":
58-
return filepath.Join(Roaming, strings.ToLower(channelName))
59+
candidate = filepath.Join(Roaming, strings.ToLower(channelName))
5960
default:
61+
candidate = ""
62+
}
63+
64+
if Exists(candidate) {
65+
return candidate
66+
}
67+
68+
candidate, err := os.UserHomeDir()
69+
70+
if err != nil {
6071
return ""
6172
}
73+
74+
return candidate
6275
}
6376

6477
func ValidatePath(proposed string) string {

frontend/.eslintrc.js

Lines changed: 0 additions & 113 deletions
This file was deleted.

frontend/.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
node_modules
2+
3+
# Output
4+
.output
5+
.vercel
6+
.netlify
7+
.wrangler
8+
/.svelte-kit
9+
/build
10+
11+
# OS
12+
.DS_Store
13+
Thumbs.db
14+
15+
# Env
16+
.env
17+
.env.*
18+
!.env.example
19+
!.env.test
20+
21+
# Vite
22+
vite.config.js.timestamp-*
23+
vite.config.ts.timestamp-*

0 commit comments

Comments
 (0)