2 Commits

Author SHA1 Message Date
73616c98a3 fix Dockerfile 2025-06-12 03:14:08 +10:00
44163d30e1 Update index.html to use local Bootstrap and Axios files instead of CDN links 2025-06-12 03:04:19 +10:00
5 changed files with 24 additions and 8 deletions

View File

@ -4,7 +4,7 @@ WORKDIR /app
COPY . .
RUN go mod download
ARG version
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X sub2clash/constant.Version=${version}" -o sub2clash .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X github.com/bestnite/sub2clash/constant.Version=${version}" -o sub2clash .
FROM alpine:latest
WORKDIR /app

3
server/static/axios.min.js vendored Normal file

File diff suppressed because one or more lines are too long

7
server/static/bootstrap.bundle.min.js vendored Normal file

File diff suppressed because one or more lines are too long

6
server/static/bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -6,13 +6,11 @@
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<title>sub2clash</title>
<!-- Bootstrap CSS -->
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" rel="stylesheet" />
<link href="./static/bootstrap.min.css" rel="stylesheet" />
<!-- Bootstrap JS -->
<script crossorigin="anonymous" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<script src="./static/bootstrap.bundle.min.js"></script>
<!-- Axios -->
<script src="https://cdn.jsdelivr.net/npm/axios@latest/dist/axios.min.js"></script>
<script src="./static/axios.min.js"></script>
<style>
.container {
max-width: 800px;
@ -147,7 +145,8 @@
<div class="form-group mb-5">
<label for="apiLink">配置链接:</label>
<div class="input-group mb-2">
<input class="form-control bg-light" id="apiLink" type="text" placeholder="链接" readonly style="cursor: not-allowed;" />
<input class="form-control bg-light" id="apiLink" type="text" placeholder="链接" readonly
style="cursor: not-allowed;" />
<button class="btn btn-primary" onclick="copyToClipboard('apiLink',this)" type="button">
复制链接
</button>
@ -163,7 +162,8 @@
</button>
</div>
<div class="input-group">
<input class="form-control bg-light" id="apiShortLink" type="text" placeholder="短链接" readonly style="cursor: not-allowed;" />
<input class="form-control bg-light" id="apiShortLink" type="text" placeholder="短链接" readonly
style="cursor: not-allowed;" />
<button class="btn btn-primary" onclick="updateShortLink()" type="button">
更新短链
</button>