mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 13:00:39 +03:00
UI fixes
This commit is contained in:
parent
5a67d982e5
commit
5d45094640
|
@ -16,7 +16,7 @@ function Footer() {
|
|||
<p className='mt-0.5 text-center'>© 2023 ЦИВТ КОНЦЕПТ</p>
|
||||
</div>
|
||||
<div className='flex flex-col underline'>
|
||||
<a href={urls.exteor64} tabIndex={-1}>Экстеор</a>
|
||||
<Link to='/manuals?topic=exteor' tabIndex={-1}>Экстеор</Link>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -139,7 +139,7 @@ function RSInput({
|
|||
}, [thisRef]);
|
||||
|
||||
return (
|
||||
<div className={`w-full ${cursor} text-lg`}>
|
||||
<div className={`w-full ${cursor}`}>
|
||||
{label &&
|
||||
<Label
|
||||
text={label}
|
||||
|
|
|
@ -70,9 +70,45 @@ export class TextWrapper {
|
|||
insertToken(tokenID: TokenID): boolean {
|
||||
const hasSelection = this.ref.view.state.selection.main.from !== this.ref.view.state.selection.main.to
|
||||
switch (tokenID) {
|
||||
case TokenID.NT_DECLARATIVE_EXPR: this.envelopeWith('D{ξ∈X1 | P1[ξ]', '}'); return true;
|
||||
case TokenID.NT_IMPERATIVE_EXPR: this.envelopeWith('I{(σ, γ) | σ:∈X1; γ:=F1[σ]; P1[σ, γ]', '}'); return true;
|
||||
case TokenID.NT_RECURSIVE_FULL: this.envelopeWith('R{ ξ:=D1 | F1[ξ]≠∅ | ξ∪F1[ξ]', '}'); return true;
|
||||
case TokenID.NT_DECLARATIVE_EXPR: {
|
||||
if (hasSelection) {
|
||||
this.envelopeWith('D{ξ∈X1 | ', '}');
|
||||
} else {
|
||||
this.envelopeWith('D{ξ∈X1 | P1[ξ]', '}');
|
||||
}
|
||||
this.ref.view.dispatch({
|
||||
selection: {
|
||||
anchor: this.ref.view.state.selection.main.from + 2,
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
case TokenID.NT_IMPERATIVE_EXPR: {
|
||||
if (hasSelection) {
|
||||
this.envelopeWith('I{(σ, γ) | σ:∈X1; γ:=F1[σ]; ', '}');
|
||||
} else {
|
||||
this.envelopeWith('I{(σ, γ) | σ:∈X1; γ:=F1[σ]; P1[σ, γ]', '}');
|
||||
}
|
||||
this.ref.view.dispatch({
|
||||
selection: {
|
||||
anchor: this.ref.view.state.selection.main.from + 2,
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
case TokenID.NT_RECURSIVE_FULL: {
|
||||
if (hasSelection) {
|
||||
this.envelopeWith('R{ξ:=D1 | F1[ξ]≠∅ | ', '}');
|
||||
} else {
|
||||
this.envelopeWith('R{ξ:=D1 | F1[ξ]≠∅ | ξ∪F1[ξ]', '}');
|
||||
}
|
||||
this.ref.view.dispatch({
|
||||
selection: {
|
||||
anchor: this.ref.view.state.selection.main.from + 2,
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
case TokenID.BIGPR: this.envelopeWith('Pr1(', ')'); return true;
|
||||
case TokenID.SMALLPR: this.envelopeWith('pr1(', ')'); return true;
|
||||
case TokenID.FILTER: this.envelopeWith('Fi1[α](', ')'); return true;
|
||||
|
|
|
@ -196,7 +196,7 @@ function EditorRSExpression({
|
|||
</div>
|
||||
</div>
|
||||
<RSInput innerref={rsInput}
|
||||
className='mt-2'
|
||||
className='mt-2 text-lg'
|
||||
height='10.1rem'
|
||||
value={value}
|
||||
editable={!disabled}
|
||||
|
|
Loading…
Reference in New Issue
Block a user