1
0
mirror of https://github.com/chylex/Nextcloud-News.git synced 2025-04-25 11:15:47 +02:00

Revert Add Vue and ng-vue packages

This reverts commits:
8809bb2c56
d2a5c26ee1
3344431a9b
83cdcb016b
36d304ec76

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
This commit is contained in:
Benjamin Brahmer 2021-08-21 10:14:45 +02:00
parent 1be66add82
commit 1f8880c8de
11 changed files with 1177 additions and 3573 deletions

View File

@ -6,7 +6,6 @@ The format is almost based on [Keep a Changelog](https://keepachangelog.com/en/1
## [16.x.x]
### Changed
- Added vue and ng-vue packages (#1421)
- Reimplemented relative time formatting as a filter (#1450)
- Added new `news:updater:update-user` command to update the feeds of a single user (#1360).

View File

@ -15,5 +15,4 @@ $('#content.app-news')
.attr('ng-controller', 'AppController as App');
/* jshint unused: false */
var app = angular.module('News', ['ngRoute', 'ngSanitize', 'ngAnimate', 'ngVue']);
var app = angular.module('News', ['ngRoute', 'ngSanitize', 'ngAnimate']);

View File

@ -1,3 +0,0 @@
var IconLinkCompact = require('../vue_components/IconLinkCompact.vue').default;
var iconLinkCompactComponent = Vue.component('IconLinkCompact', IconLinkCompact);
app.value('IconLinkCompact', iconLinkCompactComponent);

View File

@ -19,6 +19,4 @@ app.controller('AppController', function (Loading, FeedResource, FolderResource)
this.play = function (item) {
this.playingItem = item;
};
this.t = window.t;
});

View File

@ -17,9 +17,7 @@ const gulp = require('gulp'),
jshint = require('gulp-jshint'),
KarmaServer = require('karma').Server,
concat = require('gulp-concat'),
sourcemaps = require('gulp-sourcemaps'),
webpackStream = require('webpack-stream'),
webpackConfig = require('./webpack.config.js');
sourcemaps = require('gulp-sourcemaps');
// Configuration
const buildTarget = 'app.min.js';
@ -31,8 +29,6 @@ const sources = [
'node_modules/angular-route/angular-route.min.js',
'node_modules/angular-sanitize/angular-sanitize.min.js',
'node_modules/masonry-layout/dist/masonry.pkgd.min.js',
'node_modules/vue/dist/vue.js',
'node_modules/ngVue/build/index.js',
'app/App.js', 'app/Config.js', 'app/Run.js',
'controller/**/*.js',
'filter/**/*.js',
@ -43,10 +39,8 @@ const sources = [
'directive/**/*.js'
];
const testSources = ['tests/**/*.js'];
const watchSources = sources.concat(testSources);
const lintSources = watchSources.filter((item) => {
return item !== 'webpack.config.js';
});
const watchSources = sources.concat(testSources).concat(['*.js']);
const lintSources = watchSources;
// tasks
gulp.task('lint', () => {
@ -56,12 +50,8 @@ gulp.task('lint', () => {
.pipe(jshint.reporter('fail'));
});
gulp.task('webpack', () => {
return webpackStream(webpackConfig)
.pipe(gulp.dest('./webpacked'));
});
gulp.task('default', gulp.series('lint', 'webpack', () => {
return gulp.src(sources.concat(['webpacked/webpacked_vue_components.js']))
gulp.task('default', gulp.series('lint', () => {
return gulp.src(sources)
.pipe(ngAnnotate())
.pipe(sourcemaps.init())
.pipe(concat(buildTarget))

4657
js/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -33,7 +33,6 @@
"private": true,
"homepage": "https://github.com/nextcloud/news",
"devDependencies": {
"@vue/compiler-sfc": "^3.2.6",
"gulp": "^4.0.2",
"gulp-cli": "^2.3.0",
"gulp-concat": "^2.6.1",
@ -50,10 +49,7 @@
"karma-firefox-launcher": "^2.1.1",
"karma-jasmine": "^4.0.1",
"minimatch": "^3.0.4",
"natives": "^1.1.6",
"webpack-stream": "^6.1.2",
"vue-loader": "^16.5.0",
"vue-template-compiler": "^2.6.14"
"natives": "^1.1.6"
},
"dependencies": {
"angular": "^1.8.2",
@ -62,8 +58,6 @@
"angular-route": "^1.8.2",
"angular-sanitize": "^1.8.2",
"debug": "^4.3.2",
"masonry-layout": "^4.2.2",
"ngVue": "^1.7.8",
"vue": "^2.6.14"
"masonry-layout": "^4.2.2"
}
}

View File

@ -1,21 +0,0 @@
<template>
<li class="util only-in-compact">
<a class="external icon-link"
v-on:click="ctrl.markRead(item.id)"
target="_blank"
rel="noreferrer"
v-bind:href="item.url"
v-bind:title="t('news', 'Open website')"
news-stop-propagation>
</a>
</li>
</template>
<script>
export default {
props: ['ctrl', 'item', 't'],
};
</script>

View File

@ -1,21 +0,0 @@
const path = require('path');
const { VueLoaderPlugin } = require('vue-loader');
module.exports = {
entry: './app/VueComponents',
output: {
path: path.resolve(__dirname, '.'),
filename: 'webpacked_vue_components.js',
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
},
]
},
plugins: [
new VueLoaderPlugin()
]
}

View File

@ -97,4 +97,3 @@ foreach (Plugin::getScripts() as $appName => $fileName) {
news-scroll-enabled-mark-read="Content.markReadEnabled()"
news-scroll-auto-page="Content.autoPage()"
news-scroll-mark-read="Content.scrollRead(itemIds)"></div>

View File

@ -30,7 +30,16 @@
ng-class="{'compact-dropdown': Content.showDropdown[item.id]}">
<ul>
<li class="util-spacer"></li>
<vue-component name="IconLinkCompact" v-props-item="item" v-props-ctrl="Content" v-props-t="App.t" />
<li class="util only-in-compact">
<a class="external icon-link"
ng-click="Content.markRead(item.id)"
target="_blank"
rel="noreferrer"
ng-href="{{ ::item.url }}"
title="<?php p($l->t('Open website')) ?>"
news-stop-propagation>
</a>
</li>
<li class="title only-in-compact"
ng-class="{
'icon-rss':