Skip to content

Commit 7eee976

Browse files
committed
Changed caret: v1.5.0
1 parent fe42477 commit 7eee976

21 files changed

+129
-41
lines changed

CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@ All notable changes to this project will be documented in this file.
1313
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1414
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1515

16+
## [1.5.0] - 2023-06-27
17+
18+
Changed password caret so it is more symmetric
19+
20+
### Added
21+
- Translations for the two new setting entries
22+
23+
### Changed
24+
- Default caret to a custom scripted caret
25+
26+
### Fixed
27+
- No fixes
28+
1629
## [1.4.3] - 2023-06-22
1730

1831
Added LICENSE information to **Shikai**.

CITATION.cff

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ message: "If you use this software in your work, or make a fork of it, please ci
33
authors:
44
- given-names: "TheWisker"
55
title: "Shikai Project"
6-
version: 1.4.3
6+
version: 1.5.0
77
date-released: 2023-03-31
88
url: "https://github.com/TheWisker/Shikai"

CONTRIBUTORS.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
These are the **Shikai** project **contributors**, ordered from most recent to least recent:
1414

15+
- [Talin Sharma](https://github.com/TalinTheDev) => Opened an [issue](https://github.com/TheWisker/Shikai/issues/7) which resulted in an enhancement.
1516
- [Faisal Almalki](https://github.com/Faisal-beep22) => Added Arab language file in this [issue](https://github.com/TheWisker/Shikai/issues/5) and this [pull request](https://github.com/TheWisker/Shikai/pull/6).
1617
- [cidne](https://github.com/cidne) => Opened an [issue](https://github.com/TheWisker/Shikai/issues/3) which resulted in a bug fix.
1718
- [Tyler Schneider](https://github.com/teschnei) => Made this [pull request](https://github.com/TheWisker/Shikai/pull/1) fixing a bug related to the login process.

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
[Screenshots][screenshots]
2020

2121
[Installation][installation]
22+
23+
[Updating][updating]
2224

2325
[Dependencies][dependencies]
2426

@@ -127,6 +129,10 @@ First, go to the `dist` **directory** located on the release folder and **open**
127129

128130
Also, to set up a user **profile** image, copy the desired image to the user's **home** directory renaming it to `.face`.
129131

132+
<h2 align="center">Updating [<a href="https://github.com/TheWisker/Shikai#index">↑</a>]</h2>
133+
134+
When updating **Shikai** just keep in mind that if the **new** version contains **breaking changes** you must **delete localStorage** with the button in the settings panel **before** making the **update**. Apart from that, just update it as if you were [installing][installation] it *overwriting* in the case of a **manual** install.
135+
130136
<h2 align="center">Dependencies [<a href="https://github.com/TheWisker/Shikai#index">↑</a>]</h2>
131137

132138
<h3 align="left">Buildtime</h3>
@@ -221,6 +227,7 @@ We look forward to your translations!
221227
[livedemo]: https://github.com/TheWisker/Shikai#live-demo-
222228
[screenshots]: https://github.com/TheWisker/Shikai#screenshots-
223229
[installation]: https://github.com/TheWisker/Shikai#installation-
230+
[updating]: https://github.com/TheWisker/Shikai#updating-
224231
[dependencies]: https://github.com/TheWisker/Shikai#dependencies-
225232
[configuration]: https://github.com/TheWisker/Shikai#configuration-
226233
[discussions]: https://github.com/TheWisker/Shikai#discussions-

dist/LICENSE.shikai

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
/*!
88
*
9-
* shikai 1.4.3 distribution
9+
* shikai 1.5.0 distribution
1010
*
1111
* Copyright (c) 2023, TheWisker (https://github.com/TheWisker)
1212
* All rights reserved.

dist/index.css

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

dist/index.js

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

dist/monitor.css

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

dist/monitor.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
shikai 1.4.3 distribution
2+
shikai 1.5.0 distribution
33
44
Copyright (c) 2023, TheWisker (https://github.com/TheWisker)
55
All rights reserved.

package-lock.json

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

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "shikai",
3-
"version": "1.4.3",
3+
"version": "1.5.0",
44
"description": "Modern lightdm webkit2 theme",
55
"keywords": [
66
"lightdm",

src/css/_bars.scss

+3-2
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
margin: 0 0 0 10px;
127127
}
128128

129-
input[type="text"] {margin: 0 0 0 15px;}
129+
input[type="text"] {margin: 0 0 0 15px;}
130130
}
131131

132132
.colorsbar {
@@ -252,7 +252,7 @@
252252

253253
margin: 15px auto;
254254

255-
input {
255+
#password {
256256
@include general.box;
257257
@include general.font;
258258

@@ -261,5 +261,6 @@
261261
padding: 0 15px;
262262
font-size: 1.2em;
263263
text-align: center;
264+
caret-color: transparent;
264265
}
265266
}

src/js/Components/LoginWindow/Userbar/Password.jsx

+27-15
Original file line numberDiff line numberDiff line change
@@ -19,40 +19,48 @@ import {data} from "../../../../lang";
1919
class Password extends React.Component {
2020
constructor(props) {
2121
super(props);
22-
this.state = {value: ""};
22+
this.state = {value: "", active: false};
2323
this.update = this.update.bind(this);
24-
this.submit = this.submit.bind(this);
2524
if (window.__is_debug != true) {this.auth_event = () => {lightdm.respond(this.state.value); setTimeout(() => {if (!lightdm.is_authenticated) {this.props.failure();}}, 250)};}
2625
}
2726

2827
componentDidMount() {if (window.__is_debug != true) {lightdm.show_prompt.connect(this.auth_event);}}
2928

3029
componentWillUnmount() {if (window.__is_debug != true) {lightdm.show_prompt.disconnect(this.auth_event);}}
3130

32-
update(e) {this.setState({value: e.target.value}); e.preventDefault();}
33-
34-
submit(e) {
35-
if (e.which == 13) { //Enter key
36-
if (window.__is_debug === true) {
37-
if (this.state.value == "password") {
38-
notify(data.get(this.props.lang, "notifications.logged_in") + " " + this.props.user.username + "!", types.Success); this.props.success();
39-
} else {notify(data.get(this.props.lang, "notifications.wrong_password"), types.Error); this.props.failure();}
40-
} else {lightdm.cancel_authentication(); lightdm.authenticate(this.props.user.username);}
41-
}; e.preventDefault();
31+
update(e) {
32+
if (!['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Tab', 'Alt', 'Meta', 'Control', 'F1', 'F2', 'F3', 'F4', 'F5', 'F6', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12', 'OS'].includes(e.key)) {
33+
if (e.which == 13) { //Enter key
34+
if (window.__is_debug === true) {
35+
if (this.state.value == "password") {
36+
notify(data.get(this.props.lang, "notifications.logged_in") + " " + this.props.user.username + "!", types.Success); this.props.success();
37+
} else {notify(data.get(this.props.lang, "notifications.wrong_password"), types.Error); this.props.failure();}
38+
} else {lightdm.cancel_authentication(); lightdm.authenticate(this.props.user.username);}
39+
} else if (e.which == 8 || e.which == 46) { //Backspace key or Supr key
40+
this.setState({value: this.state.value.slice(0, -1)});
41+
} else {
42+
console.log(e.key);
43+
this.setState({value: this.state.value + e.key});
44+
}; e.preventDefault();
45+
}
4246
}
4347

4448
render() {
45-
return (<input id="password" disabled={this.props.inactive} value={this.state.value} type="password" onChange={this.update} onKeyUp={this.submit} className={
49+
return (<div id="password" disabled={this.props.inactive} tabIndex="0" value={this.state.value} onKeyDown={this.update} onFocus={() => {this.setState({active: true})}} onBlur={() => {this.setState({active: false})}} className={
4650
cxs({
4751
color: this.props.color,
4852
borderTop: this.props.border.top,
4953
borderBottom: this.props.border.top,
5054
borderLeft: this.props.border.left,
5155
borderRight: this.props.border.left,
5256
borderRadius: this.props.border.radius,
53-
background: this.props.background
57+
background: this.props.background,
58+
minHeight: "calc(1.2em + " + (+this.props.border.top.slice(0, 1) * 2) + "px + 1px)",
59+
position: "relative",
60+
"::before": {content: this.state.active ? '"' + this.props.caret.left + '"' : '""'},
61+
"::after": {content: this.state.active ? '"' + this.props.caret.right + '"' : '""'}
5462
})
55-
}/>);
63+
}>{(this.state.value.length > 14) ? "*".repeat(14) : "*".repeat(this.state.value.length)}</div>);
5664
}
5765
}
5866

@@ -64,6 +72,10 @@ export default connect(
6472
left: state.settings.style.userbar.password.border.left,
6573
radius: state.settings.style.userbar.password.border.radius
6674
},
75+
caret: {
76+
left: state.settings.style.userbar.password.caret.left,
77+
right: state.settings.style.userbar.password.caret.right
78+
},
6779
background: state.settings.style.userbar.password.background,
6880
inactive: state.runtime.events.inactivity,
6981
lang: state.settings.behaviour.language,

src/js/Components/SettingsWindow/Sections/Style.jsx

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ class Style extends React.Component {
5454
<Inputs.Textarea name={data.get(this.props.lang, "settings.style.sections.misc.options.horizontal")} action={(b) => this.props.set("userbar.password.border.left", b)} value={this.props.style.userbar.password.border.left}/>
5555
<Inputs.Textarea name={data.get(this.props.lang, "settings.style.sections.misc.options.password")} action={(b) => this.props.set("userbar.password.border.radius", b)} value={this.props.style.userbar.password.border.radius}/>
5656
<Inputs.Textarea name={data.get(this.props.lang, "settings.style.sections.misc.options.session")} action={(b) => this.props.set("userbar.session.radius", b)} value={this.props.style.userbar.session.radius}/>
57+
<Inputs.Textarea name={data.get(this.props.lang, "settings.style.sections.misc.options.caret.left")} action={(b) => this.props.set("userbar.password.caret.left", b)} value={this.props.style.userbar.password.caret.left}/>
58+
<Inputs.Textarea name={data.get(this.props.lang, "settings.style.sections.misc.options.caret.right")} action={(b) => this.props.set("userbar.password.caret.right", b)} value={this.props.style.userbar.password.caret.right}/>
5759
</div>
5860
</div>
5961
</React.Fragment>);

src/js/Redux/Store.js

+35-7
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ const default_state = {
8585
radius: "18px"
8686
},
8787
color: "rgba(0,255,245,1)",
88-
background: "rgba(0,0,0,0.4)"
88+
background: "rgba(0,0,0,0.4)",
89+
caret: {
90+
left: "<",
91+
right: ">"
92+
}
8993
}
9094
}
9195
}
@@ -154,7 +158,11 @@ const default_state = {
154158
"radius": "18px"
155159
},
156160
"color": "rgba(0,255,245,1)",
157-
"background": "rgba(0,0,0,0.4)"
161+
"background": "rgba(0,0,0,0.4)",
162+
"caret": {
163+
"left": "<",
164+
"right": ">"
165+
}
158166
}
159167
}
160168
}
@@ -223,7 +231,11 @@ const default_state = {
223231
"radius": "18px"
224232
},
225233
"color": "rgba(255,0,0,1)",
226-
"background": "rgba(0,0,0,0.4)"
234+
"background": "rgba(0,0,0,0.4)",
235+
"caret": {
236+
"left": "<",
237+
"right": ">"
238+
}
227239
}
228240
}
229241
}
@@ -292,7 +304,11 @@ const default_state = {
292304
"radius": "18px"
293305
},
294306
"color": "rgba(255,255,255,1)",
295-
"background": "rgba(255,255,255,0.4)"
307+
"background": "rgba(255,255,255,0.4)",
308+
"caret": {
309+
"left": "<",
310+
"right": ">"
311+
}
296312
}
297313
}
298314
}
@@ -361,7 +377,11 @@ const default_state = {
361377
"radius": "18px"
362378
},
363379
"color": "rgba(0,255,245,1)",
364-
"background": "rgba(0,237,255,0.4)"
380+
"background": "rgba(0,237,255,0.4)",
381+
"caret": {
382+
"left": "<",
383+
"right": ">"
384+
}
365385
}
366386
}
367387
}
@@ -430,7 +450,11 @@ const default_state = {
430450
"radius": "18px"
431451
},
432452
"color": "rgba(81,0,248,1)",
433-
"background": "rgba(145,0,255,0.2)"
453+
"background": "rgba(145,0,255,0.2)",
454+
"caret": {
455+
"left": "<",
456+
"right": ">"
457+
}
434458
}
435459
}
436460
}
@@ -499,7 +523,11 @@ const default_state = {
499523
"radius": "18px"
500524
},
501525
"color": "rgba(195,78,254,1)",
502-
"background": "rgba(0,5,159,0.2)"
526+
"background": "rgba(0,5,159,0.2)",
527+
"caret": {
528+
"left": "<",
529+
"right": ">"
530+
}
503531
}
504532
}
505533
}

src/lang/arb.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ export default {
123123
vertical: "حجم حدود كلمة المرور العامودية",
124124
horizontal: "حجم حدود كلمة المرور الأفقية",
125125
password: "حجم قطر خانة كلمة المرور",
126-
session: "حجم قطر خانة الجلسة"
126+
session: "حجم قطر خانة الجلسة",
127+
caret: {
128+
left: "تركت كلمة السر رمز زخرفي",
129+
right: "كلمة المرور رمز الزخرفة الصحيح"
130+
}
127131
}
128132
}
129133
}

src/lang/eng.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ export default {
123123
vertical: "Password top bottom borders",
124124
horizontal: "Password left right borders",
125125
password: "Password border radius",
126-
session: "Session border radius"
126+
session: "Session border radius",
127+
caret: {
128+
left: "Password left decorative symbol",
129+
right: "Password right decorative symbol"
130+
}
127131
}
128132
}
129133
}

src/lang/fre.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ export default {
123123
vertical: "Bordure supérieure inférieure du mot de passe",
124124
horizontal: "Mot de passe bordures gauche droite",
125125
password: "Rayon de la bordure du mot de passe",
126-
session: "Rayon de la bordure de la session"
126+
session: "Rayon de la bordure de la session",
127+
caret: {
128+
left: "Symbole décoratif gauche du mot de passe",
129+
right: "Mot de passe bon symbole décoratif"
130+
}
127131
}
128132
}
129133
}

src/lang/ger.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ export default {
123123
vertical: "Passwörter oben unten Grenzen",
124124
horizontal: "Passwort linke rechte Grenzen",
125125
password: "Radius der Passwortgrenze",
126-
session: "Radius der Sitzungsgrenze"
126+
session: "Radius der Sitzungsgrenze",
127+
caret: {
128+
left: "Passwort hinterließ dekoratives Symbol",
129+
right: "Passwort rechts dekoratives Symbol"
130+
}
127131
}
128132
}
129133
}

src/lang/jap.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ export default {
123123
vertical: "パスワードの上下の境界線",
124124
horizontal: "パスワードの左右の境界線",
125125
password: "パスワード境界半径",
126-
session: "セッション境界半径"
126+
session: "セッション境界半径",
127+
caret: {
128+
left: "パスワード左装飾記号",
129+
right: "パスワード右の装飾記号"
130+
}
127131
}
128132
}
129133
}

src/lang/spa.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ export default {
123123
vertical: "Bordes superiores e inferiores de la contraseña",
124124
horizontal: "Bordes laterales de la contraseña",
125125
password: "Radio del borde de la contraseña",
126-
session: "Radio del borde de la sesión"
126+
session: "Radio del borde de la sesión",
127+
caret: {
128+
left: "Símbolo decorativo izquierdo de contraseña",
129+
right: "Símbolo decorativo derecho de contraseña"
130+
}
127131
}
128132
}
129133
}

0 commit comments

Comments
 (0)