Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.8 #97

Merged
merged 25 commits into from
Apr 17, 2023
Merged

v1.8 #97

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
be4f7fc
enhance: auto-refresh after upgrade
0xJacky Apr 8, 2023
dab2915
template: enable HSTS
0xJacky Apr 8, 2023
69cdef4
feat: added animations
0xJacky Apr 8, 2023
b7560dd
feat: add confirm dialog for cert renewal toggle #30
0xJacky Apr 8, 2023
88daebb
enhance: rm acme-challenge if auto-renewal off #30
0xJacky Apr 10, 2023
dd6c366
fix: edit btn not navigating to edit page
0xJacky Apr 10, 2023
f36e582
enhance: set the max-height of ChatGPT UI
0xJacky Apr 10, 2023
f15e66e
enhance: block template parser
0xJacky Apr 10, 2023
9ba9711
template: added Hotlink Protection #30
0xJacky Apr 10, 2023
37d4588
enhance: set current_server_idx boundary
0xJacky Apr 11, 2023
d0c7cb0
fix: obtain cert
0xJacky Apr 11, 2023
8b756c8
feat: added github proxy setting
0xJacky Apr 11, 2023
8905575
feat: added shortcuts for remove server
0xJacky Apr 11, 2023
defd814
feat: forced use of advanced editor #73
0xJacky Apr 11, 2023
7103254
enhance: display downloading progress in upgrader
0xJacky Apr 11, 2023
5b8fae1
wip: added DNS challenge provider
0xJacky Apr 12, 2023
3cdc675
chore: update translations
0xJacky Apr 12, 2023
0f259e4
chore: clean up code
0xJacky Apr 13, 2023
418a53f
wip: dns credentials manager
0xJacky Apr 13, 2023
fcc2263
feat: added DNS credentials manager
0xJacky Apr 13, 2023
c95aa36
fix: dns manager issue
0xJacky Apr 13, 2023
431a9fd
chore: update dependencies
0xJacky Apr 13, 2023
865d2ce
fix: soft delete
0xJacky Apr 13, 2023
80e00df
fix: dashboard text error #98
0xJacky Apr 14, 2023
4ea3366
fix: upgrader background issue in dark mode #99
0xJacky Apr 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions app.example.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@ Model =
BaseUrl =
Proxy =
Token =

[git]
Url =
AuthMethod =
Username =
Password =
PrivateKeyFile =
7 changes: 5 additions & 2 deletions frontend/components.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// generated by unplugin-vue-components
// We suggest you to commit this file into source control
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
import '@vue/runtime-core'

Expand All @@ -20,6 +22,7 @@ declare module '@vue/runtime-core' {
AConfigProvider: typeof import('ant-design-vue/es')['ConfigProvider']
ADivider: typeof import('ant-design-vue/es')['Divider']
ADrawer: typeof import('ant-design-vue/es')['Drawer']
ADropdown: typeof import('ant-design-vue/es')['Dropdown']
AEmpty: typeof import('ant-design-vue/es')['Empty']
AForm: typeof import('ant-design-vue/es')['Form']
AFormItem: typeof import('ant-design-vue/es')['FormItem']
Expand Down
23 changes: 12 additions & 11 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nginx-ui-frontend-next",
"private": true,
"version": "1.7.9",
"version": "1.8.0",
"type": "commonjs",
"scripts": {
"dev": "vite",
Expand All @@ -12,13 +12,14 @@
},
"dependencies": {
"@ant-design/icons-vue": "^6.1.0",
"@formkit/auto-animate": "^1.0.0-beta.6",
"@types/lodash": "^4.14.188",
"@types/marked": "^4.0.8",
"@types/nprogress": "^0.2.0",
"@types/sortablejs": "^1.15.0",
"ant-design-vue": "^3.2.15",
"ant-design-vue": "^3.2.17",
"apexcharts": "^3.36.3",
"axios": "^1.2.2",
"axios": "^1.3.5",
"dayjs": "^1.11.7",
"highlight.js": "^11.7.0",
"marked": "^4.2.5",
Expand All @@ -27,26 +28,26 @@
"pinia-plugin-persistedstate": "^3.0.2",
"reconnecting-websocket": "^4.4.0",
"vite-plugin-build-id": "^0.2.3",
"vue": "^3.2.45",
"vue": "^3.2.47",
"vue-router": "4",
"vue3-ace-editor": "^2.2.2",
"vue3-apexcharts": "^1.4.1",
"vue3-gettext": "^2.3.4",
"vue3-gettext": "^2.5.0-alpha.1",
"vuedraggable": "^4.1.0",
"xterm": "^5.1.0",
"xterm-addon-attach": "^0.8.0",
"xterm-addon-fit": "^0.7.0"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue-jsx": "^3.0.0",
"@vitejs/plugin-vue": "^4.1.0",
"@vitejs/plugin-vue-jsx": "^3.0.1",
"@zougt/vite-plugin-theme-preprocessor": "^1.4.8",
"less": "^4.1.3",
"typescript": "^4.9.4",
"unplugin-vue-components": "^0.22.12",
"vite": "^4.1.4",
"typescript": "^5.0.4",
"unplugin-vue-components": "^0.24.1",
"vite": "^4.2.1",
"vite-plugin-html": "^3.2.0",
"vite-svg-loader": "^4.0.0",
"vue-tsc": "^1.0.24"
"vue-tsc": "^1.2.0"
}
}
13 changes: 13 additions & 0 deletions frontend/src/api/auto_cert.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import http from '@/lib/http'

