Skip to content

Commit

Permalink
Update to 5.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mastef committed Nov 4, 2019
1 parent 1819ee3 commit d94b650
Show file tree
Hide file tree
Showing 14 changed files with 215 additions and 135 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"sourceType": "script",
"plugins": [
["inline-replace-variables", {
"__VERSION__": "5.1.1"
"__VERSION__": "5.1.2"
}]
]
}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
5.1.2
=====
- Overworked and more friendlier context menu. You can now open the popup from the context menu, if opening as own tab is the default. You can now also access the changelog from the context menu
- Increase popup size/width steps to 25
- Fix: Hide saved windows when a filter is active
- Fix: Don't break rows on tabs based on the hidden tabs
- Fix: Sometimes when using the keyboard the tabs would not highlight properly. This should be resolved now.
- Fix: Background color for dark mode.
- Performance improvements, such as not rendering hidden tabs to the DOM

5.1.1
=====

Expand Down
13 changes: 12 additions & 1 deletion changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<div class="logo-options">
<div class="logo-box">
<img src="images/browsers.svg" style="max-width: 3rem;">
<h2>Tab Manager Plus 5.1.1</h2>
<h2>Tab Manager Plus 5.1.2</h2>
</div>
</div>
<div class="toggle-options">
Expand All @@ -34,6 +34,17 @@ <h3>Here's what's planned for future versions</h3>
<h3>Here's what's new since the last time</h3>
<div class="toggle-box">

<h3>5.1.2</h3>
<ul>
<li>Overworked and more friendlier context menu. You can now open the popup from the context menu, if opening as own tab is the default. You can now also access the changelog from the context menu</li>
<li>Increase popup size/width steps to 25</li>
<li>Fix: Hide saved windows when a filter is active</li>
<li>Fix: Don't break rows on tabs based on the hidden tabs</li>
<li>Fix: Sometimes when using the keyboard the tabs would not highlight properly. This should be resolved now.</li>
<li>Fix: Background color for dark mode.</li>
<li>Performance improvements, such as not rendering hidden tabs to the DOM</li>
</ul>

