Skip to content

Commit

Permalink
让我康康你的精华
Browse files Browse the repository at this point in the history
✨ 支持接口式精华消息
🐛 修正合并转发消息的一处排版错误
🐛 修正底栏的一处排版错误
➖ 移除 Shamrock 支持(年久失修)
💚 [build-electron]
  • Loading branch information
Stapxs committed Jun 5, 2024
1 parent 3010864 commit 7d26539
Show file tree
Hide file tree
Showing 18 changed files with 292 additions and 159 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stapxs-qq-lite",
"version": "2.7.10",
"version": "2.7.11",
"private": false,
"author": "Stapx Steve [林槐]",
"description": "一个兼容 OneBot 的非官方网页版 QQ 客户端,使用 Vue 重制的全新版本。",
Expand Down
35 changes: 33 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<a>{{ $t('home_card_auto_con') }}</a>
</label>
</div>
<button id="connect_btn" class="ss-button" type="submit">{{ $t('home_card_connect')
<button @mousemove="afd" id="connect_btn" class="ss-button" type="submit">{{ $t('home_card_connect')
}}</button>
</form>
<a href="https://github.com/Stapxs/Stapxs-QQ-Lite-2.0#%E5%BF%AB%E9%80%9F%E4%BD%BF%E7%94%A8"
Expand Down Expand Up @@ -306,7 +306,10 @@ export default defineComponent({
group_members: [],
group_files: {},
group_sub_files: {},
jin_info: { data: { msg_list: [] } }
jin_info: {
list: [] as { [key: string]: any }[],
pages: 0
}
}
}
runtimeData.mergeMessageList = undefined // 清空合并转发缓存
Expand Down Expand Up @@ -399,6 +402,30 @@ export default defineComponent({
if(allow != false) {
runtimeData.popBoxList.shift()
}
},
afd(event: MouseEvent) {
// 只在愚人节时生效
if(new Date().getMonth() == 3 && new Date().getDate() == 1) {
const sender = event.target as HTMLButtonElement
// 获取文档整体宽高
const docWidth = document.documentElement.clientWidth
const docHeight = document.documentElement.clientHeight
// 获取按钮宽高
const senderWidth = sender.offsetWidth
const senderHeight = sender.offsetHeight
// 获取鼠标位置
const mouseX = event.clientX
const mouseY = event.clientY
// 在宽高里随机抽一个位置,不能超出文档,不能让按钮在鼠标下
do {
var x = Math.floor(Math.random() * docWidth)
var y = Math.floor(Math.random() * docHeight)
} while (x + senderWidth > docWidth || y + senderHeight > docHeight || (x < mouseX && x + senderWidth > mouseX && y < mouseY && y + senderHeight > mouseY))
// 设置按钮位置
sender.style.left = x + 'px'
sender.style.top = y + 'px'
}
}
},
mounted () {
Expand Down Expand Up @@ -473,6 +500,10 @@ export default defineComponent({
App.checkUpdate() // 检查更新
App.checkOpenTimes() // 检查打开次数
App.checkNotice() // 检查公告
// 加载愚人节附加
if(new Date().getMonth() == 3 && new Date().getDate() == 1) {
document.getElementById('connect_btn')?.classList.add('afd')
}
}
}
})
Expand Down
71 changes: 60 additions & 11 deletions src/assets/css/append/append_new.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@
font-size: 0.95rem;
font-weight: bold;
}
.layui-tab-title li {
font-size: 0.8rem;
line-height: 30px;
min-width: 10%;
}
.layui-tab-title .layui-this:after {
transform: translateX(-50%);
height: 30px;
}

.main-body > ul {
min-width: 45px;
Expand All @@ -28,8 +19,7 @@
min-width: 50px;
padding: 0;
}
.main-body > ul > li > svg,
.main-body > ul > li.layui-this > svg {
.main-body > ul > li > svg {
width: 15px;
height: 15px;
padding: 10px;
Expand All @@ -56,6 +46,13 @@
height: 30px;
width: 95%;
}
.login-pan-card button.afd {
transform: translateX(calc(-50% + 25px));
position: fixed;
width: 240px;
left: 50vw;
top: 75vh;
}

.friend-list {
width: 220px;
Expand Down Expand Up @@ -179,6 +176,37 @@
margin-bottom: 0 !important;
}

.jin-ppan {
max-width: 350px;
}
.jin-pan > div:first-child {
padding: 10px;
}
.jin-pan > div:first-child > svg {
height: 1rem;
}
.jin-pan > div:first-child > span {
font-size: 0.9rem;
}
.jin-pan-body {
padding: 0 10px 0 10px;
margin-bottom: 10px;
}
.jin-pan-body > div > div:first-child a {
font-size: 0.8rem;
}
.jin-pan-body > div > div:first-child span {
font-size: 0.65rem;
}
.jin-pan-body > div > div:first-child > span {
font-size: 0.75rem;
flex: 1;
text-align: right;
}
.jin-pan-body > div > div.context {
padding: 10px 10px 5px 10px;
}

.ss-card:hover {
box-shadow: 0 0 3px var(--color-shader);
}
Expand Down Expand Up @@ -591,6 +619,23 @@
font-size: 0.65rem;
}

.account-not-login {
margin: 20px auto 0 auto;
}
.account-not-login > svg {
font-size: 1.5rem;
margin-top: 20px;
}
.account-not-login > span {
font-size: 0.8rem;
margin-top: 5px;
}
.account-not-login > button {
margin-top: 15px;
margin-bottom: 10px;
font-size: 0.7rem;
}

