Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/backend/drivers/apps/AppDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const INDEX_URL_UNIQUENESS_EXEMPTION_CANDIDATES = [
];

// Sentinel host for builtin apps. The GUI rewrites index_urls on this
// host to `<gui origin>/builtin/<name>` (see launch_app.js), so rows
// host to `<gui origin>/builtin/<name>` (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';
Expand Down
4 changes: 2 additions & 2 deletions src/gui/src/IPC.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
6 changes: 3 additions & 3 deletions src/gui/src/UI/Dashboard/TabApps.js
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
26 changes: 13 additions & 13 deletions src/gui/src/UI/Dashboard/TabFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@
/* 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';
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;

Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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}
*/
Expand Down
4 changes: 2 additions & 2 deletions src/gui/src/UI/Dashboard/UIDashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
2 changes: 1 addition & 1 deletion src/gui/src/UI/Dashboard/UIItemPropertiesModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import item_icon from '../../helpers/item_icon.js';
import item_icon from '../../helpers/itemIcon.js';

const { html_encode } = window;

Expand Down
8 changes: 4 additions & 4 deletions src/gui/src/UI/Dashboard/UIShareModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
16 changes: 8 additions & 8 deletions src/gui/src/UI/UIDesktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
12 changes: 6 additions & 6 deletions src/gui/src/UI/UIItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion src/gui/src/UI/UITaskbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/gui/src/UI/UITaskbarItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
16 changes: 8 additions & 8 deletions src/gui/src/UI/UIWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/gui/src/UI/UIWindowChangePassword.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

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';

Expand Down
2 changes: 1 addition & 1 deletion src/gui/src/UI/UIWindowChangeUsername.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

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';
Expand Down
4 changes: 2 additions & 2 deletions src/gui/src/UI/UIWindowCopyToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand Down
2 changes: 1 addition & 1 deletion src/gui/src/UI/UIWindowLogin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = `
Expand Down
2 changes: 1 addition & 1 deletion src/gui/src/UI/UIWindowNewPassword.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion src/gui/src/UI/UIWindowPhoneVerificationRequired.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/gui/src/UI/UIWindowSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions src/gui/src/UI/UIWindowShare.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/gui/src/UI/UIWindowSignup.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

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';
import UIWindowCardVerificationRequired from './UIWindowCardVerificationRequired.js';
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 ?? {};
Expand Down
2 changes: 1 addition & 1 deletion src/gui/src/css/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -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: '';
Expand Down
16 changes: 8 additions & 8 deletions src/gui/src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import parse_shared_path, { SHARED_PATH_PARAM } from './parse_shared_path.js';
import parse_shared_path, { SHARED_PATH_PARAM } from './parseSharedPath.js';

/**
* Where to send the user after a successful login/signup started from the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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, search = '') => {
globalThis.window = { location: { pathname, search } };
Expand Down
Loading
Loading