various fixes, typo, center popover, updated build

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2018-06-07 16:29:54 +02:00 committed by Morris Jobke
parent a9e59ff732
commit 790c897d98
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
7 changed files with 4 additions and 141 deletions

View File

@ -1,55 +0,0 @@
/**
* @copyright (c) 2018 Joas Schilling <coding@schilljs.com>
*
* @author Joas Schilling <coding@schilljs.com>
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*/
/* global $, define */
define(function (require) {
"use strict";
return {
/** @type {Vue|null} */
vm: null,
/**
* Initialise the app
*/
initialise: function() {
var data = JSON.parse($('#updatenotification').attr('data-json'));
var Vue = require('vue');
var vSelect = require('vue-select');
Vue.component('v-select', vSelect.VueSelect);
Vue.mixin({
methods: {
t: function(app, text, vars, count, options) {
return OC.L10N.translate(app, text, vars, count, options);
},
n: function(app, textSingular, textPlural, count, vars, options) {
return OC.L10N.translatePlural(app, textSingular, textPlural, count, vars, options);
}
}
});
this.vm = new Vue(require('./components/root.vue'));
this.vm.newVersionString = data.newVersionString;
this.vm.lastCheckedDate = data.lastChecked;
this.vm.isUpdateChecked = data.isUpdateChecked;
this.vm.updaterEnabled = data.updaterEnabled;
this.vm.downloadLink = data.downloadLink;
this.vm.isNewVersionAvailable = data.isNewVersionAvailable;
this.vm.updateServerURL = data.updateServerURL;
this.vm.changelogURL = data.changelogURL;
this.vm.whatsNewData = data.whatsNew;
this.vm.currentChannel = data.currentChannel;
this.vm.channels = data.channels;
this.vm.notifyGroups = data.notifyGroups;
this.vm.isDefaultUpdateServerURL = data.isDefaultUpdateServerURL;
this.vm.versionIsEol = data.versionIsEol;
}
};
});

View File

@ -42,7 +42,7 @@
<div class="whatsNew" v-if="whatsNew">
<div class="toggleWhatsNew">
<span v-click-outside="hideMenu" @click="toggleMenu">{{ t('updatenotification', 'What\'s new?') }}</span>
<div class="popovermenu" :class="{ 'open': openedWhatsNew }">
<div class="popovermenu" :class="{ 'menu-center': true, open: openedWhatsNew }">
<popover-menu :menu="whatsNew" />
</div>
</div>

View File

@ -1,57 +0,0 @@
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: './js-src/init.js',
output: {
path: path.resolve(__dirname, '../js'),
publicPath: '/',
filename: 'merged.js'
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
loaders: {
},
esModule: false
// other vue-loader options go here
}
}
]
},
resolve: {
alias: {
'vue-select': 'vue-select/dist/vue-select.js',
'vue': process.env.NODE_ENV === 'production' ? 'vue/dist/vue.min.js' : 'vue/dist/vue.js'
},
extensions: ['*', '.js', '.vue', '.json']
},
performance: {
hints: false
},
devtool: '#eval-source-map'
};
if (process.env.NODE_ENV === 'production') {
module.exports.devtool = '#source-map';
// http://vue-loader.vuejs.org/en/workflow/production.html
module.exports.plugins = (module.exports.plugins || []).concat([
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
compress: {
warnings: false
}
}),
new webpack.LoaderOptionsPlugin({
minimize: true
})
]);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1246,29 +1246,6 @@
"sha.js": "^2.4.8"
}
},
"cross-env": {
"version": "5.1.6",
"resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.1.6.tgz",
"integrity": "sha512-VWTDq+G4v383SzgRS7jsAVWqEWF0aKZpDz1GVjhONvPRgHB1LnxP2sXUVFKbykHkPSnfRKS8YdiDevWFwZmQ9g==",
"dev": true,
"requires": {
"cross-spawn": "^5.1.0",
"is-windows": "^1.0.0"
},
"dependencies": {
"cross-spawn": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
"integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
"dev": true,
"requires": {
"lru-cache": "^4.0.1",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
}
}
}
},
"cross-spawn": {
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",

View File

@ -10,8 +10,7 @@
"scripts": {
"dev": "webpack --config js-src/webpack.dev.js",
"watch": "webpack --progress --watch --config js-src/webpack.dev.js",
"build": "webpack --progress --hide-modules --config js-src/webpack.prod.js",
"test": "echo \"Error: no test specified\" && exit 1"
"build": "webpack --progress --hide-modules --config js-src/webpack.prod.js"
},
"repository": {
"type": "git",
@ -29,7 +28,6 @@
"vue-select": "^2.4.0"
},
"devDependencies": {
"cross-env": "^5.1.6",
"css-loader": "^0.28.11",
"file-loader": "^1.1.11",
"vue-loader": "^15.2.4",