@media (max-width: 700px) {
.main-body > ul {
background: var(--color-card-2) !important;
Expand Down Expand Up @@ -643,4 +688,8 @@
height: calc(100% - 125px);
padding-top: 40px;
}
.account-not-login {
margin: 0 auto;
width: calc(100% - 20px);
}
}
2 changes: 1 addition & 1 deletion src/assets/css/append/append_vibrancy.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
max-width: 240px !important;
}
.login-pan-card:hover {
box-shadow: none;
box-shadow: none !important;
}
.wave-pan {
display: none;
Expand Down
16 changes: 8 additions & 8 deletions src/assets/css/chat.css
Original file line number Diff line number Diff line change
Expand Up @@ -988,19 +988,13 @@ input {
width: 300px;
padding: 0;
}
.face-pan > div.layui-tab {
margin: 0;
}
.fase-pan-tab > li > svg {
color: var(--color-font);
margin-top: 10px;
margin-left: 5px;
height: 1.1rem;
width: 1.1rem;
}
.fase-pan-tab > li.layui-this > svg {
color: var(--color-main) !important;
}

.face-pan .tab-bar {
--bc-tab-margin: 5px;
Expand Down Expand Up @@ -1134,19 +1128,25 @@ input {
outline: 2px solid var(--color-main);
border-radius: 100%;
margin-right: 10px;
width: 22px;
width: 25px;
}
.jin-pan-body > div > div:first-child > div {
flex-direction: column;
display: flex;
}
.jin-pan-body > div > div:first-child a {
color: var(--color-font);
font-size: 0.9rem;
}
.jin-pan-body > div > div:first-child span {
color: var(--color-font-2);
border-radius: 2rem;
font-size: 0.5rem;
font-size: 0.8rem;
}
.jin-pan-body > div > div:first-child > span {
font-size: 0.8rem;
flex: 1;
text-align: right;
}
.jin-pan-body > div > div.context {
padding: 15px 15px 5px 15px;
Expand Down
2 changes: 1 addition & 1 deletion src/assets/css/msg.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
color: var(--color-font-r);
}
.message.merge > div.message-body {
max-width: 100%;
max-width: calc(100% - 50px);
}
.message.revoke {
display: none;
Expand Down
41 changes: 30 additions & 11 deletions src/assets/css/options.css
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,6 @@
display: none !important;
}

.layui-this {
color: var(--color-main) !important;
}

.layui-this:after {
border-bottom: 3px solid var(--color-main) !important;
transform: scaleX(0.5) !important;
border-radius: 1px !important;
}

.bcd-about {
padding: 5px 20px 10px 20px;
margin-bottom: 40px;
Expand Down Expand Up @@ -482,7 +472,6 @@
margin-left: 10px;
opacity: 0.7;
}

.account-info>svg {
background: var(--color-card-2);
color: var(--color-main);
Expand All @@ -493,6 +482,29 @@
width: 20px;
}

.account-not-login {
display: flex;
flex-direction: column;
align-items: center;
width: 50%;
margin: 40px auto 0 auto;
}
.account-not-login > svg {
font-size: 2rem;
color: var(--color-main);
margin-top: 40px;
}
.account-not-login > span {
color: var(--color-font-2);
font-size: 0.9rem;
margin-top: 10px;
}
.account-not-login > button {
width: 90%;
margin-top: 30px;
margin-bottom: 20px;
}

.end-card {
margin: 20px 5px 20px 5px;
display: flex;
Expand Down Expand Up @@ -596,4 +608,11 @@
.opt-tab .tab-bar > span {
display: none;
}
}

@media (max-width: 500px) {
.account-not-login {
margin: 0 auto;
width: calc(100% - 40px);
}
}
25 changes: 13 additions & 12 deletions src/assets/css/view.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ input::placeholder {
#app, #base-app {
height: 100%;
}
#base-app {
transition: transform .2s;
}
#base-app.no-touch {
transform: rotate(180deg);
}
#base-app.withBar {
height: calc(100% - 40px);
padding-top: 40px;
Expand Down Expand Up @@ -1019,17 +1025,18 @@ input::placeholder {
min-width: 100% !important;
z-index: 20;
}
.main-body > ul > li {
margin: 0 !important;
}
.side-bar-space {
display: none;
}
.hiden-home {
margin-top: calc(100% + 5px) !important;
transform: translateY(0) !important;
margin-left: -70px;
}
.main-body > ul > li {
margin-top: 0;
margin-bottom: 0 !important;
}
.side-bar-space {
display: none;
}
/* 二级侧栏 */
.friend-list {
transition: width .3s;
Expand Down Expand Up @@ -1166,12 +1173,6 @@ input::placeholder {
}
}


/* 其他覆盖样式 */
.layui-tab-bar {
display: none;
}

/* 全局淡入淡出动画 */
.v-enter-active,
.v-leave-active {
Expand Down
4 changes: 4 additions & 0 deletions src/assets/l10n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@
"reply_placeholder": "快速回复……",
"btn_iframe_tip": "请不要在内嵌页面中输入敏感信息,内嵌页面并不安全。",
"option_dev_get_version_info": "正在收集调试消息……",
"option_account_notlogin": "还没有连接到 OneBot 耶",
"option_account_gologin": "去连接",
"option_view_dont_touch": "不要点这个",
"option_view_dont_touch_tip": "啊吧啊吧(智慧)",

"menu_about": "关于",
"menu_update": "检查更新…",
Expand Down
Loading

0 comments on commit 7d26539

Please sign in to comment.