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() {
{webviewPackageName}
- +
Official webpage -
https://acode.app
+
{constants.WEBSITE_URL}
- +
Foxbiz Software Pvt. Ltd. -
https://www.foxbiz.io
+
{constants.FOXBIZ_URL}
@@ -68,34 +69,31 @@ export default function AboutInclude() { Mail - +
Twitter
- +
Instagram
- +
GitHub
- +
Telegram
- +
diff --git a/src/pages/welcome/index.js b/src/pages/welcome/index.js new file mode 100644 index 000000000..4fd02fcb4 --- /dev/null +++ b/src/pages/welcome/index.js @@ -0,0 +1 @@ +export { default } from "./welcome"; diff --git a/src/pages/welcome/welcome.js b/src/pages/welcome/welcome.js new file mode 100644 index 000000000..53972af1b --- /dev/null +++ b/src/pages/welcome/welcome.js @@ -0,0 +1,173 @@ +import "./welcome.scss"; +import Logo from "components/logo"; +import actionStack from "lib/actionStack"; +import constants from "lib/constants"; +import EditorFile from "lib/editorFile"; + +/** + * Opens the Welcome tab as an EditorFile page + */ +export default function openWelcomeTab() { + // Check if welcome tab is already open + const existingFile = editorManager.files.find((f) => f.id === "welcome-tab"); + if (existingFile) { + existingFile.makeActive(); + return; + } + + const welcomeContent = createWelcomeContent(); + + const welcomeFile = new EditorFile("Welcome", { + id: "welcome-tab", + render: true, + type: "page", + content: welcomeContent, + tabIcon: "icon acode", + hideQuickTools: true, + }); + + // Set custom subtitle for the header + welcomeFile.setCustomTitle(() => "Get Started"); + + actionStack.push({ + id: "welcome-tab", + action: () => welcomeFile.remove(), + }); +} + +/** + * Creates the welcome tab content + * @returns {HTMLElement} + */ +function createWelcomeContent() { + return ( +
+ {/* Hero Section */} +
+ +
+

Welcome to Acode

+

Powerful code editor for Android

+
+
+ + {/* Get Started Section */} +
+

GET STARTED

+
+ acode.exec("new-file")} + /> + acode.exec("open-folder")} + /> + acode.exec("recent")} + /> + acode.exec("command-palette")} + /> +
+
+ + {/* Configure Section */} +
+

CONFIGURE

+
+ acode.exec("open", "settings")} + /> + acode.exec("change-app-theme")} + /> + acode.exec("open", "plugins")} + /> +
+
+ + {/* Learn Section */} +
+

LEARN

+
+ acode.exec("open", "help")} + /> + acode.exec("open", "about")} + /> +
+
+ + {/* Links Section */} +
+

CONNECT

