mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-03 17:48:30 +00:00
3.5.314. Moderation card tweaks.
This commit is contained in:
parent
695a013f4a
commit
21e823a15c
5 changed files with 32 additions and 10 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
<div class="list-header">3.5.314 <time datetime="2016-10-03">(2016-10-05)</time></div>
|
||||||
|
<ul class="chat-menu-content menu-side-padding">
|
||||||
|
<li>Changed: Ensure you get the user's username when copy-pasting from the moderation card's chat history.</li>
|
||||||
|
<li>Fixed: Don't try to change tabs in moderation cards if a modifier key is being held.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<div class="list-header">3.5.313 <time datetime="2016-10-03">(2016-10-05)</time></div>
|
<div class="list-header">3.5.313 <time datetime="2016-10-03">(2016-10-05)</time></div>
|
||||||
<ul class="chat-menu-content menu-side-padding">
|
<ul class="chat-menu-content menu-side-padding">
|
||||||
<li>Added: Logviewer Integration (Beta)</li>
|
<li>Added: Logviewer Integration (Beta)</li>
|
||||||
|
|
|
@ -1008,10 +1008,15 @@ FFZ.prototype.modify_moderation_card = function(component) {
|
||||||
|
|
||||||
handle_key = function(e) {
|
handle_key = function(e) {
|
||||||
var key = e.keyCode || e.which,
|
var key = e.keyCode || e.which,
|
||||||
|
is_meta = e.ctrlKey || e.altKey || e.metaKey,
|
||||||
user_id = controller.get('cardInfo.user.id'),
|
user_id = controller.get('cardInfo.user.id'),
|
||||||
is_mod = controller.get('cardInfo.isModeratorOrHigher'),
|
is_mod = controller.get('cardInfo.isModeratorOrHigher'),
|
||||||
room = utils.ember_lookup('controller:chat').get('currentRoom');
|
room = utils.ember_lookup('controller:chat').get('currentRoom');
|
||||||
|
|
||||||
|
// We don't want modifier keys.'
|
||||||
|
if ( is_meta )
|
||||||
|
return;
|
||||||
|
|
||||||
if ( key === keycodes.C )
|
if ( key === keycodes.C )
|
||||||
return t.ffzChangePage('default');
|
return t.ffzChangePage('default');
|
||||||
|
|
||||||
|
@ -1519,12 +1524,12 @@ FFZ.prototype._build_mod_card_history = function(msg, modcard, show_from, ts_cli
|
||||||
style = '', colored = '';
|
style = '', colored = '';
|
||||||
|
|
||||||
if ( helpers && helpers.getTime )
|
if ( helpers && helpers.getTime )
|
||||||
out.push('<span class="timestamp' + (ts_click ? ' ts-action' : '') + '">' + helpers.getTime(msg.date) + '</span>');
|
out.push('<span class="timestamp' + (ts_click ? ' ts-action' : '') + '">' + helpers.getTime(msg.date, true) + '</span>');
|
||||||
|
|
||||||
|
var alias = this.aliases[msg.from],
|
||||||
|
results = this.format_display_name(msg.tags && msg.tags['display-name'], msg.from);
|
||||||
|
|
||||||
if ( show_from ) {
|
if ( show_from ) {
|
||||||
var alias = this.aliases[msg.from],
|
|
||||||
results = this.format_display_name(msg.tags && msg.tags['display-name'], msg.from);
|
|
||||||
|
|
||||||
// Badges
|
// Badges
|
||||||
out.push('<span class="badges">');
|
out.push('<span class="badges">');
|
||||||
out.push(this.render_badges(this.get_line_badges(msg, false)));
|
out.push(this.render_badges(this.get_line_badges(msg, false)));
|
||||||
|
@ -1555,7 +1560,8 @@ FFZ.prototype._build_mod_card_history = function(msg, modcard, show_from, ts_cli
|
||||||
+ results[0] + '</span>');
|
+ results[0] + '</span>');
|
||||||
|
|
||||||
out.push(msg.style !== 'action' ? '<span class="colon">:</span> ' : ' ');
|
out.push(msg.style !== 'action' ? '<span class="colon">:</span> ' : ' ');
|
||||||
}
|
} else if ( msg.style !== 'admin' )
|
||||||
|
out.push('<span class="cp-hidden"> ' + results[0] + (msg.style === 'action' ? '' : ':') + ' </span>');
|
||||||
|
|
||||||
|
|
||||||
// The message itself.
|
// The message itself.
|
||||||
|
|
|
@ -34,7 +34,7 @@ FFZ.msg_commands = {};
|
||||||
|
|
||||||
// Version
|
// Version
|
||||||
var VER = FFZ.version_info = {
|
var VER = FFZ.version_info = {
|
||||||
major: 3, minor: 5, revision: 313,
|
major: 3, minor: 5, revision: 314,
|
||||||
toString: function() {
|
toString: function() {
|
||||||
return [VER.major, VER.minor, VER.revision].join(".") + (VER.extra || "");
|
return [VER.major, VER.minor, VER.revision].join(".") + (VER.extra || "");
|
||||||
}
|
}
|
||||||
|
|
|
@ -228,7 +228,7 @@ FFZ.prototype.setup_tokenization = function() {
|
||||||
var f = this;
|
var f = this;
|
||||||
|
|
||||||
// Timestamp Display
|
// Timestamp Display
|
||||||
helpers.getTime = function(e) {
|
helpers.getTime = function(e, show_ampm) {
|
||||||
if ( e === undefined || e === null )
|
if ( e === undefined || e === null )
|
||||||
return '?:??' + (f.settings.timestamp_seconds ? ':??' : '');
|
return '?:??' + (f.settings.timestamp_seconds ? ':??' : '');
|
||||||
|
|
||||||
|
@ -236,16 +236,19 @@ FFZ.prototype.setup_tokenization = function() {
|
||||||
minutes = e.getMinutes(),
|
minutes = e.getMinutes(),
|
||||||
seconds = e.getSeconds(),
|
seconds = e.getSeconds(),
|
||||||
|
|
||||||
s = f.settings.twenty_four_timestamps;
|
s = f.settings.twenty_four_timestamps,
|
||||||
|
pm = false;
|
||||||
|
|
||||||
if ( s < 2 ) {
|
if ( s < 2 ) {
|
||||||
if ( hours > 12 )
|
if ( hours > 12 ) {
|
||||||
hours -= 12;
|
hours -= 12;
|
||||||
|
pm = true;
|
||||||
|
}
|
||||||
else if ( hours === 0 )
|
else if ( hours === 0 )
|
||||||
hours = 12;
|
hours = 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ((s === 1 || s === 3) && hours < 10 ? '0' : '') + hours + ':' + (minutes < 10 ? '0' : '') + minutes + (f.settings.timestamp_seconds ? ':' + (seconds < 10 ? '0' : '') + seconds : '');
|
return ((s === 1 || s === 3) && hours < 10 ? '0' : '') + hours + ':' + (minutes < 10 ? '0' : '') + minutes + (f.settings.timestamp_seconds ? ':' + (seconds < 10 ? '0' : '') + seconds : '') + (show_ampm && s < 2 ? '<span class="cp-hidden">' + (pm ? 'pm' : 'am') + '</span>' : '');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2045,6 +2045,13 @@ body.ffz-minimal-chat-input .ember-chat .chat-interface .textarea-contain textar
|
||||||
max-height: 200px;
|
max-height: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cp-hidden {
|
||||||
|
display: inline-block;
|
||||||
|
width: 1px; height: 1px;
|
||||||
|
margin-left: -1px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.chat-history.interface li:first-child { padding-top: 10px; }
|
.chat-history.interface li:first-child { padding-top: 10px; }
|
||||||
.chat-history.interface li:last-child { padding-bottom: 10px; }
|
.chat-history.interface li:last-child { padding-bottom: 10px; }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue