mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-19 00:22:15 +00:00
- cancel/resume subscription fix
- upload into root folder fix - custom color theme part 3
This commit is contained in:
@@ -26,6 +26,21 @@
|
||||
|
||||
<FormLabel class="mt-70">{{ $t('admin_settings.appearance.section_appearance') }}</FormLabel>
|
||||
|
||||
<!--TODO: add language-->
|
||||
<div class="block-wrapper">
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Title" rules="required" v-slot="{ errors }">
|
||||
<div class="inline-wrapper">
|
||||
<div class="switch-label">
|
||||
<label class="input-label">Color Theme:</label>
|
||||
<small class="input-help">Your color change will be visible after app refresh.</small>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</div>
|
||||
<input @input="$updateText('/admin/settings', 'app_color', app.color)" v-model="app.color" :placeholder="$t('admin_settings.appearance.title_plac')" type="color"
|
||||
:class="{'is-error': errors[0]}" class="focus-border-theme"/>
|
||||
</div>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('admin_settings.appearance.logo') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Logo" v-slot="{ errors }">
|
||||
@@ -91,7 +106,7 @@
|
||||
mounted() {
|
||||
axios.get('/api/admin/settings', {
|
||||
params: {
|
||||
column: 'app_title|app_description|app_logo|app_favicon|app_logo_horizontal'
|
||||
column: 'app_title|app_description|app_logo|app_favicon|app_logo_horizontal|app_color'
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
@@ -100,6 +115,7 @@
|
||||
description: response.data.app_description,
|
||||
favicon: response.data.app_favicon,
|
||||
title: response.data.app_title,
|
||||
color: response.data.app_color,
|
||||
logo: response.data.app_logo,
|
||||
}
|
||||
})
|
||||
|
||||
@@ -9,31 +9,31 @@
|
||||
<!--Page Tab links-->
|
||||
<div class="menu-list-wrapper horizontal">
|
||||
<router-link replace :to="{name: 'PlanSettings', params: {id: plan.id}}"
|
||||
class="menu-list-item link">
|
||||
<div class="icon">
|
||||
<settings-icon size="17"></settings-icon>
|
||||
class="menu-list-item link link border-bottom-theme">
|
||||
<div class="icon text-theme">
|
||||
<settings-icon size="17" />
|
||||
</div>
|
||||
<div class="label">
|
||||
<div class="label text-theme">
|
||||
{{ $t('admin_page_plans.tabs.settings') }}
|
||||
</div>
|
||||
</router-link>
|
||||
|
||||
<router-link replace :to="{name: 'PlanSubscribers', params: {id: plan.id}}"
|
||||
class="menu-list-item link">
|
||||
<div class="icon">
|
||||
<users-icon size="17"></users-icon>
|
||||
class="menu-list-item link link border-bottom-theme">
|
||||
<div class="icon text-theme">
|
||||
<users-icon size="17" />
|
||||
</div>
|
||||
<div class="label">
|
||||
<div class="label text-theme">
|
||||
{{ $t('admin_page_plans.tabs.subscribers') }}
|
||||
</div>
|
||||
</router-link>
|
||||
|
||||
<router-link replace :to="{name: 'PlanDelete', params: {id: plan.id}}"
|
||||
class="menu-list-item link">
|
||||
<div class="icon">
|
||||
<trash2-icon size="17"></trash2-icon>
|
||||
class="menu-list-item link link border-bottom-theme">
|
||||
<div class="icon text-theme">
|
||||
<trash2-icon size="17" />
|
||||
</div>
|
||||
<div class="label">
|
||||
<div class="label text-theme">
|
||||
{{ $t('admin_page_plans.tabs.delete') }}
|
||||
</div>
|
||||
</router-link>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<PageTab :is-loading="isLoading">
|
||||
<PageTabGroup>
|
||||
<DatatableWrapper @init="isLoading = false" :api="'/api/admin/plans/' + this.$route.params.id + '/subscribers'" :paginator="false" :columns="columns" :data="subscribers" class="table">
|
||||
<DatatableWrapper @init="isLoading = false" :api="`/api/admin/plans/${this.$route.params.id}/subscribers`" :paginator="false" :columns="columns" :data="subscribers" class="table">
|
||||
|
||||
<!--Table data content-->
|
||||
<template slot-scope="{ row }">
|
||||
@@ -10,14 +10,14 @@
|
||||
<router-link :to="{name: 'UserDetail', params: {id: row.data.id}}">
|
||||
<DatatableCellImage
|
||||
image-size="small"
|
||||
:image="row.data.attributes.avatar"
|
||||
:title="row.data.attributes.name"
|
||||
:image="row.data.relationships.settings.data.attributes.avatar"
|
||||
:title="row.data.relationships.settings.data.attributes.name"
|
||||
/>
|
||||
</router-link>
|
||||
</td>
|
||||
<td>
|
||||
<span class="cell-item">
|
||||
{{ row.relationships.storage.data.attributes.used }}%
|
||||
{{ row.data.attributes.storage.used }}%
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
</div>
|
||||
</router-link>
|
||||
|
||||
<router-link replace :to="{name: 'UserDelete'}" v-if="user.data.relationships.settings.data.attributes.name !== admin.name"
|
||||
<router-link replace :to="{name: 'UserDelete'}" v-if="admin && user.data.relationships.settings.data.attributes.name !== admin.data.relationships.settings.data.attributes.name"
|
||||
class="menu-list-item link border-bottom-theme">
|
||||
<div class="icon text-theme">
|
||||
<trash2-icon size="17"></trash2-icon>
|
||||
@@ -120,7 +120,7 @@
|
||||
computed: {
|
||||
...mapGetters(['config']),
|
||||
admin() {
|
||||
return this.$store.getters.user ? this.$store.getters.user.data.attributes : undefined
|
||||
return this.$store.getters.user ? this.$store.getters.user : undefined
|
||||
},
|
||||
},
|
||||
data() {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<label>{{ $t('admin_page_user.select_role') }}:</label>
|
||||
<div class="single-line-form">
|
||||
<SelectInput v-model="userRole" :options="roles"
|
||||
:placeholder="$t('admin_page_user.select_role')" :isError="errors[0]"/>
|
||||
:placeholder="$t('admin_page_user.select_role')" :isError="errors[0]" />
|
||||
<ButtonBase :loading="isSendingRequest" :disabled="isSendingRequest" type="submit"
|
||||
button-style="theme" class="submit-button">
|
||||
{{ $t('admin_page_user.save_role') }}
|
||||
@@ -199,8 +199,6 @@
|
||||
// Reset errors
|
||||
this.$refs.changeRole.reset()
|
||||
|
||||
this.isSendingRequest = false
|
||||
|
||||
this.$emit('reload-user')
|
||||
|
||||
events.$emit('toaster', {
|
||||
@@ -209,16 +207,16 @@
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
this.isSendingRequest = false
|
||||
|
||||
events.$emit('alert:open', {
|
||||
title: this.$t('popup_error.title'),
|
||||
message: this.$t('popup_error.message'),
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
this.isSendingRequest = false
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user