From 4a5d689af71dd51f0d4926ba5affcf2b5f200958 Mon Sep 17 00:00:00 2001 From: Juan Castro Date: Tue, 25 Aug 2026 10:49:59 -0400 Subject: [PATCH] refactor: rename GUI helper files to camelCase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit src/gui/src/helpers was mostly snake_case, disagreeing with itself and with the camelCase file convention in AGENTS.md. Rename the 45 offenders with git mv and repoint every import specifier at the new paths. Files only — exported symbols are unchanged. applyItemAddedToContainers.js still exports apply_item_added_to_containers and no call site is edited beyond its import line; those identifiers cross module boundaries and some hang off window, so renaming them is a separate, riskier change. --- src/backend/drivers/apps/AppDriver.js | 2 +- src/gui/src/IPC.js | 4 +-- src/gui/src/UI/Dashboard/TabApps.js | 6 ++--- src/gui/src/UI/Dashboard/TabFiles.js | 26 +++++++++---------- src/gui/src/UI/Dashboard/UIDashboard.js | 4 +-- .../src/UI/Dashboard/UIItemPropertiesModal.js | 2 +- src/gui/src/UI/Dashboard/UIShareModal.js | 8 +++--- src/gui/src/UI/UIDesktop.js | 16 ++++++------ src/gui/src/UI/UIItem.js | 12 ++++----- src/gui/src/UI/UITaskbar.js | 2 +- src/gui/src/UI/UITaskbarItem.js | 4 +-- src/gui/src/UI/UIWindow.js | 16 ++++++------ src/gui/src/UI/UIWindowChangePassword.js | 2 +- src/gui/src/UI/UIWindowChangeUsername.js | 2 +- src/gui/src/UI/UIWindowCopyToken.js | 4 +-- src/gui/src/UI/UIWindowLogin.js | 2 +- src/gui/src/UI/UIWindowNewPassword.js | 2 +- .../UI/UIWindowPhoneVerificationRequired.js | 2 +- src/gui/src/UI/UIWindowSearch.js | 4 +-- src/gui/src/UI/UIWindowShare.js | 6 ++--- src/gui/src/UI/UIWindowSignup.js | 4 +-- src/gui/src/css/dashboard.css | 2 +- src/gui/src/helpers.js | 16 ++++++------ ...iners.js => applyItemAddedToContainers.js} | 4 +-- .../{auth_redirect.js => authRedirect.js} | 0 ..._redirect.test.js => authRedirect.test.js} | 2 +- ...d_strength.js => checkPasswordStrength.js} | 0 ...t_type_to_icon.js => contentTypeToIcon.js} | 0 .../{country_codes.js => countryCodes.js} | 0 ...e_access_token.js => createAccessToken.js} | 0 ...{create_gui_token.js => createGuiToken.js} | 2 +- ...t.js => determineActiveContainerParent.js} | 0 .../{device_signals.js => deviceSignals.js} | 0 ...ext_menu.js => generateFileContextMenu.js} | 10 +++---- ...ptions.js => getHtmlElementFromOptions.js} | 2 +- .../src/helpers/{item_icon.js => itemIcon.js} | 2 +- .../helpers/{launch_app.js => launchApp.js} | 2 +- .../{list_all_shared.js => listAllShared.js} | 0 ...ext_menu_item.js => newContextMenuItem.js} | 0 .../src/helpers/{open_item.js => openItem.js} | 6 ++--- ...arse_shared_path.js => parseSharedPath.js} | 0 ...d_path.test.js => parseSharedPath.test.js} | 2 +- .../helpers/{path_owner.js => pathOwner.js} | 0 ...lish_as_website.js => publishAsWebsite.js} | 0 ...m_container.js => refreshItemContainer.js} | 6 ++--- ...ve_shared_item.js => resolveSharedItem.js} | 2 +- ...item.test.js => resolveSharedItem.test.js} | 2 +- ...e_app_sessions.js => revokeAppSessions.js} | 0 ...ions.test.js => revokeAppSessions.test.js} | 2 +- .../helpers/{share_modes.js => shareModes.js} | 0 ...share_modes.test.js => shareModes.test.js} | 2 +- .../helpers/{share_paths.js => sharePaths.js} | 0 ...share_paths.test.js => sharePaths.test.js} | 2 +- .../{shared_access.js => sharedAccess.js} | 6 ++--- ...ed_access.test.js => sharedAccess.test.js} | 2 +- .../{starts_hidden.js => startsHidden.js} | 0 ...ts_hidden.test.js => startsHidden.test.js} | 2 +- ...uncate_filename.js => truncateFilename.js} | 0 ...nates.js => updateLastTouchCoordinates.js} | 0 ...use_position.js => updateMousePosition.js} | 0 ...ploads.js => updateTitleBasedOnUploads.js} | 0 ...rname_in_gui.js => updateUsernameInGui.js} | 0 ...upload_selection.js => uploadSelection.js} | 0 ...ection.test.js => uploadSelection.test.js} | 2 +- .../src/helpers/{url_paths.js => urlPaths.js} | 0 .../{url_paths.test.js => urlPaths.test.js} | 2 +- ...ndow_visibility.js => windowVisibility.js} | 0 ...ility.test.js => windowVisibility.test.js} | 2 +- src/gui/src/initgui.js | 18 ++++++------- src/gui/src/keyboard.js | 6 ++--- src/gui/src/services/ExecService.js | 4 +-- src/puter-js/src/modules/UI.js | 2 +- 72 files changed, 121 insertions(+), 121 deletions(-) rename src/gui/src/helpers/{apply_item_added_to_containers.js => applyItemAddedToContainers.js} (96%) rename src/gui/src/helpers/{auth_redirect.js => authRedirect.js} (100%) rename src/gui/src/helpers/{auth_redirect.test.js => authRedirect.test.js} (97%) rename src/gui/src/helpers/{check_password_strength.js => checkPasswordStrength.js} (100%) rename src/gui/src/helpers/{content_type_to_icon.js => contentTypeToIcon.js} (100%) rename src/gui/src/helpers/{country_codes.js => countryCodes.js} (100%) rename src/gui/src/helpers/{create_access_token.js => createAccessToken.js} (100%) rename src/gui/src/helpers/{create_gui_token.js => createGuiToken.js} (96%) rename src/gui/src/helpers/{determine_active_container_parent.js => determineActiveContainerParent.js} (100%) rename src/gui/src/helpers/{device_signals.js => deviceSignals.js} (100%) rename src/gui/src/helpers/{generate_file_context_menu.js => generateFileContextMenu.js} (98%) rename src/gui/src/helpers/{get_html_element_from_options.js => getHtmlElementFromOptions.js} (99%) rename src/gui/src/helpers/{item_icon.js => itemIcon.js} (99%) rename src/gui/src/helpers/{launch_app.js => launchApp.js} (99%) rename src/gui/src/helpers/{list_all_shared.js => listAllShared.js} (100%) rename src/gui/src/helpers/{new_context_menu_item.js => newContextMenuItem.js} (100%) rename src/gui/src/helpers/{open_item.js => openItem.js} (99%) rename src/gui/src/helpers/{parse_shared_path.js => parseSharedPath.js} (100%) rename src/gui/src/helpers/{parse_shared_path.test.js => parseSharedPath.test.js} (96%) rename src/gui/src/helpers/{path_owner.js => pathOwner.js} (100%) rename src/gui/src/helpers/{publish_as_website.js => publishAsWebsite.js} (100%) rename src/gui/src/helpers/{refresh_item_container.js => refreshItemContainer.js} (98%) rename src/gui/src/helpers/{resolve_shared_item.js => resolveSharedItem.js} (96%) rename src/gui/src/helpers/{resolve_shared_item.test.js => resolveSharedItem.test.js} (97%) rename src/gui/src/helpers/{revoke_app_sessions.js => revokeAppSessions.js} (100%) rename src/gui/src/helpers/{revoke_app_sessions.test.js => revokeAppSessions.test.js} (98%) rename src/gui/src/helpers/{share_modes.js => shareModes.js} (100%) rename src/gui/src/helpers/{share_modes.test.js => shareModes.test.js} (97%) rename src/gui/src/helpers/{share_paths.js => sharePaths.js} (100%) rename src/gui/src/helpers/{share_paths.test.js => sharePaths.test.js} (99%) rename src/gui/src/helpers/{shared_access.js => sharedAccess.js} (97%) rename src/gui/src/helpers/{shared_access.test.js => sharedAccess.test.js} (99%) rename src/gui/src/helpers/{starts_hidden.js => startsHidden.js} (100%) rename src/gui/src/helpers/{starts_hidden.test.js => startsHidden.test.js} (97%) rename src/gui/src/helpers/{truncate_filename.js => truncateFilename.js} (100%) rename src/gui/src/helpers/{update_last_touch_coordinates.js => updateLastTouchCoordinates.js} (100%) rename src/gui/src/helpers/{update_mouse_position.js => updateMousePosition.js} (100%) rename src/gui/src/helpers/{update_title_based_on_uploads.js => updateTitleBasedOnUploads.js} (100%) rename src/gui/src/helpers/{update_username_in_gui.js => updateUsernameInGui.js} (100%) rename src/gui/src/helpers/{upload_selection.js => uploadSelection.js} (100%) rename src/gui/src/helpers/{upload_selection.test.js => uploadSelection.test.js} (99%) rename src/gui/src/helpers/{url_paths.js => urlPaths.js} (100%) rename src/gui/src/helpers/{url_paths.test.js => urlPaths.test.js} (97%) rename src/gui/src/helpers/{window_visibility.js => windowVisibility.js} (100%) rename src/gui/src/helpers/{window_visibility.test.js => windowVisibility.test.js} (99%) diff --git a/src/backend/drivers/apps/AppDriver.js b/src/backend/drivers/apps/AppDriver.js index 891d852c5..995b32a1c 100644 --- a/src/backend/drivers/apps/AppDriver.js +++ b/src/backend/drivers/apps/AppDriver.js @@ -85,7 +85,7 @@ const INDEX_URL_UNIQUENESS_EXEMPTION_CANDIDATES = [ ]; // Sentinel host for builtin apps. The GUI rewrites index_urls on this -// host to `/builtin/` (see launch_app.js), so rows +// host to `/builtin/` (see launchApp.js), so rows // carrying it are reserved for migration-seeded builtins — a user app // claiming it would load its code same-origin with the desktop. const BUILTIN_APPS_HOST = 'builtins.namespaces.puter.com'; diff --git a/src/gui/src/IPC.js b/src/gui/src/IPC.js index d4522a2bc..55bb98d1b 100644 --- a/src/gui/src/IPC.js +++ b/src/gui/src/IPC.js @@ -18,9 +18,9 @@ */ import download from './helpers/download.js'; -import item_icon from './helpers/item_icon.js'; +import item_icon from './helpers/itemIcon.js'; import socialLink from './helpers/socialLink.js'; -import update_mouse_position from './helpers/update_mouse_position.js'; +import update_mouse_position from './helpers/updateMousePosition.js'; import path from './lib/path.js'; import UIAlert from './UI/UIAlert.js'; import UIContextMenu from './UI/UIContextMenu.js'; diff --git a/src/gui/src/UI/Dashboard/TabApps.js b/src/gui/src/UI/Dashboard/TabApps.js index 5ba7e9981..ce71729a2 100644 --- a/src/gui/src/UI/Dashboard/TabApps.js +++ b/src/gui/src/UI/Dashboard/TabApps.js @@ -1,13 +1,13 @@ import UIContextMenu from '../UIContextMenu.js'; import UIAlert from '../UIAlert.js'; -import launch_app from '../../helpers/launch_app.js'; -import revokeAppSessions from '../../helpers/revoke_app_sessions.js'; +import launch_app from '../../helpers/launchApp.js'; +import revokeAppSessions from '../../helpers/revokeAppSessions.js'; import { begin_dashboard_tile_launch, settle_dashboard_tile_launch } from '../UIWindow.js'; import { isTouchPrimaryDevice } from './ContextMenu/ContextMenu.js'; import { reconcileAppOrder, serializeAppOrder, mergeSavedOrder, APPS_ORDER_KV_KEY } from './appOrder.js'; import { parseRemovedApps, serializeRemovedApps, REMOVED_APPS_KV_KEY } from './removedApps.js'; import { appTileLink } from './appLink.js'; -import { is_window_on_screen, user_facing_windows } from '../../helpers/window_visibility.js'; +import { is_window_on_screen, user_facing_windows } from '../../helpers/windowVisibility.js'; import { APP_GROUPS_KV_KEY, MAX_GROUP_APPS, diff --git a/src/gui/src/UI/Dashboard/TabFiles.js b/src/gui/src/UI/Dashboard/TabFiles.js index 9a520a009..bcddbcda6 100644 --- a/src/gui/src/UI/Dashboard/TabFiles.js +++ b/src/gui/src/UI/Dashboard/TabFiles.js @@ -20,17 +20,17 @@ /* eslint-disable no-invalid-this */ /* eslint-disable @stylistic/quotes */ import path from '../../lib/path.js'; -import open_item from '../../helpers/open_item.js'; +import open_item from '../../helpers/openItem.js'; import UIContextMenu from '../UIContextMenu.js'; import UIWindowProgress from '../UIWindowProgress.js'; import UIAlert from '../UIAlert.js'; -import generate_file_context_menu from '../../helpers/generate_file_context_menu.js'; -import truncate_filename from '../../helpers/truncate_filename.js'; -import update_title_based_on_uploads from '../../helpers/update_title_based_on_uploads.js'; -import item_icon from '../../helpers/item_icon.js'; -import { user_facing_windows } from '../../helpers/window_visibility.js'; -import new_context_menu_item from '../../helpers/new_context_menu_item.js'; -import publish_as_website from '../../helpers/publish_as_website.js'; +import generate_file_context_menu from '../../helpers/generateFileContextMenu.js'; +import truncate_filename from '../../helpers/truncateFilename.js'; +import update_title_based_on_uploads from '../../helpers/updateTitleBasedOnUploads.js'; +import item_icon from '../../helpers/itemIcon.js'; +import { user_facing_windows } from '../../helpers/windowVisibility.js'; +import new_context_menu_item from '../../helpers/newContextMenuItem.js'; +import publish_as_website from '../../helpers/publishAsWebsite.js'; import ContextMenuModal, { isTouchPrimaryDevice } from './ContextMenu/ContextMenu.js'; import UIItemPropertiesModal from './UIItemPropertiesModal.js'; import UIShareModal from './UIShareModal.js'; @@ -38,9 +38,9 @@ import { dedupedName } from './dedupedName.js'; import { isEntryVisible, isHiddenName, showHiddenFiles } from './hiddenFiles.js'; import { icons } from '../../helpers/actionIcons.js'; -import list_all_shared from '../../helpers/list_all_shared.js'; -import { can_share, remember_shared_roots } from '../../helpers/shared_access.js'; -import { parent_path_for, shared_crumbs_for, shared_uids_from_paths } from '../../helpers/share_paths.js'; +import list_all_shared from '../../helpers/listAllShared.js'; +import { can_share, remember_shared_roots } from '../../helpers/sharedAccess.js'; +import { parent_path_for, shared_crumbs_for, shared_uids_from_paths } from '../../helpers/sharePaths.js'; const { html_encode, SelectionArea } = window; @@ -2457,7 +2457,7 @@ const TabFiles = { // For trashed items, use original_name from metadata if available const item_id = window.global_element_id++; // metadata is a client-writable, untrusted string stored verbatim, so - // it may be '', undefined, or malformed. Guard the parse (as item_icon.js + // it may be '', undefined, or malformed. Guard the parse (as itemIcon.js // does) — an unguarded throw here aborts the whole directory render. let metadata = {}; try { @@ -2560,7 +2560,7 @@ const TabFiles = { * resolve to their target) against the data-file_uid that launch_app * stamps on app windows. In dashboard mode the row doubles as that * window's switcher (clicking it restores instead of relaunching — see - * open_item.js), so the dot marks where a click will return, not launch. + * openItem.js), so the dot marks where a click will return, not launch. * * @returns {void} */ diff --git a/src/gui/src/UI/Dashboard/UIDashboard.js b/src/gui/src/UI/Dashboard/UIDashboard.js index 6e596ff4b..3b18c6c41 100644 --- a/src/gui/src/UI/Dashboard/UIDashboard.js +++ b/src/gui/src/UI/Dashboard/UIDashboard.js @@ -25,8 +25,8 @@ import UIAlert from '../UIAlert.js'; import UIWindowSaveAccount from '../UIWindowSaveAccount.js'; import UIWindowLogin from '../UIWindowLogin.js'; import UIWindowFeedback from '../UIWindowFeedback.js'; -import apply_item_added_to_containers from '../../helpers/apply_item_added_to_containers.js'; -import { clear_shared_param } from '../../helpers/parse_shared_path.js'; +import apply_item_added_to_containers from '../../helpers/applyItemAddedToContainers.js'; +import { clear_shared_param } from '../../helpers/parseSharedPath.js'; /** * Creates and displays the Dashboard window. * diff --git a/src/gui/src/UI/Dashboard/UIItemPropertiesModal.js b/src/gui/src/UI/Dashboard/UIItemPropertiesModal.js index dc619a6bf..db8436a7b 100644 --- a/src/gui/src/UI/Dashboard/UIItemPropertiesModal.js +++ b/src/gui/src/UI/Dashboard/UIItemPropertiesModal.js @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -import item_icon from '../../helpers/item_icon.js'; +import item_icon from '../../helpers/itemIcon.js'; const { html_encode } = window; diff --git a/src/gui/src/UI/Dashboard/UIShareModal.js b/src/gui/src/UI/Dashboard/UIShareModal.js index 94f42099f..64f6ee90c 100644 --- a/src/gui/src/UI/Dashboard/UIShareModal.js +++ b/src/gui/src/UI/Dashboard/UIShareModal.js @@ -18,11 +18,11 @@ */ import path from '../../lib/path.js'; -import item_icon from '../../helpers/item_icon.js'; -import { owner_of_path } from '../../helpers/path_owner.js'; -import { invalidate_shared_roots } from '../../helpers/shared_access.js'; +import item_icon from '../../helpers/itemIcon.js'; +import { owner_of_path } from '../../helpers/pathOwner.js'; +import { invalidate_shared_roots } from '../../helpers/sharedAccess.js'; import { icons } from '../../helpers/actionIcons.js'; -import { mode_label, options_for } from '../../helpers/share_modes.js'; +import { mode_label, options_for } from '../../helpers/shareModes.js'; import { isTouchPrimaryDevice } from './ContextMenu/ContextMenu.js'; import { avatarHue, avatarInitial } from './shareAvatar.js'; import { aggregateOwners, aggregateShares, missingPathsFor } from './shareAggregate.js'; diff --git a/src/gui/src/UI/UIDesktop.js b/src/gui/src/UI/UIDesktop.js index b0754230e..c0fe0bcc2 100644 --- a/src/gui/src/UI/UIDesktop.js +++ b/src/gui/src/UI/UIDesktop.js @@ -32,18 +32,18 @@ import UIWindowQR from './UIWindowQR.js'; import UIWindowProgress from './UIWindowProgress.js'; import UITaskbar from './UITaskbar.js'; -import new_context_menu_item from '../helpers/new_context_menu_item.js'; -import refresh_item_container from '../helpers/refresh_item_container.js'; +import new_context_menu_item from '../helpers/newContextMenuItem.js'; +import refresh_item_container from '../helpers/refreshItemContainer.js'; import changeLanguage from '../i18n/i18nChangeLanguage.js'; import UIWindowTaskManager from './UIWindowTaskManager.js'; -import truncate_filename from '../helpers/truncate_filename.js'; +import truncate_filename from '../helpers/truncateFilename.js'; import UINotification from './UINotification.js'; import UIWindowWelcome from './UIWindowWelcome.js'; -import launch_app from '../helpers/launch_app.js'; -import item_icon from '../helpers/item_icon.js'; -import { SHARED_PATH_PARAM, clear_shared_param } from '../helpers/parse_shared_path.js'; -import resolve_shared_item from '../helpers/resolve_shared_item.js'; -import apply_item_added_to_containers from '../helpers/apply_item_added_to_containers.js'; +import launch_app from '../helpers/launchApp.js'; +import item_icon from '../helpers/itemIcon.js'; +import { SHARED_PATH_PARAM, clear_shared_param } from '../helpers/parseSharedPath.js'; +import resolve_shared_item from '../helpers/resolveSharedItem.js'; +import apply_item_added_to_containers from '../helpers/applyItemAddedToContainers.js'; import UIWindowSearch from './UIWindowSearch.js'; async function UIDesktop (options) { diff --git a/src/gui/src/UI/UIItem.js b/src/gui/src/UI/UIItem.js index 7e6b39621..e89a16295 100644 --- a/src/gui/src/UI/UIItem.js +++ b/src/gui/src/UI/UIItem.js @@ -26,14 +26,14 @@ import UIAlert from './UIAlert.js'; import UIWindowPublishWorker from './UIWindowPublishWorker.js'; import UIWindowShare from './UIWindowShare.js'; import path from '../lib/path.js'; -import truncate_filename from '../helpers/truncate_filename.js'; -import launch_app from '../helpers/launch_app.js'; -import open_item from '../helpers/open_item.js'; -import publish_as_website from '../helpers/publish_as_website.js'; +import truncate_filename from '../helpers/truncateFilename.js'; +import launch_app from '../helpers/launchApp.js'; +import open_item from '../helpers/openItem.js'; +import publish_as_website from '../helpers/publishAsWebsite.js'; import mime from '../lib/mime.js'; import { isWeblinkName, weblinkChangeIconMenuItem } from '../helpers/weblink.js'; -import { is_owned_by_me } from '../helpers/path_owner.js'; -import { can_rename, can_restructure, invalidate_shared_roots, shared_mode_for } from '../helpers/shared_access.js'; +import { is_owned_by_me } from '../helpers/pathOwner.js'; +import { can_rename, can_restructure, invalidate_shared_roots, shared_mode_for } from '../helpers/sharedAccess.js'; const AI_APP_NAME = 'ai'; diff --git a/src/gui/src/UI/UITaskbar.js b/src/gui/src/UI/UITaskbar.js index 2c5bcb615..0ba839003 100644 --- a/src/gui/src/UI/UITaskbar.js +++ b/src/gui/src/UI/UITaskbar.js @@ -19,7 +19,7 @@ import UITaskbarItem from './UITaskbarItem.js'; import UIPopover from './UIPopover.js'; -import launch_app from '../helpers/launch_app.js'; +import launch_app from '../helpers/launchApp.js'; import UIContextMenu from './UIContextMenu.js'; async function UITaskbar (options) { diff --git a/src/gui/src/UI/UITaskbarItem.js b/src/gui/src/UI/UITaskbarItem.js index 96a701057..2b1c8a9d1 100644 --- a/src/gui/src/UI/UITaskbarItem.js +++ b/src/gui/src/UI/UITaskbarItem.js @@ -19,8 +19,8 @@ import UIContextMenu from './UIContextMenu.js'; import path from '../lib/path.js'; -import launch_app from '../helpers/launch_app.js'; -import { user_facing_windows } from '../helpers/window_visibility.js'; +import launch_app from '../helpers/launchApp.js'; +import { user_facing_windows } from '../helpers/windowVisibility.js'; let tray_item_id = 1; diff --git a/src/gui/src/UI/UIWindow.js b/src/gui/src/UI/UIWindow.js index e0a466c22..d7b7ee08e 100644 --- a/src/gui/src/UI/UIWindow.js +++ b/src/gui/src/UI/UIWindow.js @@ -23,16 +23,16 @@ import path from '../lib/path.js'; import UITaskbarItem from './UITaskbarItem.js'; import UIWindowLogin from './UIWindowLogin.js'; import UIWindowItemProperties from './UIWindowItemProperties.js'; -import new_context_menu_item from '../helpers/new_context_menu_item.js'; -import refresh_item_container from '../helpers/refresh_item_container.js'; +import new_context_menu_item from '../helpers/newContextMenuItem.js'; +import refresh_item_container from '../helpers/refreshItemContainer.js'; import UIWindowAppFeedback from './UIWindowAppFeedback.js'; -import launch_app from '../helpers/launch_app.js'; -import publish_as_website from '../helpers/publish_as_website.js'; +import launch_app from '../helpers/launchApp.js'; +import publish_as_website from '../helpers/publishAsWebsite.js'; -import item_icon from '../helpers/item_icon.js'; -import { parent_path_for, shared_crumbs_for } from '../helpers/share_paths.js'; -import { has_shared_roots } from '../helpers/shared_access.js'; -import { is_window_hidden, is_unseen_background_window, user_facing_windows } from '../helpers/window_visibility.js'; +import item_icon from '../helpers/itemIcon.js'; +import { parent_path_for, shared_crumbs_for } from '../helpers/sharePaths.js'; +import { has_shared_roots } from '../helpers/sharedAccess.js'; +import { is_window_hidden, is_unseen_background_window, user_facing_windows } from '../helpers/windowVisibility.js'; const el_body = document.getElementsByTagName('body')[0]; const SNAP_PLACEHOLDER_DELAY_MS = 600; // delay before showing placeholder in any snap zone diff --git a/src/gui/src/UI/UIWindowChangePassword.js b/src/gui/src/UI/UIWindowChangePassword.js index 54ad85ff0..24d8f1661 100644 --- a/src/gui/src/UI/UIWindowChangePassword.js +++ b/src/gui/src/UI/UIWindowChangePassword.js @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -import check_password_strength from '../helpers/check_password_strength.js'; +import check_password_strength from '../helpers/checkPasswordStrength.js'; import { openRevalidatePopup } from '../util/openid.js'; import UIWindow from './UIWindow.js'; diff --git a/src/gui/src/UI/UIWindowChangeUsername.js b/src/gui/src/UI/UIWindowChangeUsername.js index 566fd8b0b..9af39edb7 100644 --- a/src/gui/src/UI/UIWindowChangeUsername.js +++ b/src/gui/src/UI/UIWindowChangeUsername.js @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -import update_username_in_gui from '../helpers/update_username_in_gui.js'; +import update_username_in_gui from '../helpers/updateUsernameInGui.js'; import { openRevalidatePopup } from '../util/openid.js'; import { fetchWithSessionCookieRetry, isSessionAuthError } from '../util/sessionAuth.js'; import UIWindow from './UIWindow.js'; diff --git a/src/gui/src/UI/UIWindowCopyToken.js b/src/gui/src/UI/UIWindowCopyToken.js index 0f5eb9fa2..eb25eeebc 100644 --- a/src/gui/src/UI/UIWindowCopyToken.js +++ b/src/gui/src/UI/UIWindowCopyToken.js @@ -19,13 +19,13 @@ import UIWindow from './UIWindow.js'; import UIWindowManageSessions from './UIWindowManageSessions.js'; -import create_access_token from '../helpers/create_access_token.js'; +import create_access_token from '../helpers/createAccessToken.js'; // Creates a named, revocable full-API-access token and shows it once. // Replaces the old "copy your raw GUI/session token" behaviour: the copied // token used to be a session-equivalent credential that could escalate to // full account control; the minted access token can use the whole API but is -// locked out of account management (see create_access_token.js). +// locked out of account management (see createAccessToken.js). function UIWindowCopyToken (options = {}) { return new Promise(async (resolve) => { let h = ''; diff --git a/src/gui/src/UI/UIWindowLogin.js b/src/gui/src/UI/UIWindowLogin.js index 3b34d65d2..281eff5a0 100644 --- a/src/gui/src/UI/UIWindowLogin.js +++ b/src/gui/src/UI/UIWindowLogin.js @@ -23,7 +23,7 @@ import UIWindowRecoverPassword from './UIWindowRecoverPassword.js'; import UIWindowSignup from './UIWindowSignup.js'; import { KNOWN_OIDC_PROVIDERS, OIDC_GENERIC_PROVIDER_ICON, humanizeOidcProviderId } from '../util/openid.js'; import { offersFederatedSignInInPopup } from '../util/popupAuth.js'; -import { get_auth_redirect_url, get_oidc_return_to } from '../helpers/auth_redirect.js'; +import { get_auth_redirect_url, get_oidc_return_to } from '../helpers/authRedirect.js'; // ── 2FA Login CSS (injected once) ─────────────────────────────────────────── const LOGIN_2FA_CSS = ` diff --git a/src/gui/src/UI/UIWindowNewPassword.js b/src/gui/src/UI/UIWindowNewPassword.js index b04063245..670bfb286 100644 --- a/src/gui/src/UI/UIWindowNewPassword.js +++ b/src/gui/src/UI/UIWindowNewPassword.js @@ -20,7 +20,7 @@ import UIWindow from './UIWindow.js'; import UIAlert from './UIAlert.js'; import UIWindowLogin from './UIWindowLogin.js'; -import check_password_strength from '../helpers/check_password_strength.js'; +import check_password_strength from '../helpers/checkPasswordStrength.js'; async function UIWindowNewPassword (options) { return new Promise(async (resolve) => { diff --git a/src/gui/src/UI/UIWindowPhoneVerificationRequired.js b/src/gui/src/UI/UIWindowPhoneVerificationRequired.js index 1b2da1be8..dccc1caa1 100644 --- a/src/gui/src/UI/UIWindowPhoneVerificationRequired.js +++ b/src/gui/src/UI/UIWindowPhoneVerificationRequired.js @@ -19,7 +19,7 @@ import UIWindow from './UIWindow.js'; import UIWindowCardVerificationRequired from './UIWindowCardVerificationRequired.js'; -import { get_country_list } from '../helpers/country_codes.js'; +import { get_country_list } from '../helpers/countryCodes.js'; import { format_phone_as_you_type, inspect_phone, diff --git a/src/gui/src/UI/UIWindowSearch.js b/src/gui/src/UI/UIWindowSearch.js index a725c25ea..a206e3f54 100644 --- a/src/gui/src/UI/UIWindowSearch.js +++ b/src/gui/src/UI/UIWindowSearch.js @@ -20,8 +20,8 @@ import UIWindow from './UIWindow.js'; import path from '../lib/path.js'; import UIAlert from './UIAlert.js'; -import launch_app from '../helpers/launch_app.js'; -import item_icon from '../helpers/item_icon.js'; +import launch_app from '../helpers/launchApp.js'; +import item_icon from '../helpers/itemIcon.js'; import UIContextMenu from './UIContextMenu.js'; async function UIWindowSearch (options) { diff --git a/src/gui/src/UI/UIWindowShare.js b/src/gui/src/UI/UIWindowShare.js index 1f6986371..73b8211c0 100644 --- a/src/gui/src/UI/UIWindowShare.js +++ b/src/gui/src/UI/UIWindowShare.js @@ -20,10 +20,10 @@ import UIWindow from './UIWindow.js'; import UIAlert from './UIAlert.js'; import path from '../lib/path.js'; -import { owner_of_path } from '../helpers/path_owner.js'; -import { invalidate_shared_roots } from '../helpers/shared_access.js'; +import { owner_of_path } from '../helpers/pathOwner.js'; +import { invalidate_shared_roots } from '../helpers/sharedAccess.js'; import { icons } from '../helpers/actionIcons.js'; -import { mode_label, options_for } from '../helpers/share_modes.js'; +import { mode_label, options_for } from '../helpers/shareModes.js'; /** * Sharing dialog for one file or directory. diff --git a/src/gui/src/UI/UIWindowSignup.js b/src/gui/src/UI/UIWindowSignup.js index 91c79def2..6935859e2 100644 --- a/src/gui/src/UI/UIWindowSignup.js +++ b/src/gui/src/UI/UIWindowSignup.js @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -import check_password_strength from '../helpers/check_password_strength.js'; +import check_password_strength from '../helpers/checkPasswordStrength.js'; import UIWindow from './UIWindow.js'; import UIWindowEmailConfirmationRequired from './UIWindowEmailConfirmationRequired.js'; import UIWindowPhoneVerificationRequired from './UIWindowPhoneVerificationRequired.js'; @@ -25,7 +25,7 @@ import UIWindowCardVerificationRequired from './UIWindowCardVerificationRequired import UIWindowLogin from './UIWindowLogin.js'; import { KNOWN_OIDC_PROVIDERS, OIDC_GENERIC_PROVIDER_ICON, humanizeOidcProviderId } from '../util/openid.js'; import { offersFederatedSignInInPopup } from '../util/popupAuth.js'; -import { get_auth_redirect_url, get_oidc_return_to } from '../helpers/auth_redirect.js'; +import { get_auth_redirect_url, get_oidc_return_to } from '../helpers/authRedirect.js'; function UIWindowSignup(options) { options = options ?? {}; diff --git a/src/gui/src/css/dashboard.css b/src/gui/src/css/dashboard.css index ebb62a917..7885f29b6 100644 --- a/src/gui/src/css/dashboard.css +++ b/src/gui/src/css/dashboard.css @@ -3578,7 +3578,7 @@ body.myapps-reordering .myapps-tile { /* Open-file dot: marks rows whose file is open in an app window (visible or minimized) — the row doubles as that window's switcher (clicking it - restores the window; see open_item.js), sibling of the Apps-tab tiles' + restores the window; see openItem.js), sibling of the Apps-tab tiles' running dot. Kept current by updateOpenFileDots in TabFiles.js. */ .dashboard-section-files .files-tab .files .row.file-is-open .item-name-wrapper::after { content: ''; diff --git a/src/gui/src/helpers.js b/src/gui/src/helpers.js index af15fcb18..f679273b8 100644 --- a/src/gui/src/helpers.js +++ b/src/gui/src/helpers.js @@ -17,15 +17,15 @@ * along with this program. If not, see . */ -import get_html_element_from_options from './helpers/get_html_element_from_options.js'; +import get_html_element_from_options from './helpers/getHtmlElementFromOptions.js'; import globToRegExp from './helpers/globToRegExp.js'; -import item_icon from './helpers/item_icon.js'; -import { is_owned_by_me, trash_path_for } from './helpers/path_owner.js'; -import { invalidate_shared_roots } from './helpers/shared_access.js'; -import truncate_filename from './helpers/truncate_filename.js'; -import update_title_based_on_uploads from './helpers/update_title_based_on_uploads.js'; -import update_username_in_gui from './helpers/update_username_in_gui.js'; -import { select_uploaded_items } from './helpers/upload_selection.js'; +import item_icon from './helpers/itemIcon.js'; +import { is_owned_by_me, trash_path_for } from './helpers/pathOwner.js'; +import { invalidate_shared_roots } from './helpers/sharedAccess.js'; +import truncate_filename from './helpers/truncateFilename.js'; +import update_title_based_on_uploads from './helpers/updateTitleBasedOnUploads.js'; +import update_username_in_gui from './helpers/updateUsernameInGui.js'; +import { select_uploaded_items } from './helpers/uploadSelection.js'; import mime from './lib/mime.js'; import path from './lib/path.js'; import UIAlert from './UI/UIAlert.js'; diff --git a/src/gui/src/helpers/apply_item_added_to_containers.js b/src/gui/src/helpers/applyItemAddedToContainers.js similarity index 96% rename from src/gui/src/helpers/apply_item_added_to_containers.js rename to src/gui/src/helpers/applyItemAddedToContainers.js index d713117ad..da21e2a39 100644 --- a/src/gui/src/helpers/apply_item_added_to_containers.js +++ b/src/gui/src/helpers/applyItemAddedToContainers.js @@ -18,8 +18,8 @@ */ import UIItem from '../UI/UIItem.js'; -import item_icon from './item_icon.js'; -import { select_added_item_if_pending } from './upload_selection.js'; +import item_icon from './itemIcon.js'; +import { select_added_item_if_pending } from './uploadSelection.js'; /** * Reflect an `item.added` socket event in every open UIWindow item container diff --git a/src/gui/src/helpers/auth_redirect.js b/src/gui/src/helpers/authRedirect.js similarity index 100% rename from src/gui/src/helpers/auth_redirect.js rename to src/gui/src/helpers/authRedirect.js diff --git a/src/gui/src/helpers/auth_redirect.test.js b/src/gui/src/helpers/authRedirect.test.js similarity index 97% rename from src/gui/src/helpers/auth_redirect.test.js rename to src/gui/src/helpers/authRedirect.test.js index 691d8db61..033ed9f2d 100644 --- a/src/gui/src/helpers/auth_redirect.test.js +++ b/src/gui/src/helpers/authRedirect.test.js @@ -18,7 +18,7 @@ */ import { describe, it, expect, afterEach } from 'vitest'; -import { get_oidc_return_to } from './auth_redirect.js'; +import { get_oidc_return_to } from './authRedirect.js'; const at = (pathname) => { globalThis.window = { location: { pathname } }; diff --git a/src/gui/src/helpers/check_password_strength.js b/src/gui/src/helpers/checkPasswordStrength.js similarity index 100% rename from src/gui/src/helpers/check_password_strength.js rename to src/gui/src/helpers/checkPasswordStrength.js diff --git a/src/gui/src/helpers/content_type_to_icon.js b/src/gui/src/helpers/contentTypeToIcon.js similarity index 100% rename from src/gui/src/helpers/content_type_to_icon.js rename to src/gui/src/helpers/contentTypeToIcon.js diff --git a/src/gui/src/helpers/country_codes.js b/src/gui/src/helpers/countryCodes.js similarity index 100% rename from src/gui/src/helpers/country_codes.js rename to src/gui/src/helpers/countryCodes.js diff --git a/src/gui/src/helpers/create_access_token.js b/src/gui/src/helpers/createAccessToken.js similarity index 100% rename from src/gui/src/helpers/create_access_token.js rename to src/gui/src/helpers/createAccessToken.js diff --git a/src/gui/src/helpers/create_gui_token.js b/src/gui/src/helpers/createGuiToken.js similarity index 96% rename from src/gui/src/helpers/create_gui_token.js rename to src/gui/src/helpers/createGuiToken.js index 0368ddbd7..f80869775 100644 --- a/src/gui/src/helpers/create_gui_token.js +++ b/src/gui/src/helpers/createGuiToken.js @@ -21,7 +21,7 @@ * Mint a GUI token for the **current session**. * * This is a full account credential — the same grade the desktop itself runs - * on. Unlike an access token (see `create_access_token.js`) it carries a + * on. Unlike an access token (see `createAccessToken.js`) it carries a * session, so it passes the account-management gates: whoever holds it can * change the password, email, and 2FA settings. * diff --git a/src/gui/src/helpers/determine_active_container_parent.js b/src/gui/src/helpers/determineActiveContainerParent.js similarity index 100% rename from src/gui/src/helpers/determine_active_container_parent.js rename to src/gui/src/helpers/determineActiveContainerParent.js diff --git a/src/gui/src/helpers/device_signals.js b/src/gui/src/helpers/deviceSignals.js similarity index 100% rename from src/gui/src/helpers/device_signals.js rename to src/gui/src/helpers/deviceSignals.js diff --git a/src/gui/src/helpers/generate_file_context_menu.js b/src/gui/src/helpers/generateFileContextMenu.js similarity index 98% rename from src/gui/src/helpers/generate_file_context_menu.js rename to src/gui/src/helpers/generateFileContextMenu.js index 990b7747e..bf26a017d 100644 --- a/src/gui/src/helpers/generate_file_context_menu.js +++ b/src/gui/src/helpers/generateFileContextMenu.js @@ -24,13 +24,13 @@ import UIWindowSaveAccount from '../UI/UIWindowSaveAccount.js'; import UIWindowEmailConfirmationRequired from '../UI/UIWindowEmailConfirmationRequired.js'; import UIWindowPublishWorker from '../UI/UIWindowPublishWorker.js'; import UIWindowShare from '../UI/UIWindowShare.js'; -import publish_as_website from './publish_as_website.js'; -import open_item from './open_item.js'; -import launch_app from './launch_app.js'; +import publish_as_website from './publishAsWebsite.js'; +import open_item from './openItem.js'; +import launch_app from './launchApp.js'; import path from '../lib/path.js'; import { isWeblinkName, weblinkChangeIconMenuItem } from './weblink.js'; -import { is_owned_by_me } from './path_owner.js'; -import { can_rename, can_restructure, can_share, invalidate_shared_roots } from './shared_access.js'; +import { is_owned_by_me } from './pathOwner.js'; +import { can_rename, can_restructure, can_share, invalidate_shared_roots } from './sharedAccess.js'; /** * Generates context menu items for file/folder operations diff --git a/src/gui/src/helpers/get_html_element_from_options.js b/src/gui/src/helpers/getHtmlElementFromOptions.js similarity index 99% rename from src/gui/src/helpers/get_html_element_from_options.js rename to src/gui/src/helpers/getHtmlElementFromOptions.js index 8368cbdf0..9babe7eb8 100644 --- a/src/gui/src/helpers/get_html_element_from_options.js +++ b/src/gui/src/helpers/getHtmlElementFromOptions.js @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -import truncate_filename from './truncate_filename.js'; +import truncate_filename from './truncateFilename.js'; const get_html_element_from_options = async function (options) { const item_id = window.global_element_id++; diff --git a/src/gui/src/helpers/item_icon.js b/src/gui/src/helpers/itemIcon.js similarity index 99% rename from src/gui/src/helpers/item_icon.js rename to src/gui/src/helpers/itemIcon.js index 5f7eab11d..f936a2afe 100644 --- a/src/gui/src/helpers/item_icon.js +++ b/src/gui/src/helpers/itemIcon.js @@ -18,7 +18,7 @@ */ import mime from '../lib/mime.js'; -import content_type_to_icon from './content_type_to_icon.js'; +import content_type_to_icon from './contentTypeToIcon.js'; import { getWeblinkIcon } from './weblink.js'; /** diff --git a/src/gui/src/helpers/launch_app.js b/src/gui/src/helpers/launchApp.js similarity index 99% rename from src/gui/src/helpers/launch_app.js rename to src/gui/src/helpers/launchApp.js index aa3f213c9..c51083fa3 100644 --- a/src/gui/src/helpers/launch_app.js +++ b/src/gui/src/helpers/launchApp.js @@ -20,7 +20,7 @@ import path from '../lib/path.js'; import { PROCESS_IPC_ATTACHED, PROCESS_RUNNING, PortalProcess, PseudoProcess } from '../definitions.js'; import UIWindow from '../UI/UIWindow.js'; -import { starts_hidden } from './starts_hidden.js'; +import { starts_hidden } from './startsHidden.js'; const normalizePrivateAccessDecision = (privateAccess) => { if ( !privateAccess || typeof privateAccess !== 'object' ) { diff --git a/src/gui/src/helpers/list_all_shared.js b/src/gui/src/helpers/listAllShared.js similarity index 100% rename from src/gui/src/helpers/list_all_shared.js rename to src/gui/src/helpers/listAllShared.js diff --git a/src/gui/src/helpers/new_context_menu_item.js b/src/gui/src/helpers/newContextMenuItem.js similarity index 100% rename from src/gui/src/helpers/new_context_menu_item.js rename to src/gui/src/helpers/newContextMenuItem.js diff --git a/src/gui/src/helpers/open_item.js b/src/gui/src/helpers/openItem.js similarity index 99% rename from src/gui/src/helpers/open_item.js rename to src/gui/src/helpers/openItem.js index 5cfeba940..e1d27429e 100644 --- a/src/gui/src/helpers/open_item.js +++ b/src/gui/src/helpers/openItem.js @@ -20,10 +20,10 @@ import UIWindow from '../UI/UIWindow.js'; import UIAlert from '../UI/UIAlert.js'; import i18n from '../i18n/i18n.js'; -import launch_app from './launch_app.js'; +import launch_app from './launchApp.js'; import path from '../lib/path.js'; -import item_icon from './item_icon.js'; -import { is_window_on_screen, user_facing_windows } from './window_visibility.js'; +import item_icon from './itemIcon.js'; +import { is_window_on_screen, user_facing_windows } from './windowVisibility.js'; // Files whose app launch is still in flight, by file uid. Between the click // and the window's creation there is nothing in the DOM to restore, so a diff --git a/src/gui/src/helpers/parse_shared_path.js b/src/gui/src/helpers/parseSharedPath.js similarity index 100% rename from src/gui/src/helpers/parse_shared_path.js rename to src/gui/src/helpers/parseSharedPath.js diff --git a/src/gui/src/helpers/parse_shared_path.test.js b/src/gui/src/helpers/parseSharedPath.test.js similarity index 96% rename from src/gui/src/helpers/parse_shared_path.test.js rename to src/gui/src/helpers/parseSharedPath.test.js index 7fce2960f..f76395f22 100644 --- a/src/gui/src/helpers/parse_shared_path.test.js +++ b/src/gui/src/helpers/parseSharedPath.test.js @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest'; -import parse_shared_path from './parse_shared_path.js'; +import parse_shared_path from './parseSharedPath.js'; const UID = '11111111-2222-4333-8444-555555555555'; diff --git a/src/gui/src/helpers/path_owner.js b/src/gui/src/helpers/pathOwner.js similarity index 100% rename from src/gui/src/helpers/path_owner.js rename to src/gui/src/helpers/pathOwner.js diff --git a/src/gui/src/helpers/publish_as_website.js b/src/gui/src/helpers/publishAsWebsite.js similarity index 100% rename from src/gui/src/helpers/publish_as_website.js rename to src/gui/src/helpers/publishAsWebsite.js diff --git a/src/gui/src/helpers/refresh_item_container.js b/src/gui/src/helpers/refreshItemContainer.js similarity index 98% rename from src/gui/src/helpers/refresh_item_container.js rename to src/gui/src/helpers/refreshItemContainer.js index e3c6fff41..c68772174 100644 --- a/src/gui/src/helpers/refresh_item_container.js +++ b/src/gui/src/helpers/refreshItemContainer.js @@ -19,9 +19,9 @@ import path from '../lib/path.js'; import UIItem from '../UI/UIItem.js'; -import item_icon from './item_icon.js'; -import list_all_shared from './list_all_shared.js'; -import { remember_shared_roots } from './shared_access.js'; +import item_icon from './itemIcon.js'; +import list_all_shared from './listAllShared.js'; +import { remember_shared_roots } from './sharedAccess.js'; const refresh_item_container = function (el_item_container, options) { // start a transaction diff --git a/src/gui/src/helpers/resolve_shared_item.js b/src/gui/src/helpers/resolveSharedItem.js similarity index 96% rename from src/gui/src/helpers/resolve_shared_item.js rename to src/gui/src/helpers/resolveSharedItem.js index 8d17343c6..093def066 100644 --- a/src/gui/src/helpers/resolve_shared_item.js +++ b/src/gui/src/helpers/resolveSharedItem.js @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -import parse_shared_path from './parse_shared_path.js'; +import parse_shared_path from './parseSharedPath.js'; /** * Find the item a share link addresses. The path only resolves while the name diff --git a/src/gui/src/helpers/resolve_shared_item.test.js b/src/gui/src/helpers/resolveSharedItem.test.js similarity index 97% rename from src/gui/src/helpers/resolve_shared_item.test.js rename to src/gui/src/helpers/resolveSharedItem.test.js index 89393b426..2b9b27336 100644 --- a/src/gui/src/helpers/resolve_shared_item.test.js +++ b/src/gui/src/helpers/resolveSharedItem.test.js @@ -1,5 +1,5 @@ import { describe, expect, it, vi } from 'vitest'; -import resolve_shared_item from './resolve_shared_item.js'; +import resolve_shared_item from './resolveSharedItem.js'; const UID = '11111111-2222-4333-8444-555555555555'; const PATH = `/alice/${UID}/report.txt`; diff --git a/src/gui/src/helpers/revoke_app_sessions.js b/src/gui/src/helpers/revokeAppSessions.js similarity index 100% rename from src/gui/src/helpers/revoke_app_sessions.js rename to src/gui/src/helpers/revokeAppSessions.js diff --git a/src/gui/src/helpers/revoke_app_sessions.test.js b/src/gui/src/helpers/revokeAppSessions.test.js similarity index 98% rename from src/gui/src/helpers/revoke_app_sessions.test.js rename to src/gui/src/helpers/revokeAppSessions.test.js index fe3f287fa..49d7132c8 100644 --- a/src/gui/src/helpers/revoke_app_sessions.test.js +++ b/src/gui/src/helpers/revokeAppSessions.test.js @@ -18,7 +18,7 @@ */ import { describe, it, expect } from 'vitest'; -import { appSessionUuids, revokeAppSessions } from './revoke_app_sessions.js'; +import { appSessionUuids, revokeAppSessions } from './revokeAppSessions.js'; const APP = 'app-1111'; diff --git a/src/gui/src/helpers/share_modes.js b/src/gui/src/helpers/shareModes.js similarity index 100% rename from src/gui/src/helpers/share_modes.js rename to src/gui/src/helpers/shareModes.js diff --git a/src/gui/src/helpers/share_modes.test.js b/src/gui/src/helpers/shareModes.test.js similarity index 97% rename from src/gui/src/helpers/share_modes.test.js rename to src/gui/src/helpers/shareModes.test.js index a55fc554b..d3ff19465 100644 --- a/src/gui/src/helpers/share_modes.test.js +++ b/src/gui/src/helpers/shareModes.test.js @@ -11,7 +11,7 @@ let MODES, mode_label, options_for; beforeAll(async () => { await import('../i18n/i18n.js'); // installs window.i18n globalThis.i18n = window.i18n; - ({ MODES, mode_label, options_for } = await import('./share_modes.js')); + ({ MODES, mode_label, options_for } = await import('./shareModes.js')); }); // What the browser renders for a fragment of HTML-safe markup. diff --git a/src/gui/src/helpers/share_paths.js b/src/gui/src/helpers/sharePaths.js similarity index 100% rename from src/gui/src/helpers/share_paths.js rename to src/gui/src/helpers/sharePaths.js diff --git a/src/gui/src/helpers/share_paths.test.js b/src/gui/src/helpers/sharePaths.test.js similarity index 99% rename from src/gui/src/helpers/share_paths.test.js rename to src/gui/src/helpers/sharePaths.test.js index c065e8f00..3a04f9a7d 100644 --- a/src/gui/src/helpers/share_paths.test.js +++ b/src/gui/src/helpers/sharePaths.test.js @@ -24,7 +24,7 @@ import { parse_shared_path, shared_crumbs_for, shared_uids_from_paths, -} from './share_paths.js'; +} from './sharePaths.js'; const UID = '11111111-2222-3333-4444-555555555555'; diff --git a/src/gui/src/helpers/shared_access.js b/src/gui/src/helpers/sharedAccess.js similarity index 97% rename from src/gui/src/helpers/shared_access.js rename to src/gui/src/helpers/sharedAccess.js index 78e1295c9..f78541f14 100644 --- a/src/gui/src/helpers/shared_access.js +++ b/src/gui/src/helpers/sharedAccess.js @@ -17,9 +17,9 @@ * along with this program. If not, see . */ -import list_all_shared from './list_all_shared.js'; -import { is_owned_by_me } from './path_owner.js'; -import { is_share_root } from './share_paths.js'; +import list_all_shared from './listAllShared.js'; +import { is_owned_by_me } from './pathOwner.js'; +import { is_share_root } from './sharePaths.js'; // What we hold on each shared root, by path: `{ mode, name }`. A `readdir` // inside a shared folder returns plain entries, so nothing else records it. diff --git a/src/gui/src/helpers/shared_access.test.js b/src/gui/src/helpers/sharedAccess.test.js similarity index 99% rename from src/gui/src/helpers/shared_access.test.js rename to src/gui/src/helpers/sharedAccess.test.js index 4b71a3e5d..81df47a11 100644 --- a/src/gui/src/helpers/shared_access.test.js +++ b/src/gui/src/helpers/sharedAccess.test.js @@ -25,7 +25,7 @@ import { invalidate_shared_roots, remember_shared_roots, shared_mode_for, -} from './shared_access.js'; +} from './sharedAccess.js'; const CONTENTS = '11111111-1111-1111-1111-111111111111'; const PHOTOS = '22222222-2222-2222-2222-222222222222'; diff --git a/src/gui/src/helpers/starts_hidden.js b/src/gui/src/helpers/startsHidden.js similarity index 100% rename from src/gui/src/helpers/starts_hidden.js rename to src/gui/src/helpers/startsHidden.js diff --git a/src/gui/src/helpers/starts_hidden.test.js b/src/gui/src/helpers/startsHidden.test.js similarity index 97% rename from src/gui/src/helpers/starts_hidden.test.js rename to src/gui/src/helpers/startsHidden.test.js index 1ac6464e8..22bf09d88 100644 --- a/src/gui/src/helpers/starts_hidden.test.js +++ b/src/gui/src/helpers/startsHidden.test.js @@ -18,7 +18,7 @@ */ import { describe, it, expect } from 'vitest'; -import { starts_hidden } from './starts_hidden.js'; +import { starts_hidden } from './startsHidden.js'; describe('starts_hidden', () => { it('shows an ordinary app launched the ordinary way', () => { diff --git a/src/gui/src/helpers/truncate_filename.js b/src/gui/src/helpers/truncateFilename.js similarity index 100% rename from src/gui/src/helpers/truncate_filename.js rename to src/gui/src/helpers/truncateFilename.js diff --git a/src/gui/src/helpers/update_last_touch_coordinates.js b/src/gui/src/helpers/updateLastTouchCoordinates.js similarity index 100% rename from src/gui/src/helpers/update_last_touch_coordinates.js rename to src/gui/src/helpers/updateLastTouchCoordinates.js diff --git a/src/gui/src/helpers/update_mouse_position.js b/src/gui/src/helpers/updateMousePosition.js similarity index 100% rename from src/gui/src/helpers/update_mouse_position.js rename to src/gui/src/helpers/updateMousePosition.js diff --git a/src/gui/src/helpers/update_title_based_on_uploads.js b/src/gui/src/helpers/updateTitleBasedOnUploads.js similarity index 100% rename from src/gui/src/helpers/update_title_based_on_uploads.js rename to src/gui/src/helpers/updateTitleBasedOnUploads.js diff --git a/src/gui/src/helpers/update_username_in_gui.js b/src/gui/src/helpers/updateUsernameInGui.js similarity index 100% rename from src/gui/src/helpers/update_username_in_gui.js rename to src/gui/src/helpers/updateUsernameInGui.js diff --git a/src/gui/src/helpers/upload_selection.js b/src/gui/src/helpers/uploadSelection.js similarity index 100% rename from src/gui/src/helpers/upload_selection.js rename to src/gui/src/helpers/uploadSelection.js diff --git a/src/gui/src/helpers/upload_selection.test.js b/src/gui/src/helpers/uploadSelection.test.js similarity index 99% rename from src/gui/src/helpers/upload_selection.test.js rename to src/gui/src/helpers/uploadSelection.test.js index 52698f9e5..ed70d03ee 100644 --- a/src/gui/src/helpers/upload_selection.test.js +++ b/src/gui/src/helpers/uploadSelection.test.js @@ -21,7 +21,7 @@ import { describe, it, expect, beforeAll, beforeEach, afterEach, vi } from 'vitest'; import jQuery from '../lib/jquery-3.6.1/jquery-3.6.1.min.js'; -import { select_uploaded_items, select_added_item_if_pending } from './upload_selection.js'; +import { select_uploaded_items, select_added_item_if_pending } from './uploadSelection.js'; const make_item = ({ path, uid = `uid-${path}`, disabled = false }) => { const el = document.createElement('div'); diff --git a/src/gui/src/helpers/url_paths.js b/src/gui/src/helpers/urlPaths.js similarity index 100% rename from src/gui/src/helpers/url_paths.js rename to src/gui/src/helpers/urlPaths.js diff --git a/src/gui/src/helpers/url_paths.test.js b/src/gui/src/helpers/urlPaths.test.js similarity index 97% rename from src/gui/src/helpers/url_paths.test.js rename to src/gui/src/helpers/urlPaths.test.js index 2977d612f..bc5597a94 100644 --- a/src/gui/src/helpers/url_paths.test.js +++ b/src/gui/src/helpers/urlPaths.test.js @@ -18,7 +18,7 @@ */ import { describe, it, expect } from 'vitest'; -import { parse_url_paths } from './url_paths.js'; +import { parse_url_paths } from './urlPaths.js'; describe('parse_url_paths', () => { it('splits a pathname into non-empty segments', () => { diff --git a/src/gui/src/helpers/window_visibility.js b/src/gui/src/helpers/windowVisibility.js similarity index 100% rename from src/gui/src/helpers/window_visibility.js rename to src/gui/src/helpers/windowVisibility.js diff --git a/src/gui/src/helpers/window_visibility.test.js b/src/gui/src/helpers/windowVisibility.test.js similarity index 99% rename from src/gui/src/helpers/window_visibility.test.js rename to src/gui/src/helpers/windowVisibility.test.js index d1383fedc..ad8feb71a 100644 --- a/src/gui/src/helpers/window_visibility.test.js +++ b/src/gui/src/helpers/windowVisibility.test.js @@ -25,7 +25,7 @@ import { is_window_on_screen, is_unseen_background_window, user_facing_windows, -} from './window_visibility.js'; +} from './windowVisibility.js'; // A `.window` element carrying the given data- attributes, in the shapes // UIWindow actually writes them (is_visible as 0/1, is_minimized as either diff --git a/src/gui/src/initgui.js b/src/gui/src/initgui.js index 691effce4..1e63134a6 100644 --- a/src/gui/src/initgui.js +++ b/src/gui/src/initgui.js @@ -39,8 +39,8 @@ import UIWindowSessionList from './UI/UIWindowSessionList.js'; import UIWindowSignup from './UI/UIWindowSignup.js'; import UIWindowRecoverPassword from './UI/UIWindowRecoverPassword.js'; import { PROCESS_RUNNING } from './definitions.js'; -import create_access_token from './helpers/create_access_token.js'; -import create_gui_token from './helpers/create_gui_token.js'; +import create_access_token from './helpers/createAccessToken.js'; +import create_gui_token from './helpers/createGuiToken.js'; import { authmeRequestUrl, authmeReturnUrl, @@ -50,13 +50,13 @@ import { urlTokenParam, wantsFullToken, } from './util/authmeGrant.js'; -import init_device_signals from './helpers/device_signals.js'; -import item_icon from './helpers/item_icon.js'; -import launch_app from './helpers/launch_app.js'; -import { parse_url_paths } from './helpers/url_paths.js'; -import update_last_touch_coordinates from './helpers/update_last_touch_coordinates.js'; -import update_mouse_position from './helpers/update_mouse_position.js'; -import update_title_based_on_uploads from './helpers/update_title_based_on_uploads.js'; +import init_device_signals from './helpers/deviceSignals.js'; +import item_icon from './helpers/itemIcon.js'; +import launch_app from './helpers/launchApp.js'; +import { parse_url_paths } from './helpers/urlPaths.js'; +import update_last_touch_coordinates from './helpers/updateLastTouchCoordinates.js'; +import update_mouse_position from './helpers/updateMousePosition.js'; +import update_title_based_on_uploads from './helpers/updateTitleBasedOnUploads.js'; import path from './lib/path.js'; import { AntiCSRFService } from './services/AntiCSRFService.js'; import { BroadcastService } from './services/BroadcastService.js'; diff --git a/src/gui/src/keyboard.js b/src/gui/src/keyboard.js index 5ce7665e6..7ed098131 100644 --- a/src/gui/src/keyboard.js +++ b/src/gui/src/keyboard.js @@ -19,9 +19,9 @@ import UIAlert from './UI/UIAlert.js'; import UIWindowSearch from './UI/UIWindowSearch.js'; -import launch_app from './helpers/launch_app.js'; -import open_item from './helpers/open_item.js'; -import determine_active_container_parent from './helpers/determine_active_container_parent.js'; +import launch_app from './helpers/launchApp.js'; +import open_item from './helpers/openItem.js'; +import determine_active_container_parent from './helpers/determineActiveContainerParent.js'; $(document).bind('keydown', async function (e) { const focused_el = document.activeElement; diff --git a/src/gui/src/services/ExecService.js b/src/gui/src/services/ExecService.js index 88737d171..aeb65cb18 100644 --- a/src/gui/src/services/ExecService.js +++ b/src/gui/src/services/ExecService.js @@ -18,7 +18,7 @@ */ import { PROCESS_IPC_ATTACHED, Service } from '../definitions.js'; -import launch_app from '../helpers/launch_app.js'; +import launch_app from '../helpers/launchApp.js'; export class ExecService extends Service { static description = ` @@ -125,7 +125,7 @@ export class ExecService extends Service { // Check if caller is in godmode. The /apps endpoint serializes // `godmode` as a boolean while older shapes used 0/1, so - // accept both (same guard as launch_app.js). + // accept both (same guard as launchApp.js). if ( caller_app_info && (caller_app_info.godmode === true || caller_app_info.godmode === 1) ) { // Get target app info to create file signatures const target_app_info = await puter.apps.get(app_name); diff --git a/src/puter-js/src/modules/UI.js b/src/puter-js/src/modules/UI.js index a9b13d9c5..f5c43db81 100644 --- a/src/puter-js/src/modules/UI.js +++ b/src/puter-js/src/modules/UI.js @@ -1942,7 +1942,7 @@ export class UIModule extends EventListener { if ( this.env === 'app' ) { // The host GUI advertises the IPC dialogs it can answer via // `puter.gui_features` on the app iframe's URL (see - // launch_app.js). A GUI that predates this feature has no + // launchApp.js). A GUI that predates this feature has no // handler for the message and would never reply, hanging this // never-rejecting promise forever — and a reply timeout can't // stand in for the check, because a legitimate reply only