Skip to content

Commit

Permalink
Rename everything from 'Random Declutter' to 'Keep or Sweep'
Browse files Browse the repository at this point in the history
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
  • Loading branch information
jancborchardt committed Apr 3, 2018
1 parent 6cf18dd commit 92941d6
Show file tree
Hide file tree
Showing 13 changed files with 50 additions and 47 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

**Tech companies help you amass data – we help you clean it**

Have fun while organizing your digital life with this app. :) It will show you a random file from your Nextcloud and you decide to ✅keep or ❌delete it.
Have fun while organizing your digital life with this app. :) It will show you a random file from your Nextcloud and you decide to ✅keep or ❌sweep it.

The plan is to extend this so you can also randomly clean your:
- 💌 Mails
- 👥 Contacts
- 📆 Events
- 🐦 Tweets
- 🎉 … anything you can imagine! We have [a document with more background info](https://github.com/randomdeclutter/randomdeclutter-meta#%EF%B8%8F-random-declutter)
- 🎉 … anything you can imagine! We have [a document with more background info](https://github.com/keeporsweep/keeporsweep.net#%EF%B8%8F-keep-or-sweep)


## Installation
Expand Down
19 changes: 10 additions & 9 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
<?xml version="1.0"?>
<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
<id>randomdeclutter</id>
<name>Random Declutter</name>
<id>keeporsweep</id>
<name>Keep or Sweep</name>
<summary>☁️🔀🗑️ Randomly clean your Nextcloud data</summary>
<description><![CDATA[**Tech companies help you amass data – we help you clean it**
Have fun while cleaning up your digital life]]></description>
Have fun while decluttering your digital life, randomly!]]></description>
<version>0.0.1</version>
<licence>AGPL</licence>
<author mail="martin@siarp.de" >Martin Stadler</author>
<author mail="hey@jancborchardt.net" homepage="http://jancborchardt.net">Jan-Christoph Borchardt</author>
<namespace>RandomDeclutter</namespace>
<category>productivity</category>
<author mail="hello@camila.codes">Camila San</author>
<namespace>KeepOrSweep</namespace>
<category>productivity</category>
<category>games</category>
<bugs>https://github.com/randomdeclutter/randomdeclutter/issues</bugs>
<repository type="git">https://github.com/randomdeclutter/randomdeclutter.git</repository>
<bugs>https://github.com/keeporsweep/keeporsweep/issues</bugs>
<repository type="git">https://github.com/keeporsweep/keeporsweep.git</repository>
<dependencies>
<nextcloud min-version="13" max-version="14"/>
</dependencies>
<navigations>
<navigation>
<name>Random Declutter</name>
<route>randomdeclutter.page.index</route>
<name>Keep or Sweep</name>
<route>keeporsweep.page.index</route>
</navigation>
</navigations>
</info>
2 changes: 1 addition & 1 deletion appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Create your routes in here. The name is the lowercase name of the controller
* without the controller part, the stuff after the hash is the method.
* e.g. page#index -> OCA\RandomDeclutter\Controller\PageController->index()
* e.g. page#index -> OCA\KeepOrSweep\Controller\PageController->index()
*
* The controller class has to be registered in the application.php file since
* it's instantiated in there
Expand Down
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"name": "Random Declutter",
"description": "Tinder for stuff",
"name": "Keep or Sweep",
"description": "Randomly declutter your data",
"type": "project",
"license": "AGPL",
"authors": [
{
"name": "Martin Stadler"
"name": "Martin Stadler",
"name": "Jan-Christoph Borchardt",
"name": "Camila San"
}
],
"require": {},
Expand Down
8 changes: 4 additions & 4 deletions css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
overflow: hidden;
}

#randomdeclutter-app {
#keeporsweep-app {
padding: 1em;
width: 100%;
height: 100%;
Expand Down Expand Up @@ -94,8 +94,8 @@
opacity: .5;
}

