mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-24 23:20:49 +08:00
Compare commits
15 Commits
feature/ic
...
feature/ar
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c28201cb8 | ||
|
|
0e26758585 | ||
|
|
786e60e8e5 | ||
|
|
d94302635a | ||
|
|
9519f66474 | ||
|
|
92ba475f3b | ||
|
|
6fffdb0fd6 | ||
|
|
db8c896b71 | ||
|
|
2a090442cc | ||
|
|
aa86909598 | ||
|
|
5eb1416c6b | ||
|
|
7320df6d20 | ||
|
|
9406bf3392 | ||
|
|
ccaada8f4e | ||
|
|
35c6d29b8f |
@@ -22,6 +22,8 @@ import org.springframework.data.redis.serializer.RedisSerializer;
|
|||||||
import org.springframework.data.redis.serializer.StringRedisSerializer;
|
import org.springframework.data.redis.serializer.StringRedisSerializer;
|
||||||
|
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Redis 缓存配置类
|
* Redis 缓存配置类
|
||||||
@@ -80,13 +82,16 @@ public class CachingConfig {
|
|||||||
.serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(new StringRedisSerializer()))
|
.serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(new StringRedisSerializer()))
|
||||||
.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(redisSerializer))
|
.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(redisSerializer))
|
||||||
.disableCachingNullValues(); // 禁止缓存 null 值
|
.disableCachingNullValues(); // 禁止缓存 null 值
|
||||||
// 个别缓存单独设置TTL时间
|
|
||||||
// Map<String, RedisCacheConfiguration> cacheConfigs = new HashMap<>();
|
// 个别缓存单独设置 TTL 时间
|
||||||
// cacheConfigs.put("openisle_tags", RedisCacheConfiguration.defaultCacheConfig().entryTtl(Duration.ZERO));
|
Map<String, RedisCacheConfiguration> cacheConfigs = new HashMap<>();
|
||||||
// cacheConfigs.put("openisle_categories", RedisCacheConfiguration.defaultCacheConfig().entryTtl(Duration.ZERO));
|
RedisCacheConfiguration oneHourConfig = config.entryTtl(Duration.ofHours(1));
|
||||||
|
cacheConfigs.put(TAG_CACHE_NAME, oneHourConfig);
|
||||||
|
cacheConfigs.put(CATEGORY_CACHE_NAME, oneHourConfig);
|
||||||
|
|
||||||
return RedisCacheManager.builder(connectionFactory)
|
return RedisCacheManager.builder(connectionFactory)
|
||||||
.cacheDefaults(config)
|
.cacheDefaults(config)
|
||||||
|
.withInitialCacheConfigurations(cacheConfigs)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ spring.jpa.hibernate.ddl-auto=update
|
|||||||
# for redis
|
# for redis
|
||||||
spring.data.redis.host=${REDIS_HOST:localhost}
|
spring.data.redis.host=${REDIS_HOST:localhost}
|
||||||
spring.data.redis.port=${REDIS_PORT:6379}
|
spring.data.redis.port=${REDIS_PORT:6379}
|
||||||
spring.data.redis.database=0
|
spring.data.redis.database=${REDIS_DATABASE:0}
|
||||||
|
|
||||||
# for jwt
|
# for jwt
|
||||||
app.jwt.secret=${JWT_SECRET:jwt_sec}
|
app.jwt.secret=${JWT_SECRET:jwt_sec}
|
||||||
@@ -56,9 +56,10 @@ app.captcha.comment-enabled=${CAPTCHA_COMMENT_ENABLED:false}
|
|||||||
# ========= Optional =========
|
# ========= Optional =========
|
||||||
# for resend email send service, you can improve your service by yourself
|
# for resend email send service, you can improve your service by yourself
|
||||||
resend.api.key=${RESEND_API_KEY:}
|
resend.api.key=${RESEND_API_KEY:}
|
||||||
resend.from.email=${RESEND.FROM.EMAIL}
|
resend.from.email=${RESEND_FROM_EMAIL:}
|
||||||
# your email services: ...
|
# your email services: ...
|
||||||
|
|
||||||
|
|
||||||
# for tencent cloud image upload service, you can improve your service by yourself
|
# for tencent cloud image upload service, you can improve your service by yourself
|
||||||
cos.base-url=${:https://example.com}
|
cos.base-url=${:https://example.com}
|
||||||
cos.secret-id=${COS_SECRET_ID:}
|
cos.secret-id=${COS_SECRET_ID:}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
; 生产环境后端
|
; 生产环境后端
|
||||||
NUXT_PUBLIC_API_BASE_URL=https://open-isle.com
|
NUXT_PUBLIC_API_BASE_URL=https://www.open-isle.com
|
||||||
; 正式环境/生产环境
|
; 正式环境/生产环境
|
||||||
NUXT_PUBLIC_WEBSITE_BASE_URL=https://open-isle.com
|
NUXT_PUBLIC_WEBSITE_BASE_URL=https://www.open-isle.com
|
||||||
; 生产环境ws后端
|
; 生产环境ws后端
|
||||||
NUXT_PUBLIC_WEBSOCKET_URL=https://open-isle.com/websocket
|
NUXT_PUBLIC_WEBSOCKET_URL=https://www.open-isle.com/websocket
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
<div class="article-category-container" v-if="category">
|
<div class="article-category-container" v-if="category">
|
||||||
<div class="article-info-item" @click="gotoCategory">
|
<div class="article-info-item" @click="gotoCategory">
|
||||||
<BaseImage
|
<BaseImage
|
||||||
v-if="category.smallIcon"
|
v-if="isImageIcon(category.smallIcon)"
|
||||||
class="article-info-item-img"
|
class="article-info-item-img"
|
||||||
:src="category.smallIcon"
|
:src="category.smallIcon"
|
||||||
:alt="category.name"
|
:alt="category.name"
|
||||||
/>
|
/>
|
||||||
|
<component v-else :is="category.smallIcon || category.icon" class="article-info-item-img" />
|
||||||
<div class="article-info-item-text">{{ category.name }}</div>
|
<div class="article-info-item-text">{{ category.name }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -22,6 +23,11 @@ const gotoCategory = async () => {
|
|||||||
const value = encodeURIComponent(props.category.id ?? props.category.name)
|
const value = encodeURIComponent(props.category.id ?? props.category.name)
|
||||||
await navigateTo({ path: '/', query: { category: value } }, { replace: true })
|
await navigateTo({ path: '/', query: { category: value } }, { replace: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isImageIcon = (icon) => {
|
||||||
|
if (!icon) return false
|
||||||
|
return /^https?:\/\//.test(icon) || icon.startsWith('/')
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -7,11 +7,17 @@
|
|||||||
@click="gotoTag(tag)"
|
@click="gotoTag(tag)"
|
||||||
>
|
>
|
||||||
<BaseImage
|
<BaseImage
|
||||||
v-if="tag.smallIcon"
|
v-if="isImageIcon(tag.smallIcon)"
|
||||||
class="article-info-item-img"
|
class="article-info-item-img"
|
||||||
:src="tag.smallIcon"
|
:src="tag.smallIcon"
|
||||||
:alt="tag.name"
|
:alt="tag.name"
|
||||||
/>
|
/>
|
||||||
|
<component
|
||||||
|
v-else-if="tag.smallIcon || tag.icon"
|
||||||
|
:is="tag.smallIcon || tag.icon"
|
||||||
|
class="article-info-item-img"
|
||||||
|
/>
|
||||||
|
<tag-one v-else class="article-info-item-img" />
|
||||||
<div class="article-info-item-text">{{ tag.name }}</div>
|
<div class="article-info-item-text">{{ tag.name }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -26,6 +32,11 @@ const gotoTag = async (tag) => {
|
|||||||
const value = encodeURIComponent(tag.id ?? tag.name)
|
const value = encodeURIComponent(tag.id ?? tag.name)
|
||||||
await navigateTo({ path: '/', query: { tags: value } }, { replace: true })
|
await navigateTo({ path: '/', query: { tags: value } }, { replace: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isImageIcon = (icon) => {
|
||||||
|
if (!icon) return false
|
||||||
|
return /^https?:\/\//.test(icon) || icon.startsWith('/')
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
class="option-icon"
|
class="option-icon"
|
||||||
:alt="option.name"
|
:alt="option.name"
|
||||||
/>
|
/>
|
||||||
<!-- <i v-else :class="['option-icon', option.icon]"></i> -->
|
<component v-else :is="option.smallIcon || option.icon" class="option-icon" />
|
||||||
</template>
|
</template>
|
||||||
<span>{{ option.name }}</span>
|
<span>{{ option.name }}</span>
|
||||||
<span class="option-count" v-if="option.count > 0"> x {{ option.count }}</span>
|
<span class="option-count" v-if="option.count > 0"> x {{ option.count }}</span>
|
||||||
|
|||||||
@@ -404,7 +404,6 @@ const handleContentClick = (e) => {
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
transform: scaleX(-1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.reply-user-name {
|
.reply-user-name {
|
||||||
|
|||||||
@@ -4,7 +4,9 @@
|
|||||||
<div class="header-content-left">
|
<div class="header-content-left">
|
||||||
<div v-if="showMenuBtn" class="menu-btn-wrapper">
|
<div v-if="showMenuBtn" class="menu-btn-wrapper">
|
||||||
<button class="menu-btn" ref="menuBtn" @click="$emit('toggle-menu')">
|
<button class="menu-btn" ref="menuBtn" @click="$emit('toggle-menu')">
|
||||||
<application-menu class="micon"></application-menu>
|
<ToolTip content="展开/收起菜单" placement="bottom">
|
||||||
|
<application-menu class="micon"></application-menu>
|
||||||
|
</ToolTip>
|
||||||
</button>
|
</button>
|
||||||
<span
|
<span
|
||||||
v-if="isMobile && (unreadMessageCount > 0 || hasChannelUnread)"
|
v-if="isMobile && (unreadMessageCount > 0 || hasChannelUnread)"
|
||||||
|
|||||||
@@ -122,6 +122,11 @@
|
|||||||
class="section-item-icon"
|
class="section-item-icon"
|
||||||
:alt="t.name"
|
:alt="t.name"
|
||||||
/>
|
/>
|
||||||
|
<component
|
||||||
|
v-else-if="t.smallIcon || t.icon"
|
||||||
|
:is="t.smallIcon || t.icon"
|
||||||
|
class="section-item-icon"
|
||||||
|
/>
|
||||||
<tag-one v-else class="section-item-icon" />
|
<tag-one v-else class="section-item-icon" />
|
||||||
<span class="section-item-text"
|
<span class="section-item-text"
|
||||||
>{{ t.name }} <span class="section-item-text-count">x {{ t.count }}</span></span
|
>{{ t.name }} <span class="section-item-text-count">x {{ t.count }}</span></span
|
||||||
|
|||||||
@@ -529,7 +529,7 @@ const sanitizeDescription = (text) => stripMarkdown(text)
|
|||||||
}
|
}
|
||||||
|
|
||||||
.article-item-title {
|
.article-item-title {
|
||||||
margin-top: 10px;
|
margin-top: 15px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
@@ -558,7 +558,7 @@ const sanitizeDescription = (text) => stripMarkdown(text)
|
|||||||
|
|
||||||
.article-item-description {
|
.article-item-description {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
margin-top: 10px;
|
margin-top: 5px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: rgba(140, 140, 140, 0.888);
|
color: rgba(140, 140, 140, 0.888);
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
@@ -605,6 +605,7 @@ const sanitizeDescription = (text) => stripMarkdown(text)
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
|
padding-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.article-member-avatars-container {
|
.article-member-avatars-container {
|
||||||
@@ -719,10 +720,15 @@ const sanitizeDescription = (text) => stripMarkdown(text)
|
|||||||
}
|
}
|
||||||
|
|
||||||
.article-item-title {
|
.article-item-title {
|
||||||
|
margin-top: 10px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.article-main-container {
|
||||||
|
padding-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
.article-item-description {
|
.article-item-description {
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
|
|||||||
@@ -63,6 +63,16 @@ import {
|
|||||||
History,
|
History,
|
||||||
Lightning,
|
Lightning,
|
||||||
PeoplesTwo,
|
PeoplesTwo,
|
||||||
|
Code,
|
||||||
|
GoodTwo,
|
||||||
|
Twitter,
|
||||||
|
Bitcoin,
|
||||||
|
Fire,
|
||||||
|
Communication,
|
||||||
|
WaterLevel,
|
||||||
|
RobotOne,
|
||||||
|
Server,
|
||||||
|
Protection,
|
||||||
} from '@icon-park/vue-next'
|
} from '@icon-park/vue-next'
|
||||||
|
|
||||||
export default defineNuxtPlugin((nuxtApp) => {
|
export default defineNuxtPlugin((nuxtApp) => {
|
||||||
@@ -129,4 +139,14 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|||||||
nuxtApp.vueApp.component('HistoryIcon', History)
|
nuxtApp.vueApp.component('HistoryIcon', History)
|
||||||
nuxtApp.vueApp.component('Lightning', Lightning)
|
nuxtApp.vueApp.component('Lightning', Lightning)
|
||||||
nuxtApp.vueApp.component('PeoplesTwo', PeoplesTwo)
|
nuxtApp.vueApp.component('PeoplesTwo', PeoplesTwo)
|
||||||
|
nuxtApp.vueApp.component('CodeIcon', Code)
|
||||||
|
nuxtApp.vueApp.component('GoodTwo', GoodTwo)
|
||||||
|
nuxtApp.vueApp.component('Twitter', Twitter)
|
||||||
|
nuxtApp.vueApp.component('Bitcoin', Bitcoin)
|
||||||
|
nuxtApp.vueApp.component('Fire', Fire)
|
||||||
|
nuxtApp.vueApp.component('Communication', Communication)
|
||||||
|
nuxtApp.vueApp.component('WaterLevel', WaterLevel)
|
||||||
|
nuxtApp.vueApp.component('RobotOne', RobotOne)
|
||||||
|
nuxtApp.vueApp.component('ServerIcon', Server)
|
||||||
|
nuxtApp.vueApp.component('Protection', Protection)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user