Skip to content
Open
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
13 changes: 13 additions & 0 deletions src/gui/src/UI/UIDesktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,7 @@ async function UIDesktop(options){
show_hidden_files: JSON.parse(await puter.kv.get('user_preferences.show_hidden_files')),
language: await puter.kv.get('user_preferences.language'),
clock_visible: await puter.kv.get('user_preferences.clock_visible'),
hide_desktop_icons: JSON.parse(await puter.kv.get('user_preferences.hide_desktop_icons')) ?? false,
};

// update default apps
Expand Down Expand Up @@ -944,6 +945,18 @@ async function UIDesktop(options){
}
},
// -------------------------------------------
// Hide/Show Desktop Icons
// -------------------------------------------
{
html: window.user_preferences.hide_desktop_icons ? i18n('show_desktop_icons') : i18n('hide_desktop_icons'),
onClick: function(){
window.mutate_user_preferences({
hide_desktop_icons : !window.user_preferences.hide_desktop_icons,
});
window.toggle_desktop_icons_visibility(document.querySelectorAll('.item-container'));
}
},
// -------------------------------------------
// -
// -------------------------------------------
'-',
Expand Down
1 change: 1 addition & 0 deletions src/gui/src/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ if (window.user_preferences === null) {
show_hidden_files: false,
language: navigator.language.split("-")[0] || navigator.userLanguage || 'en',
clock_visible: 'auto',
hide_desktop_icons: false,
}
}

Expand Down
14 changes: 14 additions & 0 deletions src/gui/src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,20 @@ window.show_or_hide_files = (item_containers) => {
.removeClass(class_to_remove).addClass(class_to_add);
}

/**
* Toggle desktop icons visibility based on user preference
* @param {NodeList|jQuery} item_containers - Container elements to search for items
*/
window.toggle_desktop_icons_visibility = (item_containers) => {
const hide_icons = window.user_preferences.hide_desktop_icons;

// Target all desktop items (including Trash)
$(item_containers)
.filter('.desktop')
.find('.item')
.toggleClass('item-hidden', hide_icons);
}

