diff --git a/CSS/main.css b/CSS/main.css index 5468030..e9dc087 100644 --- a/CSS/main.css +++ b/CSS/main.css @@ -112,6 +112,7 @@ input::-webkit-input-placeholder { user-select: none } flex-flow: column; width: 100%; height: calc(100% - var(--topMenuSize)); + z-index: 0; } #main > div:first-child { @@ -129,6 +130,7 @@ input::-webkit-input-placeholder { user-select: none } background-color: var(--obr-con-bgc); overflow-y: auto; position: relative; + z-index: -1; } /* Menu */ @@ -206,7 +208,7 @@ input::-webkit-input-placeholder { user-select: none } min-width: 110px; height: auto; position: absolute; - z-index: +1; + /* z-index: +1; */ } .menu-dropdown > div > button { padding: 10px } @@ -1687,4 +1689,28 @@ input::-webkit-input-placeholder { user-select: none } color: #222; text-transform: capitalize; user-select: text; -} \ No newline at end of file +} + +/* New Release Note */ +#nrelease-note { + display: none; + width: 100%; + height: calc(100% - var(--topMenuSize)); + padding: 20px 35px; + background-color: #F8F8FC; + color: #000; + overflow-y: auto; + position: fixed; + top: var(--topMenuSize); + left: 0; +} + +#nrelease-note > h1, #nrelease-note > h2, #nrelease-note > h3 { display: block; width: 100%; margin-bottom: 30px; font-size: 36px; font-weight: 400; } +#nrelease-note > h1 { font-weight: 600; } +#nrelease-note > h2 { margin-bottom: 50px; font-size: 24px; } +#nrelease-note > h3 { margin-bottom: 12px; font-size: 18px; } +#nrelease-note > ul { display: block; width: 100%; padding-left: 40px; margin-bottom: 30px; line-height: 32px; } +#nrelease-note > ul > li > span { color: #7d7d89; } +#nrelease-note > div { width: 100%; margin-bottom: 20px; text-align: right } +#nrelease-note > div > div { display: inline-block; padding: 7px 10px; cursor: pointer; user-select: none; border-radius: 4px; } +#nrelease-note > div > div:hover { background-color: #e9e9ea; } \ No newline at end of file diff --git a/JS/requires.js b/JS/requires.js index 8214fa6..be79012 100644 --- a/JS/requires.js +++ b/JS/requires.js @@ -26,6 +26,7 @@ const defaultSetting = { "rdls": false, "full_screen": true, "open_br_startup": false, + "rc": 0, "auto_backup": true, "developer_mode": false } @@ -66,7 +67,7 @@ const keydownEvents = [ 'SettingKeyEvents({ctrl},{shift},{key})', // 4 'InfoKeyEvents({ctrl},{shift},{key})' // 5 ] -const ThisWindow = remote.getCurrentWindow(), loading = new Loading(9), Downloader = new DownloadManager(), PageManager = new OfflinePageManager(), db = {}, procressPanel = new ProcressPanel(0), update_number = 13, SliderManager = new Slider() +const ThisWindow = remote.getCurrentWindow(), loading = new Loading(9), Downloader = new DownloadManager(), PageManager = new OfflinePageManager(), db = {}, procressPanel = new ProcressPanel(0), SliderManager = new Slider(), update_number = 14 let comicDeleting = false, wt_fps = 20, dirDB, dirUL, dirBU, dirTmp, isOptimizing = false, browserLastTabs = [], tabsHistory = [], dirHistory = '', keydownEventIndex = 0, new_update, save_value = null, save_value2 = null, afterDLReload = true, setting, openedMenuTabIndex, copiedTab = null, tabs = [], lastComicId, searchTimer, activeTabComicId = null, activeTabIndex = null, tabsPos = [], tabsPosParent = [], isUpdating = false, collectionsDB = [], groupsDB = [], artistsDB = [], parodiesDB = [], tagsDB = [], charactersDB = [], languagesDB = [], categoriesDB = [], comicGroupsDB = [], comicArtistsDB = [], comicParodiesDB = [], comicTagsDB = [], comicCharactersDB = [], comicLanguagesDB = [], comicCategoriesDB = [], indexDB = [], haveDBSite = [], haveDBId = [], haveDBComic = [] /* @@ -938,33 +939,34 @@ function CreateDatabase() { } function CheckSettings() { - if (typeof(setting.theme) != 'number' || setting.theme < 0) setting.theme = defaultSetting.theme + if (typeof setting.theme != 'number' || setting.theme < 0) setting.theme = defaultSetting.theme if (setting.theme > 1) setting.theme = 1 - if (typeof(setting.pagination_theme) != 'number' || setting.pagination_theme < 0) setting.pagination_theme = defaultSetting.pagination_theme + if (typeof setting.pagination_theme != 'number' || setting.pagination_theme < 0) setting.pagination_theme = defaultSetting.pagination_theme if (setting.pagination_theme > 6) setting.pagination_theme = 6 - if (typeof(setting.waiting_quality) != 'number') setting.waiting_quality = defaultSetting.waiting_quality + if (typeof setting.waiting_quality != 'number') setting.waiting_quality = defaultSetting.waiting_quality if (setting.waiting_quality > 2) setting.waiting_quality = 2 else if (setting.waiting_quality < 0) setting.waiting_quality = 0 - if (typeof(setting.max_per_page) != 'number') setting.max_per_page = defaultSetting.max_per_page + if (typeof setting.max_per_page != 'number') setting.max_per_page = defaultSetting.max_per_page if (setting.max_per_page < 1) setting.max_per_page = 1 - if (typeof(setting.img_graphic) != 'number' || setting.img_graphic < 0) setting.img_graphic = defaultSetting.img_graphic + if (typeof setting.img_graphic != 'number' || setting.img_graphic < 0) setting.img_graphic = defaultSetting.img_graphic if (setting.img_graphic > 1) setting.img_graphic = 1 - if (typeof(setting.notification_download_finish) != 'boolean') setting.notification_download_finish = defaultSetting.notification_download_finish - if (typeof(setting.notification_optimization_finish) != 'boolean') setting.notification_optimization_finish = defaultSetting.notification_optimization_finish - if (typeof(setting.lazy_loading) != 'boolean') setting.lazy_loading = defaultSetting.lazy_loading + if (typeof setting.notification_download_finish != 'boolean') setting.notification_download_finish = defaultSetting.notification_download_finish + if (typeof setting.notification_optimization_finish != 'boolean') setting.notification_optimization_finish = defaultSetting.notification_optimization_finish + if (typeof setting.lazy_loading != 'boolean') setting.lazy_loading = defaultSetting.lazy_loading if (setting.lazy_loading == false) imageLazyLoadingOptions.rootMargin = "0px 0px 1200px 0px" - if (typeof(setting.tabs_limit) != 'number') setting.tabs_limit = defaultSetting.tabs_limit + if (typeof setting.tabs_limit != 'number') setting.tabs_limit = defaultSetting.tabs_limit if (setting.tabs_limit < 1) setting.tabs_limit = 1 - if (typeof(setting.download_limit) != 'number') setting.download_limit = defaultSetting.download_limit + if (typeof setting.download_limit != 'number') setting.download_limit = defaultSetting.download_limit if (setting.download_limit < 1) setting.download_limit = 1 - if (typeof(setting.show_unoptimize) != 'boolean') setting.show_unoptimize = defaultSetting.show_unoptimize - if (typeof(setting.check_update) != 'boolean') setting.check_update = defaultSetting.check_update - if (typeof(setting.auto_close_optimize_panel) != 'boolean') setting.auto_close_optimize_panel = defaultSetting.auto_close_optimize_panel - if (typeof(setting.open_br_startup) != 'boolean') setting.open_br_startup = defaultSetting.open_br_startup + if (typeof setting.rc !== 'number') setting.rc = defaultSetting.rc + if (typeof setting.show_unoptimize != 'boolean') setting.show_unoptimize = defaultSetting.show_unoptimize + if (typeof setting.check_update != 'boolean') setting.check_update = defaultSetting.check_update + if (typeof setting.auto_close_optimize_panel != 'boolean') setting.auto_close_optimize_panel = defaultSetting.auto_close_optimize_panel + if (typeof setting.open_br_startup != 'boolean') setting.open_br_startup = defaultSetting.open_br_startup if (typeof setting.rdls != 'boolean') setting.rdls = defaultSetting.rdls - if (typeof(setting.full_screen) != 'boolean') setting.full_screen = defaultSetting.full_screen - if (typeof(setting.auto_backup) != 'boolean') setting.auto_backup = defaultSetting.auto_backup - if (typeof(setting.developer_mode) != 'boolean') setting.developer_mode = defaultSetting.developer_mode + if (typeof setting.full_screen != 'boolean') setting.full_screen = defaultSetting.full_screen + if (typeof setting.auto_backup != 'boolean') setting.auto_backup = defaultSetting.auto_backup + if (typeof setting.developer_mode != 'boolean') setting.developer_mode = defaultSetting.developer_mode if (setting.developer_mode == true) { window.addEventListener('keydown', e => { if (e.ctrlKey && e.shiftKey && e.which == 73) remote.getCurrentWebContents().toggleDevTools() @@ -972,21 +974,64 @@ function CheckSettings() { } } -function CheckReleaseNote() { - if (fs.existsSync(__dirname+'/release-note.json')) { - new_update = jsonfile.readFileSync(__dirname+'/release-note.json') - fs.unlinkSync(__dirname+'/release-note.json') +function OpenReleaseNotes() { + if (!fs.existsSync(__dirname+'/rn.json')) return + let data + try { data = jsonfile.readFileSync(__dirname+'/rn.json') || null } catch(err) { console.error(err) } + if (data == null) return + // data = { + // version: '', + // new: [], + // bug: [], + // impr: [], + // plan: [] + // } + + const container = document.getElementById('nrelease-note') + let html = '' + + if (data.version != null) html += '

