diff --git a/TODO.txt b/TODO.txt index 34e2e2a..d9f74ba 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,4 +1,15 @@ +- add sound fx when you get buddy request +- add friend requests to automatons that autoaccept +- add mute / desktop volume control to top nav + - have youtube and soundcloud players respect mute / volume levels + - not hard...i think... - complete v1 camera app + +YOUTUBE LIVE EMBED + + - blocked on `App.VideoPlayer` since we can't inject anymore youtube API embeds + - need instaniatable youtube window with custom playlist / source + Camera X - camera switching code ! - audio switching code @@ -16,6 +27,9 @@ Camera - swap online / offline emoji icons for images - add back button to interdemon cable / mtv / all video players +- add sigils and signets + - sigils are for system powers like matrix agent spell casting + - signets are for feature role checks like Buddy Pond Gold or Membership is Guilds, etc PUSHED to post launch diff --git a/data/interdimensionalcable.js b/data/interdimensionalcable.js index ff17b02..b67b4ae 100644 --- a/data/interdimensionalcable.js +++ b/data/interdimensionalcable.js @@ -1905,5 +1905,7 @@ desktop.interdimensionalcable.playlist = [ 'Q9XTqQbuavI', 'UuYV81r5SO0', 'MALyCfMP0a0', - '8QxIIz1yEsA' + '8QxIIz1yEsA', + 'tyWwEm-rKUY', + 'cZUfpcTrZcU' ]; \ No newline at end of file diff --git a/data/mtv.js b/data/mtv.js index 3dd6b5a..a779e4d 100644 --- a/data/mtv.js +++ b/data/mtv.js @@ -106,6 +106,7 @@ desktop.ytPlaylist = [ 'JASvfdG8INI', '856x2xIpoZM', 'TuAetZIG0mg', - 'JBTUgYIQGFo' + 'JBTUgYIQGFo', + 'DkYPge6ZKSQ' ]; diff --git a/desktop/apps/EASTER-EGG.txt b/desktop/apps/EASTER-EGG.txt index 371fefd..826f1fd 100644 --- a/desktop/apps/EASTER-EGG.txt +++ b/desktop/apps/EASTER-EGG.txt @@ -20,6 +20,7 @@ Ideas for community apps: - pick js1k winners / entries? - https://github.com/k4zmu2a/SpaceCadetPinball - https://github.com/mtevans/SkiFree + - https://github.com/nmrugg/stockfish.js/ - Wallpaper Manager - user contributed wallpapers diff --git a/desktop/apps/desktop.audioplayer/desktop.audioplayer.js b/desktop/apps/desktop.audioplayer/desktop.audioplayer.js index f148da6..2ab8dd9 100644 --- a/desktop/apps/desktop.audioplayer/desktop.audioplayer.js +++ b/desktop/apps/desktop.audioplayer/desktop.audioplayer.js @@ -8,8 +8,8 @@ desktop.audioplayer.load = function loadAudioPlayer (params, next) { desktop.audioplayer.playing = {}; desktop.audioplayer.play = function playAudio (soundPath) { - if (desktop.settings.audio_muted) { - // do not play any audio if desktop is muted + if (!desktop.settings.audio_enabled) { + // do not play any audio if desktop is not enabled } else { // play the audio if (desktop.audioplayer.playing[soundPath]) { @@ -22,9 +22,9 @@ desktop.audioplayer.play = function playAudio (soundPath) { audio.addEventListener('ended', function() { desktop.audioplayer.playing[soundPath] = false; },false); + audio.play(); } catch (err) { desktop.audioplayer.playing[soundPath] = false; } - audio.play(); } } \ No newline at end of file diff --git a/desktop/apps/desktop.buddylist/desktop.buddylist.js b/desktop/apps/desktop.buddylist/desktop.buddylist.js index cc762ba..68adcb9 100644 --- a/desktop/apps/desktop.buddylist/desktop.buddylist.js +++ b/desktop/apps/desktop.buddylist/desktop.buddylist.js @@ -192,6 +192,18 @@ desktop.updateBuddyList = function updateBuddyList () { $('.buddy_email').val(desktop.buddyListData.email); } + if (data.myProfile) { + // Remark: this cache is cleared each time the user clicks "Update Profile" + desktop.profileCache = desktop.profileCache || {}; + if (!desktop.profileCache[data.myProfile]) { + $('.publicProfilePreview').text(data.myProfile); + $('.profileMarkdown').val(data.myProfile); + desktop.profileCache[data.myProfile] = true + } else { + // do nothing, do not re-render the same text twice + } + } + desktop.buddylistProfileState = { updates: {}}; // @@ -355,7 +367,21 @@ desktop.updateBuddyList = function updateBuddyList () { $('.apiResult').val(JSON.stringify(data, true, 2)) - if ($('.pendingIncomingBuddyRequests li').length == 0) { + desktop.buddylist.pendingIncomingBuddyRequests = desktop.buddylist.pendingIncomingBuddyRequests || 0; + + let totalIncomingBuddyRequests = $('.pendingIncomingBuddyRequests li').length; + + if (totalIncomingBuddyRequests > desktop.buddylist.pendingIncomingBuddyRequests) { + desktop.buddylist.pendingIncomingBuddyRequests = totalIncomingBuddyRequests; + // Remark: short delay is used here to provide nice login experience if Buddy has requests + // allows WELCOME sound to play + // A better solution here is to here priority option for playing sound with queue + setTimeout(function(){ + desktop.audioplayer.play('desktop/assets/audio/YOUVEGOTMAIL.wav'); + }, 2222); + } + + if (totalIncomingBuddyRequests === 0) { $('.pendingIncomingBuddyRequestsHolder').hide(); } else { $('.pendingIncomingBuddyRequestsHolder').show(); diff --git a/desktop/apps/desktop.localstorage/desktop.localstorage.js b/desktop/apps/desktop.localstorage/desktop.localstorage.js index c1dedae..72b6077 100644 --- a/desktop/apps/desktop.localstorage/desktop.localstorage.js +++ b/desktop/apps/desktop.localstorage/desktop.localstorage.js @@ -4,11 +4,11 @@ desktop.localstorage.label = "localstorage"; desktop.localstorage.prefix = '_buddypond_desktop_'; desktop.localstorage.set = function setLocalStorage (key, val) { - val = JSON.stringify(val); - localStorage.setItem(desktop.localstorage.prefix + key, val); // in addition to updating the localstorage, update desktop.settings // Remark: desktop.settings is booted from localstorage on load desktop.settings[key] = val; + val = JSON.stringify(val); + localStorage.setItem(desktop.localstorage.prefix + key, val); } desktop.localstorage.get = function getLocalStorage (key) { diff --git a/desktop/apps/desktop.login/desktop.login.js b/desktop/apps/desktop.login/desktop.login.js index 78631dc..d17c09e 100644 --- a/desktop/apps/desktop.login/desktop.login.js +++ b/desktop/apps/desktop.login/desktop.login.js @@ -105,6 +105,8 @@ desktop.login.auth = function authDesktop (buddyname) { desktop.login.success = function desktopLoginSuccess () { $('#me_title').html('Welcome - ' + buddypond.me); + $('.me').html(buddypond.me); + desktop.audioplayer.play('desktop/assets/audio/WELCOME.wav') $('.logoutLink').show(); $('.loginLink').hide(); // $('.qtokenid').val(data); diff --git a/desktop/apps/desktop.profile/desktop.profile.html b/desktop/apps/desktop.profile/desktop.profile.html index 822e0d5..d0f9b44 100644 --- a/desktop/apps/desktop.profile/desktop.profile.html +++ b/desktop/apps/desktop.profile/desktop.profile.html @@ -1,3 +1,17 @@ + +
@@ -16,8 +30,8 @@
@@ -66,12 +80,36 @@