const auto_cert = {
get_dns_providers() {
return http.get('/auto_cert/dns/providers')
},

get_dns_provider(code: string) {
return http.get('/auto_cert/dns/provider/' + code)
}
}

export default auto_cert
5 changes: 5 additions & 0 deletions frontend/src/api/dns_credential.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Curd from '@/api/curd'

const dns_credential = new Curd('/dns_credential')

export default dns_credential
4 changes: 4 additions & 0 deletions frontend/src/api/domain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ class Domain extends Curd {
duplicate(name: string, data: any) {
return http.post(this.baseUrl + '/' + name + '/duplicate', data)
}

advance_mode(name: string, data: any) {
return http.post(this.baseUrl + '/' + name + '/advance', data)
}
}

const domain = new Domain('/domain')
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/api/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ class Template extends Curd {
return http.get('template/block/' + name)
}

build_block(name: string, data: any) {
return http.post('template/block/' + name, data)
}

}

const template = new Template('/template')
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/components/Chart/AreaChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ let chartOptions = {
enabled: false
},
animations: {
enabled: false,
enabled: false
},
toolbar: {
show: false
},
}
},
colors: ['#ff6385', '#36a3eb'],
fill: {
Expand All @@ -41,7 +41,7 @@ let chartOptions = {
},
stroke: {
curve: 'smooth',
width: 0,
width: 0
},
xaxis: {
type: 'datetime',
Expand Down Expand Up @@ -75,7 +75,7 @@ let chartOptions = {
},
onItemHover: {
highlightDataSeries: false
},
}
}
}

Expand Down Expand Up @@ -114,7 +114,7 @@ const callback = () => {
},
onItemHover: {
highlightDataSeries: false
},
}
}
}
}
Expand Down
10 changes: 7 additions & 3 deletions frontend/src/components/ChatGPT/ChatGPT.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ import {urlJoin} from '@/lib/helper'
import {marked} from 'marked'
import hljs from 'highlight.js'
import 'highlight.js/styles/vs2015.css'
import {SendOutlined} from '@ant-design/icons-vue'
import Template from '@/views/template/Template.vue'
import Icon, {SendOutlined} from '@ant-design/icons-vue'

import openai from '@/api/openai'
import ChatGPT_logo from '@/assets/svg/ChatGPT_logo.svg'
import Icon from '@ant-design/icons-vue'

const {$gettext} = useGettext()

Expand Down Expand Up @@ -260,6 +259,11 @@ const show = computed(() => messages?.value?.length > 1)
.chatgpt {
position: sticky;
top: 78px;

:deep(.ant-card-body) {
max-height: 100vh;
overflow-y: scroll;
}
}

