mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix: address review comments
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
This commit is contained in:
parent
d91a7feb60
commit
67b4d3d62b
7 changed files with 29 additions and 30 deletions
|
|
@ -44,13 +44,13 @@ export interface IAppstoreApp {
|
|||
app_api: boolean
|
||||
active: boolean
|
||||
internal: boolean
|
||||
removeable: boolean
|
||||
removable: boolean
|
||||
installed: boolean
|
||||
canInstall: boolean
|
||||
canUninstall: boolean
|
||||
canUnInstall: boolean
|
||||
isCompatible: boolean
|
||||
needsDownload: boolean
|
||||
update: string | null
|
||||
update?: string
|
||||
|
||||
appstoreData: Record<string, never>
|
||||
releases?: IAppstoreAppRelease[]
|
||||
|
|
@ -91,5 +91,4 @@ export interface IAppstoreExApp extends IAppstoreApp {
|
|||
daemon: IDeployDaemon | null | undefined
|
||||
status: IExAppStatus | Record<string, never>
|
||||
error: string
|
||||
removable: boolean
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import NcIconSvgWrapper from '@nextcloud/vue/dist/Components/NcIconSvgWrapper.js'
|
||||
import { mdiFileChart } from '@mdi/js'
|
||||
import type { IDeployDaemon } from '../../app-types.ts'
|
||||
import { mdiFileChart } from '@mdi/js'
|
||||
import NcIconSvgWrapper from '@nextcloud/vue/dist/Components/NcIconSvgWrapper.js'
|
||||
|
||||
defineProps<{
|
||||
daemon?: IDeployDaemon
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@
|
|||
class="app-image app-image-icon"
|
||||
:headers="getDataItemHeaders(`app-table-col-icon`)">
|
||||
<div v-if="!app?.app_api && shouldDisplayDefaultIcon" class="icon-settings-dark" />
|
||||
<NcIconSvgWrapper v-else-if="app?.app_api && shouldDisplayDefaultIcon"
|
||||
:path="mdiCogOutline()"
|
||||
<NcIconSvgWrapper v-else-if="app.app_api && shouldDisplayDefaultIcon"
|
||||
:path="mdiCogOutline"
|
||||
:size="listView ? 24 : 48"
|
||||
style="min-width: auto; min-height: auto; height: 100%;" />
|
||||
|
||||
<svg v-else-if="listView && app.preview && !app?.app_api"
|
||||
<svg v-else-if="listView && app.preview && !app.app_api"
|
||||
width="32"
|
||||
height="32"
|
||||
viewBox="0 0 32 32">
|
||||
|
|
@ -83,7 +83,7 @@
|
|||
@click.stop="update(app.id)">
|
||||
{{ t('settings', 'Update to {update}', {update:app.update}) }}
|
||||
</NcButton>
|
||||
<NcButton v-if="app.canUnInstall || app.canUninstall"
|
||||
<NcButton v-if="app.canUnInstall"
|
||||
class="uninstall"
|
||||
type="tertiary"
|
||||
:disabled="installing || isLoading"
|
||||
|
|
@ -125,6 +125,8 @@ import SvgFilterMixin from '../SvgFilterMixin.vue'
|
|||
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
|
||||
import NcIconSvgWrapper from '@nextcloud/vue/dist/Components/NcIconSvgWrapper.js'
|
||||
import { mdiCogOutline } from '@mdi/js'
|
||||
import { useAppApiStore } from '../../store/app-api-store'
|
||||
|
||||
|
||||
export default {
|
||||
name: 'AppItem',
|
||||
|
|
@ -133,7 +135,14 @@ export default {
|
|||
AppScore,
|
||||
NcButton,
|
||||
NcIconSvgWrapper,
|
||||
mdiCogOutline,
|
||||
},
|
||||
setup() {
|
||||
const appApiStore = useAppApiStore()
|
||||
|
||||
return {
|
||||
appApiStore,
|
||||
mdiCogOutline,
|
||||
}
|
||||
},
|
||||
mixins: [AppManagement, SvgFilterMixin],
|
||||
props: {
|
||||
|
|
@ -206,9 +215,6 @@ export default {
|
|||
|
||||
},
|
||||
methods: {
|
||||
mdiCogOutline() {
|
||||
return mdiCogOutline
|
||||
},
|
||||
prefix(prefix, content) {
|
||||
return prefix + '_' + content
|
||||
},
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
:value="t('settings', 'Update to {version}', { version: app.update })"
|
||||
:disabled="installing || isLoading || isManualInstall"
|
||||
@click="update(app.id)">
|
||||
<input v-if="app.canUnInstall || app.canUninstall"
|
||||
<input v-if="app.canUnInstall"
|
||||
class="uninstall"
|
||||
type="button"
|
||||
:value="t('settings', 'Remove')"
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
<p v-if="!defaultDeployDaemonAccessible" class="warning">
|
||||
{{ t('settings', 'Default Deploy daemon is not accessible') }}
|
||||
</p>
|
||||
<NcCheckboxRadioSwitch v-if="app.canUnInstall || app.canUninstall"
|
||||
<NcCheckboxRadioSwitch v-if="app.canUnInstall"
|
||||
:checked="removeData"
|
||||
:disabled="installing || isLoading || !defaultDeployDaemonAccessible"
|
||||
@update:checked="toggleRemoveData">
|
||||
|
|
@ -113,7 +113,7 @@
|
|||
<NcDateTime :timestamp="lastModified" />
|
||||
</div>
|
||||
|
||||
<div v-if="appAuthors" class="app-details__section">
|
||||
<div class="app-details__section">
|
||||
<h4>
|
||||
{{ t('settings', 'Author') }}
|
||||
</h4>
|
||||
|
|
@ -122,7 +122,7 @@
|
|||
</p>
|
||||
</div>
|
||||
|
||||
<div v-if="appCategories" class="app-details__section">
|
||||
<div class="app-details__section">
|
||||
<h4>
|
||||
{{ t('settings', 'Categories') }}
|
||||
</h4>
|
||||
|
|
|
|||
|
|
@ -8,12 +8,6 @@ import rebuildNavigation from '../service/rebuild-navigation.js'
|
|||
import { useAppApiStore } from '../store/app-api-store'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const appApiStore = useAppApiStore()
|
||||
return {
|
||||
appApiStore,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
appGroups() {
|
||||
return this.app.groups.map(group => { return { id: group, name: group } })
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ export const useAppApiStore = defineStore('app-api-apps', {
|
|||
} as IExAppStatus
|
||||
}
|
||||
app.active = true
|
||||
app.canUninstall = false
|
||||
app.canUnInstall = false
|
||||
app.removable = true
|
||||
app.error = ''
|
||||
}
|
||||
|
|
@ -159,7 +159,7 @@ export const useAppApiStore = defineStore('app-api-apps', {
|
|||
if (app) {
|
||||
app.active = false
|
||||
if (app.removable) {
|
||||
app.canUninstall = true
|
||||
app.canUnInstall = true
|
||||
}
|
||||
}
|
||||
return true
|
||||
|
|
@ -183,14 +183,14 @@ export const useAppApiStore = defineStore('app-api-apps', {
|
|||
app.active = false
|
||||
app.needsDownload = true
|
||||
app.installed = false
|
||||
app.canUninstall = false
|
||||
app.canUnInstall = false
|
||||
app.canInstall = true
|
||||
app.daemon = null
|
||||
app.status = {}
|
||||
if (app.update !== null) {
|
||||
this.updateCount--
|
||||
}
|
||||
app.update = null
|
||||
app.update = undefined
|
||||
}
|
||||
return true
|
||||
})
|
||||
|
|
@ -213,7 +213,7 @@ export const useAppApiStore = defineStore('app-api-apps', {
|
|||
const app = this.apps.find((app) => app.id === appId)
|
||||
if (app) {
|
||||
const version = app.update
|
||||
app.update = null
|
||||
app.update = undefined
|
||||
app.version = version || app.version
|
||||
app.status = {
|
||||
type: 'update',
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
<!-- Featured/Supported badges -->
|
||||
<div class="app-sidebar__badges">
|
||||
<AppLevelBadge :level="app.level" />
|
||||
<AppDaemonBadge v-if="app?.app_api && app?.daemon" :daemon="app.daemon" />
|
||||
<AppDaemonBadge v-if="app.app_api && app.daemon" :daemon="app.daemon" />
|
||||
<AppScore v-if="hasRating" :score="rating" />
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Reference in a new issue