Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f85b5de28d | |||
| ee5be2cf21 | |||
| 91195d0160 | |||
| 29e0526844 | |||
| 8d2818150c | |||
| 299abe5e96 |
@@ -38,3 +38,13 @@ $ unzip -d side_menu /path/to/side_menu_vX.Y.Z.zip
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
How to contribute?
|
||||
------------------
|
||||
|
||||
Fork the repository, go to `apps/`, clone your repository and run `npm install` inside.
|
||||
|
||||
Build javascripts using `webpack --config ./webpack.js` (add `-w` to build them in real time).
|
||||
|
||||
Then commit and create a pull request.
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
<description>Move the top menu to the left side.</description>
|
||||
<licence>agpl</licence>
|
||||
<author mail="dev+sidemenu@deblan.fr" homepage="https://www.deblan.io/">Simon Vieille</author>
|
||||
<version>1.1.3</version>
|
||||
<version>1.2.1</version>
|
||||
<namespace>SideMenu</namespace>
|
||||
<category>customization</category>
|
||||
<website>https://gitnet.fr/deblan/side_menu</website>
|
||||
|
||||
+2
-2
@@ -33,7 +33,7 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
#side-menu.is-active {
|
||||
#side-menu.open {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.side-menu-app a:hover, .side-menu-app.is-active a {
|
||||
.side-menu-app a:hover, .side-menu-app.active a {
|
||||
background: var(--side-menu-current-app-background-color, #444);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,8 @@ class Admin implements ISettings
|
||||
/** @var IConfig */
|
||||
private $config;
|
||||
|
||||
public function __construct(IL10N $l, ILogger $logger, IConfig $config) {
|
||||
public function __construct(IL10N $l, ILogger $logger, IConfig $config)
|
||||
{
|
||||
$this->l = $l;
|
||||
$this->logger = $logger;
|
||||
$this->config = $config;
|
||||
|
||||
@@ -79,6 +79,6 @@ class Section implements IIconSection
|
||||
*/
|
||||
public function getIcon()
|
||||
{
|
||||
return $this->url->imagePath('theming', 'app-dark.svg');
|
||||
return $this->url->imagePath('theming', 'app-dark.svg');
|
||||
}
|
||||
}
|
||||
|
||||
+4
-5
@@ -18,13 +18,12 @@
|
||||
import Vue from 'vue'
|
||||
import SideMenu from './SideMenu.vue'
|
||||
|
||||
Vue.prototype.t = t
|
||||
Vue.prototype.OC = OC
|
||||
Vue.prototype.OC = OCP
|
||||
// Vue.prototype.t = t
|
||||
// Vue.prototype.OC = OC
|
||||
// Vue.prototype.OC = OCP
|
||||
|
||||
const View = Vue.extend(SideMenu)
|
||||
const sideMenu = new View({
|
||||
})
|
||||
const sideMenu = new View({})
|
||||
|
||||
const mountSideMenuComponent = () => {
|
||||
const sideMenuContainer = document.querySelector('#side-menu')
|
||||
|
||||
+9
-8
@@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
</div>
|
||||
|
||||
<ul class="side-menu-apps-list">
|
||||
<li v-for="app in apps" v-bind:class="{'side-menu-app': true, 'is-active': app.active}">
|
||||
<li v-for="app in apps" v-bind:class="{'side-menu-app': true, 'active': app.active}">
|
||||
<a v-bind:href="app.href">
|
||||
<span class="side-menu-app-icon" v-html="app.icon"></span>
|
||||
|
||||
@@ -37,9 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from '@nextcloud/axios'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
|
||||
export default {
|
||||
name: 'SideMenu',
|
||||
data() {
|
||||
@@ -67,10 +64,14 @@ export default {
|
||||
}
|
||||
},
|
||||
retrieveLogo() {
|
||||
this.logo = window.getComputedStyle(document.querySelector('#nextcloud .logo'), null)
|
||||
.getPropertyValue('background-image')
|
||||
.replace('url("', '')
|
||||
.replace('")', '')
|
||||
const ncLogo = document.querySelector('#nextcloud .logo')
|
||||
|
||||
if (ncLogo) {
|
||||
this.logo = window.getComputedStyle(ncLogo, null)
|
||||
.getPropertyValue('background-image')
|
||||
.replace('url("', '')
|
||||
.replace('")', '')
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
||||
+5
-5
@@ -42,7 +42,7 @@ const saveSettings = (key) => {
|
||||
t('side_menu', (key + 1) + '/' + size)
|
||||
)
|
||||
|
||||
if (key < size -1) {
|
||||
if (key < size - 1) {
|
||||
saveSettings(++key)
|
||||
} else {
|
||||
OC.msg.finishedSuccess(selector, t('side_menu', 'Saved'))
|
||||
@@ -55,10 +55,10 @@ const saveSettings = (key) => {
|
||||
}
|
||||
|
||||
$(document).ready(() => {
|
||||
$('#side-menu-save').on('click', (event) => {
|
||||
event.preventDefault()
|
||||
OC.msg.startSaving(selector)
|
||||
$('#side-menu-save').on('click', (event) => {
|
||||
event.preventDefault()
|
||||
OC.msg.startSaving(selector)
|
||||
|
||||
saveSettings(0)
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
+5
-2
@@ -15,13 +15,16 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
const sideMenuContainer = $('<div id="side-menu">')
|
||||
const sideMenuContainer = $('<div id="side-menu-container">')
|
||||
const sideMenuOpener = $('<button class="side-menu-opener"></button>')
|
||||
const sideMenu = $('<div id="side-menu">')
|
||||
|
||||
sideMenuContainer.append(sideMenu);
|
||||
|
||||
$('body').append(sideMenuContainer);
|
||||
|
||||
sideMenuOpener.insertBefore('#nextcloud');
|
||||
|
||||
$('body').on('click', '.side-menu-opener', () => {
|
||||
$('#side-menu').toggleClass('is-active');
|
||||
$('#side-menu').toggleClass('open');
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user