mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-27 08:30:47 +08:00
Compare commits
12 Commits
codex/fix-
...
codex/upda
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbb0a11d49 | ||
|
|
35340319c6 | ||
|
|
343c4d3793 | ||
|
|
87b214cbc0 | ||
|
|
e7f06787d2 | ||
|
|
d7d2fd5dcb | ||
|
|
76b65a1400 | ||
|
|
fa8ee113a2 | ||
|
|
181237adee | ||
|
|
1b8135acfb | ||
|
|
67bbe832a0 | ||
|
|
9d67f7d8d6 |
21
.env.example
21
.env.example
@@ -80,26 +80,39 @@ WEBPUSH_PRIVATE_KEY=
|
|||||||
LOG_LEVEL=INFO
|
LOG_LEVEL=INFO
|
||||||
|
|
||||||
# === Frontend (Nuxt) ===
|
# === Frontend (Nuxt) ===
|
||||||
|
# 本地开发
|
||||||
NUXT_PUBLIC_API_BASE_URL=http://localhost:8080
|
NUXT_PUBLIC_API_BASE_URL=http://localhost:8080
|
||||||
|
# 线上环境
|
||||||
# NUXT_PUBLIC_API_BASE_URL=https://www.open-isle.com
|
# NUXT_PUBLIC_API_BASE_URL=https://www.open-isle.com
|
||||||
|
# 测试环境
|
||||||
# NUXT_PUBLIC_API_BASE_URL=https://www.staging.open-isle.com
|
# NUXT_PUBLIC_API_BASE_URL=https://www.staging.open-isle.com
|
||||||
|
|
||||||
|
# 本地开发
|
||||||
NUXT_PUBLIC_WEBSOCKET_URL=http://localhost:8082
|
NUXT_PUBLIC_WEBSOCKET_URL=http://localhost:8082
|
||||||
# NUXT_PUBLIC_WEBSOCKET_URL=https://www.open-isle.com
|
# 线上环境
|
||||||
# NUXT_PUBLIC_WEBSOCKET_URL=https://www.staging.open-isle.com
|
# NUXT_PUBLIC_WEBSOCKET_URL=https://www.open-isle.com/websocket
|
||||||
|
# 测试环境
|
||||||
|
# NUXT_PUBLIC_WEBSOCKET_URL=https://www.staging.open-isle.com/websocket
|
||||||
|
|
||||||
|
# 本地开发
|
||||||
NUXT_PUBLIC_WEBSITE_BASE_URL=http://localhost:3000
|
NUXT_PUBLIC_WEBSITE_BASE_URL=http://localhost:3000
|
||||||
# 线上 & 本地均可使用
|
# 线上 & 测试 (www.staging.open-isle.com) & 本地均可使用
|
||||||
NUXT_PUBLIC_GOOGLE_CLIENT_ID=777830451304-nt8afkkap18gui4f9entcha99unal744.apps.googleusercontent.com
|
NUXT_PUBLIC_GOOGLE_CLIENT_ID=777830451304-nt8afkkap18gui4f9entcha99unal744.apps.googleusercontent.com
|
||||||
# 线上
|
# 线上
|
||||||
NUXT_PUBLIC_GITHUB_CLIENT_ID=Ov23liVkO1NPAX5JyWxJ
|
NUXT_PUBLIC_GITHUB_CLIENT_ID=Ov23liVkO1NPAX5JyWxJ
|
||||||
|
# 测试环境 (www.staging.open-isle.com)
|
||||||
|
# NUXT_PUBLIC_GITHUB_CLIENT_ID=Ov23li6GHPxx4MwipWnM
|
||||||
# 本地
|
# 本地
|
||||||
# NUXT_PUBLIC_GITHUB_CLIENT_ID=Ov23liOlrZnPKRF7s7NN
|
# NUXT_PUBLIC_GITHUB_CLIENT_ID=Ov23liOlrZnPKRF7s7NN
|
||||||
|
|
||||||
# 线上 & 本地均可使用
|
# 线上 & 本地均可使用
|
||||||
NUXT_PUBLIC_DISCORD_CLIENT_ID=1394985417044000779
|
NUXT_PUBLIC_DISCORD_CLIENT_ID=1394985417044000779
|
||||||
|
|
||||||
# 线上 & 本地均可使用
|
# 线上 & 本地均可使用
|
||||||
NUXT_PUBLIC_TWITTER_CLIENT_ID=ZTRTU05KSk9KTTJrTTdrVC1tc1E6MTpjaQ
|
NUXT_PUBLIC_TWITTER_CLIENT_ID=ZTRTU05KSk9KTTJrTTdrVC1tc1E6MTpjaQ
|
||||||
|
|
||||||
# 线上
|
# 线上
|
||||||
NUXT_PUBLIC_TELEGRAM_BOT_ID=8450237135
|
NUXT_PUBLIC_TELEGRAM_BOT_ID=8450237135
|
||||||
|
# 测试环境 (www.staging.open-isle.com)
|
||||||
|
# NUXT_PUBLIC_TELEGRAM_BOT_ID=7832207011
|
||||||
|
|
||||||
|
|||||||
@@ -226,6 +226,8 @@ services:
|
|||||||
websocket-service:
|
websocket-service:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
profiles: ["staging", "prod"]
|
||||||
|
|
||||||
|
|
||||||
loopback_8080:
|
loopback_8080:
|
||||||
image: alpine/socat
|
image: alpine/socat
|
||||||
|
|||||||
@@ -49,7 +49,11 @@
|
|||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="open && !isMobile && (loading || filteredOptions.length > 0 || showSearch)"
|
v-if="
|
||||||
|
open &&
|
||||||
|
!isMobile &&
|
||||||
|
(loading || filteredOptions.length > 0 || showSearch || (remote && search))
|
||||||
|
"
|
||||||
:class="['dropdown-menu', menuClass]"
|
:class="['dropdown-menu', menuClass]"
|
||||||
v-click-outside="close"
|
v-click-outside="close"
|
||||||
ref="menuRef"
|
ref="menuRef"
|
||||||
@@ -62,26 +66,29 @@
|
|||||||
<l-hatch size="20" stroke="4" speed="3.5" color="var(--primary-color)"></l-hatch>
|
<l-hatch size="20" stroke="4" speed="3.5" color="var(--primary-color)"></l-hatch>
|
||||||
</div>
|
</div>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div
|
<div v-if="filteredOptions.length === 0" class="dropdown-empty">没有搜索结果</div>
|
||||||
v-for="o in filteredOptions"
|
<template v-else>
|
||||||
:key="o.id"
|
<div
|
||||||
@click="select(o.id)"
|
v-for="o in filteredOptions"
|
||||||
:class="['dropdown-option', optionClass, { selected: isSelected(o.id) }]"
|
:key="o.id"
|
||||||
>
|
@click="select(o.id)"
|
||||||
<slot name="option" :option="o" :isSelected="isSelected(o.id)">
|
:class="['dropdown-option', optionClass, { selected: isSelected(o.id) }]"
|
||||||
<template v-if="o.icon">
|
>
|
||||||
<BaseImage
|
<slot name="option" :option="o" :isSelected="isSelected(o.id)">
|
||||||
v-if="isImageIcon(o.icon)"
|
<template v-if="o.icon">
|
||||||
:src="o.icon"
|
<BaseImage
|
||||||
class="option-icon"
|
v-if="isImageIcon(o.icon)"
|
||||||
:alt="o.name"
|
:src="o.icon"
|
||||||
/>
|
class="option-icon"
|
||||||
<component v-else :is="o.icon" class="option-icon" :size="16" />
|
:alt="o.name"
|
||||||
</template>
|
/>
|
||||||
<span>{{ o.name }}</span>
|
<component v-else :is="o.icon" class="option-icon" :size="16" />
|
||||||
</slot>
|
</template>
|
||||||
</div>
|
<span>{{ o.name }}</span>
|
||||||
<slot name="footer" :close="close" :loading="loading" />
|
</slot>
|
||||||
|
</div>
|
||||||
|
<slot name="footer" :close="close" :loading="loading" />
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<Teleport to="body">
|
<Teleport to="body">
|
||||||
@@ -99,26 +106,29 @@
|
|||||||
<l-hatch size="20" stroke="4" speed="3.5" color="var(--primary-color)"></l-hatch>
|
<l-hatch size="20" stroke="4" speed="3.5" color="var(--primary-color)"></l-hatch>
|
||||||
</div>
|
</div>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div
|
<div v-if="filteredOptions.length === 0" class="dropdown-empty">没有搜索结果</div>
|
||||||
v-for="o in filteredOptions"
|
<template v-else>
|
||||||
:key="o.id"
|
<div
|
||||||
@click="select(o.id)"
|
v-for="o in filteredOptions"
|
||||||
:class="['dropdown-option', optionClass, { selected: isSelected(o.id) }]"
|
:key="o.id"
|
||||||
>
|
@click="select(o.id)"
|
||||||
<slot name="option" :option="o" :isSelected="isSelected(o.id)">
|
:class="['dropdown-option', optionClass, { selected: isSelected(o.id) }]"
|
||||||
<template v-if="o.icon">
|
>
|
||||||
<BaseImage
|
<slot name="option" :option="o" :isSelected="isSelected(o.id)">
|
||||||
v-if="isImageIcon(o.icon)"
|
<template v-if="o.icon">
|
||||||
:src="o.icon"
|
<BaseImage
|
||||||
class="option-icon"
|
v-if="isImageIcon(o.icon)"
|
||||||
:alt="o.name"
|
:src="o.icon"
|
||||||
/>
|
class="option-icon"
|
||||||
<component v-else :is="o.icon" class="option-icon" :size="16" />
|
:alt="o.name"
|
||||||
</template>
|
/>
|
||||||
<span>{{ o.name }}</span>
|
<component v-else :is="o.icon" class="option-icon" :size="16" />
|
||||||
</slot>
|
</template>
|
||||||
</div>
|
<span>{{ o.name }}</span>
|
||||||
<slot name="footer" :close="close" :loading="loading" />
|
</slot>
|
||||||
|
</div>
|
||||||
|
<slot name="footer" :close="close" :loading="loading" />
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -283,6 +293,7 @@ export default {
|
|||||||
isImageIcon,
|
isImageIcon,
|
||||||
setSearch,
|
setSearch,
|
||||||
isMobile,
|
isMobile,
|
||||||
|
remote: props.remote,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -384,6 +395,13 @@ export default {
|
|||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dropdown-empty {
|
||||||
|
padding: 20px;
|
||||||
|
text-align: center;
|
||||||
|
color: var(--muted-text-color, #8c8c8c);
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
.dropdown-mobile-page {
|
.dropdown-mobile-page {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|||||||
@@ -849,7 +849,8 @@ watch(selectedTab, async (val) => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
gap: 20px;
|
row-gap: 40px; /* 行间距 */
|
||||||
|
column-gap: 20px; /* 列间距 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.summary-title {
|
.summary-title {
|
||||||
@@ -888,10 +889,10 @@ watch(selectedTab, async (val) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.summary-divider {
|
.summary-divider {
|
||||||
margin-top: 20px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: 20px;
|
row-gap: 40px; /* 行间距 */
|
||||||
|
column-gap: 20px; /* 列间距 */
|
||||||
width: 100%;
|
width: 100%;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,51 +18,6 @@ server {
|
|||||||
add_header X-Upstream $upstream_addr always;
|
add_header X-Upstream $upstream_addr always;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ^~ /api/ws {
|
|
||||||
proxy_pass http://127.0.0.1:8080;
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
|
|
||||||
# 升级所需
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection $connection_upgrade;
|
|
||||||
|
|
||||||
# 统一透传这些头(你在 /api/ 有,/api/ws 也要有)
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header X-Forwarded-Host $host;
|
|
||||||
|
|
||||||
proxy_read_timeout 300s;
|
|
||||||
proxy_send_timeout 300s;
|
|
||||||
proxy_buffering off;
|
|
||||||
proxy_cache off;
|
|
||||||
}
|
|
||||||
|
|
||||||
# 2) SockJS(包含 /info、/iframe.html、/.../websocket 等)
|
|
||||||
location ^~ /api/sockjs {
|
|
||||||
proxy_pass http://127.0.0.1:8080;
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection $connection_upgrade;
|
|
||||||
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header X-Forwarded-Host $host;
|
|
||||||
|
|
||||||
proxy_read_timeout 300s;
|
|
||||||
proxy_send_timeout 300s;
|
|
||||||
proxy_buffering off;
|
|
||||||
proxy_cache off;
|
|
||||||
|
|
||||||
# 如要同源 iframe 回退,下面两行二选一(或者交给 Spring Security 的 sameOrigin)
|
|
||||||
# proxy_hide_header X-Frame-Options;
|
|
||||||
# add_header X-Frame-Options "SAMEORIGIN" always;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /api/ {
|
location /api/ {
|
||||||
proxy_pass http://127.0.0.1:8080/api/;
|
proxy_pass http://127.0.0.1:8080/api/;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
@@ -148,7 +103,7 @@ server {
|
|||||||
|
|
||||||
# ---------- WEBSOCKET GATEWAY TO :8082 ----------
|
# ---------- WEBSOCKET GATEWAY TO :8082 ----------
|
||||||
location ^~ /websocket/ {
|
location ^~ /websocket/ {
|
||||||
proxy_pass http://127.0.0.1:8082/;
|
proxy_pass http://127.0.0.1:8084/;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
@@ -167,6 +122,7 @@ server {
|
|||||||
add_header Cache-Control "no-store" always;
|
add_header Cache-Control "no-store" always;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name open-isle.com www.open-isle.com;
|
server_name open-isle.com www.open-isle.com;
|
||||||
|
|||||||
Reference in New Issue
Block a user