mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 15:15:34 +00:00
Add URL shortlink for outfitting page
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
#2.2.4
|
||||||
|
* Add shortlink for outfitting page
|
||||||
|
|
||||||
#2.2.3
|
#2.2.3
|
||||||
* Fix hull boost calculation - now shows correct % modifier and total armour
|
* Fix hull boost calculation - now shows correct % modifier and total armour
|
||||||
* Fix import of DiamondBack - can now be imported
|
* Fix import of DiamondBack - can now be imported
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import Persist from '../stores/Persist';
|
|||||||
import Ship from '../shipyard/Ship';
|
import Ship from '../shipyard/Ship';
|
||||||
import { toDetailedBuild } from '../shipyard/Serializer';
|
import { toDetailedBuild } from '../shipyard/Serializer';
|
||||||
import { outfitURL } from '../utils/UrlGenerators';
|
import { outfitURL } from '../utils/UrlGenerators';
|
||||||
import { FloppyDisk, Bin, Switch, Download, Reload, Fuel } from '../components/SvgIcons';
|
import { FloppyDisk, Bin, Switch, Download, Reload, Fuel, LinkIcon } from '../components/SvgIcons';
|
||||||
import ShipSummaryTable from '../components/ShipSummaryTable';
|
import ShipSummaryTable from '../components/ShipSummaryTable';
|
||||||
import StandardSlotSection from '../components/StandardSlotSection';
|
import StandardSlotSection from '../components/StandardSlotSection';
|
||||||
import HardpointsSlotSection from '../components/HardpointsSlotSection';
|
import HardpointsSlotSection from '../components/HardpointsSlotSection';
|
||||||
@@ -20,6 +20,7 @@ import LineChart from '../components/LineChart';
|
|||||||
import PowerManagement from '../components/PowerManagement';
|
import PowerManagement from '../components/PowerManagement';
|
||||||
import CostSection from '../components/CostSection';
|
import CostSection from '../components/CostSection';
|
||||||
import ModalExport from '../components/ModalExport';
|
import ModalExport from '../components/ModalExport';
|
||||||
|
import ModalPermalink from '../components/ModalPermalink';
|
||||||
import Slider from '../components/Slider';
|
import Slider from '../components/Slider';
|
||||||
|
|
||||||
const SPEED_SERIES = ['boost', '4 Pips', '2 Pips', '0 Pips'];
|
const SPEED_SERIES = ['boost', '4 Pips', '2 Pips', '0 Pips'];
|
||||||
@@ -270,6 +271,13 @@ export default class OutfittingPage extends Page {
|
|||||||
this.resizeListener.remove();
|
this.resizeListener.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates the short URL
|
||||||
|
*/
|
||||||
|
_genShortlink() {
|
||||||
|
this.context.showModal(<ModalPermalink url={window.location.href}/>);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render the Page
|
* Render the Page
|
||||||
* @return {React.Component} The page contents
|
* @return {React.Component} The page contents
|
||||||
@@ -313,6 +321,9 @@ export default class OutfittingPage extends Page {
|
|||||||
<button onClick={buildName && this._exportBuild} disabled={!buildName} onMouseOver={termtip.bind(null, 'export')} onMouseOut={hide}>
|
<button onClick={buildName && this._exportBuild} disabled={!buildName} onMouseOver={termtip.bind(null, 'export')} onMouseOut={hide}>
|
||||||
<Download className='lg'/>
|
<Download className='lg'/>
|
||||||
</button>
|
</button>
|
||||||
|
<button onClick={this._genShortlink} onMouseOver={termtip.bind(null, 'shortlink')} onMouseOut={hide}>
|
||||||
|
<LinkIcon className='lg' />
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user