diff --git a/src/ace/commands.js b/src/ace/commands.js index 8f8f0047d..e917fd847 100644 --- a/src/ace/commands.js +++ b/src/ace/commands.js @@ -349,6 +349,14 @@ const commands = [ }, readOnly: true, }, + { + name: "acode:showWelcome", + description: "Show Welcome", + exec() { + acode.exec("welcome"); + }, + readOnly: true, + }, ]; export function setCommands(editor) { diff --git a/src/handlers/quickTools.js b/src/handlers/quickTools.js index 8b86cc887..6d95b134d 100644 --- a/src/handlers/quickTools.js +++ b/src/handlers/quickTools.js @@ -361,7 +361,13 @@ function toggle() { function setHeight(height = 1, save = true) { const { $footer, $row1, $row2 } = quickTools; - const { editor } = editorManager; + const { editor, activeFile } = editorManager; + + // If active file has hideQuickTools, force height to 0 and don't save + if (activeFile?.hideQuickTools) { + height = 0; + save = false; + } setFooterHeight(height); if (save) { diff --git a/src/lang/ar-ye.json b/src/lang/ar-ye.json index 0d438e90b..15fd059b9 100644 --- a/src/lang/ar-ye.json +++ b/src/lang/ar-ye.json @@ -489,5 +489,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/be-by.json b/src/lang/be-by.json index a5d332699..28e72d2d2 100644 --- a/src/lang/be-by.json +++ b/src/lang/be-by.json @@ -490,5 +490,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/bn-bd.json b/src/lang/bn-bd.json index 95d8086b2..f4a3153b8 100644 --- a/src/lang/bn-bd.json +++ b/src/lang/bn-bd.json @@ -489,5 +489,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/cs-cz.json b/src/lang/cs-cz.json index 518986169..d10be055d 100644 --- a/src/lang/cs-cz.json +++ b/src/lang/cs-cz.json @@ -489,5 +489,9 @@ "issues found": "Nalezené problémy", "error details": "Podrobnosti o chybě", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/de-de.json b/src/lang/de-de.json index d80e531c6..63bb34ff7 100644 --- a/src/lang/de-de.json +++ b/src/lang/de-de.json @@ -489,5 +489,9 @@ "issues found": "Gefundene Probleme", "error details": "Fehlerdetails", "active tools": "Aktive Tools", - "available tools": "Verfügbare Tools" + "available tools": "Verfügbare Tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/en-us.json b/src/lang/en-us.json index 0298be386..ab7aa23dc 100644 --- a/src/lang/en-us.json +++ b/src/lang/en-us.json @@ -489,5 +489,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/es-sv.json b/src/lang/es-sv.json index 7e8307fc7..4a6d0501b 100644 --- a/src/lang/es-sv.json +++ b/src/lang/es-sv.json @@ -489,5 +489,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/fr-fr.json b/src/lang/fr-fr.json index 3496cba20..3ada6f3cb 100644 --- a/src/lang/fr-fr.json +++ b/src/lang/fr-fr.json @@ -489,5 +489,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/he-il.json b/src/lang/he-il.json index f62b5a376..6b91116cb 100644 --- a/src/lang/he-il.json +++ b/src/lang/he-il.json @@ -490,5 +490,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/hi-in.json b/src/lang/hi-in.json index 240a114b9..381ab2ea7 100644 --- a/src/lang/hi-in.json +++ b/src/lang/hi-in.json @@ -490,5 +490,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/hu-hu.json b/src/lang/hu-hu.json index 1804583c1..155566d6e 100644 --- a/src/lang/hu-hu.json +++ b/src/lang/hu-hu.json @@ -489,5 +489,9 @@ "issues found": "Problémák találhatók", "error details": "Hiba részletei", "active tools": "Aktív eszközök", - "available tools": "Elérhető eszközök" + "available tools": "Elérhető eszközök", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/id-id.json b/src/lang/id-id.json index c447d0915..9c12bf109 100644 --- a/src/lang/id-id.json +++ b/src/lang/id-id.json @@ -490,5 +490,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/ir-fa.json b/src/lang/ir-fa.json index fcc3340c0..ec018cbb6 100644 --- a/src/lang/ir-fa.json +++ b/src/lang/ir-fa.json @@ -490,5 +490,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/it-it.json b/src/lang/it-it.json index 84ba1daec..59b19e238 100644 --- a/src/lang/it-it.json +++ b/src/lang/it-it.json @@ -489,5 +489,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/ja-jp.json b/src/lang/ja-jp.json index 0abb0e59f..0d2aaf5f2 100644 --- a/src/lang/ja-jp.json +++ b/src/lang/ja-jp.json @@ -489,5 +489,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/ko-kr.json b/src/lang/ko-kr.json index 0c2fbec45..383aa081a 100644 --- a/src/lang/ko-kr.json +++ b/src/lang/ko-kr.json @@ -489,5 +489,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/ml-in.json b/src/lang/ml-in.json index 0c2c8ebb8..b528b78ee 100644 --- a/src/lang/ml-in.json +++ b/src/lang/ml-in.json @@ -489,5 +489,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/mm-unicode.json b/src/lang/mm-unicode.json index 8e9aeedad..b69a6c4a8 100644 --- a/src/lang/mm-unicode.json +++ b/src/lang/mm-unicode.json @@ -489,5 +489,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/mm-zawgyi.json b/src/lang/mm-zawgyi.json index b22ebf425..d32917c69 100644 --- a/src/lang/mm-zawgyi.json +++ b/src/lang/mm-zawgyi.json @@ -489,5 +489,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/pl-pl.json b/src/lang/pl-pl.json index 6ec2c2bb5..03258cb54 100644 --- a/src/lang/pl-pl.json +++ b/src/lang/pl-pl.json @@ -489,5 +489,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/pt-br.json b/src/lang/pt-br.json index 31260eb89..e168eee70 100644 --- a/src/lang/pt-br.json +++ b/src/lang/pt-br.json @@ -489,5 +489,9 @@ "issues found": "Problemas encontrados", "error details": "Detalhes do erro", "active tools": "Ferramentas ativas", - "available tools": "Ferramentas disponíveis" + "available tools": "Ferramentas disponíveis", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/pu-in.json b/src/lang/pu-in.json index 0f6964396..21212aff6 100644 --- a/src/lang/pu-in.json +++ b/src/lang/pu-in.json @@ -489,5 +489,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/ru-ru.json b/src/lang/ru-ru.json index 0ef4ad23a..b18c7f9bc 100644 --- a/src/lang/ru-ru.json +++ b/src/lang/ru-ru.json @@ -489,5 +489,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/tl-ph.json b/src/lang/tl-ph.json index 8fcf73751..f7ac70075 100644 --- a/src/lang/tl-ph.json +++ b/src/lang/tl-ph.json @@ -489,5 +489,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/tr-tr.json b/src/lang/tr-tr.json index 98ea05edd..31f6abb91 100644 --- a/src/lang/tr-tr.json +++ b/src/lang/tr-tr.json @@ -489,5 +489,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/uk-ua.json b/src/lang/uk-ua.json index 259a22b1d..f88f880e8 100644 --- a/src/lang/uk-ua.json +++ b/src/lang/uk-ua.json @@ -489,5 +489,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/uz-uz.json b/src/lang/uz-uz.json index 04b020051..5523589b9 100644 --- a/src/lang/uz-uz.json +++ b/src/lang/uz-uz.json @@ -489,5 +489,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/vi-vn.json b/src/lang/vi-vn.json index fad4d1d60..b321447d4 100644 --- a/src/lang/vi-vn.json +++ b/src/lang/vi-vn.json @@ -490,5 +490,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/zh-cn.json b/src/lang/zh-cn.json index b3c7f5244..f7942af7d 100644 --- a/src/lang/zh-cn.json +++ b/src/lang/zh-cn.json @@ -489,5 +489,9 @@ "issues found": "出现问题", "error details": "详细错误信息", "active tools": "已启用工具", - "available tools": "可用的工具" + "available tools": "可用的工具", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/zh-hant.json b/src/lang/zh-hant.json index 13a86e5a8..595ff6e0d 100644 --- a/src/lang/zh-hant.json +++ b/src/lang/zh-hant.json @@ -489,5 +489,9 @@ "issues found": "發現問題", "error details": "詳細錯誤資訊", "active tools": "已啟用工具", - "available tools": "可用的工具" + "available tools": "可用的工具", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lang/zh-tw.json b/src/lang/zh-tw.json index 19b3fda1e..dea6c1133 100644 --- a/src/lang/zh-tw.json +++ b/src/lang/zh-tw.json @@ -489,5 +489,9 @@ "issues found": "Issues found", "error details": "Error details", "active tools": "Active tools", - "available tools": "Available tools" + "available tools": "Available tools", + "recent": "Recent Files", + "command palette": "Open Command Palette", + "change theme": "Change Theme", + "documentation": "Documentation" } diff --git a/src/lib/commands.js b/src/lib/commands.js index 8f70ba391..8e01e4583 100644 --- a/src/lib/commands.js +++ b/src/lib/commands.js @@ -7,9 +7,11 @@ import prompt from "dialogs/prompt"; import select from "dialogs/select"; import actions from "handlers/quickTools"; import recents from "lib/recents"; +import About from "pages/about"; import FileBrowser from "pages/fileBrowser"; import plugins from "pages/plugins"; import Problems from "pages/problems/problems"; +import openWelcomeTab from "pages/welcome/welcome"; import changeEncoding from "palettes/changeEncoding"; import changeMode from "palettes/changeMode"; import changeTheme from "palettes/changeTheme"; @@ -188,6 +190,10 @@ export default { FileBrowser(); break; + case "about": + About(); + break; + default: return; } @@ -474,4 +480,7 @@ Additional Info: window.toast("Failed to create terminal"); } }, + welcome() { + openWelcomeTab(); + }, }; diff --git a/src/lib/constants.js b/src/lib/constants.js index 85b2ede0e..f1315999a 100644 --- a/src/lib/constants.js +++ b/src/lib/constants.js @@ -23,4 +23,14 @@ export default { // API_BASE: 'https://192.168.0.102:3001/api', // test api SKU_LIST: ["crystal", "bronze", "silver", "gold", "platinum", "titanium"], LOG_FILE_NAME: "Acode.log", + + // Social Links + DOCS_URL: "https://docs.acode.app", + WEBSITE_URL: "https://acode.app", + GITHUB_URL: "https://github.com/Acode-Foundation/Acode", + TELEGRAM_URL: "https://t.me/foxdebug_acode", + DISCORD_URL: "https://discord.gg/nDqZsh7Rqz", + TWITTER_URL: "https://x.com/foxbiz_io", + INSTAGRAM_URL: "https://www.instagram.com/foxbiz.io/", + FOXBIZ_URL: "https://foxbiz.io", }; diff --git a/src/lib/editorFile.js b/src/lib/editorFile.js index 71cbbabac..8f3d82111 100644 --- a/src/lib/editorFile.js +++ b/src/lib/editorFile.js @@ -4,6 +4,7 @@ import tile from "components/tile"; import confirm from "dialogs/confirm"; import DOMPurify from "dompurify"; import startDrag from "handlers/editorFileTab"; +import actions from "handlers/quickTools"; import tag from "html-tag-js"; import mimeTypes from "mime-types"; import helpers from "utils/helpers"; @@ -815,6 +816,19 @@ export default class EditorFile { this.#loadText(); } + // Handle quicktools visibility based on hideQuickTools property + if (this.hideQuickTools) { + root.classList.add("hide-floating-button"); + actions("set-height", { height: 0, save: false }); + } else { + root.classList.remove("hide-floating-button"); + const quickToolsHeight = + appSettings.value.quickTools !== undefined + ? appSettings.value.quickTools + : 1; + actions("set-height", { height: quickToolsHeight, save: false }); + } + editorManager.header.subText = this.#getTitle(); this.#emit("focus", createFileEvent(this)); diff --git a/src/lib/editorManager.js b/src/lib/editorManager.js index af13262f6..87ec6aab7 100644 --- a/src/lib/editorManager.js +++ b/src/lib/editorManager.js @@ -7,7 +7,6 @@ import quickTools from "components/quickTools"; import ScrollBar from "components/scrollbar"; import SideButton, { sideButtonContainer } from "components/sideButton"; import keyboardHandler, { keydownState } from "handlers/keyboard"; -import actions from "handlers/quickTools"; import EditorFile from "./editorFile"; import appSettings from "./settings"; import { @@ -672,18 +671,6 @@ async function EditorManager($header, $body) { file.tab.classList.add("active"); file.tab.scrollIntoView(); - if (file?.hideQuickTools) { - root.classList.add("hide-floating-button"); - actions("set-height", { height: 0, save: false }); - } else { - root.classList.remove("hide-floating-button"); - const quickToolsHeight = - appSettings.value.quickTools !== undefined - ? appSettings.value.quickTools - : 1; - actions("set-height", { height: quickToolsHeight, save: true }); - } - $header.text = file.filename; $header.subText = file.headerSubtitle || ""; manager.onupdate("switch-file"); diff --git a/src/main.js b/src/main.js index a7e9ac81e..50a176d18 100644 --- a/src/main.js +++ b/src/main.js @@ -45,6 +45,7 @@ import settings from "lib/settings"; import startAd from "lib/startAd"; import mustache from "mustache"; import plugins from "pages/plugins"; +import openWelcomeTab from "pages/welcome"; import otherSettings from "settings/appSettings"; import themes from "theme/list"; import { getEncoding, initEncodings } from "utils/encodings"; @@ -474,7 +475,13 @@ async function loadApp() { window.log("info", "Started app and its services..."); - new EditorFile(); + // Show welcome tab on first launch, otherwise create default file + const isFirstLaunch = Number.isNaN(previousVersionCode); + if (isFirstLaunch) { + openWelcomeTab(); + } else { + new EditorFile(); + } // load theme plugins try { diff --git a/src/pages/about/about.js b/src/pages/about/about.js index 94383db0a..cb6a6b5c4 100644 --- a/src/pages/about/about.js +++ b/src/pages/about/about.js @@ -3,6 +3,7 @@ import Logo from "components/logo"; import Page from "components/page"; import Reactive from "html-tag-js/reactive"; import actionStack from "lib/actionStack"; +import constants from "lib/constants"; import helpers from "utils/helpers"; export default function AboutInclude() { @@ -41,22 +42,22 @@ export default function AboutInclude() {
Powerful code editor for Android
+