window.create_folder = async(basedir, appendto_element)=>{
let dirname = basedir;
let folder_name = 'New Folder';
Expand Down
5 changes: 5 additions & 0 deletions src/gui/src/helpers/refresh_item_container.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ const refresh_item_container = function(el_item_container, options){
$(el_item_container).attr('data-sort_order')
);

// Apply hide desktop icons preference if this is desktop
if($(el_item_container).hasClass('desktop') && window.user_preferences.hide_desktop_icons){
window.toggle_desktop_icons_visibility(el_item_container);
}

if(options.fadeInItems)
$(el_item_container).animate({'opacity': '1'});

Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/i18n/translations/ar.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ const ar = {
get_a_copy_of_on_puter: "احصل على نسخة من '%%' على Puter.com!",
get_copy_link: "احصل على رابط النسخ",
hide_all_windows: "إخفاء جميع النوافذ",
hide_desktop_icons: "إخفاء أيقونات سطح المكتب",
home: "الصفحة الرئيسية",
html_document: "مستند HTML",
hue: "درجة اللون",
Expand Down Expand Up @@ -288,6 +289,7 @@ const ar = {
share_with: "مشاركة مع:",
shortcut_to: "اختصار إلى",
show_all_windows: "عرض جميع النوافذ",
show_desktop_icons: "إظهار أيقونات سطح المكتب",
show_hidden: "إظهار المخفي",
sign_in_with_puter: "تسجيل الدخول باستخدام Puter",
sign_up: "تسجيل",
Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/i18n/translations/bn.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ const bn = {
get_a_copy_of_on_puter: `পিউটার ডটকমে '%%' এর একটি অনুলিপি পান!`,
get_copy_link: "কপি লিংক নিন",
hide_all_windows: "সমস্ত উইন্ডো লুকান",
hide_desktop_icons: "ডেস্কটপ আইকন লুকান",
home: "হোম",
html_document: "এইচটিএমএল ডকুমেন্ট",
hue: "হিউ",
Expand Down Expand Up @@ -272,6 +273,7 @@ const bn = {
share_with: "সঙ্গে ভাগাভাগি করুন:",
shortcut_to: "শর্টকাট",
show_all_windows: "সমস্ত উইন্ডো দেখান",
show_desktop_icons: "ডেস্কটপ আইকন দেখান",
show_hidden: "লুকানো দেখান",
sign_in_with_puter: "Puter দিয়ে সাইন ইন করুন",
sign_up: "নিবন্ধন করুন",
Expand Down
1 change: 1 addition & 0 deletions src/gui/src/i18n/translations/br.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ const br = {
get_a_copy_of_on_puter: `Obtenha uma cópia de '%%' em Puter.com!`,
get_copy_link: 'Obter Link de Cópia',
hide_all_windows: "Ocultar Todas as Janelas",
hide_desktop_icons: "Ocultar Ícones da Área de Trabalho",
home: 'Início',
html_document: 'Documento HTML',
hue: 'Matiz',
Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/i18n/translations/da.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ const da = {
get_a_copy_of_on_puter: `Få en kopi af '%%' på Puter.com!`,
get_copy_link: 'Få kopi-link',
hide_all_windows: 'Skjul alle vinduer',
hide_desktop_icons: "Skjul skrivebordikoner",
home: 'Hjem',
html_document: 'HTML-dokument',
hue: 'Farvetone',
Expand Down Expand Up @@ -269,6 +270,7 @@ const da = {
share_with: 'Del med:',
shortcut_to: 'Genvej til',
show_all_windows: 'Vis alle vinduer',
show_desktop_icons: "Vis skrivebordikoner",
show_hidden: 'Vis skjulte',
sign_in_with_puter: 'Log ind med Puter',
sign_up: 'Tilmeld dig',
Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/i18n/translations/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ const de = {
get_a_copy_of_on_puter: `Holen Sie sich eine Kopie von '%%' auf Puter.com!`,
get_copy_link: 'Kopierlink erhalten',
hide_all_windows: "Alle Fenster verstecken",
hide_desktop_icons: "Desktop-Symbole ausblenden",
home: 'Startseite',
html_document: 'HTML-Dokument',
hue: 'Farbton',
Expand Down Expand Up @@ -269,6 +270,7 @@ const de = {
share_with: "Teilen mit:",
shortcut_to: "Verknüpfung zu",
show_all_windows: "Alle Fenster anzeigen",
show_desktop_icons: "Desktop-Symbole anzeigen",
show_hidden: 'Zeige versteckte',
sign_in_with_puter: "Mit Puter anmelden",
sign_up: "Registrieren",
Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/i18n/translations/emoji.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ const emoji = {
get_a_copy_of_on_puter: `📩🔄📂`,
get_copy_link: '🔗🔄',
hide_all_windows: "🔚🔄🖼️🖼️",
hide_desktop_icons: "🔄🖥️🖼️",
html_document: '📄🌐',
image: '🖼️',
invite_link: "🔗📩",
Expand Down Expand Up @@ -157,6 +158,7 @@ const emoji = {
set_new_password: "🔑🆕",
share_to: "🔁➡️",
show_all_windows: "🔄🆓🖼️🖼️",
show_desktop_icons: "👁️🖥️🖼️",
show_hidden: '👁️🔄',
sign_in_with_puter: "👤🆔",
sign_up: "👤🆕",
Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/i18n/translations/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ const en = {
get_a_copy_of_on_puter: `Get a copy of '%%' on Puter.com!`,
get_copy_link: 'Get Copy Link',
hide_all_windows: "Hide All Windows",
hide_desktop_icons: 'Hide Desktop Icons',
home: 'Home',
html_document: 'HTML document',
hue: 'Hue',
Expand Down Expand Up @@ -273,6 +274,7 @@ const en = {
share_with: "Share with:",
shortcut_to: "Shortcut to",
show_all_windows: "Show All Windows",
show_desktop_icons: 'Show Desktop Icons',
show_hidden: 'Show hidden',
sign_in_with_puter: "Sign in with Puter",
sign_up: "Sign Up",
Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/i18n/translations/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ const es = {
get_a_copy_of_on_puter: `¡Consigue una copia de '%%' en Puter.com!`,
get_copy_link: 'Copiar el enlace',
hide_all_windows: 'Ocultar todas las ventanas',
hide_desktop_icons: 'Ocultar iconos del escritorio',
home: 'Inicio',
html_document: 'Documento HTML',
hue: 'Hue',
Expand Down Expand Up @@ -305,6 +306,7 @@ const es = {
share_with: 'Compartir con:',
shortcut_to: 'Acceso directo a',
show_all_windows: 'Mostrar todas las ventanas',
show_desktop_icons: 'Mostrar iconos del escritorio',
show_hidden: 'Mostrar ocultos',
sign_in_with_puter: 'Inicia sesión con Puter',
sign_up: 'Registrarse',
Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/i18n/translations/fa.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const fa = {
get_a_copy_of_on_puter: `یک نسخه از '%%' را در Puter.com بگیرید!`,
get_copy_link: "گرفتن لینک کپی",
hide_all_windows: "پنهان کردن همه پنجره ها",
hide_desktop_icons: "پنهان کردن آیکون های دسکتاپ",
html_document: "سند HTML",
image: "تصویر",
invite_link: "لینک دعوت",
Expand Down Expand Up @@ -155,6 +156,7 @@ const fa = {
settings: "تنظیمات",
share_to: "اشتراک گذاری به",
show_all_windows: "نمایش همه پنجره ها",
show_desktop_icons: "نمایش آیکون های دسکتاپ",
show_hidden: "نمایش مخفی",
sign_in_with_puter: "ورود با Puter",
sign_up: "ثبت نام",
Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/i18n/translations/fi.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ const fi = {
// 'get a link to the copy' => 'Ota Linkki Kopioon' - More probable, just want to be sure

hide_all_windows: "Piilota kaikki ikkunat",
hide_desktop_icons: "Piilota työpöydän kuvakkeet",
home: "Koti",
html_document: "HTML-dokumentti",
hue: "Sävy",
Expand Down Expand Up @@ -348,6 +349,7 @@ const fi = {
share_with: "Jaa:",
shortcut_to: "Pikakuvake",
show_all_windows: "Näytä kaikki ikkunat",
show_desktop_icons: "Näytä työpöydän kuvakkeet",
show_hidden: "Näytä piilotetut",
sign_in_with_puter: "Kirjaudu sisään Puterilla",
sign_up: "Rekisteröidy",
Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/i18n/translations/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ const fr = {
get_a_copy_of_on_puter: `Obtenez une copie de '%%' sur Puter.com !`,
get_copy_link: 'Obtenir le lien de copie',
hide_all_windows: "Masquer toutes les fenêtres",
hide_desktop_icons: "Masquer les icônes du bureau",
home: 'Accueil',
html_document: 'Document HTML',
hue: 'Teinte',
Expand Down Expand Up @@ -269,6 +270,7 @@ const fr = {
share_with: "Partager avec",
shortcut_to: "Raccourci vers",
show_all_windows: "Afficher toutes les fenêtres",
show_desktop_icons: "Afficher les icônes du bureau",
show_hidden: 'Afficher les fichiers cachés',
sign_in_with_puter: "Se connecter avec Puter",
sign_up: "S'inscrire",
Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/i18n/translations/he.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ const en = {
get_a_copy_of_on_puter: `קבל עותק של '%%' ב Puter.com!`,
get_copy_link: "קבל העתק קישור",
hide_all_windows: "הסתר את כל החלונות",
hide_desktop_icons: "הסתר סמלי שולחן עבודה",
home: "בית",
html_document: "מסמך HTML",
hue: "דרגת צבע",
Expand Down Expand Up @@ -286,6 +287,7 @@ const en = {
share_with: "שתף עם:",
shortcut_to: "קיצור דרך אל",
show_all_windows: "הצג את כל החלונות",
show_desktop_icons: "הצג סמלי שולחן עבודה",
show_hidden: "הצג מוסתר",
sign_in_with_puter: "להתחבר עם Puter",
sign_up: "הרשמה",
Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/i18n/translations/hi.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ const hi = {
get_a_copy_of_on_puter: "Purer.com पर '%%' की एक कॉपी प्राप्त करें!",
get_copy_link: 'कॉपी लिंक प्राप्त करें',
hide_all_windows: "सभी विंडोज़ छिपाएँ",
hide_desktop_icons: "डेस्कटॉप आइकन छिपाएं",
home: 'घर',
html_document: 'एचटीएमएल दस्तावेज़',
hue: 'रंग',
Expand Down Expand Up @@ -269,6 +270,7 @@ const hi = {
share_with: "के साथ साझा करें",
shortcut_to: "के लिए शॉर्टकट",
show_all_windows: "सभी विंडोज़ दिखाएँ",
show_desktop_icons: "डेस्कटॉप आइकन दिखाएं",
show_hidden: 'छिपा हुआ दिखाएं',
sign_in_with_puter: "पुटर के साथ साइन इन करें",
sign_up: "साइन अप करें",
Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/i18n/translations/hu.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ const hu = {
get_a_copy_of_on_puter: "Szerezz egy példányt a(z) '%%' Puter.com-on!",
get_copy_link: "Másolási link megszerzése",
hide_all_windows: "Minden ablak elrejtése",
hide_desktop_icons: "Asztal ikonok elrejtése",
home: "Otthon",
html_document: "HTML dokumentum",
hue: "Színárnyalat",
Expand Down Expand Up @@ -265,6 +266,7 @@ const hu = {
share_with: "Megosztás valakivel:",
shortcut_to: "Parancsikon ide:",
show_all_windows: "Összes ablak megjelenítése",
show_desktop_icons: "Asztal ikonok megjelenítése",
show_hidden: "Rejtett megjelenítése",
sign_in_with_puter: "Bejelentkezés Puterrel",
sign_up: "Regisztráció",
Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/i18n/translations/hy.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ const hy = {
get_a_copy_of_on_puter: "Ստանալ '%%'-ի պատճենը Puter.com-ում!",
get_copy_link: "Ստանալ պատճենված հղումը",
hide_all_windows: "Թաքցնել բոլոր պատուհանները",
hide_desktop_icons: "Թաքցնել դեսքթոփի պատկերակները",
home: "Գլխավոր",
html_document: "HTML փաստաթուղթ",
hue: "Երանգ",
Expand Down Expand Up @@ -269,6 +270,7 @@ const hy = {
share_with: "Տարածել հետ՝",
shortcut_to: "Դյուրանցում դեպի",
show_all_windows: "Ցույց տալ բոլոր պատուհանները",
show_desktop_icons: "Ցուցադրել դեսքթոփի պատկերակները",
show_hidden: "Ցույց տալ թաքնված տարրերը",
sign_in_with_puter: "Մուտք գործել Փութերի միջոցով",
sign_up: "Գրանցվել",
Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/i18n/translations/id.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ const id = {
get_a_copy_of_on_puter: `Dapatkan salinan '%%' di Puter.com!`,
get_copy_link: "Dapatkan Tautan Salinan",
hide_all_windows: "Sembunyikan Semua Jendela",
hide_desktop_icons: "Sembunyikan ikon desktop",
home: "Beranda",
html_document: "Dokumen HTML",
hue: "Hue",
Expand Down Expand Up @@ -287,6 +288,7 @@ const id = {
share_with: "Bagikan dengan:",
shortcut_to: "Jalan Pintas ke",
show_all_windows: "Tampilkan Semua Jendela",
show_desktop_icons: "Tampilkan ikon desktop",
show_hidden: "Tampilkan yang tersembunyi",
sign_in_with_puter: "Masuk dengan Puter",
sign_up: "Daftar",
Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/i18n/translations/ig.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ const ig = {
get_a_copy_of_on_puter: `Nweta otu '%%' na Puter.com!`,
get_copy_link: "Nweta njikọ nke",
hide_all_windows: "Ezo Windows niile",
hide_desktop_icons: "Zoo Desktop Icons",
home: "ụlọ",
html_document: "akwụkwọ HTML",
hue: "Hue",
Expand Down Expand Up @@ -292,6 +293,7 @@ const ig = {
share_with: "ji ike nye:",
shortcut_to: "Ụzọ mkpirisi ka",
show_all_windows: "Gosi Windows niile",
show_desktop_icons: "Gosi Desktop Icons",
show_hidden: "Gosi ihe ezozo",
sign_in_with_puter: "Jiri Puter banye",
sign_up: "Debanye aha",
Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/i18n/translations/it.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ const it = {
get_a_copy_of_on_puter: `Ottieni una copia di '%%' su Puter.com!`,
get_copy_link: "Ottieni link di copia",
hide_all_windows: "Nascondi tutte le finestre",
hide_desktop_icons: "Nascondi icone desktop",
home: "Home",
html_document: "Documento HTML",
hue: "Tonalità",
Expand Down Expand Up @@ -298,6 +299,7 @@ const it = {
share_with: "Condividi con",
shortcut_to: "Scorciatoia per",
show_all_windows: "Mostra tutte le finestre",
show_desktop_icons: "Mostra icone desktop",
show_hidden: "Mostra nascosti",
sign_in_with_puter: "Accedi con Puter",
sign_up: "Registrati",
Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/i18n/translations/ja.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ const ja = {
get_a_copy_of_on_puter: `Puter.comで '%%' のコピーを取得!`,
get_copy_link: 'コピーリンクを取得',
hide_all_windows: "すべてのウィンドウを隠す",
hide_desktop_icons: "デスクトップアイコンを隠す",
home: 'ホーム',
html_document: 'HTML文書',
hue: '色合い',
Expand Down Expand Up @@ -270,6 +271,7 @@ const ja = {
share_with: "共有相手:",
shortcut_to: "ショートカット先",
show_all_windows: "すべてのウィンドウを表示",
show_desktop_icons: "デスクトップアイコンを表示",
show_hidden: '隠しファイルを表示',
sign_in_with_puter: "Puterでサインイン",
sign_up: "サインアップ",
Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/i18n/translations/ko.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ const ko = {
get_a_copy_of_on_puter: `Puter.com에서 '%%'의 사본을 받으세요!`,
get_copy_link: "링크 복사",
hide_all_windows: "모든 창 숨기기",
hide_desktop_icons: "데스크톱 아이콘 숨기기",
home: "홈",
html_document: "HTML 문서",
hue: "색조",
Expand Down Expand Up @@ -290,6 +291,7 @@ const ko = {
share_with: "공유 대상",
shortcut_to: "바로 가기",
show_all_windows: "모든 창 표시",
show_desktop_icons: "데스크톱 아이콘 표시",
show_hidden: "숨김 항목 표시",
sign_in_with_puter: "Puter로 로그인",
sign_up: "가입",
Expand Down
2 changes: 2 additions & 0 deletions src/gui/src/i18n/translations/ku.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ const ku = {
get_a_copy_of_on_puter: `کۆپیێک وەرگرتنەوەی '%%' لە پوتەر.com!`,
get_copy_link: "کۆپی بەستەر وەرگرتن",
hide_all_windows: "شاردنەوەی هەموو پەنجەکان",
hide_desktop_icons: "شاردنەوەی ئایکۆنەکانی دێسکتۆپ",
home: "ماڵەوە",
html_document: "بەڵگەی HTML",
hue: "هیو",
Expand Down Expand Up @@ -296,6 +297,7 @@ const ku = {
share_with: "هاوبەشکردن بە:",
shortcut_to: "شارتی بۆ",
show_all_windows: "پیشاندانی هەموو پەنجەکان",
show_desktop_icons: "پیشاندانی ئایکۆنەکانی دێسکتۆپ",
show_hidden: "پیشاندانی شاردراوەکان",
sign_in_with_puter: "چوونەژوورەوە بە پوتەر",
sign_up: "خۆتۆمارکردن",
Expand Down
Loading