Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8165b2d843 | ||
|
|
e480141e89 | ||
|
|
e1ae34a336 | ||
|
|
3aac950b9c | ||
|
|
96bfcb7d0e | ||
|
|
64744e218a | ||
|
|
7d3db6b485 | ||
|
|
9cde384a36 | ||
| f9a92e4e4a | |||
| 40b13a0661 | |||
|
|
ff473d0e8d | ||
|
|
4798b76b2d | ||
|
|
80d637f03e | ||
|
|
793929ad82 | ||
|
|
281548c166 | ||
|
|
9543bf407b | ||
|
|
45c400e7d3 |
2
.env
2
.env
@@ -2,4 +2,4 @@ ENV= #empty|development
|
|||||||
PHOTO_DIR=images
|
PHOTO_DIR=images
|
||||||
HOST=0.0.0.0
|
HOST=0.0.0.0
|
||||||
PORT=8080
|
PORT=8080
|
||||||
INTERVAL_DEFAULT=120
|
INTERVAL_DEFAULT=10
|
||||||
189
.gitea/workflows/build.yml
Normal file
189
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,189 @@
|
|||||||
|
name: Build Slideshow App
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
env:
|
||||||
|
APP_NAME: slideshowApp
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: windows
|
||||||
|
arch: amd64
|
||||||
|
ext: .exe
|
||||||
|
- os: linux
|
||||||
|
arch: amd64
|
||||||
|
ext: ""
|
||||||
|
- os: linux
|
||||||
|
arch: arm64
|
||||||
|
ext: ""
|
||||||
|
- os: linux
|
||||||
|
arch: arm
|
||||||
|
arm_version: 7
|
||||||
|
ext: ""
|
||||||
|
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Ensure latest Go is installed in /data/go
|
||||||
|
run: |
|
||||||
|
export GOROOT=/data/go/go
|
||||||
|
export PATH=$GOROOT/bin:$PATH
|
||||||
|
export GOCACHE=/data/gocache
|
||||||
|
export GOMODCACHE=/data/gomodcache
|
||||||
|
mkdir -p $GOCACHE $GOMODCACHE
|
||||||
|
|
||||||
|
if [ ! -x "$GOROOT/bin/go" ]; then
|
||||||
|
echo "Go not found in $GOROOT, downloading latest stable..."
|
||||||
|
|
||||||
|
GO_VERSION=$(curl -s https://go.dev/VERSION?m=text | head -n1)
|
||||||
|
echo "Latest version is $GO_VERSION"
|
||||||
|
|
||||||
|
mkdir -p /data/go
|
||||||
|
curl -sSL "https://go.dev/dl/${GO_VERSION}.linux-amd64.tar.gz" -o /tmp/go.tar.gz
|
||||||
|
tar -C /data/go -xzf /tmp/go.tar.gz
|
||||||
|
else
|
||||||
|
echo "Using cached Go from $GOROOT"
|
||||||
|
fi
|
||||||
|
|
||||||
|
go version
|
||||||
|
|
||||||
|
- name: Download Go dependencies
|
||||||
|
run: |
|
||||||
|
export GOROOT=/data/go/go
|
||||||
|
export PATH=$GOROOT/bin:$PATH
|
||||||
|
export GOCACHE=/data/gocache
|
||||||
|
export GOMODCACHE=/data/gomodcache
|
||||||
|
mkdir -p $GOCACHE $GOMODCACHE
|
||||||
|
go mod download
|
||||||
|
|
||||||
|
- name: Build binary
|
||||||
|
run: |
|
||||||
|
export GOROOT=/data/go/go
|
||||||
|
export PATH=$GOROOT/bin:$PATH
|
||||||
|
export GOCACHE=/data/gocache
|
||||||
|
export GOMODCACHE=/data/gomodcache
|
||||||
|
mkdir -p $GOCACHE $GOMODCACHE
|
||||||
|
|
||||||
|
OUTPUT="${APP_NAME}"
|
||||||
|
if [ -n "${{ matrix.arm_version }}" ]; then
|
||||||
|
export GOARM=${{ matrix.arm_version }}
|
||||||
|
fi
|
||||||
|
|
||||||
|
OUTPUT="${OUTPUT}${{ matrix.ext }}"
|
||||||
|
echo "Building $OUTPUT"
|
||||||
|
GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -ldflags="-s -w" -trimpath -o "$OUTPUT"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Create Debian Package
|
||||||
|
if: matrix.os == 'linux'
|
||||||
|
run: |
|
||||||
|
# 1. Setup Variables
|
||||||
|
VERSION=${GITHUB_REF_NAME#v} # Extracts 1.0.0 from v1.0.0
|
||||||
|
ARCH=${{ matrix.arch }}
|
||||||
|
if [ "$ARCH" == "arm" ]; then ARCH="armhf"; fi
|
||||||
|
|
||||||
|
PKG_NAME="slideshowapp"
|
||||||
|
BUILD_DIR="${PKG_NAME}_${VERSION}_${ARCH}"
|
||||||
|
|
||||||
|
# 2. Create Directory Structure
|
||||||
|
mkdir -p $BUILD_DIR/usr/bin
|
||||||
|
mkdir -p $BUILD_DIR/usr/share/$PKG_NAME
|
||||||
|
mkdir -p $BUILD_DIR/etc/systemd/system
|
||||||
|
mkdir -p $BUILD_DIR/DEBIAN
|
||||||
|
|
||||||
|
# 3. Copy Files
|
||||||
|
cp ${APP_NAME} $BUILD_DIR/usr/bin/$PKG_NAME
|
||||||
|
cp -r ./web $BUILD_DIR/usr/share/$PKG_NAME/
|
||||||
|
chmod +x $BUILD_DIR/usr/bin/$PKG_NAME
|
||||||
|
|
||||||
|
# 4. Handle .env (Copy as a .template so it doesn't overwrite existing ones)
|
||||||
|
if [ -f ".env" ]; then
|
||||||
|
cp .env $BUILD_DIR/usr/share/$PKG_NAME/.env.template
|
||||||
|
else
|
||||||
|
echo "PORT=8080" > $BUILD_DIR/usr/share/$PKG_NAME/.env.template
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 5. Create the systemd Service File
|
||||||
|
cat <<EOF > $BUILD_DIR/etc/systemd/system/$PKG_NAME.service
|
||||||
|
[Unit]
|
||||||
|
Description=Slideshow Application Service
|
||||||
|
After=graphical.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
Environment=DISPLAY=:0
|
||||||
|
Environment=XAUTHORITY=/home/youruser/.Xauthority
|
||||||
|
ExecStart=/usr/bin/$PKG_NAME
|
||||||
|
WorkingDirectory=/usr/share/$PKG_NAME
|
||||||
|
Restart=always
|
||||||
|
User=root
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# 6. Create Control File
|
||||||
|
cat <<EOF > $BUILD_DIR/DEBIAN/control
|
||||||
|
Package: $PKG_NAME
|
||||||
|
Version: $VERSION
|
||||||
|
Section: utils
|
||||||
|
Priority: optional
|
||||||
|
Architecture: $ARCH
|
||||||
|
Maintainer: Your Name <you@example.com>
|
||||||
|
Description: Slideshow Application
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# 7. Optional: Add post-install script to enable service automatically
|
||||||
|
echo "create service"
|
||||||
|
cat <<EOF > $BUILD_DIR/DEBIAN/postinst
|
||||||
|
#!/bin/sh
|
||||||
|
# Check if .env exists in the target share folder
|
||||||
|
if [ ! -f "/usr/share/$PKG_NAME/.env" ]; then
|
||||||
|
echo "Creating new .env from template..."
|
||||||
|
cp /usr/share/$PKG_NAME/.env.template /usr/share/$PKG_NAME/.env
|
||||||
|
else
|
||||||
|
echo ".env already exists, skipping template copy to preserve settings."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "reload"
|
||||||
|
systemctl daemon-reload
|
||||||
|
echo "enable service"
|
||||||
|
systemctl enable $PKG_NAME.service
|
||||||
|
echo "start service"
|
||||||
|
systemctl start $PKG_NAME.service
|
||||||
|
EOF
|
||||||
|
chmod 555 $BUILD_DIR/DEBIAN/postinst
|
||||||
|
|
||||||
|
# 8. Build .deb
|
||||||
|
dpkg-deb --build $BUILD_DIR
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
# Upload for Windows (Binary + Web folder)
|
||||||
|
- name: Upload Windows Artifact
|
||||||
|
if: matrix.os == 'windows'
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ env.APP_NAME }}-windows
|
||||||
|
path: |
|
||||||
|
${{ env.APP_NAME }}.exe
|
||||||
|
./web
|
||||||
|
|
||||||
|
# Upload for Linux (Binary + .deb)
|
||||||
|
- name: Upload Linux Artifact
|
||||||
|
if: matrix.os == 'linux'
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ env.APP_NAME }}-linux-${{ matrix.arch }}
|
||||||
|
path: |
|
||||||
|
${{ env.APP_NAME }}
|
||||||
|
*.deb
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
images/
|
images/
|
||||||
slideshow_app
|
slideshowApp
|
||||||
|
schedule.json
|
||||||
4
env/enviroment.go
vendored
4
env/enviroment.go
vendored
@@ -28,6 +28,10 @@ func (key EnvKey) GetValue() string {
|
|||||||
return os.Getenv(string(key))
|
return os.Getenv(string(key))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (key EnvKey) SetValue(value string) {
|
||||||
|
os.Setenv(string(key), value)
|
||||||
|
}
|
||||||
|
|
||||||
func (key EnvKey) GetBoolValue() bool {
|
func (key EnvKey) GetBoolValue() bool {
|
||||||
value := strings.ToLower(os.Getenv(string(key)))
|
value := strings.ToLower(os.Getenv(string(key)))
|
||||||
return value == "true" || value == "1"
|
return value == "true" || value == "1"
|
||||||
|
|||||||
@@ -5,30 +5,32 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"slideshowApp/env"
|
"slideshowApp/env"
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Helper to get the local network IP address
|
// Helper to get the local network IP address
|
||||||
func getLocalIP() string {
|
func GetLocalIP() string {
|
||||||
if env.Host.GetValue() != "0.0.0.0" && env.Host.GetValue() != "localhost" {
|
if env.Host.GetValue() != "0.0.0.0" && env.Host.GetValue() != "localhost" {
|
||||||
return env.Host.GetValue()
|
return env.Host.GetValue()
|
||||||
}
|
}
|
||||||
|
|
||||||
addrs, err := net.InterfaceAddrs()
|
if ip := getActiveIP(); ip != "" {
|
||||||
|
return ip
|
||||||
|
}
|
||||||
|
return "localhost"
|
||||||
|
}
|
||||||
|
|
||||||
|
func getActiveIP() string {
|
||||||
|
conn, err := net.Dial("udp", "8.8.8.8:80")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "localhost"
|
return ""
|
||||||
}
|
}
|
||||||
for _, address := range addrs {
|
defer conn.Close()
|
||||||
if ipnet, ok := address.(*net.IPNet); ok && !ipnet.IP.IsLoopback() {
|
|
||||||
if ipnet.IP.To4() != nil {
|
addr := conn.LocalAddr()
|
||||||
if env.Env.GetValue() == "development" && !strings.Contains(ipnet.IP.String(), "192.168") {
|
if udpAddr, ok := addr.(*net.UDPAddr); ok {
|
||||||
continue
|
return udpAddr.IP.String()
|
||||||
}
|
}
|
||||||
return ipnet.IP.String()
|
return ""
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return "localhost"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func InfoHandler(w http.ResponseWriter, r *http.Request) {
|
func InfoHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
@@ -43,7 +45,7 @@ func InfoHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
data := map[string]string{
|
data := map[string]string{
|
||||||
"ip": getLocalIP(),
|
"ip": GetLocalIP(),
|
||||||
"port": port,
|
"port": port,
|
||||||
"speed": speed,
|
"speed": speed,
|
||||||
}
|
}
|
||||||
|
|||||||
22
main.go
22
main.go
@@ -7,10 +7,14 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"slideshowApp/env"
|
"slideshowApp/env"
|
||||||
"slideshowApp/handlers"
|
"slideshowApp/handlers"
|
||||||
|
"slideshowApp/utils"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var staticFolder = "./web/static/"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
env.Load(".env")
|
env.Load(".env")
|
||||||
@@ -21,38 +25,46 @@ func main() {
|
|||||||
|
|
||||||
if _, err := os.Stat(uploadFolder); err != nil {
|
if _, err := os.Stat(uploadFolder); err != nil {
|
||||||
fmt.Println("upload folder for images not found: ", uploadFolder)
|
fmt.Println("upload folder for images not found: ", uploadFolder)
|
||||||
fmt.Println("use fallback")
|
fmt.Println("use fallback folder")
|
||||||
uploadFolder = "./images"
|
uploadFolder = "./images"
|
||||||
|
env.PhotoDir.SetValue(uploadFolder)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("upload folder for images: ", uploadFolder)
|
fmt.Println("upload folder for images: ", uploadFolder)
|
||||||
|
|
||||||
r.PathPrefix("/uploads/").Handler(http.StripPrefix("/uploads/", http.FileServer(http.Dir(uploadFolder))))
|
r.PathPrefix("/uploads/").Handler(http.StripPrefix("/uploads/", http.FileServer(http.Dir(uploadFolder))))
|
||||||
r.HandleFunc("/api/images", handlers.ListFilesHandler).Methods("GET")
|
r.HandleFunc("/api/images", handlers.ListFilesHandler).Methods("GET")
|
||||||
r.HandleFunc("/ws", handlers.Websocket)
|
r.HandleFunc("/ws", handlers.Websocket)
|
||||||
r.HandleFunc("/upload", handlers.UploadHandler).Methods("POST")
|
r.HandleFunc("/upload", handlers.UploadHandler).Methods("POST")
|
||||||
r.HandleFunc("/settings", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "settings.html") })
|
r.HandleFunc("/settings", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, staticFolder+"settings.html") })
|
||||||
r.HandleFunc("/api/save-schedule", handlers.SaveSchedule).Methods("POST")
|
r.HandleFunc("/api/save-schedule", handlers.SaveSchedule).Methods("POST")
|
||||||
r.HandleFunc("/api/get-schedule", handlers.GetSchedule).Methods("GET")
|
r.HandleFunc("/api/get-schedule", handlers.GetSchedule).Methods("GET")
|
||||||
|
|
||||||
r.HandleFunc("/api/delete", handlers.DeleteHandler).Methods("POST")
|
r.HandleFunc("/api/delete", handlers.DeleteHandler).Methods("POST")
|
||||||
r.HandleFunc("/manage", func(w http.ResponseWriter, r *http.Request) {
|
r.HandleFunc("/manage", func(w http.ResponseWriter, r *http.Request) {
|
||||||
http.ServeFile(w, r, "manage.html")
|
http.ServeFile(w, r, staticFolder+"manage.html")
|
||||||
})
|
})
|
||||||
|
|
||||||
r.HandleFunc("/api/info", handlers.InfoHandler).Methods("GET")
|
r.HandleFunc("/api/info", handlers.InfoHandler).Methods("GET")
|
||||||
|
|
||||||
r.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
r.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||||
http.ServeFile(w, r, "index.html")
|
http.ServeFile(w, r, staticFolder+"index.html")
|
||||||
})
|
})
|
||||||
// We add a route for the slideshow page specifically
|
// We add a route for the slideshow page specifically
|
||||||
r.HandleFunc("/slideshow", func(w http.ResponseWriter, r *http.Request) {
|
r.HandleFunc("/slideshow", func(w http.ResponseWriter, r *http.Request) {
|
||||||
http.ServeFile(w, r, "frame.html")
|
http.ServeFile(w, r, staticFolder+"frame.html")
|
||||||
})
|
})
|
||||||
|
|
||||||
host := env.Host.GetValue()
|
host := env.Host.GetValue()
|
||||||
port := env.Port.GetValue()
|
port := env.Port.GetValue()
|
||||||
url := fmt.Sprintf("%s:%s", host, port)
|
url := fmt.Sprintf("%s:%s", host, port)
|
||||||
|
go func() {
|
||||||
|
time.Sleep(3 * time.Second)
|
||||||
|
if err := utils.OpenBrowser(fmt.Sprintf("%s:%s/slideshow", handlers.GetLocalIP(), port)); err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
fmt.Println("Server running at", url)
|
fmt.Println("Server running at", url)
|
||||||
log.Fatal(http.ListenAndServe(url, r))
|
log.Fatal(http.ListenAndServe(url, r))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
{"Friday_active":false,"Friday_end":"07:38","Friday_start":"07:00","Monday_active":false,"Monday_end":"22:00","Monday_start":"08:00","Saturday_active":false,"Saturday_end":"22:00","Saturday_start":"08:00","Sunday_active":false,"Sunday_end":"22:00","Sunday_start":"08:00","Thursday_active":false,"Thursday_end":"22:00","Thursday_start":"08:00","Tuesday_active":false,"Tuesday_end":"22:00","Tuesday_start":"08:00","Wednesday_active":false,"Wednesday_end":"22:00","Wednesday_start":"08:00"}
|
|
||||||
81
utils/utils.go
Normal file
81
utils/utils.go
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
package utils
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
"os/exec"
|
||||||
|
"runtime"
|
||||||
|
)
|
||||||
|
|
||||||
|
func OpenBrowser(url string) error {
|
||||||
|
var commands [][]string
|
||||||
|
|
||||||
|
switch runtime.GOOS {
|
||||||
|
case "windows":
|
||||||
|
commands = [][]string{
|
||||||
|
// Chrome (most common)
|
||||||
|
{`C:\Program Files\Google\Chrome\Application\chrome.exe`, "--kiosk", url},
|
||||||
|
{`C:\Program Files (x86)\Google\Chrome\Application\chrome.exe`, "--kiosk", url},
|
||||||
|
|
||||||
|
// Edge (default on modern Windows)
|
||||||
|
{`C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe`, "--kiosk", url},
|
||||||
|
{`C:\Program Files\Microsoft\Edge\Application\msedge.exe`, "--kiosk", url},
|
||||||
|
|
||||||
|
// Firefox (no true kiosk, but fullscreen)
|
||||||
|
{`C:\Program Files\Mozilla Firefox\firefox.exe`, "--kiosk", url},
|
||||||
|
{`C:\Program Files (x86)\Mozilla Firefox\firefox.exe`, "--kiosk", url},
|
||||||
|
|
||||||
|
// System default browser (always works)
|
||||||
|
{"rundll32", "url.dll,FileProtocolHandler", url},
|
||||||
|
}
|
||||||
|
|
||||||
|
case "darwin":
|
||||||
|
commands = [][]string{
|
||||||
|
// Chrome
|
||||||
|
{"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", "--kiosk", url},
|
||||||
|
|
||||||
|
// Edge
|
||||||
|
{"/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge", "--kiosk", url},
|
||||||
|
|
||||||
|
// Firefox
|
||||||
|
{"/Applications/Firefox.app/Contents/MacOS/firefox", "--kiosk", url},
|
||||||
|
|
||||||
|
// Safari (no kiosk flag, opens normally)
|
||||||
|
{"open", "-a", "Safari", url},
|
||||||
|
|
||||||
|
// System default browser
|
||||||
|
{"open", url},
|
||||||
|
}
|
||||||
|
|
||||||
|
default: // Linux
|
||||||
|
if os.Getenv("DISPLAY") == "" &&
|
||||||
|
os.Getenv("WAYLAND_DISPLAY") == "" &&
|
||||||
|
os.Getenv("XDG_SESSION_TYPE") != "wayland" {
|
||||||
|
return fmt.Errorf("os is running in headless mode; do not start browser")
|
||||||
|
}
|
||||||
|
|
||||||
|
commands = [][]string{
|
||||||
|
// Chromium / Chrome
|
||||||
|
{"chromium-browser", "--kiosk", url},
|
||||||
|
{"chromium", "--kiosk", url},
|
||||||
|
{"google-chrome", "--kiosk", url},
|
||||||
|
|
||||||
|
// Firefox
|
||||||
|
{"firefox", "--kiosk", url},
|
||||||
|
|
||||||
|
// System default browser (best universal fallback)
|
||||||
|
{"xdg-open", url},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, cmd := range commands {
|
||||||
|
execCmd := exec.Command(cmd[0], cmd[1:]...)
|
||||||
|
if err := execCmd.Start(); err == nil {
|
||||||
|
return nil
|
||||||
|
} else {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Errorf("could not open browser")
|
||||||
|
}
|
||||||
@@ -193,6 +193,7 @@
|
|||||||
const res = await fetch('/api/info');
|
const res = await fetch('/api/info');
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
const uploadUrl = `http://${data.ip}:${data.port}/`;
|
const uploadUrl = `http://${data.ip}:${data.port}/`;
|
||||||
|
|
||||||
new QRCode(document.getElementById("qrcode"), {
|
new QRCode(document.getElementById("qrcode"), {
|
||||||
text: uploadUrl,
|
text: uploadUrl,
|
||||||
width: 128,
|
width: 128,
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Go File Center</title>
|
<title>Slideshow App</title>
|
||||||
<script src="https://cdn.tailwindcss.com"></script>
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-gray-50 min-h-screen flex items-center justify-center p-6">
|
<body class="bg-gray-50 min-h-screen flex items-center justify-center p-6">
|
||||||
Reference in New Issue
Block a user