Skip to content

Commit

Permalink
1.6.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
YrracOwl committed Sep 4, 2024
1 parent 6f1eb5c commit 5c5bec2
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 66 deletions.
2 changes: 1 addition & 1 deletion default.aproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<project ver="10" name="ChiikawaBest" libEmbed="true" icon="res\chiikawaIcon.ico" ui="win" output="ChiikawaBest.exe" CompanyName="CarryWho" FileDescription="ChiikawaBest" LegalCopyright="Copyright (C) CarryWho 2023" ProductName="ChiikawaBest" InternalName="ChiikawaBest" FileVersion="1.6.0.14" ProductVersion="1.6.0.14" publishDir="/dist/" dstrip="true" local="false" ignored="false">
<project ver="10" name="ChiikawaBest" libEmbed="true" icon="res\chiikawaIcon.ico" ui="win" output="ChiikawaBest.exe" CompanyName="CarryWho" FileDescription="ChiikawaBest" LegalCopyright="Copyright (C) CarryWho 2023" ProductName="ChiikawaBest" InternalName="ChiikawaBest" FileVersion="1.6.1.1" ProductVersion="1.6.1.1" publishDir="/dist/" dstrip="true" local="false" ignored="false">
<file name="main.aardio" path="main.aardio" comment="main.aardio"/>
<folder name="资源文件" path="res" embed="true" local="false" ignored="false">
<file name="chiikawa.png" path="res\chiikawa.png" comment="res\chiikawa.png"/>
Expand Down
87 changes: 27 additions & 60 deletions dlg/timeline.aardio
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ winform.内容plus.setCueBannerText("请输入内容,默认为还没想好");
winform.时间plus.focusOnClick = false;

winform.lastTime = "";
winform.currentTitle = "";

