Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
!/apps/testing
!/apps/admin_audit
!/apps/updatenotification
!/apps/theming
/apps/files_external/3rdparty/irodsphp/PHPUnitTest
/apps/files_external/3rdparty/irodsphp/web
/apps/files_external/3rdparty/irodsphp/prods/test
Expand Down
38 changes: 38 additions & 0 deletions apps/theming/appinfo/app.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php
/**
* @copyright Copyright (c) 2016 Bjoern Schiessle <bjoern@schiessle.org>
* @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

\OCP\App::registerAdmin('theming', 'settings/settings-admin');

$linkToCSS = \OC::$server->getURLGenerator()->linkToRoute(
'theming.Theming.getStylesheet',
[
'v' => \OC::$server->getConfig()->getAppValue('theming', 'cachebuster', '0'),
]
);
\OC_Util::addHeader(
'link',
[
'rel' => 'stylesheet',
'href' => $linkToCSS,
]
);

15 changes: 15 additions & 0 deletions apps/theming/appinfo/info.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<info>
<id>theming</id>
<name>Theming</name>
<description>Adjust the Nextcloud theme</description>
<licence>AGPL</licence>
<author>Nextcloud</author>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since when do we use the project name as author. In the past we always had the real author here and I would stick to it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I for one find it utterly confusing and non-saying if the apps page shows an app with 20 different authors 🙈

<version>0.1.0</version>
<namespace>Theming</namespace>
<category>other</category>
<dependencies>
<owncloud min-version="9.0" max-version="9.1" />
</dependencies>
<default_enable/>
</info>
57 changes: 57 additions & 0 deletions apps/theming/appinfo/routes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php
/**
* @copyright Copyright (c) 2016 Bjoern Schiessle <bjoern@schiessle.org>
* @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

namespace OCA\Theming\AppInfo;

(new \OCP\AppFramework\App('theming'))->registerRoutes($this, array('routes' => array(
[
'name' => 'Theming#updateStylesheet',
'url' => '/ajax/updateStylesheet',
'verb' => 'POST'
],
[
'name' => 'Theming#undo',
'url' => '/ajax/undoChanges',
'verb' => 'POST'
],
[
'name' => 'Theming#updateLogo',
'url' => '/ajax/updateLogo',
'verb' => 'POST'
],
[
'name' => 'Theming#getStylesheet',
'url' => '/styles.css',
'verb' => 'GET',
],
[
'name' => 'Theming#getLogo',
'url' => '/logo',
'verb' => 'GET',
],
[
'name' => 'Theming#getLoginBackground',
'url' => '/loginbackground',
'verb' => 'GET',
],
)));

34 changes: 34 additions & 0 deletions apps/theming/css/settings-admin.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#theming input {
width: 17em;
}

#theming .upload-logo-field {
display: none;
}

#theming .theme-undo {
cursor: pointer;
opacity: .5;
padding: 9px;
vertical-align: bottom;
}

#theming .icon {
display: inline-block;
}

#theming label span {
display: inline-block;
min-width: 90px;
padding: 8px 0px;
}

#theming .icon-upload {
display: inline-flex;
padding: 8px;
margin: 0;
}

div#theming_settings_msg {
margin-left: 10px;
}
Loading