From c02a0a244b96c2e88218ac485fe5c11ec4195feb Mon Sep 17 00:00:00 2001 From: ziqianou Date: Wed, 10 Apr 2024 21:39:33 +0800 Subject: [PATCH 1/4] add_click_see_all_week_class test --- main.js | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index cd8005d..9ff597c 100644 --- a/main.js +++ b/main.js @@ -8,6 +8,7 @@ const prompt = require('electron-prompt'); const Store = require('electron-store'); const { DisableMinimize } = require('electron-disable-minimize'); const store = new Store(); +const { dialog } = require('electron'); let tray = undefined; let form = undefined; var win = undefined; @@ -244,4 +245,31 @@ ipcMain.on('getTimeOffset', (e, arg) => { win.webContents.send('setTimeOffset', Number(r) % 10000000000000) } }) -}) \ No newline at end of file +}) + +classContainer.addEventListener('click', (event) => { + // 判断点击的位置是否在课程区域内 + const isClassArea = event.target.classList.contains('class'); + if (!isClassArea) return; + + // 显示所有课程的对话框 + dialog.showMessageBox(win, { + title: '本周课程', + message: getFullScheduleHtml(), + }); +}); + +function getFullScheduleHtml() { + // 获取本周所有课程数据 + const scheduleData = getScheduleData(); + const scheduleArray = scheduleData.scheduleArray; + + // 生成 HTML 代码 + let html = ''; + + return html; +} \ No newline at end of file From 766c05fde35dca157d34068761f58f81f9979857 Mon Sep 17 00:00:00 2001 From: ziqianou Date: Wed, 10 Apr 2024 21:42:01 +0800 Subject: [PATCH 2/4] new test --- main.js | 1 - 1 file changed, 1 deletion(-) diff --git a/main.js b/main.js index 9ff597c..462414f 100644 --- a/main.js +++ b/main.js @@ -8,7 +8,6 @@ const prompt = require('electron-prompt'); const Store = require('electron-store'); const { DisableMinimize } = require('electron-disable-minimize'); const store = new Store(); -const { dialog } = require('electron'); let tray = undefined; let form = undefined; var win = undefined; From d2fbdc7fbad8345111ac83af678a5922f0cd9fe2 Mon Sep 17 00:00:00 2001 From: ziqianou Date: Wed, 10 Apr 2024 22:03:34 +0800 Subject: [PATCH 3/4] remove test --- main.js | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/main.js b/main.js index 462414f..cd8005d 100644 --- a/main.js +++ b/main.js @@ -244,31 +244,4 @@ ipcMain.on('getTimeOffset', (e, arg) => { win.webContents.send('setTimeOffset', Number(r) % 10000000000000) } }) -}) - -classContainer.addEventListener('click', (event) => { - // 判断点击的位置是否在课程区域内 - const isClassArea = event.target.classList.contains('class'); - if (!isClassArea) return; - - // 显示所有课程的对话框 - dialog.showMessageBox(win, { - title: '本周课程', - message: getFullScheduleHtml(), - }); -}); - -function getFullScheduleHtml() { - // 获取本周所有课程数据 - const scheduleData = getScheduleData(); - const scheduleArray = scheduleData.scheduleArray; - - // 生成 HTML 代码 - let html = '
    '; - for (let i = 0; i < scheduleArray.length; i++) { - html += `
  • ${scheduleArray[i]}
  • `; - } - html += '
'; - - return html; -} \ No newline at end of file +}) \ No newline at end of file From 2e8bd0506f85ac706020660691e8db9234526123 Mon Sep 17 00:00:00 2001 From: ziqianou Date: Wed, 10 Apr 2024 22:50:12 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=BF=98=E6=9C=89=E4=B8=80=E7=82=B9?= =?UTF-8?q?=E5=B0=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 12 ++++++++++-- main.js | 9 ++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 7a67af5..8152312 100644 --- a/index.html +++ b/index.html @@ -26,10 +26,16 @@
00:00
- - + +
00:00
+
+