mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-13 06:40:59 +00:00
feat(sub): add raw subscription download actions (#6017)
* feat(sub): add raw subscription downloads * fix(sub): address review feedback * feat(sub): add download buttons to client subscriptions * fix(sub): fetch subscription before download --------- Co-authored-by: w3struk <w3struk@gmail.com>
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
package sub
|
||||
|
||||
import "embed"
|
||||
import "io/fs"
|
||||
|
||||
// distFS holds the Vite-built frontend filesystem, injected from main at
|
||||
// startup. The `web` package owns the //go:embed directive (because dist/
|
||||
// is at internal/web/dist/), and hands the FS over via SetDistFS so the sub package
|
||||
// doesn't import web — that would create an import cycle once any
|
||||
// internal/web/controller handler reuses sub's link-building service.
|
||||
var distFS embed.FS
|
||||
var distFS fs.FS
|
||||
|
||||
// SetDistFS installs the embedded frontend filesystem the sub server uses
|
||||
// for its info page assets. Must be called before NewServer().Start().
|
||||
func SetDistFS(fs embed.FS) {
|
||||
distFS = fs
|
||||
func SetDistFS(frontendFS fs.FS) {
|
||||
distFS = frontendFS
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user