.chat-start {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/FooterToolbar/FooterToolBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default {
<style lang="less" scoped>
.dark {
.ant-pro-footer-toolbar {
background: rgba(24, 24, 24, 0.62);
background: rgba(24, 24, 24, 1);
border-top: unset;
}
}
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/NginxControl/NginxControl.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<script setup lang="ts">
import gettext from '@/gettext'

const {$gettext} = gettext
import ngx from '@/api/ngx'
import logLevel from '@/views/config/constants'
import {message} from 'ant-design-vue'
import {ReloadOutlined} from '@ant-design/icons-vue'
import Template from '@/views/template/Template.vue'

import {ref, watch} from 'vue'

const {$gettext} = gettext

function get_status() {
ngx.status().then(r => {
if (r?.running === true) {
Expand Down
35 changes: 17 additions & 18 deletions frontend/src/components/StdDataDisplay/StdBatchEdit.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<script setup lang="ts">
import {reactive, ref} from 'vue'
import gettext from '@/gettext'

const {$gettext} = gettext

import StdDataEntry from '@/components/StdDataEntry'
import {message} from 'ant-design-vue'

const {$gettext} = gettext

const emit = defineEmits(['onSave'])

const props = defineProps(['api', 'beforeSave'])
Expand Down Expand Up @@ -49,23 +48,23 @@ async function ok() {

<template>
<a-modal
class="std-curd-edit-modal"
:mask="false"
:title="$gettext('Batch Modify')"
v-model:visible="visible"
:cancel-text="$gettext('Cancel')"
:ok-text="$gettext('OK')"
@ok="ok"
:confirm-loading="loading"
:width="600"
destroyOnClose
class="std-curd-edit-modal"
:mask="false"
:title="$gettext('Batch Modify')"
v-model:visible="visible"
:cancel-text="$gettext('Cancel')"
:ok-text="$gettext('OK')"
@ok="ok"
:confirm-loading="loading"
:width="600"
destroyOnClose
>

<std-data-entry
ref="std_data_entry"
:data-list="batchColumns"
v-model:data-source="data"
:error="error"
ref="std_data_entry"
:data-list="batchColumns"
:data-source="data"
:error="error"
/>

<slot name="extra"/>
Expand All @@ -74,4 +73,4 @@ async function ok() {

<style scoped>

</style>
</style>
43 changes: 22 additions & 21 deletions frontend/src/components/StdDataDisplay/StdCurd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import StdTable from './StdTable.vue'

import StdDataEntry from '@/components/StdDataEntry'

import {reactive, ref} from 'vue'
import {provide, reactive, ref} from 'vue'
import {message} from 'ant-design-vue'

const {$gettext} = gettext
Expand Down Expand Up @@ -62,6 +62,7 @@ const props = defineProps({
const visible = ref(false)
const update = ref(0)
const data: any = reactive({id: null})
provide('data', data)
const error: any = reactive({})
const selected = ref([])

Expand Down Expand Up @@ -146,12 +147,12 @@ const selectedRowKeys = ref([])
</template>

<std-table
ref="table"
v-model:selected-row-keys="selectedRowKeys"
v-bind="props"
@clickEdit="edit"
@selected="onSelect"
:key="update"
ref="table"
v-model:selected-row-keys="selectedRowKeys"
v-bind="props"
@clickEdit="edit"
@selected="onSelect"
:key="update"
>
<template v-slot:actions="slotProps">
<slot name="actions" :actions="slotProps.record"/>
Expand All @@ -160,26 +161,26 @@ const selectedRowKeys = ref([])
</a-card>

<a-modal
class="std-curd-edit-modal"
:mask="false"
:title="edit_text?edit_text:(data.id ? $gettext('Modify') : $gettext('Add'))"
:visible="visible"
:cancel-text="$gettext('Cancel')"
:ok-text="$gettext('OK')"
@cancel="cancel"
@ok="ok"
:width="modalWidth"
destroyOnClose
class="std-curd-edit-modal"
:mask="false"
:title="edit_text?edit_text:(data.id ? $gettext('Modify') : $gettext('Add'))"
:visible="visible"
:cancel-text="$gettext('Cancel')"
:ok-text="$gettext('OK')"
@cancel="cancel"
@ok="ok"
:width="modalWidth"
destroyOnClose
>
<div class="before-edit" v-if="$slots.beforeEdit">
<slot name="beforeEdit" :data="data"/>
</div>

<std-data-entry
ref="std_data_entry"
:data-list="editableColumns()"
v-model:data-source="data"
:error="error"
ref="std_data_entry"
:data-list="editableColumns()"
:data-source="data"
:error="error"
/>

<slot name="edit" :data="data"/>
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/components/StdDataDisplay/StdPagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ const pageSize = computed({
<template>
<div class="pagination-container" v-if="pagination.total>pagination.per_page">
<a-pagination
:current="pagination.current_page"
v-model:pageSize="pageSize"
:size="size"
:total="pagination.total"
@change="change"
:current="pagination.current_page"
v-model:pageSize="pageSize"
:size="size"
:total="pagination.total"
@change="change"
/>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/StdDataDisplay/StdTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ function initSortable() {
<std-data-entry
v-if="!disable_search && searchColumns.length"
:data-list="searchColumns"
v-model:data-source="params"
:data-source="params"
layout="inline"
>
<template #action>
Expand Down
Loading