mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-03-17 04:13:17 +08:00
🚨 fix command warn
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
*/
|
||||
|
||||
@import "fonts/index.css";
|
||||
@import url("themes/default.css");
|
||||
@import url("themes/dark.css");
|
||||
@import "themes/default.css";
|
||||
@import "themes/dark.css";
|
||||
|
||||
:root {
|
||||
/* font */
|
||||
|
||||
@@ -128,7 +128,7 @@ async function toBBS(link: URL): Promise<void> {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "@styles/github.styles.scss";
|
||||
@use "@styles/github.styles.scss" as github-styles;
|
||||
|
||||
.tgn-container {
|
||||
position: relative;
|
||||
@@ -138,7 +138,7 @@ async function toBBS(link: URL): Promise<void> {
|
||||
}
|
||||
|
||||
.tgn-nav {
|
||||
@include github-card();
|
||||
@include github-styles.github-card();
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -149,7 +149,7 @@ async function toBBS(link: URL): Promise<void> {
|
||||
}
|
||||
|
||||
.dark .tgn-nav {
|
||||
@include github-card("dark");
|
||||
@include github-styles.github-card("dark");
|
||||
}
|
||||
|
||||
.tgn-nav img {
|
||||
|
||||
@@ -245,10 +245,10 @@ function onUserClick(): void {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "@styles/github.styles.scss";
|
||||
@use "@styles/github.styles.scss" as github-styles;
|
||||
|
||||
.tpc-card {
|
||||
@include github-card();
|
||||
@include github-styles.github-card();
|
||||
position: relative;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
@@ -262,7 +262,7 @@ function onUserClick(): void {
|
||||
}
|
||||
|
||||
.dark .tpc-card {
|
||||
@include github-card("dark");
|
||||
@include github-styles.github-card("dark");
|
||||
}
|
||||
|
||||
.tpc-top {
|
||||
@@ -334,7 +334,7 @@ function onUserClick(): void {
|
||||
}
|
||||
|
||||
.tpc-tag {
|
||||
@include github-tag-dark-gen(#e06c63);
|
||||
@include github-styles.github-tag-dark-gen(#e06c63);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -344,12 +344,12 @@ function onUserClick(): void {
|
||||
gap: 4px;
|
||||
|
||||
&:hover {
|
||||
@include github-tag-dark-gen(#00aeec);
|
||||
@include github-styles.github-tag-dark-gen(#00aeec);
|
||||
}
|
||||
}
|
||||
|
||||
.tpc-reason {
|
||||
@include github-tag-dark-gen(#d19a66);
|
||||
@include github-styles.github-tag-dark-gen(#d19a66);
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -60,10 +60,10 @@ async function shareAnno(): Promise<void> {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "@styles/github.styles.scss";
|
||||
@use "@styles/github.styles.scss" as github-styles;
|
||||
|
||||
.anno-card {
|
||||
@include github-card();
|
||||
@include github-styles.github-card();
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
@@ -72,7 +72,7 @@ async function shareAnno(): Promise<void> {
|
||||
}
|
||||
|
||||
.dark .anno-card {
|
||||
@include github-card("dark");
|
||||
@include github-styles.github-card("dark");
|
||||
}
|
||||
|
||||
.anno-cover {
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
defineProps<{ append?: boolean }>();
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "@styles/github.styles.scss";
|
||||
@use "@styles/github.styles.scss" as github-styles;
|
||||
|
||||
.thc-container {
|
||||
@include github-card();
|
||||
@include github-styles.github-card();
|
||||
|
||||
position: relative;
|
||||
min-height: 100px;
|
||||
@@ -29,7 +29,7 @@ defineProps<{ append?: boolean }>();
|
||||
}
|
||||
|
||||
.dark .thc-container {
|
||||
@include github-card("dark");
|
||||
@include github-styles.github-card("dark");
|
||||
}
|
||||
|
||||
.thc-title,
|
||||
|
||||
@@ -93,8 +93,6 @@ onUnmounted(() => {
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "@styles/github.styles.scss";
|
||||
|
||||
.ph-position-card {
|
||||
position: relative;
|
||||
display: flex;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<div class="tpr-info">
|
||||
<div class="tpri-left">
|
||||
<span :title="timestampToDate(props.modelValue.reply.created_at * 1000)">
|
||||
{{ getTime() }}
|
||||
{{ getNearTime(props.modelValue.reply.created_at) }}
|
||||
</span>
|
||||
<span>{{ props.modelValue.user.ip_region }}</span>
|
||||
</div>
|
||||
@@ -112,7 +112,7 @@ import { computed, onMounted, onUnmounted, ref, shallowRef, toRaw, watch } from
|
||||
import TpParser from "./tp-parser.vue";
|
||||
|
||||
import { generateShareImg } from "@/utils/TGShare.js";
|
||||
import { timestampToDate } from "@/utils/toolFunc.js";
|
||||
import { getNearTime, timestampToDate } from "@/utils/toolFunc.js";
|
||||
import postReq from "@/web/request/postReq.js";
|
||||
|
||||
type TprReplyProps =
|
||||
@@ -166,21 +166,6 @@ async function share(): Promise<void> {
|
||||
await generateShareImg(replyId, replyDom, 3);
|
||||
}
|
||||
|
||||
function getTime(): string {
|
||||
const time = new Date(props.modelValue.reply.created_at * 1000);
|
||||
const now = new Date();
|
||||
// 如果是今天,只显示 hh:mm
|
||||
if (time.toDateString() === now.toDateString()) {
|
||||
return time.toLocaleTimeString();
|
||||
}
|
||||
// 如果是今年,显示 MM-dd
|
||||
if (time.getFullYear() === now.getFullYear()) {
|
||||
return time.toLocaleDateString().slice(5).replace(/\//g, "-");
|
||||
}
|
||||
// 否则显示 yyyy-MM-dd
|
||||
return time.toLocaleDateString().replace(/\//g, "-");
|
||||
}
|
||||
|
||||
async function showReply(): Promise<void> {
|
||||
if (subReplies.value.length > 0) return;
|
||||
if (isLast.value) return;
|
||||
|
||||
@@ -10,7 +10,6 @@ import { createVuetify } from "vuetify";
|
||||
import App from "./App.vue";
|
||||
import router from "./router/index.js";
|
||||
import store from "./store/index.js";
|
||||
import "https://static.geetest.com/static/js/gt.0.4.9.js";
|
||||
|
||||
import "@mdi/font/css/materialdesignicons.css";
|
||||
import "vuetify/styles";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file utils/toolFunc.ts
|
||||
* @description 一些工具函数
|
||||
* @since Beta v0.6.8
|
||||
* @since Beta v0.7.2
|
||||
*/
|
||||
|
||||
import { path } from "@tauri-apps/api";
|
||||
@@ -45,6 +45,34 @@ export function timestampToDate(timestamp: number): string {
|
||||
return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取相近时间
|
||||
* @description 如果是今天,只显示 hh:mm
|
||||
* @description 如果是今年,显示 MM-dd
|
||||
* @description 否则显示 yyyy-MM-dd
|
||||
* @since Beta v0.7.2
|
||||
* @param {number} timestamp - 时间戳(秒)
|
||||
* @returns {string} 相近时间
|
||||
*/
|
||||
export function getNearTime(timestamp: number): string {
|
||||
const date = new Date(timestamp * 1000);
|
||||
const now = new Date();
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, "0");
|
||||
const day = String(date.getDate()).padStart(2, "0");
|
||||
const hour = String(date.getHours()).padStart(2, "0");
|
||||
const minute = String(date.getMinutes()).padStart(2, "0");
|
||||
if (
|
||||
now.getFullYear() === year &&
|
||||
now.getMonth() === date.getMonth() &&
|
||||
now.getDate() === date.getDate()
|
||||
) {
|
||||
return `${hour}:${minute}`;
|
||||
}
|
||||
if (now.getFullYear() === year) return `${month}-${day}`;
|
||||
return `${year}-${month}-${day}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取设备信息(初始化时)
|
||||
* @since Beta v0.4.1
|
||||
|
||||
@@ -355,7 +355,7 @@ function handleUser(user: TGApp.BBS.Post.User): void {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "@styles/github.styles.scss";
|
||||
@use "@styles/github.styles.scss" as github-styles;
|
||||
|
||||
.tp-post-body {
|
||||
width: 800px;
|
||||
@@ -513,27 +513,27 @@ function handleUser(user: TGApp.BBS.Post.User): void {
|
||||
|
||||
/* collection */
|
||||
.tp-post-collection {
|
||||
@include github-tag-dark-gen(#3572a5);
|
||||
@include github-styles.github-tag-dark-gen(#3572a5);
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
@include github-tag-dark-gen(#98c379);
|
||||
@include github-styles.github-tag-dark-gen(#98c379);
|
||||
}
|
||||
}
|
||||
|
||||
/* topic */
|
||||
.tp-post-topic {
|
||||
@include github-tag-dark-gen(#e06c63);
|
||||
@include github-styles.github-tag-dark-gen(#e06c63);
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
@include github-tag-dark-gen(#00aeec);
|
||||
@include github-styles.github-tag-dark-gen(#00aeec);
|
||||
}
|
||||
}
|
||||
|
||||
/* reason */
|
||||
.tp-post-reason {
|
||||
@include github-tag-dark-gen(#d19a66);
|
||||
@include github-styles.github-tag-dark-gen(#d19a66);
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user