+
+ + + + +
+
+
+ ); +} + +/** + * Action row component + */ +function ActionRow({ icon, label, shortcut, onClick }) { + return ( +
+ + {label} + {shortcut && {shortcut}} +
+ ); +} + +/** + * Link item component - opens URL in external browser + */ +function LinkItem({ icon, label, url }) { + const handleClick = (e) => { + e.preventDefault(); + system.openInBrowser(url); + }; + + return ( +
+ + {label} + + ); +} diff --git a/src/pages/welcome/welcome.scss b/src/pages/welcome/welcome.scss new file mode 100644 index 000000000..ae94a415d --- /dev/null +++ b/src/pages/welcome/welcome.scss @@ -0,0 +1,224 @@ +#welcome-tab { + display: flex; + flex-direction: column; + align-items: center; + justify-content: flex-start; + min-height: 100%; + height: auto; + padding: 32px 24px; + overflow-y: auto; + overflow-x: hidden; + background-color: var(--secondary-color); + + // Hero Header + .welcome-header { + display: flex; + align-items: center; + gap: 16px; + margin-bottom: 48px; + + .logo { + width: 64px; + height: 64px; + flex-shrink: 0; + + &::after { + background-size: 48px; + } + + &::before { + background: radial-gradient(circle, + color-mix(in srgb, var(--button-background-color) 30%, transparent) 0%, + transparent 70%); + } + } + + .welcome-header-text { + h1 { + font-size: 20px; + font-weight: 600; + color: var(--primary-text-color); + margin: 0 0 4px 0; + letter-spacing: -0.3px; + } + + .tagline { + font-size: 13px; + color: color-mix(in srgb, var(--secondary-text-color) 60%, transparent); + margin: 0; + } + } + } + + // Section Styles + .welcome-section { + width: 100%; + max-width: 400px; + margin-bottom: 32px; + + .section-label { + font-size: 11px; + font-weight: 600; + letter-spacing: 1px; + color: color-mix(in srgb, var(--secondary-text-color) 50%, transparent); + margin: 0 0 12px 0; + padding-left: 4px; + } + } + + // Action List + .action-list { + display: flex; + flex-direction: column; + gap: 2px; + } + + .action-row { + display: flex; + align-items: center; + gap: 12px; + padding: 10px 12px; + border-radius: 6px; + cursor: pointer; + transition: background-color 0.15s ease; + + &:hover, + &:active { + background-color: color-mix(in srgb, var(--popup-background-color) 40%, transparent); + } + + .icon { + font-size: 16px; + color: color-mix(in srgb, var(--secondary-text-color) 70%, transparent); + width: 20px; + text-align: center; + } + + .action-label { + flex: 1; + font-size: 14px; + color: var(--secondary-text-color); + } + + .action-shortcut { + font-size: 12px; + font-family: 'Roboto Mono', monospace; + color: color-mix(in srgb, var(--secondary-text-color) 40%, transparent); + letter-spacing: 0.5px; + } + } + + // Links Section + .welcome-links { + margin-top: 16px; + + .link-row { + display: flex; + flex-wrap: wrap; + gap: 8px; + justify-content: flex-start; + } + + .link-item { + display: inline-flex; + align-items: center; + gap: 8px; + padding: 10px 16px; + border-radius: 8px; + text-decoration: none; + color: var(--secondary-text-color); + font-size: 13px; + font-weight: 500; + transition: all 0.15s ease; + background-color: color-mix(in srgb, var(--popup-background-color) 25%, transparent); + border: 1px solid color-mix(in srgb, var(--border-color) 20%, transparent); + + &:hover, + &:active { + background-color: color-mix(in srgb, var(--popup-background-color) 50%, transparent); + border-color: color-mix(in srgb, var(--border-color) 40%, transparent); + transform: translateY(-1px); + } + + .icon { + font-size: 16px; + color: color-mix(in srgb, var(--secondary-text-color) 80%, transparent); + } + } + } +} + +// Responsive adjustments for smaller screens +@media (max-width: 360px) { + #welcome-tab { + padding: 24px 16px; + + .welcome-header { + flex-direction: column; + text-align: center; + margin-bottom: 36px; + + .logo { + width: 56px; + height: 56px; + + &::after { + background-size: 40px; + } + } + + .welcome-header-text h1 { + font-size: 18px; + } + } + + .welcome-section { + margin-bottom: 24px; + } + + .action-row { + padding: 8px 10px; + + .action-label { + font-size: 13px; + } + + .action-shortcut { + font-size: 11px; + } + } + + .welcome-links .link-row { + justify-content: center; + } + } +} + +// Larger screens - center content better +@media (min-width: 600px) { + #welcome-tab { + .welcome-section { + max-width: 480px; + } + + .action-row { + padding: 12px 16px; + } + } +} + +// Discord icon +.icon.discord { + position: relative; + + &::before { + content: ''; + display: block; + width: 16px; + height: 16px; + background-image: url(../../pages/about/discord.svg); + background-size: contain; + background-repeat: no-repeat; + background-position: center; + } +} \ No newline at end of file diff --git a/src/settings/helpSettings.js b/src/settings/helpSettings.js index 56b009bb7..5263ae65a 100644 --- a/src/settings/helpSettings.js +++ b/src/settings/helpSettings.js @@ -1,22 +1,28 @@ import settingsPage from "components/settingsPage"; +import constants from "lib/constants"; export default function help() { const title = strings.help; const items = [ + { + key: "docs", + text: strings.documentation, + link: constants.DOCS_URL, + }, { key: "help", text: strings.help, - link: "https://telegram.me/foxdebug_acode", + link: constants.TELEGRAM_URL, }, { key: "faqs", text: strings.faqs, - link: "https://acode.app/faqs", + link: `${constants.WEBSITE_URL}/faqs`, }, { key: "bug_report", text: strings.bug_report, - link: "https://github.com/deadlyjack/Acode/issues", + link: `${constants.GITHUB_URL}/issues`, }, ];