-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Theming app #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Theming app #59
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
2acf831
initial commit for the theming app
schiessle 55f3a65
basic information architecture for the theming app
jancborchardt a1f1712
write theme settings to database
schiessle dfe2273
add some visual feedback if the operation was succesful or not
schiessle 92e2d1c
Migrate logic to dynamic controller
LukasReschke f225c5d
Check if server is installed
LukasReschke 1e93c26
Fix indentation
LukasReschke 7c232d5
Disable drop zone
LukasReschke ca36429
Adjust integration test
LukasReschke 61cba10
scale preview image
schiessle 0e30db4
make sure that the preview gets updated every time a new image gets u…
schiessle 973fe7a
design and layout fixes for Theming app
jancborchardt 1c5b9c0
Replace OC_Defaults with \OC::$server->getThemingDefaults()
LukasReschke 050f373
Use stream instead of rename
LukasReschke 4684741
Add comment to "getMailHeaderColor"
LukasReschke fe1089e
Add tooltip
LukasReschke 4b79420
Only save when value changed or enter is pressed
LukasReschke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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, | ||
| ] | ||
| ); | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> | ||
| <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> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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', | ||
| ], | ||
| ))); | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 🙈