Skip to content

Commit

Permalink
Merge branch 'beta'
Browse files Browse the repository at this point in the history
  • Loading branch information
ptkdev committed Nov 20, 2021
2 parents 6240186 + 2208011 commit 0cedcce
Show file tree
Hide file tree
Showing 200 changed files with 24,722 additions and 35,727 deletions.
2 changes: 1 addition & 1 deletion .all-shieldsrc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"message": "cordova",
"title": "Powered By Cordova",
"style": "flat",
"logo": "apachecordova",
"logo": "apache-cordova",
"platform": "shields"
},
{
Expand Down
107 changes: 52 additions & 55 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,93 +1,90 @@
module.exports = {
"env": {
"es6": true,
"node": true,
"browser": true,
"jest/globals": true
env: {
es6: true,
node: true,
browser: true,
"jest/globals": true,
},
"parser": "@typescript-eslint/parser",
"extends": ["eslint:recommended", "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended"],
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2019
parser: "@typescript-eslint/parser",
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
],
parserOptions: {
sourceType: "module",
ecmaVersion: 2019,
},
"plugins": ["jsdoc", "jest", "svelte3", "@typescript-eslint"],
"globals": {
"fetch": false
plugins: ["jsdoc", "jest", "svelte3", "@typescript-eslint"],
globals: {
fetch: false,
},
"settings": {
"jsdoc": {
"tagNamePreference": {
"returns": "return"
}
settings: {
jsdoc: {
tagNamePreference: {
returns: "return",
},
},
"svelte3/typescript": require("typescript")
"svelte3/typescript": require("typescript"),
},
"overrides": [
overrides: [
{
"files": ["**/*.svelte"],
"processor": "svelte3/svelte3"
}
files: ["**/*.svelte"],
processor: "svelte3/svelte3",
},
],
"rules": {
rules: {
"no-multi-spaces": [
"error",
{
"ignoreEOLComments": true,
"exceptions": {
"VariableDeclarator": true
}
}
ignoreEOLComments: true,
exceptions: {
VariableDeclarator: true,
},
},
],
"block-spacing": ["error", "always"],
"array-bracket-spacing": ["error", "never"],
"space-in-parens": ["error", "never"],
"comma-spacing": [
"error",
{
"before": false,
"after": true
}
before: false,
after: true,
},
],
"key-spacing": [
"error",
{
"afterColon": true,
"beforeColon": false
}
],
"indent": [
"error",
"tab",
{
"SwitchCase": 1
}
afterColon: true,
beforeColon: false,
},
],
"quotes": [
quotes: [
"error",
"double",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
avoidEscape: true,
allowTemplateLiterals: true,
},
],
"semi": ["error", "always"],
semi: ["error", "always"],
"no-console": ["warn"],
"no-constant-condition": ["warn"],
"curly": ["error", "all"],
curly: ["error", "all"],
"brace-style": [
"error",
"1tbs",
{
"allowSingleLine": false
}
allowSingleLine: false,
},
],
"keyword-spacing": [
"error",
{
"before": true,
"after": true
}
before: true,
after: true,
},
],
"object-curly-spacing": ["error", "always"],
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
Expand All @@ -113,6 +110,6 @@ module.exports = {
"jsdoc/require-returns-description": 1,
"jsdoc/require-returns-type": 1,
"jsdoc/require-returns-check": 1,
"jsdoc/require-hyphen-before-param-description": 1
}
"jsdoc/require-hyphen-before-param-description": 1,
},
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ npm-debug.log
#######
/app/configs/config.js
/app/configs/config.ts
/app/configs/config.json
/extra
/dist
/build
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"bracketSpacing": true,
"printWidth": 160,
"printWidth": 120,
"semi": true,
"singleQuote": false,
"tabWidth": 4,
Expand Down
10 changes: 9 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
{
"recommendations": ["svelte.svelte-vscode", "esbenp.prettier-vscode", "dbaeumer.vscode-eslint", "gruntfuggly.todo-tree", "nickdodd79.gulptasks"]
"recommendations": [
"ptkdev.dark-blood-theme",
"naumovs.color-highlight",
"svelte.svelte-vscode",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"gruntfuggly.todo-tree",
"nickdodd79.gulptasks"
]
}
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
},
"eslint.format.enable": true,
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
Expand Down
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# v1.0.20210412 (April 12, 2021)
# v1.0.20211120 (November 20, 2021)

- Fix: minor fix
- Fix: readme of issues
- Porting: Cordova v10.0.0

<!-- all-shields/sponsors-badges:START -->

