-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
- Loading branch information
Showing
4 changed files
with
170 additions
and
124 deletions.
There are no files selected for viewing
This file contains 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 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 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 |
---|---|---|
@@ -1,40 +1,37 @@ | ||
<!-- | ||
- @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net> | ||
- | ||
- @author Julius Härtl <[email protected]> | ||
- | ||
- @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/>. | ||
- | ||
--> | ||
/** | ||
* @copyright Copyright (c) 2019 Julius Härtl <[email protected]> | ||
* | ||
* @author Julius Härtl <[email protected]> | ||
* @author John Molakvoæ <[email protected]> | ||
* | ||
* @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/>. | ||
* | ||
*/ | ||
|
||
<script> | ||
export default { | ||
computed: { | ||
appGroups() { | ||
return this.app.groups.map(group => { return { id: group, name: group } }) | ||
}, | ||
loading() { | ||
const self = this | ||
return function(id) { | ||
return self.$store.getters.loading(id) | ||
} | ||
}, | ||
installing() { | ||
return this.$store.getters.loading('install') | ||
}, | ||
isLoading() { | ||
return this.app && this.$store.getters.loading(this.app.id) | ||
}, | ||
enableButtonText() { | ||
if (this.app.needsDownload) { | ||
return t('settings', 'Download and enable') | ||
|
@@ -61,11 +58,19 @@ export default { | |
return base | ||
}, | ||
}, | ||
|
||
data() { | ||
return { | ||
groupCheckedAppsData: false, | ||
} | ||
}, | ||
|
||
mounted() { | ||
if (this.app.groups.length > 0) { | ||
if (this.app && this.app.groups && this.app.groups.length > 0) { | ||
this.groupCheckedAppsData = true | ||
} | ||
}, | ||
|
||
methods: { | ||
asyncFindGroup(query) { | ||
return this.$store.dispatch('getGroups', { search: query, limit: 5, offset: 0 }) | ||
|
@@ -135,4 +140,3 @@ export default { | |
}, | ||
}, | ||
} | ||
</script> |
Oops, something went wrong.