Skip to content

Commit 424bd56

Browse files
committed
update terminal signature #972
1 parent 0dae81b commit 424bd56

7 files changed

+35
-16
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* allow using Object URLs in links [#982](https://github.com/jcubic/jquery.terminal/issues/982)
55
* experimental `--cols` CSS variable [#956](https://github.com/jcubic/jquery.terminal/issues/956)
66
* add `terminal::lines()` [#966](https://github.com/jcubic/jquery.terminal/issues/966)
7+
* add small ASCII Art to signature [#972](https://github.com/jcubic/jquery.terminal/issues/972)
78
### Bugfix
89
* fix `terminal::login()` when user already authenticated [#980](https://github.com/jcubic/jquery.terminal/issues/980)
910
* improve mobile support

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[![npm](https://img.shields.io/badge/npm-DEV-blue.svg)](https://www.npmjs.com/package/jquery.terminal)
99
![bower](https://img.shields.io/badge/bower-DEV-yellow.svg)
1010
[![Build and test](https://github.com/jcubic/jquery.terminal/actions/workflows/build.yaml/badge.svg?branch=devel&event=push)](https://github.com/jcubic/jquery.terminal/actions/workflows/build.yaml)
11-
[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=devel&1620e1f399d74967a5e6292177558e0a)](https://coveralls.io/github/jcubic/jquery.terminal?branch=devel)
11+
[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=devel&f6f4cbb4305eab7c6a36637dff2538c9)](https://coveralls.io/github/jcubic/jquery.terminal?branch=devel)
1212
![NPM Downloads](https://img.shields.io/npm/dm/jquery.terminal.svg?style=flat)
1313
[![jsDelivr Downloads](https://data.jsdelivr.com/v1/package/npm/jquery.terminal/badge?style=rounded&n=1)](https://www.jsdelivr.com/package/npm/jquery.terminal)
1414
[![Paid Support](https://img.shields.io/badge/paid-support-354465.svg)](https://support.jcubic.pl/)

__tests__/terminal.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6245,14 +6245,14 @@ describe('Terminal plugin', function() {
62456245
function max_length() {
62466246
var lines = term.signature().split('\n');
62476247
return Math.max.apply(null, lines.map(function(line) {
6248-
return line.length;
6248+
return $.terminal.length(line);
62496249
}));
62506250
}
62516251
it('should return space', function() {
62526252
expect(term.signature()).toEqual('');
62536253
});
62546254
it('should return proper max length of signature', function() {
6255-
var numbers = {20: 20, 36: 33, 60: 56, 70: 66, 100: 75};
6255+
var numbers = {20: 20, 36: 35, 70: 66, 100: 75};
62566256
Object.keys(numbers).forEach(function(numChars) {
62576257
var length = numbers[numChars];
62586258
term.option('numChars', numChars);

js/jquery.terminal-src.js

+13-4
Original file line numberDiff line numberDiff line change
@@ -7496,13 +7496,22 @@
74967496
var reg = new RegExp(' {' + version_string.length + '}$');
74977497
var name_ver = 'jQuery Terminal Emulator' +
74987498
(version_set ? version_string : '');
7499+
function small_string(name) {
7500+
return '(c) 2011-2024 [[!;;;;https://jcubic.pl/me]' + name + ']';
7501+
}
74997502
// -----------------------------------------------------------------------
75007503
// :: Terminal Signatures
75017504
// -----------------------------------------------------------------------
75027505
var signatures = [
7503-
['jQuery Terminal', '(c) 2011-2024 jcubic'],
7504-
[name_ver, copyright.replace(/^Copyright | *<.*>/g, '')],
7505-
[name_ver, copyright.replace(/^Copyright /, '')],
7506+
['jQuery Terminal', small_string('jcubic')],
7507+
[' __ ____ ________',
7508+
' / // _ /__ ___/__ ___ ______',
7509+
' __ / // // / / // _ // _// /',
7510+
'/ / // // / / // ___// / / / / /',
7511+
'\\___//____ \\ /_//____//_/ /_/ /_/',
7512+
' \\/ '
7513+
.replace(reg, ' ') + version_string,
7514+
small_string('Jakub T. Jankiewicz')],
75067515
[
75077516
' _______ ________ __',
75087517
' / / _ /_ ____________ _/__ ___/______________ _____ / /',
@@ -10533,7 +10542,7 @@
1053310542
var cols = self.cols();
1053410543
for (var i = signatures.length; i--;) {
1053510544
var lengths = signatures[i].map(function(line) {
10536-
return line.length;
10545+
return $.terminal.length(line);
1053710546
});
1053810547
if (Math.max.apply(null, lengths) <= cols) {
1053910548
return signatures[i].join('\n').replace(/\s+$/m, '') + '\n';

js/jquery.terminal.js

+15-6
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
*
4242
* broken image by Sophia Bai from the Noun Project (CC-BY)
4343
*
44-
* Date: Thu, 21 Nov 2024 14:33:45 +0000
44+
* Date: Thu, 21 Nov 2024 14:51:40 +0000
4545
*/
4646
/* global define, Map, BigInt */
4747
/* eslint-disable */
@@ -5345,7 +5345,7 @@
53455345
// -------------------------------------------------------------------------
53465346
$.terminal = {
53475347
version: 'DEV',
5348-
date: 'Thu, 21 Nov 2024 14:33:45 +0000',
5348+
date: 'Thu, 21 Nov 2024 14:51:40 +0000',
53495349
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
53505350
color_names: [
53515351
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
@@ -7496,13 +7496,22 @@
74967496
var reg = new RegExp(' {' + version_string.length + '}$');
74977497
var name_ver = 'jQuery Terminal Emulator' +
74987498
(version_set ? version_string : '');
7499+
function small_string(name) {
7500+
return '(c) 2011-2024 [[!;;;;https://jcubic.pl/me]' + name + ']';
7501+
}
74997502
// -----------------------------------------------------------------------
75007503
// :: Terminal Signatures
75017504
// -----------------------------------------------------------------------
75027505
var signatures = [
7503-
['jQuery Terminal', '(c) 2011-2024 jcubic'],
7504-
[name_ver, copyright.replace(/^Copyright | *<.*>/g, '')],
7505-
[name_ver, copyright.replace(/^Copyright /, '')],
7506+
['jQuery Terminal', small_string('jcubic')],
7507+
[' __ ____ ________',
7508+
' / // _ /__ ___/__ ___ ______',
7509+
' __ / // // / / // _ // _// /',
7510+
'/ / // // / / // ___// / / / / /',
7511+
'\\___//____ \\ /_//____//_/ /_/ /_/',
7512+
' \\/ '
7513+
.replace(reg, ' ') + version_string,
7514+
small_string('Jakub T. Jankiewicz')],
75067515
[
75077516
' _______ ________ __',
75087517
' / / _ /_ ____________ _/__ ___/______________ _____ / /',
@@ -10533,7 +10542,7 @@
1053310542
var cols = self.cols();
1053410543
for (var i = signatures.length; i--;) {
1053510544
var lengths = signatures[i].map(function(line) {
10536-
return line.length;
10545+
return $.terminal.length(line);
1053710546
});
1053810547
if (Math.max.apply(null, lengths) <= cols) {
1053910548
return signatures[i].join('\n').replace(/\s+$/m, '') + '\n';

js/jquery.terminal.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/jquery.terminal.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)