Skip to content

Commit

Permalink
Merge pull request #183 from HaveAGitGat/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
HaveAGitGat authored Mar 20, 2020
2 parents 08f7c26 + 5132da0 commit 2be26dc
Show file tree
Hide file tree
Showing 17 changed files with 997 additions and 595 deletions.
32 changes: 0 additions & 32 deletions ServiceAdd.js

This file was deleted.

16 changes: 0 additions & 16 deletions ServiceRemove.js

This file was deleted.

19 changes: 0 additions & 19 deletions ecosystem.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion imports/ui/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default AppRouter = () => {

const [currentVersion, setVersion] = React.useState('');

const [newVersion, setNewVersion] = React.useState(1.105);
const [newVersion, setNewVersion] = React.useState(1.106);



Expand Down
15 changes: 8 additions & 7 deletions imports/ui/item_Button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,16 @@ export default class App extends Component {

render() {

// var temp ={
// createdAt: new Date()

// }

var serverTime = this.props.time
var lastUpdate = this.props.file.lastUpdate ? this.props.file.lastUpdate.getTime() : 0
//this.props.time >= this.state.lastUpdate
//this.state.showButton


//dates are stringified when backup created:
try {
var lastUpdate = this.props.file.lastUpdate ? new Date(this.props.file.lastUpdate).getTime() : 0
} catch (err) {
var lastUpdate = 0
}


if (this.props.type == "updateDBAction") {
Expand Down
43 changes: 18 additions & 25 deletions imports/ui/libraries/tab_Libraries.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ class App extends Component {
super(props);
this.clearFiles = this.clearFiles.bind(this);

this.state = { listItems: [1, 2],
ready: false
this.state = {
listItems: [1, 2],
ready: false,
selectedLibrary:0,

};
}
Expand All @@ -39,17 +41,19 @@ class App extends Component {
if (confirm('Are you sure you want to delete all libraries?')) {
Meteor.call('remove', function (error, result) { });

GlobalSettingsDB.upsert('globalsettings',
{
$set: {
selectedLibrary: 0,
}
}
);

this.setState({selectedLibrary: 0})
}
}


setSelectedLibrary = (number) => {

this.setState({selectedLibrary: number})

}



addFolder = () => {

Expand Down Expand Up @@ -646,14 +650,8 @@ class App extends Component {
]
});

GlobalSettingsDB.upsert('globalsettings',
{
$set: {
selectedLibrary: count,
}
}
);

this.setState({selectedLibrary: count})


}
Expand Down Expand Up @@ -746,7 +744,8 @@ class App extends Component {
<Folder
key={item._id}
libraryItem={item}
backgroundColour={COLORS[(i+1) % 2]}
backgroundColour={COLORS[(i+1) % 2]}
setSelectedLibrary={this.setSelectedLibrary}
/>
</div></TabPanel>

Expand All @@ -755,15 +754,9 @@ class App extends Component {
));


return <div className="tabWrap" > <Tabs selectedIndex={ this.props.globalSettings[0].selectedLibrary != undefined ? this.props.globalSettings[0].selectedLibrary : 0} onSelect={tabIndex => {
return <div className="tabWrap" > <Tabs selectedIndex={ this.state.selectedLibrary != undefined ? this.state.selectedLibrary : 0} onSelect={tabIndex => {

GlobalSettingsDB.upsert('globalsettings',
{
$set: {
selectedLibrary: tabIndex,
}
}
);
this.setState({selectedLibrary: tabIndex})
}}>
<TabList>

Expand Down
Loading

0 comments on commit 2be26dc

Please sign in to comment.