winform.添加提醒项.skin({
background={
Expand Down Expand Up @@ -299,38 +300,6 @@ var task = timeUpdate.create("每秒执行",function(){
task.interval = {
second = 1;
}
/*
var thrdListboxUpdate = function(winform,database){
var list_items = {};
for rowid, time, title, content in database.each("SELECT rowid,* FROM ??",{winform.当前主题.text}) {
table.push(list_items,time);
}
table.sort(list_items);
winform.listbox.clear();
for(k,v in list_items){
winform.listbox.add(v)
}
};

var thrdTimelineUpdate = function(winform,database,tl_webview){
tl_webview.xcall("clearListTemp");
if(winform.listbox.count<1){
tl_webview.xcall("pushTable",{"当前无内容";"无内容";"请在左侧添加"});
}
else {
for(i=1;winform.listbox.count;1){
var result = database.stepQuery("SELECT * FROM ??",{time = winform.listbox.items[i], winform.当前主题.text} )
tl_webview.xcall("pushTable",{tostring(result.time);tostring(result.title);tostring(result.content)});
}
}
tl_webview.xcall("replaceList");
};
*/

/*
thread.set("thrdListboxUpdate", thrdListboxUpdate);
thread.set("thrdTimelineUpdate", thrdTimelineUpdate);
*/

import win.ui.mask;
var frmMask = win.ui.mask(winform.winTimelineShow,true)
Expand Down Expand Up @@ -480,10 +449,11 @@ winform.chkDbField = function(tlTitle){
winform.childWinUpdate = function(tlTitle){
currentTimeLine = tlTitle;
winform.当前主题.text = currentTimeLine;
winform.currentTitle = currentTimeLine;
winform.text = "时间线 - " + winform.当前主题.text;
tl_webview.xcall("setTitle",winform.当前主题.text);
tl_webview.invoke("setTitle",winform.当前主题.text);
if(_WIN10_LATER){
tl_webview.xcall("animationActivate");
tl_webview.invoke("animationActivate");
}
thread.invoke(
function(winform,tlTitle){
Expand All @@ -494,10 +464,9 @@ winform.childWinUpdate = function(tlTitle){

winform.listboxUpdate = function(winform){
var list_items = {};

..logMsg(">>>更新时间线的listbox");
..logMsg(winform.当前主题.text);
for rowid, time, title, content in ..dbTimeline.each("SELECT rowid,* FROM ??",{winform.当前主题.text}) {
..logMsg("当前时间线:",winform.currentTitle);
for rowid, time, title, content in ..dbTimeline.each("SELECT rowid,* FROM ??",{winform.currentTitle}) {
table.push(list_items,time);
..logMsg(time,rowid,title)
}
Expand All @@ -506,6 +475,7 @@ winform.listboxUpdate = function(winform){
for(k,v in list_items){
winform.listbox.add(v)
}
..logMsg("listbox更新完毕")
}

winform.gfmarkCheckList = function(strPrepared){
Expand All @@ -524,9 +494,9 @@ winform.gfmarkCheckList = function(strPrepared){


winform.timelineWebUpdate = function(winform){
tl_webview.xcall("clearListTemp");
tl_webview.invoke("clearListTemp");
if(winform.listbox.count<1){
tl_webview.xcall("pushTable",{"当前无内容";"无内容";"请在左侧添加";"null"});
tl_webview.invoke("pushTable",{"当前无内容";"无内容";"请在左侧添加";"null"});
}
else {
for(i=1;winform.listbox.count;1){
Expand All @@ -540,11 +510,11 @@ winform.timelineWebUpdate = function(winform){
if(imgUrl == null){
imgUrl = "null";
}
//tl_webview.xcall("pushTable",{tostring(result.time);tostring(result.title);tostring(result.content);imgUrl});
tl_webview.xcall("pushTable",{tostring(result.time);tostring(result.title);winform.gfmarkCheckList(result.content);imgUrl});
//tl_webview.invoke("pushTable",{tostring(result.time);tostring(result.title);tostring(result.content);imgUrl});
tl_webview.invoke("pushTable",{tostring(result.time);tostring(result.title);winform.gfmarkCheckList(result.content);imgUrl});
}
}
tl_webview.xcall("replaceList");
tl_webview.invoke("replaceList");
}


Expand Down Expand Up @@ -720,8 +690,8 @@ winform.添加plus.oncommand = function(id,event){
imgUrl = "null";
}

//tl_webview.xcall("updateContent",{tostring(tl_time);tostring(tl_title);tostring(tl_content);imgUrl});
tl_webview.xcall("updateContent",{tostring(tl_time);tostring(tl_title);winform.gfmarkCheckList(tl_content);imgUrl});
//tl_webview.invoke("updateContent",{tostring(tl_time);tostring(tl_title);tostring(tl_content);imgUrl});
tl_webview.invoke("updateContent",{tostring(tl_time);tostring(tl_title);winform.gfmarkCheckList(tl_content);imgUrl});
}
//修改了时间,或者纯粹新增,均不会触发
else {
Expand Down Expand Up @@ -794,25 +764,22 @@ winform.删除plus.oncommand = function(id,event){
var tl_time = winform.datetimepick.text + '-' + winform.时间plus.text;
var confirmed = winform.msgboxTest("确认删除"""+tl_time+"""吗?","确认删除");
if(confirmed){
try{
var hasErr = ..dbTimeline.exec("DELETE FROM ?? WHERE time=?;",{ winform.当前主题.text,tl_time} )
var hasErr = ..dbTimeline.exec("DELETE FROM ?? WHERE time=?;",{ winform.当前主题.text,tl_time} )
if(hasErr){
..logErr(">>>无法删除",winform.当前主题.text,"中的:",tl_time);
return false;
}
else {
..logWarn(">>>已删除项",winform.当前主题.text,"中的:",tl_time)
if(hasErr){
return ;
}
win.delay(200)
tl_webview.xcall("removeContent",{tostring(tl_time)});

win.delay(200)
winform.addUIReset(winform);

win.delay(200)
..logMsg('Rdy to del web content...')
tl_webview.invoke("removeContent",{tostring(tl_time)})
//frmMask.show(true);
win.delay(20)
..logMsg('Rdy to update...')
winform.listboxUpdate(winform);
winform.timelineWebUpdate(winform);
}
catch(e){
..logErr(">>>删除",winform.当前主题.text,"中的:",tl_time,"失败")
..logErr(e)
//frmMask.show(false);
}
}
else {
Expand Down Expand Up @@ -891,7 +858,7 @@ winform.图片预览.wndproc = function(hwnd,message,wParam,lParam){
}

winform.timelineThemeSet = function(){
tl_webview.xcall("themeSet",{tostring(..timeline_skin.bg);tostring(..timeline_skin.txt);tostring(..timeline_skin.hl);tostring(..timeline_skin.normal)});
tl_webview.invoke("themeSet",{tostring(..timeline_skin.bg);tostring(..timeline_skin.txt);tostring(..timeline_skin.hl);tostring(..timeline_skin.normal)});
}


Expand Down
2 changes: 1 addition & 1 deletion main.aardio
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ if(cfg.apps_setting.启动到托盘){
cfg.apps_setting.启动次数 = cfg.apps_setting.启动次数 + 1;
}
else {
mainForm.tray.pop("应用"+mainForm.appVersion+"已启动","ChiikawaBest");
//mainForm.tray.pop("应用"+mainForm.appVersion+"已启动","ChiikawaBest");
}
}
else {
Expand Down
1 change: 0 additions & 1 deletion release/1.6.0.13

This file was deleted.

1 change: 1 addition & 0 deletions release/1.6.1.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.6.1.0
Binary file modified release/ChiikawaBest.exe
Binary file not shown.
6 changes: 3 additions & 3 deletions res/template_timeline.aardio
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,9 @@ var content_js = /**

window.removeContent = function(datas){
var liEle = document.getElementById(datas[0]);
liEle.remove();
console.log('Removed',datas[0])
var liEleParent = liEle.parentElement;
liEleParent.removeChild(liEle)
console.log('Removed...');
}

window.watchImg = function(){
Expand Down Expand Up @@ -1254,7 +1255,6 @@ var content_js = /**
console.log("delete old TOC")
oldTOC.remove();
}

console.log('Hs Querying...')
const headingSet = document.querySelectorAll("h1, h2, h3, h4, h5, h6") // You can also select only the titles you are interested in.
console.log(headingSet)
Expand Down

0 comments on commit 5c5bec2

Please sign in to comment.