diff --git a/src/app/profile.coffee b/src/app/profile.coffee index 31b49f125b..68fa0a4bac 100644 --- a/src/app/profile.coffee +++ b/src/app/profile.coffee @@ -15,3 +15,8 @@ module.exports.app = (appExports, model) -> sites.splice(i,1) user.set 'profile.websites', sites + appExports.profileChangeActive = (e, el) -> + uid = $(el).attr('data-uid') + model.ref '_profileActive', model.at("users.#{uid}") + model.set '_profileActiveMain', model.get('_user.id') == uid + diff --git a/views/app/avatar.html b/views/app/avatar.html index 60380a53d6..192ab080de 100644 --- a/views/app/avatar.html +++ b/views/app/avatar.html @@ -1,24 +1,46 @@ - - {#with _user.preferences} - + + {#if _profileActiveMain} + {#with _user.preferences} + -
-
- +
+
+ +
+ +
- -
-
+ {/} + {else} + {/} <@footer> + +
+ {#unless @minimal}{#if @profile.items.pet}{/}{/} +
+ {#with @profile.preferences as :p} + + + + + + + {/} +
+ {{#unless @minimal}} +
Lvl {@profile.stats.lvl}
+ {{/}} +
+
@@ -69,89 +91,72 @@ {/} - -
- {#unless @minimal}{#if @profile.items.pet}{/}{/} -
- {#with @profile.preferences as :p} - - - - - - - {/} -
- {{#unless @minimal}} -
Lvl {@profile.stats.lvl}
- {{/}} -
-
{#if _profileEditing} - Save - -
- -
- + {#if _profileActiveMain} + Save + +
+ +
+ +
-
-
- -
- +
+ +
+ +
-
-
- -
- +
+ +
+ +
-
-
- -
-
- -
+
+ +
+
+ +
+
+
    + {#each _user.profile.websites as :website} + +
  • {:website}
  • + {/} +
+
-
    - {#each _user.profile.websites as :website} - -
  • {:website}
  • - {/} -
- -
- Save + Save + {/} {else}

- {#if @user.profile.name}{@user.profile.name} - {else}{username(@user.auth)} + {#if _profileActive.profile.name}{_profileActive.profile.name} + {else}{username(_profileActive.auth)} {/} - {#if @main}Edit{/} + {#if _profileActiveMain}Edit{/}

- {#if @user.profile.imageUrl} - + {#if _profileActive.profile.imageUrl} + + {/} + {#if _profileActive.profile.blurb} +

{_profileActive.profile.blurb}

+ {/} + {#if _profileActive.profile.websites} +
    + {#each _profileActive.profile.websites as :website} +
  • {:website}
  • + {/} +
+ {/} {/} - {#if @user.profile.blurb} -

{@user.profile.blurb}

- {/} - {#if @user.profile.websites} -
    - {#each @user.profile.websites as :website} -
  • {:website}
  • - {/} -
- {/} - - {/}