summaryrefslogtreecommitdiffstats
path: root/apps/settings/src
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-09-07 13:10:38 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-09-08 10:49:17 +0200
commit3fa59ba4127a1a861f4a6485664371af4cb57662 (patch)
treef34b46c94cee9e24cb9fe8f9438e4a10486fb0bc /apps/settings/src
parent107aeb36e5435c9eb3c6b597d5a7da4f4909f5a9 (diff)
downloadnextcloud-server-3fa59ba4127a1a861f4a6485664371af4cb57662.tar.gz
nextcloud-server-3fa59ba4127a1a861f4a6485664371af4cb57662.zip
Fix apps list issues caused by redesign
- Make icons work on dark theme - Use new buttons - Fix some eslint warnings Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/settings/src')
-rw-r--r--apps/settings/src/components/AppList/AppItem.vue64
1 files changed, 31 insertions, 33 deletions
diff --git a/apps/settings/src/components/AppList/AppItem.vue b/apps/settings/src/components/AppList/AppItem.vue
index f6431d64e18..7ff256378c2 100644
--- a/apps/settings/src/components/AppList/AppItem.vue
+++ b/apps/settings/src/components/AppList/AppItem.vue
@@ -29,13 +29,11 @@
width="32"
height="32"
viewBox="0 0 32 32">
- <defs><filter :id="filterId"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" /></filter></defs>
<image x="0"
y="0"
width="32"
height="32"
preserveAspectRatio="xMinYMin meet"
- :filter="filterUrl"
:xlink:href="app.preview"
class="app-icon" />
</svg>
@@ -70,51 +68,53 @@
{{ app.error }}
</div>
<div v-if="isLoading" class="icon icon-loading-small" />
- <input v-if="app.update"
- class="update primary"
- type="button"
- :value="t('settings', 'Update to {update}', {update:app.update})"
+ <NcButton v-if="app.update"
+ type="primary"
:disabled="installing || isLoading"
@click.stop="update(app.id)">
- <input v-if="app.canUnInstall"
+ {{ t('settings', 'Update to {update}', {update:app.update}) }}
+ </NcButton>
+ <NcButton v-if="app.canUnInstall"
class="uninstall"
- type="button"
- :value="t('settings', 'Remove')"
+ type="tertiary"
:disabled="installing || isLoading"
@click.stop="remove(app.id)">
- <input v-if="app.active"
- class="enable"
- type="button"
- :value="t('settings','Disable')"
+ {{ t('settings', 'Remove') }}
+ </NcButton>
+ <NcButton v-if="app.active"
:disabled="installing || isLoading"
@click.stop="disable(app.id)">
- <input v-if="!app.active && (app.canInstall || app.isCompatible)"
+ {{ t('settings','Disable') }}
+ </NcButton>
+ <NcButton v-if="!app.active && (app.canInstall || app.isCompatible)"
v-tooltip.auto="enableButtonTooltip"
- class="enable"
- type="button"
- :value="enableButtonText"
+ type="primary"
:disabled="!app.canInstall || installing || isLoading"
@click.stop="enable(app.id)">
- <input v-else-if="!app.active"
+ {{ enableButtonText }}
+ </NcButton>
+ <NcButton v-else-if="!app.active"
v-tooltip.auto="forceEnableButtonTooltip"
- class="enable force"
- type="button"
- :value="forceEnableButtonText"
+ type="secondary"
:disabled="installing || isLoading"
@click.stop="forceEnable(app.id)">
+ {{ forceEnableButtonText }}
+ </NcButton>
</div>
</div>
</template>
<script>
-import AppScore from './AppScore'
-import AppManagement from '../../mixins/AppManagement'
-import SvgFilterMixin from '../SvgFilterMixin'
+import AppScore from './AppScore.vue'
+import AppManagement from '../../mixins/AppManagement.js'
+import SvgFilterMixin from '../SvgFilterMixin.vue'
+import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
export default {
name: 'AppItem',
components: {
AppScore,
+ NcButton,
},
mixins: [AppManagement, SvgFilterMixin],
props: {
@@ -177,15 +177,13 @@ export default {
</script>
<style scoped>
- .force {
- background: var(--color-main-background);
- border-color: var(--color-error);
- color: var(--color-error);
+ .app-icon {
+ filter: var(--background-invert-if-bright);
}
- .force:hover,
- .force:active {
- background: var(--color-error);
- border-color: var(--color-error) !important;
- color: var(--color-main-background);
+ .actions {
+ display: flex !important;
+ gap: 8px;
+ flex-wrap: wrap;
+ justify-content: end;
}
</style>