[![Donate Paypal](https://img.shields.io/badge/donate-paypal-005EA6.svg?style=for-the-badge&logo=paypal)](https://www.paypal.me/ptkdev) [![Donate Ko-Fi](https://img.shields.io/badge/donate-ko--fi-29abe0.svg?style=for-the-badge&logo=ko-fi)](https://ko-fi.com/ptkdev) [![Donate Github Sponsors](https://img.shields.io/badge/donate-sponsors-ea4aaa.svg?style=for-the-badge&logo=github)](https://github.com/sponsors/ptkdev) [![Donate Patreon](https://img.shields.io/badge/donate-patreon-F87668.svg?style=for-the-badge&logo=patreon)](https://www.patreon.com/join/ptkdev) [![Donate Bitcoin](https://img.shields.io/badge/BTC-35jQmZCy4nsxoMM3QPFrnZePDVhdKaHMRH-E38B29.svg?style=flat-square&logo=bitcoin)](https://ptk.dev/img/icons/menu/bitcoin_wallet.png) [![Donate Ethereum](https://img.shields.io/badge/ETH-0x8b8171661bEb032828e82baBb0B5B98Ba8fBEBFc-4E8EE9.svg?style=flat-square&logo=ethereum)](https://ptk.dev/img/icons/menu/ethereum_wallet.png)

<!-- all-shields/sponsors-badges:END -->

# v1.0.20210412 (April 12, 2021)

- Fix: minor fix
- Fix: readme of issues

# v1.0.20210407 (April 07, 2021)

- First release
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- all-shields/header-badges:START -->

[![v1.0.20210412](https://img.shields.io/badge/version-v1.0.20210412-lightgray.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate/svelte-cordova-boilerplate/blob/main/CHANGELOG.md) [![](https://img.shields.io/npm/v/@ptkdev/svelte-cordova-boilerplate?color=CC3534&logo=npm)](https://www.npmjs.com/package/@ptkdev/svelte-cordova-boilerplate) [![License: MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat&logo=license)](https://github.com/ptkdev-boilerplate/svelte-cordova-boilerplate/blob/main/LICENSE.md) [![Powered By Svelte](https://img.shields.io/badge/powered%20by-svelte-FF3C02.svg?style=flat&logo=svelte)](https://svelte.dev/) [![Powered By Cordova](https://img.shields.io/badge/powered%20by-cordova-4CC2E4.svg?style=flat&logo=apachecordova)](https://cordova.apache.org/) [![Language: TypeScript](https://img.shields.io/badge/language-typescript-blue.svg?style=flat&logo=typescript)](https://www.typescriptlang.org/) [![ECMAScript: 2019](https://img.shields.io/badge/ES-9-F7DF1E.svg?style=flat&logo=javascript)](https://github.com/tc39/ecma262) [![Discord Server](https://discordapp.com/api/guilds/383373985666301975/embed.png)](https://discord.ptkdev.io)
[![v1.0.20211120](https://img.shields.io/badge/version-v1.0.20211120-lightgray.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate/svelte-cordova-boilerplate/blob/main/CHANGELOG.md) [![](https://img.shields.io/npm/v/@ptkdev/svelte-cordova-boilerplate?color=CC3534&logo=npm)](https://www.npmjs.com/package/@ptkdev/svelte-cordova-boilerplate) [![License: MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat&logo=license)](https://github.com/ptkdev-boilerplate/svelte-cordova-boilerplate/blob/main/LICENSE.md) [![Powered By Svelte](https://img.shields.io/badge/powered%20by-svelte-FF3C02.svg?style=flat&logo=svelte)](https://svelte.dev/) [![Powered By Cordova](https://img.shields.io/badge/powered%20by-cordova-4CC2E4.svg?style=flat&logo=apache-cordova)](https://cordova.apache.org/) [![Language: TypeScript](https://img.shields.io/badge/language-typescript-blue.svg?style=flat&logo=typescript)](https://www.typescriptlang.org/) [![ECMAScript: 2019](https://img.shields.io/badge/ES-9-F7DF1E.svg?style=flat&logo=javascript)](https://github.com/tc39/ecma262) [![Discord Server](https://discordapp.com/api/guilds/383373985666301975/embed.png)](https://discord.ptkdev.io)

<!-- all-shields/header-badges:END -->

Expand Down Expand Up @@ -112,25 +112,25 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d

<!-- all-shields/projects-badges1:START -->

[![](https://img.shields.io/badge/💻%20My-Portfolio-3498db.svg?style=flat&logo=)](https://ptk.dev/)
[![](https://img.shields.io/badge/%F0%9F%92%BB%20My-Portfolio-3498db.svg?style=flat&logo=)](https://ptk.dev/)

<!-- all-shields/projects-badges1:END -->

<!-- all-shields/projects-badges2:START -->

[![](https://img.shields.io/badge/🦒%20Tools-Node%20Logger-9b59b6.svg?style=flat&logo=)](https://github.com/ptkdev/ptkdev-logger) [![](https://img.shields.io/badge/🦌%20Tools-All%20Shields%20CLI-9b59b6.svg?style=flat&logo=)](https://github.com/ptkdev/all-shields-cli) [![](https://img.shields.io/badge/🖥️%20Tools-Aspect%20Ratio%2021:9-9b59b6.svg?style=flat&logo=)](https://github.com/ptkdev/chrome-extension-aspectratio219) [![](https://img.shields.io/badge/🛡%20Tools-Badges:%20Available%20on-9b59b6.svg?style=flat&logo=)](https://availableon.badge.ptkdev.io/) [![](https://img.shields.io/badge/🐾%20Tools-JSON%20Token%20Replace-9b59b6.svg?style=flat&logo=)](https://github.com/ptkdev/json-token-replace) [![](https://img.shields.io/badge/🐍%20Tools-ESLint:%20snakecasejs-9b59b6.svg?style=flat&logo=)](https://github.com/ptkdev/eslint-plugin-snakecasejs)
[![](https://img.shields.io/badge/%F0%9F%A6%92%20Tools-Node%20Logger-9b59b6.svg?style=flat&logo=)](https://github.com/ptkdev/ptkdev-logger) [![](https://img.shields.io/badge/%F0%9F%A6%8C%20Tools-All%20Shields%20CLI-9b59b6.svg?style=flat&logo=)](https://github.com/ptkdev/all-shields-cli) [![](https://img.shields.io/badge/%F0%9F%96%A5%EF%B8%8F%20Tools-Aspect%20Ratio%2021%3A9-9b59b6.svg?style=flat&logo=)](https://github.com/ptkdev/chrome-extension-aspectratio219) [![](https://img.shields.io/badge/%F0%9F%9B%A1%20Tools-Badges%3A%20Available%20on-9b59b6.svg?style=flat&logo=)](https://availableon.badge.ptkdev.io/) [![](https://img.shields.io/badge/%F0%9F%90%BE%20Tools-JSON%20Token%20Replace-9b59b6.svg?style=flat&logo=)](https://github.com/ptkdev/json-token-replace) [![](https://img.shields.io/badge/%F0%9F%90%8D%20Tools-ESLint%3A%20snakecasejs-9b59b6.svg?style=flat&logo=)](https://github.com/ptkdev/eslint-plugin-snakecasejs)

<!-- all-shields/projects-badges2:END -->

<!-- all-shields/projects-badges3:START -->

[![](https://img.shields.io/badge/📸%20WebComponent-Instagram%20Widget-e74c3c.svg?style=flat&logo=)](https://github.com/ptkdev-components/webcomponent-instagram-widget) [![](https://img.shields.io/badge/👑%20WebComponent-My%20Patreon%20Box-e74c3c.svg?style=flat&logo=)](https://github.com/ptkdev-components/webcomponent-patreon-box) [![](https://img.shields.io/badge/🏞%20WebComponent-Carousel%20Slideshow-e74c3c.svg?style=flat&logo=)](https://github.com/ptkdev-components/webcomponent-carousel-slideshow)
[![](https://img.shields.io/badge/%F0%9F%93%B8%20WebComponent-Instagram%20Widget-e74c3c.svg?style=flat&logo=)](https://github.com/ptkdev-components/webcomponent-instagram-widget) [![](https://img.shields.io/badge/%F0%9F%91%91%20WebComponent-My%20Patreon%20Box-e74c3c.svg?style=flat&logo=)](https://github.com/ptkdev-components/webcomponent-patreon-box) [![](https://img.shields.io/badge/%F0%9F%8F%9E%20WebComponent-Carousel%20Slideshow-e74c3c.svg?style=flat&logo=)](https://github.com/ptkdev-components/webcomponent-carousel-slideshow)

<!-- all-shields/projects-badges3:END -->

<!-- all-shields/projects-badges4:START -->

[![](https://img.shields.io/badge/🎨%20Themes-VSCode-f1c40f.svg?style=flat&logo=)](https://github.com/ptkdev/vscode-theme-dark-blood) [![](https://img.shields.io/badge/📚%20Bot-GameBookChat-34495e.svg?style=flat&logo=)](https://t.me/gamebookchatbot) [![](https://img.shields.io/badge/👔%20Boilerplate-Svelte-f368e0.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate?q=svelte) [![](https://img.shields.io/badge/👔%20Boilerplate-WebComponents-f368e0.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate?q=webcomponent) [![](https://img.shields.io/badge/👔%20Boilerplate-BOT-f368e0.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate?q=bot) [![](https://img.shields.io/badge/👔%20Boilerplate-Node-f368e0.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate?q=node) [![](https://img.shields.io/badge/💅%20App-Me%20in%20Gifs-2ecc71.svg?style=flat&logo=)](https://meingifs.pics/) [![](https://img.shields.io/badge/📱%20App-Stickers-2ecc71.svg?style=flat&logo=)](https://github.com/ptkdev/ptkdev-stickers#-install-free)
[![](https://img.shields.io/badge/%F0%9F%8E%A8%20Themes-VSCode-f1c40f.svg?style=flat&logo=)](https://github.com/ptkdev/vscode-theme-dark-blood) [![](https://img.shields.io/badge/%F0%9F%93%9A%20Bot-GameBookChat-34495e.svg?style=flat&logo=)](https://t.me/gamebookchatbot) [![](https://img.shields.io/badge/%F0%9F%91%94%20Boilerplate-Svelte-f368e0.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate?q=svelte) [![](https://img.shields.io/badge/%F0%9F%91%94%20Boilerplate-WebComponents-f368e0.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate?q=webcomponent) [![](https://img.shields.io/badge/%F0%9F%91%94%20Boilerplate-BOT-f368e0.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate?q=bot) [![](https://img.shields.io/badge/%F0%9F%91%94%20Boilerplate-Node-f368e0.svg?style=flat&logo=)](https://github.com/ptkdev-boilerplate?q=node) [![](https://img.shields.io/badge/%F0%9F%92%85%20App-Me%20in%20Gifs-2ecc71.svg?style=flat&logo=)](https://meingifs.pics/) [![](https://img.shields.io/badge/%F0%9F%93%B1%20App-Stickers-2ecc71.svg?style=flat&logo=)](https://github.com/ptkdev/ptkdev-stickers#-install-free)

<!-- all-shields/projects-badges4:END -->

Expand Down
18 changes: 11 additions & 7 deletions app/components/common/darkmode/darkmode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ let darkmode = false;
*
*/
const darkModeToggle = (): boolean => {
if (document.querySelector("html").classList.contains("darkmode")) {
if (document.querySelector("html")?.classList.contains("darkmode")) {
darkmode = false;
} else {
darkmode = true;
}

document.querySelector("html").classList.toggle("darkmode");
document.querySelector("body").classList.toggle("darkmode");
document.querySelector("html")?.classList.toggle("darkmode");
document.querySelector("body")?.classList.toggle("darkmode");

window.localStorage.setItem("darkmode", darkmode ? "enabled" : "disabled");

Expand All @@ -41,10 +41,14 @@ const darkModeToggle = (): boolean => {
*
*/
const darkModeDetect = (): boolean => {
if (window.localStorage.getItem("darkmode") === "enabled" || (window.localStorage.getItem("darkmode") === undefined && window?.matchMedia("(prefers-color-scheme: dark)").matches)) {
if (!document.querySelector("html").classList.contains("darkmode")) {
document.querySelector("html").classList.add("darkmode");
document.querySelector("body").classList.add("darkmode");
if (
window.localStorage.getItem("darkmode") === "enabled" ||
(window.localStorage.getItem("darkmode") === undefined &&
window?.matchMedia("(prefers-color-scheme: dark)").matches)
) {
if (!document.querySelector("html")?.classList.contains("darkmode")) {
document.querySelector("html")?.classList.add("darkmode");
document.querySelector("body")?.classList.add("darkmode");
}

return true;
Expand Down
2 changes: 1 addition & 1 deletion app/components/common/footer/footer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* @license: MIT License
*
*/
export { };
export {};
2 changes: 1 addition & 1 deletion app/components/common/menu/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* @license: MIT License
*
*/
export { };
export {};
2 changes: 1 addition & 1 deletion app/pages/404/404.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
* @license: MIT License
*
*/
export { };
export {};
2 changes: 1 addition & 1 deletion app/pages/home/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
* @license: MIT License
*
*/
export { };
export {};
2 changes: 1 addition & 1 deletion app/pages/index/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
* @license: MIT License
*
*/
export { };
export {};
2 changes: 1 addition & 1 deletion app/pages/offline/offline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* @license: MIT License
*
*/
export { };
export {};
2 changes: 1 addition & 1 deletion app/pages/wild/wild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
* @license: MIT License
*
*/
export { };
export {};
2 changes: 1 addition & 1 deletion app/types/global.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
*
*/

export { };
export {};
2 changes: 2 additions & 0 deletions config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<engine name="ios" spec="~4.5.5" />
<engine name="android" spec="~6.3.0" />
</widget>
5 changes: 2 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ module.exports = {
testEnvironment: "jsdom",
globals: {
"ts-jest": {
"tsconfig": "tsconfig.json",
"compiler": "ttypescript"
}
tsconfig: "tsconfig.json",
},
},
};
Loading

0 comments on commit 0cedcce

Please sign in to comment.