/* *********************************************************************************** fpPS4 Temmie's Launcher aboutScreen.js This file contains all data / functions required to assemble about screen *********************************************************************************** */ temp_ABOUTSCREEN = { /* Functions */ // Process link list makeLinkList: function(arr){ // Final HTML var res = ''; // Process article list arr.forEach(function(cItem, cIndex){ // Check if need to break line var breakLine = '
'; if (cIndex === (arr.length - 1)){ breakLine = ''; } // Create entry res = res + '' + arr[cIndex].name + '' + breakLine; }); // End return res; }, // Generate about screen make: function(){ try { // Variables var appPath = APP.settings.appPath, // Plugin list pluginList = [ {author: 'Rob--', name: 'memoryjs', urlAuthor: 'https://github.com/rob--', urlPlugin: 'https://github.com/rob--/memoryjs'}, {author: 'Antelle', name: 'node-stream-zip', urlAuthor: 'https://github.com/antelle/', urlPlugin: 'https://github.com/antelle/node-stream-zip'}, {author: 'TemmieHeartz (Hi!)', name: 'TMS.js', urlAuthor: 'https://github.com/temmieheartz/', urlPlugin: 'https://github.com/temmieheartz/TMS.js'} ], // Plugin icon list pluginIconList = [ {name: 'TMS.js', imgSrc: 'tmsjs.webp', url: 'https://github.com/temmieheartz/TMS.js'}, {name: 'memoryjs', imgSrc: 'memoryjs.webp', url: 'https://github.com/rob--/memoryjs'} ], // Original translation (up to 1.2.1) legacyTranslationsDb = { 'en-us': {author: 'TemmieHeartz', url: 'https://github.com/temmieheartz/', revisors: {'ArbestRi': 'https://github.com/ArbestRi'}}, 'pt-br': {author: 'TemmieHeartz', url: 'https://github.com/temmieheartz/', revisors: null}, 'fr-fr': {author: 'Mizmalik', url: 'https://github.com/Mizmalik', revisors: null}, 'zh-s': {author: 'nini2P', url: 'https://github.com/nini22P', revisors: null}, 'it-it': {author: 'B8nee', url: 'https://github.com/B8nee', revisors: null}, 'ja-ja': {author: 'mktm235', url: 'https://github.com/mktm235', revisors: null}, 'nl-nl': {author: 'MrSn0wy', url: 'https://github.com/MrSn0wy)', revisors: null}, 'ru-ru': {author: 'ThatSameGuy', url: null, revisors: {'gandalfthewhite': 'https://github.com/gandalfthewhite19890404', 'ArtemVideoGames': 'https://github.com/ArtemVideoGames'}}, 'uk-ua': {author: 'ArtemVideoGames', url: 'https://github.com/ArtemVideoGames', revisors: {'ThatSameGuy': null}}, }, // Articles used as refence articlesList = [ {name: 'You Might Not Need jQuery', url: 'http://youmightnotneedjquery.com/'}, {name: 'Param.sfo - PS4 Developer wiki', url: 'https://www.psdevwiki.com/ps4/Param.sfo'}, {name: 'TemmieHeartz - R3ditor V2 (R3V2) API', url: 'https://github.com/temmieheartz/R3ditor-V2'}, {name: 'CSS-Tricks - Strip HTML Tags in JavaScript', url: 'https://css-tricks.com/snippets/javascript/strip-html-tags-in-javascript/'}, {name: 'Microsoft - [MS-ERREF]: NTSTATUS Values', url: 'https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55'}, {name: 'W3schools - How To Create a Draggable HTML Element', url: 'https://www.w3schools.com/howto/howto_js_draggable.asp'} ], // Icons used on this project iconsUsedList = [ {name: 'SVG Repo - Free SVG Vectors and Icons', url: 'https://www.svgrepo.com/'}, {name: 'Explore HD Transparent PNGs & Cliparts, Free Unlimited Download - PngFind', url: 'https://www.pngfind.com/'}, {name: 'ClipartMax - PNG Clipart Free Download, Largest Transparent Clip Art Images Collection', url: 'https://www.clipartmax.com/'}, {name: 'Free controllers and Keyboard Prompts by Nicolae (Xelu) Berbece (Those Awesome Guys)', url: 'https://thoseawesomeguys.com/prompts/'} ], // Top HTML topHtml = 'appLogo

' + APP.lang.getVariable('aboutScreen_createdBy') + '
' + APP.lang.getVariable('aboutScreen_version') + ': ' + APP.appVersion + '
'; /* Plugins */ // HTML Base var pluginsHtml = '
' + APP.lang.getVariable('aboutScreen_plugins') + '
'; // Process plugin list pluginList.forEach(function(cPlugin, cIndex){ // Check if need to insert break line var breakLine = '
'; if (cIndex === (pluginList.length - 1)){ breakLine = ''; } // Create entry pluginsHtml = pluginsHtml + '' + pluginList[cIndex].name + ' - ' + APP.lang.getVariable('aboutScreen_pluginCreatedBy') + ' ' + pluginList[cIndex].author + '' + breakLine; }); // Close div and prepare to generate plugin icon list pluginsHtml = pluginsHtml + '

'; // Process plugin icon list pluginIconList.forEach(function(cPlugin, cIndex){ // Create icon pluginsHtml = pluginsHtml + 'ABOUT_PLUGIN_ICON_' + pluginIconList[cIndex].name + ''; }); // Close div pluginsHtml = pluginsHtml + '
'; /* Original translation */ // HTML Base var legacyTranslationsArray = Object.keys(legacyTranslationsDb), legacyTranslationsHtml = '
' + APP.lang.getVariable('aboutScreen_legacyTranslations') + '
'; // Process legacy translations list legacyTranslationsArray.forEach(function(cLanguage, cIndex){ // Variables var revisors = '', breakLine = '
', langData = legacyTranslationsDb[cLanguage], authorUrl = '' + langData.author + ''; // Check if is latest entry if (cIndex === (legacyTranslationsArray.length - 1)){ breakLine = ''; } // Check if author has url if (langData.url === null){ authorUrl = langData.author; } // Check if had revisors if (langData.revisors !== null){ // Set initial label revisors = ' (' + APP.lang.getVariable('aboutScreen_legacyTranslations_revisors'); // Process revisions Object.keys(langData.revisors).forEach(function(cRevisor, revIndex){ // Check if isn't latest revision var comma = ', '; if (revIndex === (Object.keys(langData.revisors).length - 1)){ comma = ''; } // Append revision if (langData.revisors[cRevisor] !== null){ revisors = revisors + '' + cRevisor + '' + comma; } else { revisors = revisors + cRevisor + comma; } }); // Append closing parenthesis revisors = revisors + ')'; } // Create entry legacyTranslationsHtml = legacyTranslationsHtml + APP.lang.getVariable('aboutScreen_legacyTranslations_' + cLanguage) + ': ' + authorUrl + revisors + breakLine; }); // Close div legacyTranslationsHtml = legacyTranslationsHtml + '
'; /* 2.0.0 Translations - [WIP] */ /* Articles used as reference */ var articlesHtml = '
' + APP.lang.getVariable('aboutScreen_articlesUsedAsReference') + '
' + APP.design.about.makeLinkList(articlesList) + '
', /* External icons used on this project */ externalIconsHtml = '
' + APP.lang.getVariable('aboutScreen_externalIconsUsed') + '
' + APP.design.about.makeLinkList(iconsUsedList) + '
', /* Special Thanks */ specialThanksHtml = '
' + APP.lang.getVariable('aboutScreen_specialThanksTo') + ': ' + 'ShoMatsuiEx, RedKween, Sherry Winters, red_prig, Kimieggie, B8ne, elon, addy,
sceGnmMapComputeQueueEnjoyer, gandalfthewhite, ' + ' ' + APP.lang.getVariable('aboutScreen_specialThanksTo_disc') + '


' + APP.lang.getVariable('aboutScreen_specialThanksTo_closing') + '

', /* Closing */ closingInfo = '
' + APP.lang.getVariable('aboutScreen_important') + ': ' + APP.lang.getVariable('bootWarnInfo') + '
'; /* End */ // Make final HTML const finalHtml = topHtml + pluginsHtml + legacyTranslationsHtml + articlesHtml + externalIconsHtml + specialThanksHtml + closingInfo; // Set HTML on design formList APP.design.formList['about'] = finalHtml; // End return 0; } catch (err) { // Log error throw new Error(err); } } }