Add config support (#76)
Co-authored-by: AceDataCloud <office@acedata.cloud> Co-authored-by: GitHub Actions <actions@github.com>
This commit is contained in:
99 files changed
+2882
-2015
No files matched your search
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<el-row class="panel">
|
||||
<help-entry class="help" />
|
||||
<el-col :span="24">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
@@ -82,7 +81,6 @@ import CopyToClipboard from '@/components/common/CopyToClipboard.vue';
|
||||
import { ElTable, ElRow, ElCol, ElTableColumn, ElCard, ElButton } from 'element-plus';
|
||||
import { ROUTE_CONSOLE_APPLICATION_BUY } from '@/router/constants';
|
||||
import { IApplication, IApplicationListResponse, ICredentialType, IService } from '@/models';
|
||||
import HelpEntry from '@/components/common/HelpEntry.vue';
|
||||
|
||||
interface IData {
|
||||
applications: IApplication[];
|
||||
@@ -104,7 +102,6 @@ export default defineComponent({
|
||||
name: 'ConsoleApplicationList',
|
||||
components: {
|
||||
Pagination,
|
||||
HelpEntry,
|
||||
CopyToClipboard,
|
||||
ElTable,
|
||||
ElRow,
|
||||
@@ -233,17 +230,7 @@ export default defineComponent({
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.help {
|
||||
position: fixed;
|
||||
right: 40px;
|
||||
bottom: 40px;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.help {
|
||||
top: 40px;
|
||||
}
|
||||
.panel {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<el-row class="panel">
|
||||
<help-entry class="help" />
|
||||
<el-col :span="24">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
@@ -109,7 +108,6 @@ import Pagination from '@/components/common/Pagination.vue';
|
||||
import CopyToClipboard from '@/components/common/CopyToClipboard.vue';
|
||||
import { ElRow, ElCol, ElTable, ElTableColumn, ElButton, ElTag, ElCard } from 'element-plus';
|
||||
import { IOrder, IOrderListResponse, OrderState } from '@/models';
|
||||
import HelpEntry from '@/components/common/HelpEntry.vue';
|
||||
|
||||
interface IData {
|
||||
orders: IOrder[];
|
||||
@@ -123,7 +121,6 @@ export default defineComponent({
|
||||
name: 'ConsoleOrderList',
|
||||
components: {
|
||||
Pagination,
|
||||
HelpEntry,
|
||||
CopyToClipboard,
|
||||
ElRow,
|
||||
ElCol,
|
||||
@@ -218,17 +215,7 @@ export default defineComponent({
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.help {
|
||||
position: fixed;
|
||||
right: 40px;
|
||||
bottom: 40px;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.help {
|
||||
top: 40px;
|
||||
}
|
||||
.panel {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
@@ -125,7 +125,6 @@ import Pagination from '@/components/common/Pagination.vue';
|
||||
import { ElTable, ElRow, ElCol, ElTableColumn, ElCard, ElTag, ElSelect, ElOption } from 'element-plus';
|
||||
import { apiUsageOperator, applicationOperator } from '@/operators';
|
||||
import CopyToClipboard from '@/components/common/CopyToClipboard.vue';
|
||||
import HelpEntry from '@/components/common/HelpEntry.vue';
|
||||
|
||||
interface IData {
|
||||
apiUsages: IApiUsage[];
|
||||
@@ -142,7 +141,6 @@ export default defineComponent({
|
||||
name: 'ConsoleUsageList',
|
||||
components: {
|
||||
Pagination,
|
||||
HelpEntry,
|
||||
ElTag,
|
||||
ElTable,
|
||||
ElSelect,
|
||||
@@ -310,17 +308,4 @@ export default defineComponent({
|
||||
margin: auto;
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.help {
|
||||
position: fixed;
|
||||
right: 40px;
|
||||
bottom: 40px;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.help {
|
||||
top: 40px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<el-row class="panel">
|
||||
<help-entry class="help" />
|
||||
<el-col :span="24">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
@@ -198,7 +197,6 @@ import { userOperator } from '@/operators';
|
||||
import QrCode from 'vue-qrcode';
|
||||
import { ROUTE_DISTRIBUTION_HISTORY, ROUTE_DISTRIBUTION_INVITEES } from '@/router';
|
||||
import { IDistributionLevel, IDistributionStatus, IUser } from '@/models';
|
||||
import HelpEntry from '@/components/common/HelpEntry.vue';
|
||||
|
||||
interface IData {
|
||||
invitees: IUser[];
|
||||
@@ -214,7 +212,6 @@ export default defineComponent({
|
||||
CopyToClipboard,
|
||||
FontAwesomeIcon,
|
||||
QrCode,
|
||||
HelpEntry,
|
||||
ElProgress,
|
||||
ElRow,
|
||||
ElCol,
|
||||
@@ -428,16 +425,4 @@ export default defineComponent({
|
||||
color: var(--el-text-color-regular);
|
||||
}
|
||||
}
|
||||
.help {
|
||||
position: fixed;
|
||||
right: 40px;
|
||||
bottom: 40px;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.help {
|
||||
top: 40px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -25,6 +25,7 @@
|
||||
</div>
|
||||
<locale-selector :visible="operating.locale == true" @close="operating.locale = false" />
|
||||
<dark-selector :visible="operating.dark == true" @close="operating.dark = false" />
|
||||
<help-dialog :visible="operating.help == true" @close="operating.help = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -43,6 +44,7 @@ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
||||
import { getBaseUrlAuth, getBaseUrlPlatform } from '@/utils';
|
||||
import LocaleSelector from '@/components/common/LocaleSelector.vue';
|
||||
import DarkSelector from '@/components/common/DarkSelector.vue';
|
||||
import HelpDialog from '@/components/common/HelpDialog.vue';
|
||||
|
||||
interface ILink {
|
||||
key: string;
|
||||
@@ -57,6 +59,7 @@ export default defineComponent({
|
||||
name: 'ProfileIndex',
|
||||
components: {
|
||||
ElImage,
|
||||
HelpDialog,
|
||||
FontAwesomeIcon,
|
||||
LocaleSelector,
|
||||
DarkSelector
|
||||
@@ -65,7 +68,8 @@ export default defineComponent({
|
||||
return {
|
||||
operating: {
|
||||
locale: false,
|
||||
dark: false
|
||||
dark: false,
|
||||
help: false
|
||||
}
|
||||
};
|
||||
},
|
||||
@@ -140,6 +144,14 @@ export default defineComponent({
|
||||
href: getBaseUrlPlatform(),
|
||||
icon: 'fa-solid fa-laptop-code'
|
||||
},
|
||||
{
|
||||
key: 'support',
|
||||
text: this.$t('common.nav.support'),
|
||||
callback: () => {
|
||||
this.operating.help = true;
|
||||
},
|
||||
icon: 'fa-solid fa-question'
|
||||
},
|
||||
{
|
||||
key: 'logout',
|
||||
text: this.$t('common.nav.logOut'),
|
||||
@@ -150,6 +162,7 @@ export default defineComponent({
|
||||
await this.$store.dispatch('midjourney/resetAll');
|
||||
await this.$store.dispatch('chatdoc/resetAll');
|
||||
await this.$store.dispatch('qrart/resetAll');
|
||||
await this.$store.dispatch('login');
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
+97
-14
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<el-row class="panel">
|
||||
<help-entry class="help" />
|
||||
<el-col :span="24">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
@@ -35,7 +34,6 @@
|
||||
{{ $t('site.message.titleTip') }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('site.field.logo')">
|
||||
<span class="block w-full">
|
||||
<el-image :src="site.logo" class="logo" />
|
||||
@@ -176,7 +174,7 @@
|
||||
<el-divider />
|
||||
<el-form :model="site" class="form" label-width="auto" style="max-width: 600px">
|
||||
<el-form-item
|
||||
v-for="(feature, featureIndex) in ['chat', 'midjourney', 'chatdoc', 'qrart']"
|
||||
v-for="(feature, featureIndex) in ['chat', 'midjourney', 'chatdoc', 'qrart', 'support']"
|
||||
:key="featureIndex"
|
||||
:label="$t('site.field.features' + feature.charAt(0).toUpperCase() + feature.slice(1))"
|
||||
>
|
||||
@@ -200,9 +198,103 @@
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<span class="block tip">
|
||||
<span class="block tip w-full">
|
||||
{{ $t('site.message.features' + feature.charAt(0).toUpperCase() + feature.slice(1)) }}
|
||||
</span>
|
||||
<div v-if="feature === 'support'" v-show="site.features[feature].enabled">
|
||||
<el-form-item label="WeChat">
|
||||
<el-switch
|
||||
v-model="site.features[feature].wechat.enabled"
|
||||
inline-prompt
|
||||
:active-text="$t('site.button.enabled')"
|
||||
:inactive-text="$t('site.button.disabled')"
|
||||
@change="
|
||||
onSave({
|
||||
features: {
|
||||
...site.features,
|
||||
[feature]: {
|
||||
...site.features[feature],
|
||||
wechat: {
|
||||
...site.features[feature].wechat,
|
||||
enabled: $event
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
"
|
||||
></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="site.features[feature].wechat.enabled" :label="$t('site.field.qr')">
|
||||
<span class="block w-full">
|
||||
<el-image :src="site.features[feature].wechat?.qr" />
|
||||
<edit-image
|
||||
:model-value="site.features[feature].wechat.qr"
|
||||
:title="$t('site.title.editQR')"
|
||||
:tip="$t('site.message.editQRTip')"
|
||||
@confirm="
|
||||
onSave({
|
||||
features: {
|
||||
...site.features,
|
||||
[feature]: {
|
||||
...site.features[feature],
|
||||
wechat: {
|
||||
...site.features[feature].wechat,
|
||||
qr: $event
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
"
|
||||
/>
|
||||
</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Discord">
|
||||
<el-switch
|
||||
v-model="site.features[feature].discord.enabled"
|
||||
inline-prompt
|
||||
:active-text="$t('site.button.enabled')"
|
||||
:inactive-text="$t('site.button.disabled')"
|
||||
@change="
|
||||
onSave({
|
||||
features: {
|
||||
...site.features,
|
||||
[feature]: {
|
||||
...site.features[feature],
|
||||
discord: {
|
||||
...site.features[feature].discord,
|
||||
enabled: $event
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
"
|
||||
></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="site.features[feature].discord.enabled" :label="$t('site.field.url')">
|
||||
<span class="block w-full">
|
||||
{{ site.features[feature].discord?.url }}
|
||||
<edit-text
|
||||
:model-value="site.features[feature].discord?.url"
|
||||
:title="$t('site.title.editUrl')"
|
||||
:placeholder="$t('site.placeholder.editUrl')"
|
||||
@confirm="
|
||||
onSave({
|
||||
features: {
|
||||
...site.features,
|
||||
[feature]: {
|
||||
...site.features[feature],
|
||||
discord: {
|
||||
...site.features[feature].discord,
|
||||
url: $event
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
"
|
||||
/>
|
||||
</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
@@ -220,7 +312,6 @@ import EditImage from '@/components/site/EditImage.vue';
|
||||
import EditArray from '@/components/site/EditArray.vue';
|
||||
import { siteOperator } from '@/operators';
|
||||
import site from '@/router/site';
|
||||
import HelpEntry from '@/components/common/HelpEntry.vue';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'SiteIndex',
|
||||
@@ -235,8 +326,7 @@ export default defineComponent({
|
||||
ElCard,
|
||||
ElForm,
|
||||
ElSwitch,
|
||||
ElFormItem,
|
||||
HelpEntry
|
||||
ElFormItem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -292,11 +382,4 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.help {
|
||||
position: fixed;
|
||||
right: 40px;
|
||||
bottom: 40px;
|
||||
z-index: 1000;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user