Skip to content

Commit

Permalink
1.6.11
Browse files Browse the repository at this point in the history
  • Loading branch information
MCDFsteve committed Nov 9, 2024
1 parent e226cf9 commit 6ce9375
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 53 deletions.
128 changes: 86 additions & 42 deletions index.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,90 @@
--sidebar-width: 150px;
/* 边栏宽度,更窄 */
}
.sidebar button img {
animation: none;
}

.sidebar button:hover img {
animation: scaleAnimation 0.5s ease forwards;
}

/* 定义序列动画 */
@keyframes scaleAnimation {
0% {
transform: scale(1); /* 初始大小1倍 */
}
50% {
transform: scale(1.2); /* 放大到1.1倍 */
}
75% {
transform: scale(0.9); /* 缩回到1倍 */
}
88% {
transform: scale(1.1); /* 缩回到1倍 */
}
100% {
transform: scale(1.0); /* 缩回到1倍 */
}
}

.upload-button {
cursor: pointer;
transition: background-color 0.3s, color 0.3s;
width: 200px;
height: 200px;
color: var(--text-color);
background-color: rgba(200, 200, 200, 0.4);
border-radius: 20px;
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
backdrop-filter: blur(20px);
border: none;
position: absolute;
left: calc(50% + 22vw / 2);
top: 50%;
/* 新增:设置距顶部的比例 */
transform: translate(-50%, -50%);
/* 修改:同时在X和Y方向居中 */
-webkit-app-region: no-drag;
}

.upload-button:hover {
background-color: rgba(0, 0, 0, 0.3);
color: #fff;
text-decoration: none;
border-radius: 20px;
/* 修复悬停时的弧度 */
animation: uploadAnimation 0.5s ease forwards;
}
@keyframes uploadAnimation {
0% {
width:200px;
}
50% {
width:300px;
}
75% {
width:180px;
}
88% {
width:220px;
}
100% {
width:200px;
}
}

.upload-icon {
width: 150px;
height: 150px;
background: url('icons/upload.png') no-repeat center;
background-size: contain;
scale:1;
}
@media (prefers-color-scheme: dark) {
:root {
--background-color: #222;
Expand Down Expand Up @@ -420,38 +503,6 @@ li.sidebar-button::before {
overflow-x: hidden;
}

.upload-button {
cursor: pointer;
transition: background-color 0.3s, color 0.3s;
width: 200px;
height: 200px;
color: var(--text-color);
background-color: rgba(200, 200, 200, 0.4);
border-radius: 20px;
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
backdrop-filter: blur(20px);
border: none;
position: absolute;
left: calc(50% + 22vw / 2);
top: 50%;
/* 新增:设置距顶部的比例 */
transform: translate(-50%, -50%);
/* 修改:同时在X和Y方向居中 */
-webkit-app-region: no-drag;
}

.upload-button:hover {
background-color: rgba(0, 0, 0, 0.3);
color: #fff;
text-decoration: none;
border-radius: 20px;
/* 修复悬停时的弧度 */
}

@media (prefers-color-scheme: dark) {
.upload-button {
background-color: rgba(51, 51, 51, 0.75);
Expand Down Expand Up @@ -560,13 +611,6 @@ h2 {
border-top: 1px solid rgb(70, 70, 70);
}
}
.upload-icon {
width: 150px;
height: 150px;
background: url('icons/upload.png') no-repeat center;
background-size: contain;

}

.anime-list {
display: flex;
Expand All @@ -584,7 +628,6 @@ h2 {
text-align: left;
box-sizing: border-box;
}

.anime-image {
width: auto;
height: 200px;
Expand All @@ -594,7 +637,7 @@ h2 {
/* 添加圆角 */
}
.anime-image img {
border-radius: 2px;
border-radius: 5px;
/* 添加圆角 */
width: auto;
height: 200px;
Expand All @@ -606,6 +649,7 @@ h2 {
}
.anime-image img:hover {
opacity: 0.7;

}
.anime-title {
flex: 0 0 auto;
Expand Down Expand Up @@ -689,7 +733,7 @@ h2 {
width: auto;
height: 300px;
max-height: auto;
border-radius: 2px;
border-radius: 5px;
box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.3);
}

Expand Down
16 changes: 8 additions & 8 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ const logFilePath = path.join(downloadsPath, 'app.log');
const windowModePath = path.join(nipaPath, 'windowMode.json');
// 获取应用的用户数据目录
const userDataPath = app.getPath('userData');
const userName = 'f23ui499dfij1mf9';
const password = 'g54hu53t4ty45w';
const userName = '';
const password = '';
let loginUserName;
let loginPassword;
const appId = "nipaplayv1";
Expand Down Expand Up @@ -690,8 +690,8 @@ async function loginAndGetToken() {

const currentTimestamp = Math.floor(Date.now() / 1000);
const twentyDaysInSeconds = 20 * 24 * 60 * 60;
console.log("loginUserName:", loginUserName);
console.log("loginPassword:", loginPassword);
//console.log("loginUserName:", loginUserName);
//console.log("loginPassword:", loginPassword);
// 检查 token 文件是否存在且时间戳是否有效
if (fs.existsSync(tokenFilePath)) {
const tokenData = JSON.parse(fs.readFileSync(tokenFilePath, 'utf-8'));
Expand Down Expand Up @@ -2235,17 +2235,17 @@ function createMainWindow() {
mainWindow.loadFile('index.html');
mainWindow.once('ready-to-show', () => {
mainWindow.show(); // 显示窗口
});
//console.log('Window loaded URL:', 'index.html');
mainWindow.webContents.on('did-finish-load', () => {
mainWindow.webContents.send('platform-info', { isMac });
if (token != null){
mainWindow.webContents.send('login-success', loginUserName);
console.log('登录成功');
}else{
console.log('未登录');
}
});
//console.log('Window loaded URL:', 'index.html');
mainWindow.webContents.on('did-finish-load', () => {
mainWindow.webContents.send('platform-info', { isMac });
});
//mainWindow.resizable = false;
}
function CreateloadWindow(center) {
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nipaplay",
"productName": "NipaPlay",
"version": "1.6.10",
"version": "1.6.11",
"description": "咪啪~☆",
"main": "main.js",
"author": "DFsteve",
Expand Down Expand Up @@ -70,8 +70,9 @@
"!**/electron-builder.yml",
"!**/.DS_Store",
"!**/*.bak",
"!**/ffmpeg/ffmpeg_mac",
"!**/ffmpeg/ffmpeg_win"
"!**/ffmpeg/ffmpeg_win",
"!**/ffmpeg/ffmpeg_linux64",
"!**/ffmpeg/ffmpeg_linuxarm"
],
"publish": {
"provider": "github",
Expand Down
9 changes: 9 additions & 0 deletions updata_log.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@

var updatesData = [
{
version: "1.6.11",
date: "2024.11.9",
changes: [
"修复了掉登录的bug。",
"主界面增加了一些交互动画。",
"新番更新界面的图像变得更圆滑了。",
]
},
{
version: "1.6.10",
date: "2024.11.8",
Expand Down

0 comments on commit 6ce9375

Please sign in to comment.