.action-remove,
.action-keep {
.action-keep,
.action-sweep {
width: 70px;
height: 70px;
padding: 16px;
Expand All @@ -107,7 +107,7 @@
border: none;
}

.action-remove {
.action-sweep {
background-color: $color-error;

&:hover,
Expand Down
18 changes: 9 additions & 9 deletions js/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var RandomDeclutter = RandomDeclutter || {};
var KeepOrSweep = KeepOrSweep || {};

(function(window, OC, exports, undefined) {
'use strict';
Expand All @@ -22,7 +22,7 @@ var RandomDeclutter = RandomDeclutter || {};
_loadList: function() {
var self = this;

var baseUrl = OC.generateUrl('/apps/randomdeclutter');
var baseUrl = OC.generateUrl('/apps/keeporsweep');
return (
$.getJSON(baseUrl + '/files')
.then(function(result) {
Expand Down Expand Up @@ -74,7 +74,7 @@ var RandomDeclutter = RandomDeclutter || {};
this.moveContainer('Right');
},

removeElement: function(path) {
sweepElement: function(path) {
if (this._currentIndex > this._list.length) {
return;
}
Expand Down Expand Up @@ -127,12 +127,12 @@ var RandomDeclutter = RandomDeclutter || {};
var manager = new Manager();

var app = new Vue({
el: '#randomdeclutter-app',
container: '#randomdeclutter-app .element-container',
el: '#keeporsweep-app',
container: '#keeporsweep-app .element-container',
data: {
file: {},
actionKeepHover: false,
actionRemoveHover: false
actionSweepHover: false
},
methods: {
next: function() {
Expand All @@ -145,9 +145,9 @@ var RandomDeclutter = RandomDeclutter || {};
manager.keepElement();
this.next();
},
remove: function() {
sweep: function() {
var path = this.file.path + this.file.name;
manager.removeElement(path);
manager.sweepElement(path);
this.next();
}
}
Expand All @@ -156,4 +156,4 @@ var RandomDeclutter = RandomDeclutter || {};
manager.load()
.then(app.next);

})(window, OC, RandomDeclutter);
})(window, OC, KeepOrSweep);
2 changes: 1 addition & 1 deletion lib/Controller/ApiController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace OCA\RandomDeclutter\Controller;
namespace OCA\KeepOrSweep\Controller;

use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\DataResponse;
Expand Down
4 changes: 2 additions & 2 deletions lib/Controller/PageController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace OCA\RandomDeclutter\Controller;
namespace OCA\KeepOrSweep\Controller;

use OCP\IRequest;
use OCP\AppFramework\Http\TemplateResponse;
Expand All @@ -25,7 +25,7 @@ public function __construct($AppName, IRequest $request, $UserId){
* @NoCSRFRequired
*/
public function index() {
return new TemplateResponse('randomdeclutter', 'index'); // templates/index.php
return new TemplateResponse('keeporsweep', 'index'); // templates/index.php
}

}
8 changes: 4 additions & 4 deletions templates/content/index.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div id="randomdeclutter-app" class="animated bounceInUp">
<div id="keeporsweep-app" class="animated bounceInUp">
<div class="element-container element-container-1 animated active">
<div class="element-preview"></div>
<div class="element-name">{{ file.name }}</div>
Expand All @@ -25,9 +25,9 @@
<div class="element-detail">Refresh to go through your data again</div>
</div>
<div class="action-container">
<button v-on:click="remove"
v-on:mouseover="actionRemoveHover = true" v-on:mouseout="actionRemoveHover = false" :class="{'animated tada': actionRemoveHover}"
class="action-remove icon-close-white">Nah</button>
<button v-on:click="sweep"
v-on:mouseover="actionSweepHover = true" v-on:mouseout="actionSweepHover = false" :class="{'animated tada': actionSweepHover}"
class="action-sweep icon-close-white">Sweep</button>
<button v-on:click="keep"
v-on:mouseover="actionKeepHover = true" v-on:mouseout="actionKeepHover = false" :class="{'animated pulse': actionKeepHover}"
class="action-keep icon-checkmark-white">Keep</button>
Expand Down
8 changes: 4 additions & 4 deletions templates/index.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
script('randomdeclutter', 'vue');
script('randomdeclutter', 'script');
style('randomdeclutter', 'style');
style('randomdeclutter', 'animate.min');
script('keeporsweep', 'vue');
script('keeporsweep', 'script');
style('keeporsweep', 'style');
style('keeporsweep', 'animate.min');
?>

<div id="app">
Expand Down
6 changes: 3 additions & 3 deletions tests/Integration/AppTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace OCA\RandomDeclutter\Tests\Integration\Controller;
namespace OCA\KeepOrSweep\Tests\Integration\Controller;

use OCP\AppFramework\App;
use Test\TestCase;
Expand All @@ -17,13 +17,13 @@ class AppTest extends TestCase {

public function setUp() {
parent::setUp();
$app = new App('randomdeclutter');
$app = new App('keeporsweep');
$this->container = $app->getContainer();
}

public function testAppInstalled() {
$appManager = $this->container->query('OCP\App\IAppManager');
$this->assertTrue($appManager->isInstalled('randomdeclutter'));
$this->assertTrue($appManager->isInstalled('keeporsweep'));
}

}
6 changes: 3 additions & 3 deletions tests/Unit/Controller/PageControllerTest.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace OCA\RandomDeclutter\Tests\Unit\Controller;
namespace OCA\KeepOrSweep\Tests\Unit\Controller;

use PHPUnit_Framework_TestCase;

use OCP\AppFramework\Http\TemplateResponse;

use OCA\RandomDeclutter\Controller\PageController;
use OCA\KeepOrSweep\Controller\PageController;


class PageControllerTest extends PHPUnit_Framework_TestCase {
Expand All @@ -17,7 +17,7 @@ public function setUp() {
$request = $this->getMockBuilder('OCP\IRequest')->getMock();

$this->controller = new PageController(
'randomdeclutter', $request, $this->userId
'keeporsweep', $request, $this->userId
);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// Fix for "Autoload path not allowed: .../tests/lib/testcase.php"
\OC::$loader->addValidRoot(OC::$SERVERROOT . '/tests');

// Fix for "Autoload path not allowed: .../randomdeclutter/tests/testcase.php"
\OC_App::loadApp('randomdeclutter');
// Fix for "Autoload path not allowed: .../keeporsweep/tests/testcase.php"
\OC_App::loadApp('keeporsweep');

if(!class_exists('PHPUnit_Framework_TestCase')) {
require_once('PHPUnit/Autoload.php');
Expand Down

0 comments on commit 92941d6

Please sign in to comment.