fix issues public folder paths

This commit is contained in:
Nariman Jelveh
2024-08-17 11:34:53 -07:00
parent 88e8e33dc2
commit 4e37064f47
4 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -782,7 +782,7 @@ function UIItem(options){
// -------------------------------------------
menu_items.push('-');
}
if(!are_trashed && (!window.user.feature_flags || window.user.feature_flags.share !== false)){
if(!are_trashed && (window.user.feature_flags?.share !== false)){
menu_items.push({
html: 'Share With…',
onClick: async function(){
@@ -1086,7 +1086,7 @@ function UIItem(options){
// -------------------------------------------
// Share With…
// -------------------------------------------
if(!is_trashed && !is_trash && (!window.user.feature_flags || window.user.feature_flags.share !== false)){
if(!is_trashed && !is_trash && (window.user.feature_flags?.share !== false)){
menu_items.push({
html: 'Share With…',
onClick: async function(){
-1
View File
@@ -271,7 +271,6 @@ async function UIWindow(options) {
h += `<div draggable="false" title="${i18n('desktop')}" class="window-sidebar-item disable-user-select ${options.path === window.desktop_path ? 'window-sidebar-item-active' : ''}" data-path="${html_encode(window.desktop_path)}"><img draggable="false" class="window-sidebar-item-icon" src="${html_encode(window.icons['folder-desktop.svg'])}">${i18n('desktop')}</div>`;
h += `<div draggable="false" title="${i18n('videos')}" class="window-sidebar-item disable-user-select ${options.path === window.videos_path ? 'window-sidebar-item-active' : ''}" data-path="${html_encode(window.videos_path)}"><img draggable="false" class="window-sidebar-item-icon" src="${html_encode(window.icons['folder-videos.svg'])}">${i18n('videos')}</div>`;
h += `</div>`;
}
// Menubar
+1
View File
@@ -488,6 +488,7 @@ window.update_auth_data = async (auth_token, user)=>{
window.videos_path = '/' + window.user.username + '/Videos';
window.desktop_path = '/' + window.user.username + '/Desktop';
window.home_path = '/' + window.user.username;
window.public_path = '/' + window.user.username + '/Public';
if(window.user !== null && !window.user.is_temp){
$('.user-options-login-btn, .user-options-create-account-btn').hide();
@@ -83,6 +83,7 @@ const update_username_in_gui = function(new_username){
window.pictures_path = '/' + new_username + '/Pictures';
window.videos_path = '/' + new_username + '/Videos';
window.desktop_path = '/' + new_username + '/Desktop';
window.public_path = '/' + new_username + '/Public';
window.home_path = '/' + new_username;
}