Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for fblo drag handle bug #14993

Merged
merged 2 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/Application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ class Application {
const state: IState = this.mStore.getState();
const lastVersion = state.app.appVersion || '0.0.0';

if (this.mFirstStart || (currentVersion === '0.0.1')) {
if (this.mFirstStart || (process.env.NODE_ENV === 'development')) {
// don't check version change in development builds or on first start
return Promise.resolve();
}
Expand Down
12 changes: 7 additions & 5 deletions src/extensions/about_dialog/views/AboutPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ class AboutPage extends ComponentEx<IProps, IComponentState> {
public componentDidMount() {
this.mMounted = true;

//this.mVersion = '1.8.5'; // force this to test

if (this.mVersion === '0.0.1') {
this.nextState.tag = 'Development';
// removing version check when in dev mode and moved to NODE_ENV instead
if (process.env.NODE_ENV === 'development') {
this.nextState.tag = 'Dev';
} else {
// if not development, lets see what is on github to determine if we are stable, beta or preview
github.releases()
.then(releases => {
if (this.mMounted) {
Expand All @@ -82,7 +82,9 @@ class AboutPage extends ComponentEx<IProps, IComponentState> {
this.nextState.changelog = thisRelease.body;
this.nextState.tag = thisRelease.prerelease ? 'Beta' : undefined;
} else {
this.nextState.tag = 'Unknown';
// no release found on github, so it's packaged but not distributed properly yet
// this could be on the mystery Next repo for testing
this.nextState.tag = 'Preview';
}
} catch (err) {
log('warn', 'Failed to parse release info', err.message);
Expand Down
9 changes: 5 additions & 4 deletions src/extensions/file_based_loadorder/views/ItemRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,19 @@ class ItemRenderer extends ComponentEx<IProps, {}> {
<Icon className='locked-entry-logo' name='locked'/>
) : null;

const dragHandleClasses = this.isLocked(item)
? 'drag-handle-icon undraggable' : 'drag-handle-icon';

return (
<ListGroupItem
key={key}
className={classes.join(' ')}
ref={this.props.item.setRef}
>
<Icon className='drag-handle-icon' name='drag-handle'/>
<Icon className={dragHandleClasses} name='drag-handle'/>
<p className='load-order-index'>{position}</p>
{this.renderValidationError()}

<p className='load-order-name'>{key}</p>

<p className='load-order-name'>{key}</p>
{this.renderExternalBanner(item)}
{checkBox()}
{lock()}
Expand Down
4 changes: 4 additions & 0 deletions src/extensions/mod_load_order/views/DefaultItemRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,17 @@ class DefaultItemRenderer extends ComponentEx<IProps, {}> {
)
: null;

const dragHandleClasses = item.locked
? 'drag-handle-icon undraggable' : 'drag-handle-icon';

return (
<ListGroupItem
ref={this.setRef}
key={key}
className={classes.join(' ')}
onContextMenu={this.props.onContextMenu}
>
<Icon className={dragHandleClasses} name='drag-handle'/>
<p className='load-order-index'>{position}</p>
<div>
{(!!item?.external) && this.renderExternalBanner()}
Expand Down
13 changes: 7 additions & 6 deletions src/stylesheets/vortex/page-mod-load-order.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
.entry-checkbox {
//margin-right: 15px;
//margin-left: auto;

// This shouldn't be necessary. But hey ho lets go.
&.disabled {
display: none;
Expand Down Expand Up @@ -106,12 +106,13 @@
background-color: $brand-primary;
}

&.external {

.drag-handle-icon {
visibility: hidden;
}
.drag-handle-icon.undraggable {
visibility: hidden;
//fill: red;
}

&.external {

.load-order-unmanaged-banner {

text-align: center;
Expand Down
2 changes: 1 addition & 1 deletion src/util/StyleManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ if (ipcMain !== undefined) {
sassIndex = `$theme-path: "${pathToFileURL(themePath)}";\n` + sassIndex;

// development builds are always versioned as 0.0.1
const isDevel: boolean = getApplication().version === '0.0.1';
const isDevel: boolean = (process.env.NODE_ENV === 'development')

const assetsPath = path.join(getVortexPath('assets_unpacked'), 'css');
const modulesPath = getVortexPath('modules_unpacked');
Expand Down
Loading