mirror of
https://github.com/HeyPuter/puter.git
synced 2026-07-08 16:21:40 +00:00
dev: Replaced human-readable text with i18n keys (#1382)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
* dev: Replaced human-readable text with i18n keys * Add two missing keys in UIDesktop.js * more i18n keys! * add more keys * Update UIWindow.js --------- Co-authored-by: jelveh <nj@puter.com>
This commit is contained in:
@@ -42,11 +42,11 @@ function UIAlert(options) {
|
||||
}
|
||||
// Define alert types
|
||||
const alertTypes = {
|
||||
error: { icon: "danger.svg", title: "Error!", color: "#D32F2F" },
|
||||
warning: { icon: "warning-sign.svg", title: "Warning!", color: "#FFA000" },
|
||||
info: { icon: "reminder.svg", title: "Info", color: "#1976D2" },
|
||||
success: { icon: "c-check.svg", title: "Success!", color: "#388E3C" },
|
||||
confirm: { icon: "question.svg", title: "Are you sure?", color: "#555555" }
|
||||
error: { icon: "danger.svg", title: i18n('alert_error_title'), color: "#D32F2F" },
|
||||
warning: { icon: "warning-sign.svg", title: i18n('alert_warning_title'), color: "#FFA000" },
|
||||
info: { icon: "reminder.svg", title: i18n('alert_info_title'), color: "#1976D2" },
|
||||
success: { icon: "c-check.svg", title: i18n('alert_success_title'), color: "#388E3C" },
|
||||
confirm: { icon: "question.svg", title: i18n('alert_confirm_title'), color: "#555555" }
|
||||
};
|
||||
|
||||
// Set default values
|
||||
@@ -60,14 +60,14 @@ function UIAlert(options) {
|
||||
switch (options.type) {
|
||||
case "confirm":
|
||||
options.buttons = [
|
||||
{ label: "Yes", value: true, type: "primary" },
|
||||
{ label: "No", value: false, type: "secondary" }
|
||||
{ label: i18n('alert_yes'), value: true, type: "primary" },
|
||||
{ label: i18n('alert_no'), value: false, type: "secondary" }
|
||||
];
|
||||
break;
|
||||
case "error":
|
||||
options.buttons = [
|
||||
{ label: "Retry", value: "retry", type: "danger" },
|
||||
{ label: "Cancel", value: "cancel", type: "secondary" }
|
||||
{ label: i18n('alert_retry'), value: "retry", type: "danger" },
|
||||
{ label: i18n('alert_cancel'), value: "cancel", type: "secondary" }
|
||||
];
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1163,7 +1163,7 @@ async function UIDesktop(options) {
|
||||
ht += `</div>`;
|
||||
|
||||
// 'Show Desktop'
|
||||
ht += `<a href="/" class="show-desktop-btn toolbar-btn antialiased hidden" target="_blank" title="Show Desktop">Show Desktop <img src="${window.icons['launch-white.svg']}" style="width: 10px; height: 10px; margin-left: 5px;"></a>`;
|
||||
ht += `<a href="/" class="show-desktop-btn toolbar-btn antialiased hidden" target="_blank" title="${i18n('desktop_show_desktop')}">${i18n('desktop_show_desktop')} <img src="${window.icons['launch-white.svg']}" style="width: 10px; height: 10px; margin-left: 5px;"></a>`;
|
||||
|
||||
// refer
|
||||
if (window.user.referral_code) {
|
||||
@@ -1772,24 +1772,24 @@ $(document).on('contextmenu taphold', '.taskbar', function (event) {
|
||||
// Only show position submenu on desktop devices
|
||||
if (!isMobile.phone && !isMobile.tablet) {
|
||||
menuItems.push({
|
||||
html: "Position",
|
||||
html: i18n('desktop_position'),
|
||||
items: [
|
||||
{
|
||||
html: "Left",
|
||||
html: i18n('desktop_position_left'),
|
||||
checked: currentPosition === 'left',
|
||||
onClick: function() {
|
||||
window.update_taskbar_position('left');
|
||||
}
|
||||
},
|
||||
{
|
||||
html: "Bottom",
|
||||
html: i18n('desktop_position_bottom'),
|
||||
checked: currentPosition === 'bottom',
|
||||
onClick: function() {
|
||||
window.update_taskbar_position('bottom');
|
||||
}
|
||||
},
|
||||
{
|
||||
html: "Right",
|
||||
html: i18n('desktop_position_right'),
|
||||
checked: currentPosition === 'right',
|
||||
onClick: function() {
|
||||
window.update_taskbar_position('right');
|
||||
@@ -1802,7 +1802,7 @@ $(document).on('contextmenu taphold', '.taskbar', function (event) {
|
||||
|
||||
// Add the "Show open windows" option for all devices
|
||||
menuItems.push({
|
||||
html: "Show open windows",
|
||||
html: i18n('desktop_show_open_windows'),
|
||||
onClick: function () {
|
||||
$(`.window`).showWindow();
|
||||
}
|
||||
@@ -1810,7 +1810,7 @@ $(document).on('contextmenu taphold', '.taskbar', function (event) {
|
||||
|
||||
// Add the "Show the desktop" option for all devices
|
||||
menuItems.push({
|
||||
html: "Show the desktop",
|
||||
html: i18n('desktop_show_desktop'),
|
||||
onClick: function () {
|
||||
$(`.window`).hideWindow();
|
||||
}
|
||||
@@ -2209,11 +2209,11 @@ document.addEventListener('fullscreenchange', (event) => {
|
||||
|
||||
if (document.fullscreenElement) {
|
||||
$('.fullscreen-btn').css('background-image', `url(${window.icons['shrink.svg']})`);
|
||||
$('.fullscreen-btn').attr('title', 'Exit Full Screen');
|
||||
$('.fullscreen-btn').attr('title', i18n('desktop_exit_full_screen'));
|
||||
window.user_preferences.clock_visible === 'auto' && $('#clock').show();
|
||||
} else {
|
||||
$('.fullscreen-btn').css('background-image', `url(${window.icons['fullscreen.svg']})`);
|
||||
$('.fullscreen-btn').attr('title', 'Enter Full Screen');
|
||||
$('.fullscreen-btn').attr('title', i18n('desktop_enter_full_screen'));
|
||||
window.user_preferences.clock_visible === 'auto' && $('#clock').hide();
|
||||
}
|
||||
})
|
||||
|
||||
@@ -141,7 +141,7 @@ function UIItem(options){
|
||||
background-color: #ffffff;
|
||||
padding: 2px;" src="${html_encode(window.icons['shared.svg'])}"
|
||||
data-item-id="${item_id}"
|
||||
title="A user has shared this item with you.">`;
|
||||
title="${i18n('item_shared_with_you')}">`;
|
||||
// owner-shared badge
|
||||
h += `<img class="item-badge item-is-shared"
|
||||
style="background-color: #ffffff; padding: 2px; ${!is_shared_with_me && options.is_shared ? 'display:block;' : ''}"
|
||||
@@ -149,14 +149,14 @@ function UIItem(options){
|
||||
data-item-id="${item_id}"
|
||||
data-item-uid="${options.uid}"
|
||||
data-item-path="${html_encode(options.path)}"
|
||||
title="You have shared this item with at least one other user."
|
||||
title="${i18n('item_shared_by_you')}"
|
||||
>`;
|
||||
// shortcut badge
|
||||
h += `<img class="item-badge item-shortcut"
|
||||
style="background-color: #ffffff; padding: 2px; ${options.is_shortcut !== 0 ? 'display:block;' : ''}"
|
||||
src="${html_encode(window.icons['shortcut.svg'])}"
|
||||
data-item-id="${item_id}"
|
||||
title="Shortcut"
|
||||
title="${i18n('item_shortcut')}"
|
||||
>`;
|
||||
|
||||
h += `</div>`;
|
||||
@@ -784,7 +784,7 @@ function UIItem(options){
|
||||
}
|
||||
if(!are_trashed){
|
||||
menu_items.push({
|
||||
html: 'Share With…',
|
||||
html: i18n('Share With…'),
|
||||
onClick: async function(){
|
||||
if(window.user.is_temp &&
|
||||
!await UIWindowSaveAccount({
|
||||
@@ -1050,7 +1050,7 @@ function UIItem(options){
|
||||
}
|
||||
}else{
|
||||
items.push({
|
||||
html: 'No suitable apps found',
|
||||
html: i18n('no_suitable_apps_found'),
|
||||
disabled: true,
|
||||
});
|
||||
}
|
||||
@@ -1090,7 +1090,7 @@ function UIItem(options){
|
||||
// -------------------------------------------
|
||||
if(!is_trashed && !is_trash){
|
||||
menu_items.push({
|
||||
html: 'Share With…',
|
||||
html: i18n('Share With…'),
|
||||
onClick: async function(){
|
||||
if(window.user.is_temp &&
|
||||
!await UIWindowSaveAccount({
|
||||
@@ -1517,7 +1517,7 @@ $(document).on('long-hover', '.item-has-website-badge', function(e){
|
||||
|
||||
if(fsentry.subdomains){
|
||||
let h = `<div class="allow-user-select website-badge-popover-content">`;
|
||||
h += `<div class="website-badge-popover-title">Associated website${ fsentry.subdomains.length > 1 ? 's':''}</div>`;
|
||||
h += `<div class="website-badge-popover-title">${i18n(fsentry.subdomains.length > 1 ? 'item_associated_websites_plural' : 'item_associated_websites')}</div>`;
|
||||
fsentry.subdomains.forEach(subdomain => {
|
||||
h += `
|
||||
<a class="website-badge-popover-link" href="${subdomain.address}" style="font-size:13px;" target="_blank">${subdomain.address.replace('https://', '')}</a>
|
||||
|
||||
@@ -176,7 +176,7 @@ function UITaskbarItem(options){
|
||||
//------------------------------------------
|
||||
if(options.app && options.app !== 'trash'){
|
||||
menu_items.push({
|
||||
html: 'New Window',
|
||||
html: i18n('new_window'),
|
||||
val: $(this).attr('data-id'),
|
||||
onClick: function(){
|
||||
// is trash?
|
||||
@@ -192,7 +192,7 @@ function UITaskbarItem(options){
|
||||
//------------------------------------------
|
||||
else if(options.app && options.app === 'trash'){
|
||||
menu_items.push({
|
||||
html: 'Open Trash',
|
||||
html: i18n('open_trash'),
|
||||
val: $(this).attr('data-id'),
|
||||
onClick: function(){
|
||||
launch_app({
|
||||
|
||||
+19
-19
@@ -340,11 +340,11 @@ async function UIWindow(options) {
|
||||
h += `<div class="window-navbar">`;
|
||||
h += `<div style="float:left; margin-left:5px; margin-right:5px;">`;
|
||||
// Back
|
||||
h += `<img draggable="false" class="window-navbar-btn window-navbar-btn-back window-navbar-btn-disabled" src="${html_encode(window.icons['arrow-left.svg'])}" title="Click to go back.">`;
|
||||
h += `<img draggable="false" class="window-navbar-btn window-navbar-btn-back window-navbar-btn-disabled" src="${html_encode(window.icons['arrow-left.svg'])}" title="${i18n('window_click_to_go_back')}">`;
|
||||
// Forward
|
||||
h += `<img draggable="false" class="window-navbar-btn window-navbar-btn-forward window-navbar-btn-disabled" src="${html_encode(window.icons['arrow-right.svg'])}" title="Click to go forward.">`;
|
||||
h += `<img draggable="false" class="window-navbar-btn window-navbar-btn-forward window-navbar-btn-disabled" src="${html_encode(window.icons['arrow-right.svg'])}" title="${i18n('window_click_to_go_forward')}">`;
|
||||
// Up
|
||||
h += `<img draggable="false" class="window-navbar-btn window-navbar-btn-up ${options.path === '/' ? 'window-navbar-btn-disabled' : ''}" src="${html_encode(window.icons['arrow-up.svg'])}" title="Click to go one directory up.">`;
|
||||
h += `<img draggable="false" class="window-navbar-btn window-navbar-btn-up ${options.path === '/' ? 'window-navbar-btn-disabled' : ''}" src="${html_encode(window.icons['arrow-up.svg'])}" title="${i18n('window_click_to_go_up')}">`;
|
||||
h += `</div>`;
|
||||
// Path
|
||||
h += `<div class="window-navbar-path">${window.navbar_path(options.path, window.user.username)}</div>`;
|
||||
@@ -403,7 +403,7 @@ async function UIWindow(options) {
|
||||
h += window.explore_table_headers();
|
||||
|
||||
// Add 'This folder is empty' message by default
|
||||
h += `<div class="explorer-empty-message">This folder is empty</div>`;
|
||||
h += `<div class="explorer-empty-message">${i18n('window_folder_empty')}</div>`;
|
||||
|
||||
h += `<div class="explorer-error-message">${i18n('error_message_is_missing')}</div>`;
|
||||
|
||||
@@ -2206,7 +2206,7 @@ async function UIWindow(options) {
|
||||
}
|
||||
});
|
||||
menu_items.push({
|
||||
html: 'Minimize',
|
||||
html: i18n('minimize'),
|
||||
onClick: function(){
|
||||
$(el_window).hideWindow();
|
||||
}
|
||||
@@ -2219,7 +2219,7 @@ async function UIWindow(options) {
|
||||
//-------------------------------------------
|
||||
if(el_window_app_iframe !== null){
|
||||
menu_items.push({
|
||||
html: 'Reload App',
|
||||
html: i18n('reload_app'),
|
||||
onClick: function(){
|
||||
$(el_window_app_iframe).attr('src', $(el_window_app_iframe).attr('src'));
|
||||
}
|
||||
@@ -2231,7 +2231,7 @@ async function UIWindow(options) {
|
||||
// Close
|
||||
// -------------------------------------------
|
||||
menu_items.push({
|
||||
html: 'Close',
|
||||
html: i18n('close'),
|
||||
onClick: function(){
|
||||
$(el_window).close();
|
||||
}
|
||||
@@ -2720,7 +2720,7 @@ $(document).on('contextmenu taphold', '.window-sidebar-item', function(event){
|
||||
// Open
|
||||
//--------------------------------------------------
|
||||
{
|
||||
html: "Open",
|
||||
html: i18n('open'),
|
||||
onClick: function(){
|
||||
$(item).trigger('click');
|
||||
}
|
||||
@@ -2729,7 +2729,7 @@ $(document).on('contextmenu taphold', '.window-sidebar-item', function(event){
|
||||
// Open in New Window
|
||||
//--------------------------------------------------
|
||||
{
|
||||
html: "Open in New Window",
|
||||
html: i18n('open_in_new_window'),
|
||||
onClick: async function(){
|
||||
let item_path = $(item).attr('data-path');
|
||||
|
||||
@@ -2901,7 +2901,7 @@ $(document).on('contextmenu taphold', '.window-navbar-path-dirname', function(ev
|
||||
// Open
|
||||
// -------------------------------------------
|
||||
menu_items.push({
|
||||
html: 'Open',
|
||||
html: i18n('open'),
|
||||
onClick: ()=>{
|
||||
$(this).trigger('click');
|
||||
}
|
||||
@@ -2911,7 +2911,7 @@ $(document).on('contextmenu taphold', '.window-navbar-path-dirname', function(ev
|
||||
// (only if the item is on a window)
|
||||
// -------------------------------------------
|
||||
menu_items.push({
|
||||
html: 'Open in New Window',
|
||||
html: i18n('open_in_new_window'),
|
||||
onClick: function(){
|
||||
UIWindow({
|
||||
path: $(el).attr('data-path'),
|
||||
@@ -2931,7 +2931,7 @@ $(document).on('contextmenu taphold', '.window-navbar-path-dirname', function(ev
|
||||
// Paste
|
||||
// -------------------------------------------
|
||||
menu_items.push({
|
||||
html: "Paste",
|
||||
html: i18n('paste'),
|
||||
disabled: window.clipboard.length > 0 ? false : true,
|
||||
onClick: function(){
|
||||
if(window.clipboard_op === 'copy')
|
||||
@@ -3133,13 +3133,13 @@ window.update_window_path = async function(el_window, target_path){
|
||||
$(el_window).find('.window-head-title').text(i18n('documents'))
|
||||
}else if (target_path === window.public_path){
|
||||
$(el_window).find('.window-head-icon').attr('src', window.icons['folder-public.svg']);
|
||||
$(el_window).find('.window-head-title').text('Public')
|
||||
$(el_window).find('.window-head-title').text(i18n('window_title_public'))
|
||||
}else if (target_path === window.videos_path){
|
||||
$(el_window).find('.window-head-icon').attr('src', window.icons['folder-videos.svg']);
|
||||
$(el_window).find('.window-head-title').text('Videos')
|
||||
$(el_window).find('.window-head-title').text(i18n('window_title_videos'))
|
||||
}else if (target_path === window.pictures_path){
|
||||
$(el_window).find('.window-head-icon').attr('src', window.icons['folder-pictures.svg']);
|
||||
$(el_window).find('.window-head-title').text('Pictures')
|
||||
$(el_window).find('.window-head-title').text(i18n('window_title_pictures'))
|
||||
}// root folder of a shared user?
|
||||
else if((target_path.split('/').length - 1) === 1 && target_path !== '/'+window.user.username)
|
||||
$(el_window).find('.window-head-icon').attr('src', window.icons['shared.svg']);
|
||||
@@ -3360,18 +3360,18 @@ $.fn.close = async function(options) {
|
||||
// otherwise, change URL/Title to desktop
|
||||
else{
|
||||
window.history.replaceState(null, document.title, '/');
|
||||
document.title = 'Puter';
|
||||
document.title = i18n('window_title_puter');
|
||||
}
|
||||
// if it's explore
|
||||
if($last_window_in_stack.attr('data-app') && $last_window_in_stack.attr('data-app').toLowerCase() === 'explorer'){
|
||||
window.history.replaceState(null, document.title, '/');
|
||||
document.title = 'Puter';
|
||||
document.title = i18n('window_title_puter');
|
||||
}
|
||||
}
|
||||
// otherwise, change URL/Title to desktop
|
||||
else{
|
||||
window.history.replaceState(null, document.title, '/');
|
||||
document.title = 'Puter';
|
||||
document.title = i18n('window_title_puter');
|
||||
}
|
||||
}
|
||||
// close child windows
|
||||
@@ -3753,7 +3753,7 @@ $.fn.hideWindow = async function(options) {
|
||||
|
||||
// update title and window URL
|
||||
window.history.replaceState(null, document.title, '/');
|
||||
document.title = 'Puter';
|
||||
document.title = i18n('window_title_puter');
|
||||
}
|
||||
})
|
||||
return this;
|
||||
|
||||
@@ -51,7 +51,7 @@ async function UIWindowChangePassword(options){
|
||||
h += `</div>`;
|
||||
|
||||
const el_window = await UIWindow({
|
||||
title: 'Change Password',
|
||||
title: i18n('window_title_change_password'),
|
||||
app: 'change-passowrd',
|
||||
single_instance: true,
|
||||
icon: null,
|
||||
|
||||
@@ -199,7 +199,7 @@ async function UIWindowDesktopBGSettings(options){
|
||||
allowed_file_types: ['image/*'],
|
||||
show_maximize_button: false,
|
||||
show_minimize_button: false,
|
||||
title: 'Open',
|
||||
title: i18n('window_title_open'),
|
||||
is_dir: true,
|
||||
is_openFileDialog: true,
|
||||
selectable_body: false,
|
||||
|
||||
@@ -66,7 +66,7 @@ async function UIWindowFontPicker(options){
|
||||
h += `</div>`;
|
||||
|
||||
const el_window = await UIWindow({
|
||||
title: 'Select font…',
|
||||
title: i18n('window_title_select_font'),
|
||||
app: 'font-picker',
|
||||
single_instance: true,
|
||||
icon: null,
|
||||
|
||||
@@ -153,13 +153,13 @@ async function UIWindowLogin(options){
|
||||
|
||||
// Basic validation for email/username and password
|
||||
if(!email_username) {
|
||||
$(el_window).find('.login-error-msg').html(i18n('email_or_username_required') || 'Email or username is required');
|
||||
$(el_window).find('.login-error-msg').html(i18n('login_email_username_required'));
|
||||
$(el_window).find('.login-error-msg').fadeIn();
|
||||
return;
|
||||
}
|
||||
|
||||
if(!password) {
|
||||
$(el_window).find('.login-error-msg').html(i18n('password_required') || 'Password is required');
|
||||
$(el_window).find('.login-error-msg').html(i18n('login_password_required'));
|
||||
$(el_window).find('.login-error-msg').fadeIn();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ async function UIWindowLoginInProgress(options){
|
||||
h += `</div>`;
|
||||
|
||||
const el_window = await UIWindow({
|
||||
title: 'Authenticating...',
|
||||
title: i18n('window_title_authenticating'),
|
||||
app: 'change-passowrd',
|
||||
single_instance: true,
|
||||
icon: null,
|
||||
|
||||
@@ -82,7 +82,7 @@ async function UIWindowNewPassword(options){
|
||||
|
||||
|
||||
const el_window = await UIWindow({
|
||||
title: 'Set New Password',
|
||||
title: i18n('window_title_set_new_password'),
|
||||
app: 'change-passowrd',
|
||||
single_instance: true,
|
||||
icon: null,
|
||||
|
||||
@@ -48,7 +48,7 @@ async function UIWindowPublishWebsite(target_dir_uid, target_dir_name, target_di
|
||||
h += `</div>`;
|
||||
|
||||
const el_window = await UIWindow({
|
||||
title: 'Publish Website',
|
||||
title: i18n('window_title_publish_website'),
|
||||
icon: null,
|
||||
uid: null,
|
||||
is_dir: false,
|
||||
@@ -114,7 +114,7 @@ async function UIWindowPublishWebsite(target_dir_uid, target_dir_name, target_di
|
||||
$(el_window).find('.publish-website-error-msg').html(
|
||||
err.message + (
|
||||
err.code === 'subdomain_limit_reached' ?
|
||||
' <span class="manage-your-websites-link">Manage Your Subdomains</span>' : ''
|
||||
' <span class="manage-your-websites-link">' + i18n('manage_your_subdomains') + '</span>' : ''
|
||||
)
|
||||
);
|
||||
$(el_window).find('.publish-website-error-msg').fadeIn();
|
||||
|
||||
@@ -40,7 +40,7 @@ async function UIWindowQR(options){
|
||||
h += placeholder_qr.html;
|
||||
|
||||
const el_window = await UIWindow({
|
||||
title: 'Instant Login!',
|
||||
title: i18n('window_title_instant_login'),
|
||||
app: 'instant-login',
|
||||
single_instance: true,
|
||||
icon: null,
|
||||
|
||||
@@ -36,7 +36,7 @@ async function UIWindowRefer(options){
|
||||
h += `</div>`;
|
||||
|
||||
const el_window = await UIWindow({
|
||||
title: `Refer a friend!`,
|
||||
title: i18n('window_title_refer_friend'),
|
||||
window_class: 'window-refer-friend',
|
||||
icon: null,
|
||||
uid: null,
|
||||
|
||||
@@ -47,7 +47,7 @@ async function UIWindowSessionList(options){
|
||||
h += `</div>`;
|
||||
|
||||
const el_window = await UIWindow({
|
||||
title: 'Session List!',
|
||||
title: i18n('window_title_session_list'),
|
||||
app: 'session-list',
|
||||
single_instance: true,
|
||||
icon: null,
|
||||
|
||||
@@ -69,7 +69,7 @@ function UIWindowSignup(options){
|
||||
h += `</div>`;
|
||||
// confirm password
|
||||
h += `<div style="overflow: hidden; margin-top: 20px; margin-bottom: 20px; position: relative">`;
|
||||
h += `<label for="confirm-password-${internal_id}">${i18n('Confirm Password')}</label>`;
|
||||
h += `<label for="confirm-password-${internal_id}">${i18n('signup_confirm_password')}</label>`;
|
||||
h += `<input id="confirm-password-${internal_id}" class="confirm-password" type="${options.show_password ? "text" : "password"}" name="confirm-password" autocomplete="new-password" />`;
|
||||
// show/hide icon
|
||||
h += `<span style="position: absolute; right: 5%; top: 50%; cursor: pointer;" id="toggle-show-password-${internal_id}">
|
||||
|
||||
@@ -31,20 +31,20 @@ async function UIWindowWelcome(options){
|
||||
h += `<img style="display: block; margin: 45px auto 0; width: 270px; opacity: 0.5;" src="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%3F%3E%3Csvg%20width%3D%2248%22%20height%3D%2248%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Asvg%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20class%3D%22layer%22%3E%3Ctitle%3ELayer%201%3C%2Ftitle%3E%3Cg%20id%3D%22svg_1%22%20stroke-width%3D%221%22%20transform%3D%22rotate(90%2024%2023.9997)%22%3E%3Cpolyline%20fill%3D%22none%22%20id%3D%22svg_2%22%20points%3D%2239%2024%2025%2024%2025%2028%22%20stroke%3D%22%23ffffff%22%20stroke-linecap%3D%22square%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%221%22%2F%3E%3Cpolyline%20fill%3D%22none%22%20id%3D%22svg_3%22%20points%3D%2235.879%2010.121%2032%2014%2025%2014%2025%2018%22%20stroke%3D%22%23ffffff%22%20stroke-linecap%3D%22square%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%221%22%2F%3E%3Cpath%20d%3D%22m13%2C26a10.29%2C10.29%200%200%201%20-7.2%2C-3%22%20fill%3D%22none%22%20id%3D%22svg_4%22%20stroke%3D%22%23ffffff%22%20stroke-linecap%3D%22square%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%221%22%2F%3E%3Cpath%20d%3D%22m17%2C31.6a5.83%2C5.83%200%200%201%20-4%2C-5.6a5.73%2C5.73%200%200%201%202%2C-4.4%22%20fill%3D%22none%22%20id%3D%22svg_5%22%20stroke%3D%22%23ffffff%22%20stroke-linecap%3D%22square%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%221%22%2F%3E%3Cpath%20d%3D%22m35.88%2C37.88l-3.88%2C-3.88l-7%2C0l0%2C2a9.9%2C9.9%200%200%201%20-10%2C10a9.9%2C9.9%200%200%201%20-10%2C-10a9.06%2C9.06%200%200%201%200.6%2C-3.2a5.63%2C5.63%200%200%201%20-2.6%2C-4.8a5.89%2C5.89%200%200%201%202.8%2C-5a9.99%2C9.99%200%200%201%20-2.8%2C-7a9.9%2C9.9%200%200%201%2010%2C-10l0.4%2C0a5.83%2C5.83%200%200%201%205.6%2C-4a5.89%2C5.89%200%200%201%206%2C6%22%20fill%3D%22none%22%20id%3D%22svg_6%22%20stroke%3D%22%23ffffff%22%20stroke-linecap%3D%22square%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%221%22%2F%3E%3Ccircle%20cx%3D%2238%22%20cy%3D%228%22%20data-color%3D%22color-2%22%20fill%3D%22none%22%20id%3D%22svg_7%22%20r%3D%223%22%20stroke%3D%22%23ffffff%22%20stroke-linecap%3D%22square%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%221%22%2F%3E%3Ccircle%20cx%3D%2242%22%20cy%3D%2224%22%20data-color%3D%22color-2%22%20fill%3D%22none%22%20id%3D%22svg_8%22%20r%3D%223%22%20stroke%3D%22%23ffffff%22%20stroke-linecap%3D%22square%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%221%22%2F%3E%3Ccircle%20cx%3D%2238%22%20cy%3D%2240%22%20data-color%3D%22color-2%22%20fill%3D%22none%22%20id%3D%22svg_9%22%20r%3D%223%22%20stroke%3D%22%23ffffff%22%20stroke-linecap%3D%22square%22%20stroke-miterlimit%3D%2210%22%20stroke-width%3D%221%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E">`;
|
||||
h += `</div>`;
|
||||
h += `<div style="flex-grow: 1; padding-left: 50px; padding-top: 70px; padding-right: 50px;">`;
|
||||
h += `<h1 style="font-size: 25px; font-weight: 300; -webkit-font-smoothing: antialiased; color: #545763;">Welcome to your <br>Personal Internet Computer</h1>`;
|
||||
h += `<p style="margin-top: 25px; font-size: 16px; font-weight: 300; -webkit-font-smoothing: antialiased; color: #3e4251;">Store files, play games, find awesome apps, and much more! All in one place, accessible from anywhere at any time.</p>`;
|
||||
h += `<button class="welcome-window-get-started" style="font-size: 15px; font-weight: 300; -webkit-font-smoothing: antialiased; cursor: pointer; padding: 8px 20px; border-radius: 5px; text-decoration: none; margin-right: 20px; border: 1px solid #656565 !important; background: none; margin-top: 10px;">Get Started</button>`;
|
||||
h += `<h1 style="font-size: 25px; font-weight: 300; -webkit-font-smoothing: antialiased; color: #545763;">${i18n('welcome_title')}</h1>`;
|
||||
h += `<p style="margin-top: 25px; font-size: 16px; font-weight: 300; -webkit-font-smoothing: antialiased; color: #3e4251;">${i18n('welcome_description')}</p>`;
|
||||
h += `<button class="welcome-window-get-started" style="font-size: 15px; font-weight: 300; -webkit-font-smoothing: antialiased; cursor: pointer; padding: 8px 20px; border-radius: 5px; text-decoration: none; margin-right: 20px; border: 1px solid #656565 !important; background: none; margin-top: 10px;">${i18n('welcome_get_started')}</button>`;
|
||||
h += `<div class="welcome-window-footer">`;
|
||||
h += `<a href="/terms" target="_blank">Terms</a>`;
|
||||
h += `<a href="/privacy" style="margin-left: 20px;" target="_blank">Privacy</a>`;
|
||||
h += `<a href="https://developer.puter.com" style="margin-left: 20px;" target="_blank">Developers</a>`;
|
||||
h += `<a href="https://github.com/heyputer/puter" style="margin-left: 20px;" target="_blank">Open Source</a>`;
|
||||
h += `<a href="/terms" target="_blank">${i18n('welcome_terms')}</a>`;
|
||||
h += `<a href="/privacy" style="margin-left: 20px;" target="_blank">${i18n('welcome_privacy')}</a>`;
|
||||
h += `<a href="https://developer.puter.com" style="margin-left: 20px;" target="_blank">${i18n('welcome_developers')}</a>`;
|
||||
h += `<a href="https://github.com/heyputer/puter" style="margin-left: 20px;" target="_blank">${i18n('welcome_open_source')}</a>`;
|
||||
h += `</div>`;
|
||||
h += `</div>`;
|
||||
h += `</div>`;
|
||||
|
||||
const el_window = await UIWindow({
|
||||
title: 'Instant Login!',
|
||||
title: i18n('welcome_instant_login_title'),
|
||||
app: 'instant-login',
|
||||
single_instance: true,
|
||||
icon: null,
|
||||
|
||||
@@ -171,6 +171,8 @@ const en = {
|
||||
move: 'Move',
|
||||
moving_file: "Moving %%",
|
||||
my_websites: "My Websites",
|
||||
minimize: "Minimize",
|
||||
reload_app: "Reload App",
|
||||
name: 'Name',
|
||||
name_cannot_be_empty: 'Name cannot be empty.',
|
||||
name_cannot_contain_double_period: "Name can not be the '..' character.",
|
||||
@@ -188,8 +190,10 @@ const en = {
|
||||
no_websites_published: "You have not published any websites yet. Right click on a folder to get started.",
|
||||
ok: 'OK',
|
||||
open: "Open",
|
||||
new_window: "New Window",
|
||||
open_in_new_tab: "Open in New Tab",
|
||||
open_in_new_window: "Open in New Window",
|
||||
open_trash: "Open Trash",
|
||||
open_with: "Open With",
|
||||
original_name: 'Original Name',
|
||||
original_path: 'Original Path',
|
||||
@@ -419,7 +423,76 @@ const en = {
|
||||
'billing.enjoy_msg': 'Enjoy %% of Cloud Storage plus other benefits.',
|
||||
'too_many_attempts': 'Too many attempts. Please try again later.',
|
||||
'server_timeout': 'The server took too long to respond. Please try again.',
|
||||
'signup_error': 'An error occurred during signup. Please try again.'
|
||||
'signup_error': 'An error occurred during signup. Please try again.',
|
||||
|
||||
// Welcome Window
|
||||
'welcome_title': 'Welcome to your Personal Internet Computer',
|
||||
'welcome_description': 'Store files, play games, find awesome apps, and much more! All in one place, accessible from anywhere at any time.',
|
||||
'welcome_get_started': 'Get Started',
|
||||
'welcome_terms': 'Terms',
|
||||
'welcome_privacy': 'Privacy',
|
||||
'welcome_developers': 'Developers',
|
||||
'welcome_open_source': 'Open Source',
|
||||
'welcome_instant_login_title': 'Instant Login!',
|
||||
|
||||
// Alert Window
|
||||
'alert_error_title': 'Error!',
|
||||
'alert_warning_title': 'Warning!',
|
||||
'alert_info_title': 'Info',
|
||||
'alert_success_title': 'Success!',
|
||||
'alert_confirm_title': 'Are you sure?',
|
||||
'alert_yes': 'Yes',
|
||||
'alert_no': 'No',
|
||||
'alert_retry': 'Retry',
|
||||
'alert_cancel': 'Cancel',
|
||||
|
||||
// Signup Window
|
||||
'signup_confirm_password': 'Confirm Password',
|
||||
|
||||
// Login Window
|
||||
'login_email_username_required': 'Email or username is required',
|
||||
'login_password_required': 'Password is required',
|
||||
|
||||
// Various Window Titles
|
||||
'window_title_open': 'Open',
|
||||
'window_title_change_password': 'Change Password',
|
||||
'window_title_select_font': 'Select font…',
|
||||
'window_title_session_list': 'Session List!',
|
||||
'window_title_set_new_password': 'Set New Password',
|
||||
'window_title_instant_login': 'Instant Login!',
|
||||
'window_title_publish_website': 'Publish Website',
|
||||
'window_title_authenticating': 'Authenticating...',
|
||||
'window_title_refer_friend': 'Refer a friend!',
|
||||
|
||||
// Desktop UI
|
||||
'desktop_show_desktop': 'Show Desktop',
|
||||
'desktop_show_open_windows': 'Show Open Windows',
|
||||
'desktop_exit_full_screen': 'Exit Full Screen',
|
||||
'desktop_enter_full_screen': 'Enter Full Screen',
|
||||
'desktop_position': 'Position',
|
||||
'desktop_position_left': 'Left',
|
||||
'desktop_position_bottom': 'Bottom',
|
||||
'desktop_position_right': 'Right',
|
||||
// Item UI
|
||||
'item_shared_with_you': 'A user has shared this item with you.',
|
||||
'item_shared_by_you': 'You have shared this item with at least one other user.',
|
||||
'item_shortcut': 'Shortcut',
|
||||
'item_associated_websites': 'Associated website',
|
||||
'item_associated_websites_plural': 'Associated websites',
|
||||
'no_suitable_apps_found': 'No suitable apps found',
|
||||
|
||||
// Window UI
|
||||
'window_click_to_go_back': 'Click to go back.',
|
||||
'window_click_to_go_forward': 'Click to go forward.',
|
||||
'window_click_to_go_up': 'Click to go one directory up.',
|
||||
'window_title_public': 'Public',
|
||||
'window_title_videos': 'Videos',
|
||||
'window_title_pictures': 'Pictures',
|
||||
'window_title_puter': 'Puter',
|
||||
'window_folder_empty': 'This folder is empty',
|
||||
|
||||
// Website Management
|
||||
'manage_your_subdomains': 'Manage Your Subdomains'
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user