Skip to content

Commit

Permalink
Fix update check on dev env, remove TTSMM flags from mod names
Browse files Browse the repository at this point in the history
  • Loading branch information
FLSoz committed Jun 5, 2022
1 parent e0a496c commit 87cf106
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ const createWindow = async () => {
});

// Remove this if your app does not use auto updates
autoUpdater.checkForUpdates();
if (!isDevelopment) {
autoUpdater.checkForUpdates();
}
// eslint-disable-next-line
new App();
};
Expand Down
6 changes: 5 additions & 1 deletion src/model/ModCollection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { ModData } from './Mod';
export interface ModCollection {
name: string;
description?: string;
linkedId?: bigint;
mods: string[];
}

Expand Down Expand Up @@ -36,7 +37,10 @@ export enum CollectionManagerModalType {
DESELECTING_MOD_MANAGER = 1,
VIEW_SETTINGS = 2,
ERRORS_FOUND = 'errors_found',
WARNINGS_FOUND = 'warnings_found'
WARNINGS_FOUND = 'warnings_found',
IMPORT_COLLECTION = 5,
EXPORT_COLLECTION = 6,
WARN_OVERWRITE_COLLECTION = 7
}

export interface NotificationProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ export default class CollectionManagementToolbarComponent extends Component<
key="export"
type="primary"
icon={<ExportOutlined />}
onClick={saveCollectionCallback}
disabled={true || disabledFeatures || !madeEdits}
loading={savingCollection}
>
Expand All @@ -256,7 +255,6 @@ export default class CollectionManagementToolbarComponent extends Component<
key="copy"
type="primary"
icon={<CopyOutlined />}
onClick={saveCollectionCallback}
disabled={true || disabledFeatures || !madeEdits}
loading={savingCollection}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ export default class CollectionManagerModal extends Component<CollectionManagerM
default:
return null;
}
break;
case CollectionManagerModalType.IMPORT_COLLECTION:
return null;
default:
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ const MAIN_COLUMN_SCHEMA: ColumnSchema<DisplayModData>[] = [
updateType = 'warning';
}
}
let correctedName = name;
const matches = name.match(/(.*)\s*\(([^()]*[Tt][Tt][Ss][Mm][Mm][^()]*)\)$/);
if (matches && matches[1]) {
correctedName = matches[1];
}
return (
<button
type="submit"
Expand Down Expand Up @@ -251,7 +256,7 @@ const MAIN_COLUMN_SCHEMA: ColumnSchema<DisplayModData>[] = [
strong={record.needsUpdate}
type={updateType}
style={{ whiteSpace: 'normal', width: '100%', verticalAlign: 'middle' }}
>{` ${name}`}</Text>
>{` ${correctedName}`}</Text>
</button>
);
};
Expand Down

0 comments on commit 87cf106

Please sign in to comment.