Release Notes v'+data.version+'

' + html += "

🚀 What's New

" + + if (data.new != null) { + html += '

🔥 New Features

' + } + if (data.bug != null) { + html += '

🔧 Bug Fixes

' + } - document.getElementById('r-n-n-v').innerHTML = "What's new in v"+new_update.v - let html = '

Important Changes

' - for (let i = 0; i < new_update.s.length; i++) { - html += `

${new_update.s[i]}

` - } - document.getElementById('r-n-n-n').innerHTML = html - document.getElementById('release-note').style.display = 'flex' + if (data.impr != null) { + html += '

🌟 Improvements

' + } + + if (data.plan != null) { + html += '

🚢 Plans

' + } + + if (setting.rc == update_number) html += '
Close
' + else html += '
Show This Later
I Undrestand
' + + container.innerHTML = html + container.style.display = 'block' + container.scrollTop = 0 +} - new_update = null +function CloseReleaseNotes(save = false) { + const container = document.getElementById('nrelease-note') + container.style.display = 'none' + container.innerHTML = null + if (save) { + setting.rc = update_number + try { jsonfile.writeFileSync(dirDocument+'/setting.json', setting) } catch(err) { console.error(err) } } } diff --git a/JS/startup.js b/JS/startup.js index 6e8dce5..37e3630 100644 --- a/JS/startup.js +++ b/JS/startup.js @@ -43,7 +43,7 @@ function AfterDatabaseDoneOnStartup() { } try { - CheckReleaseNote() + if (setting.rc != update_number) OpenReleaseNotes() } catch(err) { error("Startup->CheckReleaseNote->Err: "+err) console.error(err) diff --git a/index.html b/index.html index 71e58cb..04e8264 100644 --- a/index.html +++ b/index.html @@ -41,7 +41,7 @@
-
X Comic Downloader v2.2.0
+
X Comic Downloader v2.3.3
@@ -81,6 +81,7 @@
+
@@ -720,6 +721,9 @@ + +
+
diff --git a/index.js b/index.js index 1d02d25..062627a 100644 --- a/index.js +++ b/index.js @@ -9,7 +9,7 @@ function createWindow () { minHeight: 600, frame: false, center: true, - title: 'X Comic Downloader v2.2.0', + title: 'X Comic Downloader v2.3.3', webPreferences: { enableRemoteModule: true, nodeIntegration: true, diff --git a/package.json b/package.json index 72578aa..707ca95 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "x-comic-downloader", - "version": "2.2.0", + "version": "2.3.3", "description": "A Software for Downloading Adult and Hentai Comic and Manga and Manage Theme.", "main": "index.js", "author": "Mehdi Enayatzadeh (LowMaster)", diff --git a/release-maker.html b/release-maker.html deleted file mode 100644 index 24c2987..0000000 --- a/release-maker.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - Release Maker v1.0.0 - - - - -
- -

Version

- - - - - - - \ No newline at end of file diff --git a/rn.json b/rn.json new file mode 100644 index 0000000..cce7684 --- /dev/null +++ b/rn.json @@ -0,0 +1 @@ +{"version":"2.3.3","new":["Add Ability To Sort With Multiple Tags/etc... (Requested By Zogarth23)","Add Right Click Ability To Browser Links","Add Comic Properties * Right Click Comic -> Properties","Add Download Button To nhentai Related Comics","Add More Choose Location Checkup"],"bug":["Fix Bug: When renaming still can use hotkeys","Fix Some Database Optimization Bugs","Fix Some Right Click Menu Bugs","Fix Some Gallery Comic Loading","Fix Some Slider Mouse Event Bugs"],"impr":["Optimize Have Database and its System","Merge Collections To Normal Gallery View","Change Slider Mouse System","Make Image LoadingStop System Work Better","Make History Checkboxs Hitbox Bigger"],"plan":["Add Download Log (Requested By SmartBadger)","Add Tab System In Personal Gallery (Requested By Zogarth23)","Add Ability To ReDownload an Image","Add Bookmark System To Browser","Add Ability To Edit Comic Infos Such as Tags/Artists/etc..."]} diff --git a/task.txt b/task.txt index e6410d5..3dc8966 100644 --- a/task.txt +++ b/task.txt @@ -93,31 +93,23 @@ Add Comic { } Added To Version { - *Add Ability To Sort With Multiple Tags/etc... (Requested By Zogarth23) - *Add Right Click Menu To Browser Links - Fix Bug: When renaming still can use hotkeys - Fix Some Database Optimization Bugs - Fix Some Right Click Menu Bugs - Fix Some Gallery Comic Loading - Optimize Have Database and its System - Merge Collections To Normal Gallery View - Change Slider System and Fix Some Bugs - Add Comic Properties - Add Download Button To nhentai Related Comics - Add More Choose Location Checkup - Make Image Stop Loading System Work Better - Make History Checkboxs Hitbox Bigger + } Tasks => { + Plans { + Add Download Log (Requested By SmartBadger) + Add Tab System In Personal Gallery (Requested By Zogarth23) + Add Ability To ReDownload an Image + Add Bookmark System To Browser + Add Ability To Edit Comic Infos Such as Tags/Artists/etc... + } Make Mac and Linux version Fix Browser Multi Change Page Problem Add Download Log Fix History Fix Bug: nhentai -> Search -> Otokonoko Heaven Vol. 4 Jump Page Optimize and Fix Events - Improve Release-Note - Add Browser-Right Click Change Tab Remove Activating Next Tab Add Downloaded Comic Site Icon In Comic Panel Fix bug: nhentai -> Searching B-trayal pagination won't work @@ -143,7 +135,6 @@ Tasks => { } Mybe in v2 { - Add Bookmark || Favoriet Posts Make Tab Resizing Work Better Add Ability That Check Post Updated Image Add Report Bug Button @@ -151,7 +142,6 @@ Tasks => { New Abilities For v2 { Add Ability To Zoom in Image in Sldier - Add ReDownload Comic or A Picture Add Jump to Picture to Comic Panel }