Skip to content

Commit

Permalink
Update: 优化样式错误
Browse files Browse the repository at this point in the history
  • Loading branch information
KiWi233333 committed Jan 25, 2025
1 parent b3c4313 commit 196d1d4
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion components/Chat/ContactList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ onBeforeUnmount(() => {
</el-badge>
<div class="flex flex-1 flex-col justify-between truncate">
<div flex truncate>
<p truncate font-400>
<p truncate text-black dark:text-white>
{{ room.name }}
</p>
<span ml-a w-fit flex-shrink-0 text-right text-10px text-mini>
Expand Down
5 changes: 3 additions & 2 deletions components/Chat/Msg/RTC.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const chat = useChatStore();
v-bind="$attrs"
>
<template #body>
<div ctx-name="rtc" class="msg-popper min-w-6em cursor-pointer hover:op-80" @click="data.message.body?.type && chat.rollbackCall(data.message.roomId, data.message.body?.type, data)">
<div ctx-name="rtc" class="msg-popper min-w-6em flex cursor-pointer items-center hover:op-80" @click="data.message.body?.type && chat.rollbackCall(data.message.roomId, data.message.body?.type, data)">
<i ctx-name="rtc" class="icon p-2.6" :class="data.message.body?.type === CallTypeEnum.AUDIO ? 'i-solar:end-call-outline' : 'i-solar:videocamera-record-outline'" />
{{ data.message.content }}
</div>
Expand All @@ -31,8 +31,9 @@ const chat = useChatStore();
@use './msg.scss';
.self {
.msg-popper {
.icon {
float: right;
order: 1;
margin-left: 0.5rem;
}
}
Expand Down
3 changes: 0 additions & 3 deletions components/menu/ChatMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,6 @@ export interface MenuItem {
}
.item {
--at-apply: "card-rounded-df hover:(bg-color)";
.icon {
--at-apply: "bg-light dark:bg-none";
}
&.action {
--at-apply: "!bg-[var(--el-color-primary)] shadow";
.icon {
Expand Down
4 changes: 4 additions & 0 deletions composables/hooks/useSetting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export function useSettingNotice({
const setting = useSettingStore();
const showNotice = ref(false);
const notice = ref<string>("# 暂无内容"); // 公告内容
const runtime = useRuntimeConfig();

const currentVersion = computed(() => setting.isDesktop ? setting.appUploader.version : runtime.public.version);

// 显示新版本 + 当前版本 更新时间线
const showUpateNoticeLine = ref(false);
Expand Down Expand Up @@ -172,6 +175,7 @@ export function useSettingNotice({
return {
showNotice,
notice,
currentVersion,
showUpateNoticeLine,
showVersionNotice,
handleCheckUpadate,
Expand Down
3 changes: 3 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
// import { prismjsPlugin } from "vite-plugin-prismjs";
// import { pwa } from "./config/pwa";
import { appDescription, appName } from "./constants/index";
import * as packageJson from "./package.json";
import "dayjs/locale/zh-cn";

const BASE_URL = process.env.NUXT_PUBLIC_API_BASE_URL;
const isSSR = process.env.NUXT_PUBLIC_SPA;
const mode = process.env.NUXT_PUBLIC_NODE_ENV as "development" | "production" | "test";
const version = packageJson?.version;
// 打印
console.log(`mode:${mode} api_url:${BASE_URL} SSR:${isSSR}`);
export default defineNuxtConfig({
Expand All @@ -18,6 +20,7 @@ export default defineNuxtConfig({
public: {
baseUrl: BASE_URL,
mode,
version,
},
},
build: {
Expand Down
5 changes: 3 additions & 2 deletions pages/index/setting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const {
const {
showNotice,
notice,
currentVersion,
showUpateNoticeLine,
showVersionNotice,
handleCheckUpadate,
Expand Down Expand Up @@ -154,7 +155,7 @@ const {
<div class="group h-8 flex-row-bt-c">
关于更新
<div class="ml-a flex items-center gap-2 sm:gap-4">
<span class="text-0.8rem tracking-0.1em !btn-info" @click="showUpateNoticeLine = true">{{ setting.appUploader.version ? `v${setting.appUploader.version}` : "" }} 更新日志</span>
<span class="text-0.8rem tracking-0.1em !btn-info" @click="showUpateNoticeLine = true">{{ currentVersion ? `v${currentVersion}` : "" }} 更新日志</span>
<template v-if="setting.isDesktop">
<el-badge
v-if="!setting.appUploader.isUpdating"
Expand Down Expand Up @@ -308,7 +309,7 @@ const {
>
<div class="flex items-center text-xl font-bold">
v{{ item.version }}
<el-tag v-if="item.version === setting.appUploader.version" type="primary" effect="dark" size="small" class="ml-2 text-xs text-dark">
<el-tag v-if="item.version === currentVersion" type="primary" effect="dark" size="small" class="ml-2 text-xs text-dark">
当前
</el-tag>
<el-tag v-else-if="item.isLatest" type="danger" effect="dark" size="small" class="ml-2 text-xs text-dark">
Expand Down

0 comments on commit 196d1d4

Please sign in to comment.