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
32 changes: 16 additions & 16 deletions js/dashboard.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dashboard.js.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions js/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/main.js.map

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions lib/Dashboard/RecommendationWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ public function load(): void {
if ($user === null) {
return;
}
$this->initialStateService->provideInitialState('recommendations', 'recommendations', [
'enabled' => true,
'recommendations' => $this->recommendationService->getRecommendations($user)
]);
Util::addScript('recommendations', 'dashboard');
}
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"homepage": "https://github.com/ChristophWurst/files_recommendation#readme",
"dependencies": {
"@nextcloud/axios": "^1.4.0",
"@nextcloud/initial-state": "^1.1.2",
"@nextcloud/router": "^1.2.0",
"@nextcloud/vue": "^2.6.1",
"@nextcloud/vue-dashboard": "^0.1.8",
Expand Down
8 changes: 1 addition & 7 deletions src/store/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import Vuex from 'vuex'
import axios from '@nextcloud/axios'
import { generateUrl } from 'nextcloud-server/dist/router'
import { fetchRecommendedFiles } from '../service/RecommendationService'
import { loadState } from '@nextcloud/initial-state'

Vue.use(Vuex)

Expand Down Expand Up @@ -75,12 +74,7 @@ export default new Vuex.Store({
return
}
this.commit('loading', true)
let fetched
try {
fetched = loadState('recommendations', 'recommendations')
} catch (e) {
fetched = await fetchRecommendedFiles()
}
const fetched = await fetchRecommendedFiles()

context.commit('enabled', fetched.enabled)
if (fetched.recommendations) {
Expand Down