Several small changes
- Disabled buttons with server interaction functions - Disabled buttons with no functionality - Fixed problems in profile when there is no race, culture and/or profession selected - Small layout improvements
This commit is contained in:
Vendored
+28
-11
@@ -46266,7 +46266,7 @@
|
||||
value: 'ap'
|
||||
}]
|
||||
}),
|
||||
_react2.default.createElement(_BorderButton2.default, { label: 'Aktualisieren', onClick: this.refresh }),
|
||||
_react2.default.createElement(_BorderButton2.default, { label: 'Aktualisieren', onClick: this.refresh, disabled: true }),
|
||||
_react2.default.createElement(_BorderButton2.default, { label: 'Erstellen', onClick: this.showHeroCreation, primary: true })
|
||||
),
|
||||
_react2.default.createElement(
|
||||
@@ -47645,7 +47645,8 @@
|
||||
node: node,
|
||||
buttons: [{
|
||||
label: 'Speichern',
|
||||
onClick: null
|
||||
onClick: null,
|
||||
disabled: true
|
||||
}] },
|
||||
_react2.default.createElement(
|
||||
'div',
|
||||
@@ -49847,7 +49848,8 @@
|
||||
{
|
||||
label: 'Heldenbogen',
|
||||
tag: 'sheets',
|
||||
disabled: phase < 3
|
||||
disabled: true
|
||||
// disabled: phase < 3
|
||||
}],
|
||||
active: this.state.tab,
|
||||
onClick: this.handleClick }),
|
||||
@@ -50000,6 +50002,8 @@
|
||||
|
||||
const sex = this.state.sex === 'm' ? 'Männlich' : 'Weiblich';
|
||||
|
||||
const isProfessionUndefined = _ProfessionStore2.default.getCurrentID() === null;
|
||||
|
||||
const currentEL = (0, _calcEL2.default)(ap);
|
||||
|
||||
const nameElement = editName ? _react2.default.createElement(_OverviewNameChange2.default, {
|
||||
@@ -50026,7 +50030,7 @@
|
||||
'div',
|
||||
{ className: 'text-wrapper' },
|
||||
nameElement,
|
||||
_react2.default.createElement(
|
||||
isProfessionUndefined ? null : _react2.default.createElement(
|
||||
_VerticalList2.default,
|
||||
{ className: 'rcp' },
|
||||
_react2.default.createElement(
|
||||
@@ -50114,12 +50118,12 @@
|
||||
label: 'AP hinzuf\xFCgen',
|
||||
onClick: this.addAP
|
||||
}) : null,
|
||||
_react2.default.createElement(
|
||||
isProfessionUndefined ? null : _react2.default.createElement(
|
||||
'h3',
|
||||
null,
|
||||
'Pers\xF6nliche Daten'
|
||||
),
|
||||
_react2.default.createElement(_OverviewPersonalData2.default, (0, _extends3.default)({}, personal, {
|
||||
isProfessionUndefined ? null : _react2.default.createElement(_OverviewPersonalData2.default, (0, _extends3.default)({}, personal, {
|
||||
race: _RaceStore2.default.getCurrent(),
|
||||
culture: _CultureStore2.default.getCurrent(),
|
||||
haircolorTags: _ProfileStore2.default.getHaircolorTags(),
|
||||
@@ -50154,7 +50158,8 @@
|
||||
_react2.default.createElement(_BorderButton2.default, {
|
||||
className: 'delete-char',
|
||||
label: 'Held l\xF6schen',
|
||||
onClick: this.deleteHero
|
||||
onClick: this.deleteHero,
|
||||
disabled: true
|
||||
})
|
||||
) : null
|
||||
)
|
||||
@@ -57159,7 +57164,8 @@
|
||||
_react2.default.createElement(_BorderButton2.default, {
|
||||
label: 'Anmelden',
|
||||
onClick: this.login,
|
||||
primary: true
|
||||
primary: true,
|
||||
disabled: true
|
||||
})
|
||||
)
|
||||
);
|
||||
@@ -57215,8 +57221,16 @@
|
||||
total - spent,
|
||||
' AP'
|
||||
),
|
||||
_react2.default.createElement(_IconButton2.default, { icon: '\uE166', onClick: this.undo, disabled: !isUndoAvailable }),
|
||||
_react2.default.createElement(_BorderButton2.default, { label: 'Speichern', onClick: this.saveHero })
|
||||
_react2.default.createElement(_IconButton2.default, {
|
||||
icon: '\uE166',
|
||||
onClick: this.undo,
|
||||
disabled: !isUndoAvailable
|
||||
}),
|
||||
_react2.default.createElement(_BorderButton2.default, {
|
||||
label: 'Speichern',
|
||||
onClick: this.saveHero,
|
||||
disabled: true
|
||||
})
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -57238,7 +57252,10 @@
|
||||
_react2.default.createElement(
|
||||
_TitleBarRight2.default,
|
||||
null,
|
||||
_react2.default.createElement(_BorderButton2.default, { label: 'Speichern', onClick: this.saveGroup })
|
||||
_react2.default.createElement(_BorderButton2.default, {
|
||||
label: 'Speichern',
|
||||
onClick: this.saveGroup
|
||||
})
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -95,6 +95,7 @@ export default class TitleBar extends Component {
|
||||
label="Anmelden"
|
||||
onClick={this.login}
|
||||
primary
|
||||
disabled
|
||||
/>
|
||||
</TitleBarRight>
|
||||
</TitleBarWrapper>
|
||||
@@ -153,8 +154,16 @@ export default class TitleBar extends Component {
|
||||
</TitleBarLeft>
|
||||
<TitleBarRight>
|
||||
<Text className="collected-ap">{total - spent} AP</Text>
|
||||
<IconButton icon="" onClick={this.undo} disabled={!isUndoAvailable} />
|
||||
<BorderButton label="Speichern" onClick={this.saveHero} />
|
||||
<IconButton
|
||||
icon=""
|
||||
onClick={this.undo}
|
||||
disabled={!isUndoAvailable}
|
||||
/>
|
||||
<BorderButton
|
||||
label="Speichern"
|
||||
onClick={this.saveHero}
|
||||
disabled
|
||||
/>
|
||||
</TitleBarRight>
|
||||
</TitleBarWrapper>
|
||||
);
|
||||
@@ -167,7 +176,10 @@ export default class TitleBar extends Component {
|
||||
<Text>Gruppenname</Text>
|
||||
</TitleBarLeft>
|
||||
<TitleBarRight>
|
||||
<BorderButton label="Speichern" onClick={this.saveGroup} />
|
||||
<BorderButton
|
||||
label="Speichern"
|
||||
onClick={this.saveGroup}
|
||||
/>
|
||||
</TitleBarRight>
|
||||
</TitleBarWrapper>
|
||||
);
|
||||
|
||||
@@ -8,5 +8,6 @@
|
||||
width: 100%;
|
||||
display: flex;
|
||||
position: relative;
|
||||
// background: linear-gradient(to bottom, transparentize($background2, .5) 0%, transparentize($background2, 1) 100%);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ export default class Herolist extends Component {
|
||||
}
|
||||
]}
|
||||
/>
|
||||
<BorderButton label="Aktualisieren" onClick={this.refresh} />
|
||||
<BorderButton label="Aktualisieren" onClick={this.refresh} disabled />
|
||||
<BorderButton label="Erstellen" onClick={this.showHeroCreation} primary />
|
||||
</div>
|
||||
<Scroll className="list">
|
||||
|
||||
@@ -60,7 +60,8 @@ export default class ItemEditor extends Component {
|
||||
buttons={[
|
||||
{
|
||||
label: 'Speichern',
|
||||
onClick: null
|
||||
onClick: null,
|
||||
disabled: true
|
||||
}
|
||||
]}>
|
||||
<div className="main">
|
||||
|
||||
@@ -66,6 +66,8 @@ export default class Overview extends Component {
|
||||
|
||||
const sex = this.state.sex === 'm' ? 'Männlich' : 'Weiblich';
|
||||
|
||||
const isProfessionUndefined = ProfessionStore.getCurrentID() === null;
|
||||
|
||||
const currentEL = calcEL(ap);
|
||||
|
||||
const nameElement = editName ? (
|
||||
@@ -87,41 +89,45 @@ export default class Overview extends Component {
|
||||
<AvatarWrapper src={avatar} onClick={this.showImageUpload} />
|
||||
<div className="text-wrapper">
|
||||
{nameElement}
|
||||
<VerticalList className="rcp">
|
||||
<span>{sex}</span>
|
||||
<span className="race">
|
||||
{(() => {
|
||||
const { name } = RaceStore.getCurrent();
|
||||
return name;
|
||||
})()}
|
||||
</span>
|
||||
<span className="culture">
|
||||
{(() => {
|
||||
const { name } = CultureStore.getCurrent();
|
||||
return name;
|
||||
})()}
|
||||
</span>
|
||||
<span className="profession">
|
||||
{(() => {
|
||||
let { name, subname } = ProfessionStore.getCurrent();
|
||||
|
||||
if (typeof name === 'object') {
|
||||
name = name[this.state.sex];
|
||||
}
|
||||
if (typeof subname === 'object') {
|
||||
subname = subname[this.state.sex];
|
||||
}
|
||||
{
|
||||
isProfessionUndefined ? null : (
|
||||
<VerticalList className="rcp">
|
||||
<span>{sex}</span>
|
||||
<span className="race">
|
||||
{(() => {
|
||||
const { name } = RaceStore.getCurrent();
|
||||
return name;
|
||||
})()}
|
||||
</span>
|
||||
<span className="culture">
|
||||
{(() => {
|
||||
const { name } = CultureStore.getCurrent();
|
||||
return name;
|
||||
})()}
|
||||
</span>
|
||||
<span className="profession">
|
||||
{(() => {
|
||||
let { name, subname } = ProfessionStore.getCurrent();
|
||||
|
||||
if (typeof name === 'object') {
|
||||
name = name[this.state.sex];
|
||||
}
|
||||
if (typeof subname === 'object') {
|
||||
subname = subname[this.state.sex];
|
||||
}
|
||||
|
||||
let { name: vname } = ProfessionVariantStore.getCurrent() || {};
|
||||
let { name: vname } = ProfessionVariantStore.getCurrent() || {};
|
||||
|
||||
if (typeof vname === 'object') {
|
||||
vname = vname[this.state.sex];
|
||||
}
|
||||
if (typeof vname === 'object') {
|
||||
vname = vname[this.state.sex];
|
||||
}
|
||||
|
||||
return name + (subname ? ` (${subname})` : vname ? ` (${vname})` : '');
|
||||
})()}
|
||||
</span>
|
||||
</VerticalList>
|
||||
return name + (subname ? ` (${subname})` : vname ? ` (${vname})` : '');
|
||||
})()}
|
||||
</span>
|
||||
</VerticalList>
|
||||
)
|
||||
}
|
||||
<VerticalList className="el">
|
||||
<span>
|
||||
{(() => {
|
||||
@@ -144,15 +150,23 @@ export default class Overview extends Component {
|
||||
/>
|
||||
) : null
|
||||
}
|
||||
<h3>Persönliche Daten</h3>
|
||||
<OverviewPersonalData
|
||||
{...personal}
|
||||
race={RaceStore.getCurrent()}
|
||||
culture={CultureStore.getCurrent()}
|
||||
haircolorTags={ProfileStore.getHaircolorTags()}
|
||||
eyecolorTags={ProfileStore.getEyecolorTags()}
|
||||
socialstatusTags={ProfileStore.getSocialstatusTags()}
|
||||
/>
|
||||
{
|
||||
isProfessionUndefined ? null : (
|
||||
<h3>Persönliche Daten</h3>
|
||||
)
|
||||
}
|
||||
{
|
||||
isProfessionUndefined ? null : (
|
||||
<OverviewPersonalData
|
||||
{...personal}
|
||||
race={RaceStore.getCurrent()}
|
||||
culture={CultureStore.getCurrent()}
|
||||
haircolorTags={ProfileStore.getHaircolorTags()}
|
||||
eyecolorTags={ProfileStore.getEyecolorTags()}
|
||||
socialstatusTags={ProfileStore.getSocialstatusTags()}
|
||||
/>
|
||||
)
|
||||
}
|
||||
{
|
||||
phase === 2 ? (
|
||||
<div>
|
||||
@@ -176,6 +190,7 @@ export default class Overview extends Component {
|
||||
className="delete-char"
|
||||
label="Held löschen"
|
||||
onClick={this.deleteHero}
|
||||
disabled
|
||||
/>
|
||||
</div>
|
||||
) : null
|
||||
|
||||
@@ -56,7 +56,8 @@ export default class Profile extends Component {
|
||||
{
|
||||
label: 'Heldenbogen',
|
||||
tag: 'sheets',
|
||||
disabled: phase < 3
|
||||
disabled: true
|
||||
// disabled: phase < 3
|
||||
}
|
||||
]}
|
||||
active={this.state.tab}
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
.personal-data {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 10px;
|
||||
|
||||
> div {
|
||||
flex: none;
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
tbody {
|
||||
tr {
|
||||
@extend %large-tr;
|
||||
|
||||
td.ap:last-child {
|
||||
padding-right: 11px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user