Bladeren bron

more work to this

tags/v0.8.0
Shaun 4 jaren geleden
bovenliggende
commit
dbe6575a08
2 gewijzigde bestanden met toevoegingen van 27 en 19 verwijderingen
  1. +14
    -13
      src/client/ui/templates/messages/messages.js
  2. +13
    -6
      src/client/ui/templates/messages/styles.less

+ 14
- 13
src/client/ui/templates/messages/messages.js Bestand weergeven

@@ -292,10 +292,10 @@ define([

if (subType === 'privateIn' || subType === 'privateOut') {
const list = this.privateChannels;
list.spliceWhere(l => l === source);
list.spliceWhere(l => l === source || l === target);

//Newest sources are always at the end
list.push(source);
list.push(source || target);

if (list.length > 5)
list.splice(0, list.length - 5);
@@ -487,8 +487,12 @@ define([
return;
}

if (this.currentChannel === pick)
this.lastCustomChannel = null;
if (this.currentChannel === pick) {
if (pick === 'direct')
this.lastPrivateChannel = null;
else if (pick === 'custom')
this.lastCustomChannel = null;
}

this.onPickChannel(pick, true);
msgConfig.cancel = true;
@@ -505,7 +509,7 @@ define([

if (this.el.hasClass('picking')) {
this.processChat(msgConfig);
return;
return false;
}

if (e.which === 27) {
@@ -629,14 +633,6 @@ define([
this.el.removeClass('picking');
},

/* Todo
Don't allow party switch if not in a party
Arrow navigation fo different DMs and custom channels
Type name of private and custom channel
Typing @ while DMing someone should pop up the channels again
Mobile
*/

onShowChannelOptions: function (currentPick) {
const optionContainer = this.find('.channelOptions')
.addClass('active')
@@ -664,6 +660,11 @@ define([
else if (currentPick === 'custom')
options.push(...this.customChannels, 'join new', 'leave');
}

if (!options.length) {
this.onPickChannel('global');
return;
}
let addSelectStyleTo = null;
if (currentPick)


+ 13
- 6
src/client/ui/templates/messages/styles.less Bestand weergeven

@@ -268,7 +268,7 @@

&.picking {
> *:not(.channelOptions) {
opacity: 0.5;
opacity: 0.4;
pointer-events: none;
}

@@ -312,14 +312,21 @@
flex-direction: column;
z-index: 999999998;

.channelPicker {
display: none;
}

.channelOptions {
z-index: 999999999;
}

.input {
display: block;
height: 26px;
flex-shrink: 0;
.bottom {
.input {
display: block;
height: 26px;
flex-shrink: 0;
}

}

.el.textbox.message:not(.input),.time {
@@ -333,7 +340,7 @@
background-color: @blackC;
justify-content: center;
align-items: center;
height: 128px;
height: 140px;
flex-shrink: 0;

.key {


Laden…
Annuleren
Opslaan