User Profile Settings

+ + Enable Desktop Audio + + + +
- +
-
+
+

Your current Buddy Profile:

+
+
+
+

Marak

+

Last Seen: 2/22/2022 14:40pm

+
+
+
+
+
+
+
+ + +
+
+

Buddy Desktop Apps are *Locked* for Buddy Pond Alpha. @@ -89,82 +127,92 @@

User Profile Settings

+ - Profile + Console + - Buddy List + Profile + - Buddy Pond + Buddy List + - Console + Buddy Pond + - Background + Mirror + - Mirror + Video Chat + - Video Chat + Music Television + - Music TeleVision + Interdimensional Cable + - Interdimensional Cable + Games + - Games + Wallpaper @@ -175,14 +223,6 @@

User Profile Settings

-->
-
-

Simple preview of what your Buddy Profile will look like

-
-
-

Marak

-

Last Seen: 2/22/2022 14:40pm

-
-
diff --git a/desktop/apps/desktop.profile/desktop.profile.js b/desktop/apps/desktop.profile/desktop.profile.js index 9b487be..219e1a4 100644 --- a/desktop/apps/desktop.profile/desktop.profile.js +++ b/desktop/apps/desktop.profile/desktop.profile.js @@ -6,9 +6,21 @@ desktop.profile.load = function loadDesktop (params, next) { $('.lastSeen').html(new Date().toString()); $('.updateProfileForm').on('submit', function () { + // clear out local profile cache, this will trigger a re-render from next server update + desktop.profileCache = {}; return false; }); + $('.editProfileLink').on('click', function(){ + $(this).closest('.menu').hide(); + desktop.profile.openWindow(); + return false; + }); + + $('.setStatus').on('click', function(){ + let replaceThisWithBetterUXThankYou = prompt('( alert lol )\n\nType your custom status:'); + }); + // Remark: also being triggered by enter event on form, jquery.desktop.js? $('.updateProfileButton').on('click', function(){ let updates = {}; @@ -29,6 +41,10 @@ desktop.profile.load = function loadDesktop (params, next) { }) }); + $('.updateProfileMarkdown').on('click', function(){ + desktop.buddylistProfileState.updates.myProfile = $('.profileMarkdown').val(); + }); + $('.enableWebNotifications').on('change', function(){ let notificationsEnabled = $(this).prop("checked"); if (notificationsEnabled) { @@ -53,6 +69,8 @@ desktop.profile.load = function loadDesktop (params, next) { if (audioNotificationsEnabled) { desktop.localstorage.set('notifications_audio_enabled', true); desktop.log('Audio Notifications have been enabled.'); + $('.audioEnabled').prop('checked', true); + $('.audioEnabled').trigger('change'); } else { desktop.localstorage.set('notifications_audio_enabled', false); desktop.log('Audio Notifications have been disabled.'); @@ -63,12 +81,28 @@ desktop.profile.load = function loadDesktop (params, next) { $('.enableAudioNotifications').prop('checked', true); } + $('.audioEnabled').on('change', function(){ + let audioMuted = $(this).prop("checked"); + if (audioMuted) { + desktop.localstorage.set('audio_enabled', true); + desktop.log('Desktop Audio has been muted.'); + } else { + desktop.localstorage.set('audio_enabled', false); + desktop.log('Desktop Audio has is back on.'); + } + }); + + if (desktop.settings.audio_enabled) { + $('.audioEnabled').prop('checked', true); + } + $("#profileTabs" ).tabs(); next(); }); }; desktop.profile.openWindow = function openWindow () { - $('#window_profile').css('height', 510); + $('#window_profile').addClass('window_stack').show(); + $('#window_profile').css('height', 540); $('#window_profile').css('width', 460); } \ No newline at end of file diff --git a/desktop/assets/audio/WELCOME.wav b/desktop/assets/audio/WELCOME.wav new file mode 100644 index 0000000..3ef7918 Binary files /dev/null and b/desktop/assets/audio/WELCOME.wav differ diff --git a/desktop/assets/audio/YOUVEGOTMAIL.wav b/desktop/assets/audio/YOUVEGOTMAIL.wav new file mode 100644 index 0000000..258f6a0 Binary files /dev/null and b/desktop/assets/audio/YOUVEGOTMAIL.wav differ diff --git a/desktop/assets/css/desktop.css b/desktop/assets/css/desktop.css index 11e2563..aeb5ab6 100755 --- a/desktop/assets/css/desktop.css +++ b/desktop/assets/css/desktop.css @@ -470,6 +470,11 @@ th.shrink { text-shadow: none; } +#bar_top li.emptyMenuCell { + background-color: white; +} + + #bar_bottom li { display: none; margin: 0 0 10px 5px; @@ -648,6 +653,33 @@ a:hover { } +.desktopPanel { + /* + background-color: black; + color: #00FF41; + */ + cursor: pointer; + border: solid; + border-width: 1px; + padding: 8px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 12px; + margin: 4px 2px; + border-radius: 4px; +} + +.desktopPanel:hover { + color: #008F11; + background-color: #FFF; + filter: drop-shadow(5px 5px 2px #4444dd); + animation-name: rainbow; + animation-duration: 2.1111s; + opacity: 0.7; + animation-iteration-count: infinite; +} + .desktopSelect { /* background-color: black; @@ -790,6 +822,7 @@ a:hover { .me_title { float: left; text-align: center; + cursor: pointer; } .emojiPicker { @@ -1167,4 +1200,15 @@ iframe { padding-right: 16px; padding-top: 8px; cursor: pointer; +} + +.tiny { + font-size: 12px; + padding-left: 8px; + padding-right: 8px; +} + +.float-left { + position: relative; + float: left; } \ No newline at end of file diff --git a/desktop/assets/js/jquery.desktop.js b/desktop/assets/js/jquery.desktop.js index 0fd59af..b9becd5 100755 --- a/desktop/assets/js/jquery.desktop.js +++ b/desktop/assets/js/jquery.desktop.js @@ -3,6 +3,20 @@ jQuery Desktop is licensed as GPL v3, and is a Copyright of Nathan Smith see: https://github.com/nathansmith/jQuery-Desktop */ + +/* + + TODO: add these methods to jQuery prototype: + + $.openWindow() + $.closeWindow() + $.cloneWindow() + $.minimizeWindow(); + $.maximizeWindow(); + $.positionWindow(); + +*/ + // // Namespace - Module Pattern. // @@ -364,6 +378,7 @@ jQuery(document).ready(function() { // extended JDQ functions added by Marak var JDQX = {}; +// TODO: this should be renamed to loadWindow() ? JDQX.openWindow = function openWindow (context) { var iconDock = $(context).attr('href'); var appName = iconDock.replace('#icon_dock_', ''); diff --git a/index.html b/index.html index 02d57e5..4571187 100755 --- a/index.html +++ b/index.html @@ -124,6 +124,30 @@
  • Welcome - You look nice today!