Skip to content

Commit

Permalink
v. 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jaumesegarra committed Oct 13, 2017
1 parent 44d4392 commit 4bbdd45
Show file tree
Hide file tree
Showing 14 changed files with 431 additions and 152 deletions.
118 changes: 59 additions & 59 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ module.exports = function (grunt) {
var package = require('./package.json')
if (!!package.dependencies) {
modules = Object.keys(package.dependencies)
.filter(function (m) {
return m != 'nodewebkit'
})
.map(function (m) {
return './node_modules/' + m + '/**/*'
});
.filter(function (m) {
return m != 'nodewebkit'
})
.map(function (m) {
return './node_modules/' + m + '/**/*'
});
}
//Grunt Config
grunt.initConfig({
Expand All @@ -34,53 +34,53 @@ module.exports = function (grunt) {
keepExpandedHierarchy: false,
stripGlobBase: true,
files: [
'dist/css/bootstrap.css',
'dist/js/bootstrap.min.js',
'themes/base/minified/**'
'dist/css/bootstrap.css',
'dist/js/bootstrap.min.js',
'themes/base/minified/**'
]
},
'font-awesome': {
},
'font-awesome': {
expand: false,
css_dest: 'app/css/',
keepExpandedHierarchy: false,
stripGlobBase: true,
files: [
'css/font-awesome.min.css',
'fonts/*'
'css/font-awesome.min.css',
'fonts/*'
]
}
}
}
}
}
}
},
sass: {
dist: {
options: {
style: 'compressed',
sourcemap: 'none'
},
sass: {
dist: {
options: {
style: 'compressed',
sourcemap: 'none'
},
files: [{
expand: true,
cwd: 'app/scss',
src: ['*.scss'],
dest: 'app/css',
ext: '.css'
}]
}
},
watch: {
css: {
files: ['app/scss/**/*.scss'],
tasks: ['sass'],
}
},
nwjs: {
options: {
cacheDir: './build/cache',
macIcns: './app-icon.icns',
winIco: './app-icon.ico',
version: '0.25.1',
flavor: 'normal',
files: [{
expand: true,
cwd: 'app/scss',
src: ['*.scss'],
dest: 'app/css',
ext: '.css'
}]
}
},
watch: {
css: {
files: ['app/scss/**/*.scss'],
tasks: ['sass'],
}
},
nwjs: {
options: {
cacheDir: './build/cache',
macIcns: './app-icon.icns',
winIco: './app-icon.ico',
version: '0.25.1',
flavor: 'normal',
buildDir: './builds', // Where the build version your app is saved
},
src: ['./package.json', './app/**/*', '!./app/scss/**/**'].concat(modules) // Your NW.js app
Expand All @@ -101,28 +101,28 @@ module.exports = function (grunt) {
// If no platform where specified, determine current platform
if (arguments.length === 0) {
if (process.platform === 'darwin') platforms.push('osx64')
else if (process.platform === 'win32') platforms.push('win')
else if (process.arch === 'ia32') platforms.push('linux32')
else if (process.arch === 'x64') platforms.push('linux64')
else if (process.platform === 'win32') platforms.push('win')
else if (process.arch === 'ia32') platforms.push('linux32')
else if (process.arch === 'x64') platforms.push('linux64')

} else {
if (platform === 'win') platforms.push('win')
if (platform === 'mac') platforms.push('osx64')
if (platform === 'linux32') platforms.push('linux32')
if (platform === 'linux34') platforms.push('linux64')
} else {
if (platform === 'win') platforms.push('win')
if (platform === 'mac') platforms.push('osx64')
if (platform === 'linux32') platforms.push('linux32')
if (platform === 'linux34') platforms.push('linux64')

// Build for All platforms
if (platform === 'all') platforms = ['win', 'osx64', 'linux32', 'linux64']
if (platform === 'all') platforms = ['win', 'osx64', 'linux32', 'linux64']

}
}


if (platforms) {
grunt.config('nwjs.options.platforms', platforms);
}
if (platforms) {
grunt.config('nwjs.options.platforms', platforms);
}

grunt.task.run(['sass']);
grunt.task.run(['nwjs']);
grunt.task.run(['sass']);
grunt.task.run(['nwjs']);

});
});
};
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ With Ranwall you can discover new wallpapers just doing a click, if you like it
## Download
Download latest version from [here](https://github.com/jaumesegarra/ranwall-app/releases) (Only for Windows and macos at the moment)

## Coming
- [ ] Option to launch at startup
- [ ] Tray icon
- [ ] Global command for set a new random wallpaper
- [ ] ? Change wallpaper automatically every x minutes
## Coming?
- [ ] Change wallpaper automatically every x minutes

## Thanks to:
* [unsplash.it](https://unsplash.it)
Expand Down
83 changes: 52 additions & 31 deletions app/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,65 @@
<link href="css/app.css" rel="stylesheet"/>
</head>
<body class="config" ng-controller="configController">

<table border="0" class="content">
<tr>
<td><h2>Wallpaper:</h2></td>
<td>
<div class="config-option">
<label for="wall_provider" class="block">Provider:</label>
<div class="select-wrapper">
<select ng-model="wall_provider" id="wall_provider" ng-options="wprovider.name for wprovider in wproviders">
</select>
<nav>
<a href="#app" class="button grey light">App</a>
<a href="#wallpaper" class="button grey light">Wallpaper</a>
<a href="#advanced" class="button grey light">Advanced</a>
</nav>
<div class="content">
<table border="0">
<tr id="app">
<td><h2>App:</h2></td>
<td>
<div class="config-option">
<input type="checkbox" ng-model="hideAtLaunch" id="show-at-open"/>
<label for="show-at-open">Hide at launch</label>
</div>
</div>

<div class="config-option">
<label for="resolution_x" class="block">Resolution:</label>
<input type="number" id="resolution_x" ng-model="res_x"/><span class="x">x</span><input type="number" id="resolution_y" ng-model="res_y"/>
<button class="grey" ng-click="resolution_input('default')" title="Default">DF</button>
<button class="grey" ng-click="resolution_input('hd')" title="HD">HD</button>
<button class="grey" ng-click="resolution_input('4k')" title="4K">4K</button>
<span class="info">+ resolution, + loading time</span>
</div>
</td>
</tr>
<tr>
<td><h2>Advanced options:</h2></td>
<td>
<div class="config-option">
<button style="display: block" ng-click="deleteCache()">Delete cache</button>
<span class="info">If you have set a ranwallpaper, it may not be established when restart the computer.</span>
</div>
</td>
</tr>
</table>
<div class="config-option">
<input type="checkbox" ng-model="launchAtStartup" id="start-at-ss"/>
<label for="start-at-ss">Launch at startup</label>
</div>
</td>
</tr>
<tr id="wallpaper">
<td><h2>Wallpaper:</h2></td>
<td>
<div class="config-option">
<label for="wall_provider" class="block">Provider:</label>
<div class="select-wrapper">
<select ng-model="wall_provider" id="wall_provider" ng-options="wprovider.name for wprovider in wproviders">
</select>
</div>
</div>

<div class="config-option">
<label for="resolution_x" class="block">Resolution:</label>
<input type="number" id="resolution_x" ng-model="res_x"/><span class="x">x</span><input type="number" id="resolution_y" ng-model="res_y"/>
<button class="grey" ng-click="resolution_input('default')" title="Default">DF</button>
<button class="grey" ng-click="resolution_input('hd')" title="HD">HD</button>
<button class="grey" ng-click="resolution_input('4k')" title="4K">4K</button>
<span class="info">+ resolution, + loading time</span>
</div>
</td>
</tr>
<tr id="advanced">
<td><h2>Advanced options:</h2></td>
<td>
<div class="config-option">
<button style="display: block" ng-click="deleteCache()">Delete cache</button>
<span class="info">If you have set a ranwallpaper, it may not be established when restart the computer.</span>
</div>
</td>
</tr>
</table>
</div>
<script src="js/_vendor/angular/angular.js"></script>
<script src="js/_vendor/angular-random-string/angular-random-string.js"></script>
<script src="js/_vendor/angular-local-storage/angular-local-storage.js"></script>
<script type="text/javascript" src="js/app.js"></script>
<script type="text/javascript" src="js/win.js"></script>
<script type="text/javascript" src="js/updater.js"></script>
<script type="text/javascript" src="js/wall.js"></script>
</body>
</html>
Binary file added app/img/logo_barMacos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/img/logo_barWin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<div id="random-wallpaper-active">
<img/>
<div class="foot-buttons">
<button class="very light" id="saveas-wallpaper" ng-click="saveasBtnClick()"><i class="fa fa-download"></i></button>
<button class="light" id="set-wallpaper" ng-click="setBtnClick()">set</button>
</div>
</div>
Expand All @@ -23,6 +24,7 @@
<script src="js/_vendor/angular-random-string/angular-random-string.js"></script>
<script src="js/_vendor/angular-local-storage/angular-local-storage.js"></script>
<script src="js/app.js"></script>
<script src="js/win.js"></script>
<script src="js/wall.js"></script>
<script src="js/updater.js"></script>
</body>
Expand Down
Loading

0 comments on commit 4bbdd45

Please sign in to comment.