mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-26 09:03:54 +08:00
update:优化时间显示 (#1139)
This commit is contained in:
@@ -177,5 +177,5 @@ public interface Constant {
|
|||||||
/**
|
/**
|
||||||
* 版本号
|
* 版本号
|
||||||
*/
|
*/
|
||||||
public static final String VERSION = "0.3.14";
|
public static final String VERSION = "0.4.1";
|
||||||
}
|
}
|
||||||
@@ -53,7 +53,9 @@ export default {
|
|||||||
const now = new Date();
|
const now = new Date();
|
||||||
const diffMinutes = Math.floor((now - lastTime) / (1000 * 60));
|
const diffMinutes = Math.floor((now - lastTime) / (1000 * 60));
|
||||||
|
|
||||||
if (diffMinutes < 60) {
|
if (diffMinutes <= 1) {
|
||||||
|
return '刚刚';
|
||||||
|
} else if (diffMinutes < 60) {
|
||||||
return `${diffMinutes}分钟前`;
|
return `${diffMinutes}分钟前`;
|
||||||
} else if (diffMinutes < 24 * 60) {
|
} else if (diffMinutes < 24 * 60) {
|
||||||
const hours = Math.floor(diffMinutes / 60);
|
const hours = Math.floor(diffMinutes / 60);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from loguru import logger
|
|||||||
from config.config_loader import load_config
|
from config.config_loader import load_config
|
||||||
from config.settings import check_config_file
|
from config.settings import check_config_file
|
||||||
|
|
||||||
SERVER_VERSION = "0.3.14"
|
SERVER_VERSION = "0.4.1"
|
||||||
|
|
||||||
|
|
||||||
def get_module_abbreviation(module_name, module_dict):
|
def get_module_abbreviation(module_name, module_dict):
|
||||||
|
|||||||
Reference in New Issue
Block a user