Skip to content

Commit

Permalink
1.6.0.13
Browse files Browse the repository at this point in the history
  • Loading branch information
YrracOwl committed Sep 3, 2024
1 parent 3185568 commit 6f1eb5c
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 13 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.13" ProductVersion="1.6.0.13" 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.0.14" ProductVersion="1.6.0.14" 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
11 changes: 7 additions & 4 deletions dlg/timeline.aardio
Original file line number Diff line number Diff line change
Expand Up @@ -795,16 +795,19 @@ winform.删除plus.oncommand = function(id,event){
var confirmed = winform.msgboxTest("确认删除"""+tl_time+"""吗?","确认删除");
if(confirmed){
try{
..dbTimeline.exec("DELETE FROM ?? WHERE time=?;",{ winform.当前主题.text,tl_time} )
var hasErr = ..dbTimeline.exec("DELETE FROM ?? WHERE time=?;",{ winform.当前主题.text,tl_time} )
..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)
tl_webview.xcall("removeContent",{tostring(tl_time)});

win.delay(200)
winform.listboxUpdate(winform);
win.delay(200)
winform.timelineWebUpdate(winform);
}
catch(e){
Expand Down
1 change: 0 additions & 1 deletion release/1.6.0.12

This file was deleted.

1 change: 1 addition & 0 deletions release/1.6.0.13
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.6.0.13
Binary file modified release/ChiikawaBest.exe
Binary file not shown.
28 changes: 21 additions & 7 deletions res/template_timeline.aardio
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ body {
z-index: 1000;
}

.fixed-top > ul {
margin-left: 1.5em;
padding-left: 0em;
list-style-type: decimal-leading-zero;
}

/* Styling */
.timeline {
margin: 4em auto;
Expand Down Expand Up @@ -483,6 +489,7 @@ var content_js = /**
window.removeContent = function(datas){
var liEle = document.getElementById(datas[0]);
liEle.remove();
console.log('Removed',datas[0])
}

window.watchImg = function(){
Expand Down Expand Up @@ -1154,52 +1161,59 @@ var content_js = /**
let idFlag = 1

headingSet.forEach(heading => {
console.log('forEach Starting...', idFlag);
const hLevel = heading.outerHTML.match(/<h([\d]).*>/)[1]
console.log(hLevel)
const titleText = heading.innerText

switch (hLevel >= curLevel) {
switch (hLevel > curLevel) {
case true:
console.log('>>>switch true')
if (preTocItem === undefined) {
console.log('>>>switch true->if true')
preTocItem = new TocItem(titleText, hLevel)
console.log(preTocItem)
tocData.push(preTocItem)
} else {
console.log('>>>switch true->if false')
const curTocItem = new TocItem(titleText, hLevel)
console.log(curTocItem)
const parent = curTocItem.level > preTocItem.level ? preTocItem : preTocItem.parent
curTocItem.parent = parent
parent.children.push(curTocItem)
preTocItem = curTocItem
}
break
case false:
console.log('>>>switch false')
// We need to find the appropriate parent node from the preTocItem
const curTocItem = new TocItem(titleText, hLevel)
while (1) {
if (preTocItem.level < curTocItem.level) {
console.log('>>>switch false->if < is true')
preTocItem.children.push(curTocItem)
preTocItem = curTocItem
break
}
preTocItem = preTocItem.parent

if (preTocItem === undefined) {
console.log('>>>switch false->if === is true')
tocData.push(curTocItem)
preTocItem = curTocItem
break
}
}
break
}

curLevel = hLevel

if (heading.id === "") {
let tmpId = titleText.replace(/\s+/g,"_").toLowerCase() + "-toc-" + idFlag.toString();
console.log('>>>if no heading id')
let tmpId = "toc-" + idFlag.toString() + "-" + titleText.replace(/\s+/g,"_").toLowerCase();
heading.id = tmpId;
}
preTocItem.id = heading.id;
idFlag += idFlag;
console.log(preTocItem.id)
idFlag += 1;
console.log('forEach Ending...');
})

return tocData
Expand Down

0 comments on commit 6f1eb5c

Please sign in to comment.