<h3>5.1.1</h3>
<ul>
<li>Fix: The "highlight duplicate tabs" button may have disappeared - it should be back now</li>
Expand Down
2 changes: 1 addition & 1 deletion manifest-firefox.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Tab Manager Plus for Firefox",
"short_name": "Tab Manager+",
"version": "5.1.1",
"version": "5.1.2",
"manifest_version": 2,
"description": "Quickly find open tabs, see all windows in one view, find duplicates and limit tabs per window. The best Tab Manager for Firefox.",
"author": "stefanXO",
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Tab Manager Plus for Chrome",
"short_name": "Tab Manager+",
"version": "5.1.1",
"version": "5.1.2",
"manifest_version": 2,
"offline_enabled": true,
"description": "Quickly find open tabs, see all windows in one view, find duplicates and limit tabs per window. The best Tab Manager for Chrome.",
Expand Down
3 changes: 2 additions & 1 deletion outlib/Session.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ Session = function (_React$Component) {_inherits(Session, _React$Component);
hoverHandler: _this.props.hoverHandler,
searchActive: _this.props.searchActive,
select: _this.props.select,
ref: "sessiontab" + tabId }));
ref: "sessiontab" + tabId,
id: "sessiontab-" + tab.id }));


});
Expand Down
2 changes: 1 addition & 1 deletion outlib/Tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Tab = function (_React$Component) {_inherits(Tab, _React$Component);
{ backgroundImage: this.state.favIcon },



id: this.props.id,
title: this.props.tab.title,
onClick: this.click,
onMouseDown: this.onMouseDown,
Expand Down
52 changes: 23 additions & 29 deletions outlib/TabManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ TabManager = function (_React$Component) {_inherits(TabManager, _React$Component
if (typeof localStorage["sessionsFeature"] === "undefined") localStorage["sessionsFeature"] = "0";
if (typeof localStorage["hideWindows"] === "undefined") localStorage["hideWindows"] = "0";
if (typeof localStorage["filter-tabs"] === "undefined") localStorage["filter-tabs"] = "0";
if (typeof localStorage["version"] === "undefined") localStorage["version"] = "5.1.1";
if (typeof localStorage["version"] === "undefined") localStorage["version"] = "5.1.2";

layout = localStorage["layout"];
tabLimit = JSON.parse(localStorage["tabLimit"]);
Expand Down Expand Up @@ -167,9 +167,6 @@ TabManager = function (_React$Component) {_inherits(TabManager, _React$Component
}_createClass(TabManager, [{ key: "componentWillMount", value: function componentWillMount()
{
this.update();
} }, { key: "shouldComponentUpdate", value: function shouldComponentUpdate(
nextProps, nextState) {
return true;
} }, { key: "hoverHandler", value: function hoverHandler(
tab) {
this.setState({ topText: tab.title });
Expand Down Expand Up @@ -215,6 +212,13 @@ TabManager = function (_React$Component) {_inherits(TabManager, _React$Component

if (this.state.sessionsFeature) {
if (this.state.sessions.length > 0) haveSess = true;
// disable session window if we have filtering enabled
// and filter active
if (haveSess && this.state.filterTabs) {
if (this.state.searchLen > 0 || Object.keys(this.state.hiddenTabs).length > 0) {
haveSess = false;
}
}
}

return (
Expand Down Expand Up @@ -304,7 +308,7 @@ TabManager = function (_React$Component) {_inherits(TabManager, _React$Component
React.createElement("span", { className: "hrSpan" }, "Saved windows"))),


this.state.sessionsFeature ?
haveSess ?
this.state.sessions.map(function (window) {
return (
React.createElement(Session, {
Expand Down Expand Up @@ -448,7 +452,7 @@ TabManager = function (_React$Component) {_inherits(TabManager, _React$Component
React.createElement("div", {
className: "icon windowaction filter" + (this.state.filterTabs ? " enabled" : ""),
title:
(this.state.filterTabs ? "Do not hide" : "Hide") +
(this.state.filterTabs ? "Turn off hiding of" : "Hide") +
" tabs that do not match search" + (
this.state.searchLen > 0 ?
"\n" + (
Expand Down Expand Up @@ -804,21 +808,22 @@ TabManager = function (_React$Component) {_inherits(TabManager, _React$Component
}
this.forceUpdate();
} }, { key: "clearSelection", value: function clearSelection()
{var _this8 = this;
{
this.state.selection = {};
this.setState({
lastSelect: false });

var setTimeoutCallback = function setTimeoutCallback() {
_this8.forceUpdate();
};
setTimeout(setTimeoutCallback);
} }, { key: "checkKey", value: function checkKey(
e) {var _this9 = this;
e) {
// enter
if (e.keyCode == 13) this.addWindow();
// escape key
if (e.keyCode == 27) {
if (this.state.searchLen > 0 || Object.keys(this.state.selection).length > 0) {
// stop popup from closing if we have search text or selection active
e.nativeEvent.preventDefault();
e.nativeEvent.stopPropagation();
}
this.state.hiddenTabs = {};
this.state.searchLen = 0;
this.refs.searchbox.value = "";
Expand Down Expand Up @@ -1097,11 +1102,6 @@ TabManager = function (_React$Component) {_inherits(TabManager, _React$Component
this.refs.windowcontainer.focus();
}
}

var setTimeoutCallback = function setTimeoutCallback() {
_this9.forceUpdate();
};
setTimeout(setTimeoutCallback);
} }, { key: "selectWindowTab", value: function selectWindowTab(
windowId, tabPosition) {
if (!tabPosition || tabPosition < 1) tabPosition = 1;var _iteratorNormalCompletion9 = true;var _didIteratorError9 = false;var _iteratorError9 = undefined;try {
Expand Down Expand Up @@ -1161,7 +1161,7 @@ TabManager = function (_React$Component) {_inherits(TabManager, _React$Component
return "Vertical";
}
} }, { key: "select", value: function select(
id) {var _this10 = this;
id) {
if (this.state.selection[id]) {
delete this.state.selection[id];
this.setState({
Expand All @@ -1177,7 +1177,6 @@ TabManager = function (_React$Component) {_inherits(TabManager, _React$Component
var tab = this.state.tabsbyid[id];
if (this.refs['window' + tab.windowId] && this.refs['window' + tab.windowId].refs['tab' + id]) {
this.refs['window' + tab.windowId].refs['tab' + id].resolveFavIconUrl();
this.refs['window' + tab.windowId].refs['tab' + id].forceUpdate();
}

var selected = Object.keys(this.state.selection).length;
Expand All @@ -1197,11 +1196,6 @@ TabManager = function (_React$Component) {_inherits(TabManager, _React$Component
bottomText: "Press enter to move them to a new window" });

}

var setTimeoutCallback = function setTimeoutCallback() {
_this10.forceUpdate();
};
setTimeout(setTimeoutCallback);
} }, { key: "selectTo", value: function selectTo(
id, tabs) {
var activate = false;
Expand Down Expand Up @@ -1532,7 +1526,7 @@ TabManager = function (_React$Component) {_inherits(TabManager, _React$Component
bottomText: "Allows you to export your saved windows to an external backup" });

} }, { key: "importSessions", value: function importSessions(
evt) {var _this11 = this;
evt) {var _this8 = this;
try {
var inputField = evt.target; // #session_import
var files = evt.target.files;
Expand All @@ -1552,7 +1546,7 @@ TabManager = function (_React$Component) {_inherits(TabManager, _React$Component
} catch (err) {
console.error(err);
window.alert(err);
_this11.setState({ bottomText: "Error: Could not read the backup file!" });
_this8.setState({ bottomText: "Error: Could not read the backup file!" });
} //console.log('FILE CONTENT', event.target.result);
if (!(!!backupFile && backupFile.length > 0)) {_context10.next = 18;break;}
success = backupFile.length;
Expand All @@ -1570,12 +1564,12 @@ TabManager = function (_React$Component) {_inherits(TabManager, _React$Component



_this11.setState({ bottomText: success + " windows successfully restored!" });_context10.next = 19;break;case 18:
_this8.setState({ bottomText: success + " windows successfully restored!" });_context10.next = 19;break;case 18:

_this11.setState({ bottomText: "Error: Could not restore any windows from the backup file!" });case 19:
_this8.setState({ bottomText: "Error: Could not restore any windows from the backup file!" });case 19:

inputField.value = "";
_this11.sessionSync();case 21:case "end":return _context10.stop();}}}, _callee10, _this11);}));return function (_x4) {return _ref10.apply(this, arguments);};}();
_this8.sessionSync();case 21:case "end":return _context10.stop();}}}, _callee10, _this8);}));return function (_x4) {return _ref10.apply(this, arguments);};}();

reader.readAsText(file);
} catch (err) {
Expand Down
6 changes: 3 additions & 3 deletions outlib/TabOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TabOptions = function (_React$Component) {_inherits(TabOptions, _React$Component
_this.state = {};return _this;
}_createClass(TabOptions, [{ key: "logo", value: function logo()
{
var logo = [React.createElement("img", { src: "images/browsers.svg", style: { maxWidth: "3rem" } }), React.createElement("h2", null, "Tab Manager Plus ", "5.1.1")];
var logo = [React.createElement("img", { src: "images/browsers.svg", style: { maxWidth: "3rem" } }), React.createElement("h2", null, "Tab Manager Plus ", "5.1.2")];

return (
React.createElement("div", { className: "logo-options" },
Expand Down Expand Up @@ -55,7 +55,7 @@ TabOptions = function (_React$Component) {_inherits(TabOptions, _React$Component
type: "number",
min: "450",
max: "800",
step: "10",
step: "25",
onMouseEnter: this.props.tabWidthText,
onChange: this.props.changeTabWidth,
value: this.props.tabWidth,
Expand All @@ -72,7 +72,7 @@ TabOptions = function (_React$Component) {_inherits(TabOptions, _React$Component
type: "number",
min: "400",
max: "600",
step: "10",
step: "25",
onMouseEnter: this.props.tabHeightText,
onChange: this.props.changeTabHeight,
value: this.props.tabHeight,
Expand Down
6 changes: 3 additions & 3 deletions outlib/TabOptionsFirefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TabOptions = function (_React$Component) {_inherits(TabOptions, _React$Component
_this.state = {};return _this;
}_createClass(TabOptions, [{ key: "logo", value: function logo()
{
var logo = [React.createElement("img", { src: "images/browsers.svg", style: { maxWidth: "3rem" } }), React.createElement("h2", null, "Tab Manager Plus ", "5.1.1")];
var logo = [React.createElement("img", { src: "images/browsers.svg", style: { maxWidth: "3rem" } }), React.createElement("h2", null, "Tab Manager Plus ", "5.1.2")];

return (
React.createElement("div", { className: "logo-options" },
Expand Down Expand Up @@ -55,7 +55,7 @@ TabOptions = function (_React$Component) {_inherits(TabOptions, _React$Component
type: "number",
min: "450",
max: "800",
step: "10",
step: "25",
onMouseEnter: this.props.tabWidthText,
onChange: this.props.changeTabWidth,
value: this.props.tabWidth,
Expand All @@ -72,7 +72,7 @@ TabOptions = function (_React$Component) {_inherits(TabOptions, _React$Component
type: "number",
min: "400",
max: "600",
step: "10",
step: "25",
onMouseEnter: this.props.tabHeightText,
onChange: this.props.changeTabHeight,
value: this.props.tabHeight,
Expand Down
14 changes: 11 additions & 3 deletions outlib/Window.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Window = function (_React$Component) {_inherits(Window, _React$Component);
_this2.stop = _this2.stop.bind(_this2);
_this2.windowClick = _this2.windowClick.bind(_this2);return _this2;
}_createClass(Window, [{ key: "render", value: function render()

{
var _this = this;
var colors = localStorage["windowColors"];
Expand Down Expand Up @@ -78,7 +79,8 @@ Window = function (_React$Component) {_inherits(Window, _React$Component);
drag: _this.props.drag,
drop: _this.props.drop,
dropWindow: _this.props.dropWindow,
ref: "tab" + tab.id }));
ref: "tab" + tab.id,
id: "tab-" + tab.id }));


});
Expand Down Expand Up @@ -390,9 +392,15 @@ Window = function (_React$Component) {_inherits(Window, _React$Component);
if (!!titleAdded) {
children.push(tabs.shift());
}
var z = -1;
for (var j = 0; j < tabs.length; j++) {
children.push(tabs[j]);
if ((j + 1) % tabsperrow == 0 && j && this.props.layout.indexOf("blocks") > -1) {
var tab = tabs[j].props.tab;
var isHidden = !!tab && !!tab.id && !!this.props.hiddenTabs[tab.id] && this.props.filterTabs;
if (!isHidden) {
z++;
children.push(tabs[j]);
}
if ((z + 1) % tabsperrow == 0 && z && this.props.layout.indexOf("blocks") > -1) {
children.push(React.createElement("div", { className: "newliner" }));
}
}
Expand Down
Loading

0 comments on commit d94b650

Please sign in to comment.