small fixes
This commit is contained in:
@@ -59,7 +59,7 @@ export default {
|
||||
computed: {
|
||||
optionTLS: {
|
||||
get(): boolean { return this.$props.addr.tls != undefined },
|
||||
set(v:boolean) { this.$props.addr.tls = v ? { enabled: true } : undefined; }
|
||||
set(v:boolean) { this.$props.addr.tls = v ? { enabled: true } : undefined }
|
||||
},
|
||||
optionRemark: {
|
||||
get(): boolean { return this.$props.addr.remark != undefined },
|
||||
|
||||
@@ -209,7 +209,7 @@ const startTimer = () => {
|
||||
|
||||
const stopTimer = () => {
|
||||
if (intervalId) {
|
||||
clearInterval(intervalId);
|
||||
clearInterval(intervalId)
|
||||
intervalId = null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ export default {
|
||||
needNetwork():boolean { return this.haveNetwork.includes(this.$props.type) },
|
||||
needUot():boolean { return this.havUoT.includes(this.$props.type) },
|
||||
packet_encoding: {
|
||||
get() { return this.$props.inData.out_json.packet_encoding != undefined ? this.$props.inData.out_json.packet_encoding : 'none'; },
|
||||
get() { return this.$props.inData.out_json.packet_encoding != undefined ? this.$props.inData.out_json.packet_encoding : 'none' },
|
||||
set(v:string) { this.$props.inData.out_json.packet_encoding = v != "none" ? v : undefined }
|
||||
},
|
||||
},
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { i18n } from '@/locales';
|
||||
import { i18n } from '@/locales'
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
@@ -46,8 +46,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { KeepAlive } from 'vue';
|
||||
|
||||
export default {
|
||||
props: ['data'],
|
||||
data() {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import { Notivue, Notification, NotivueSwipe, outlinedIcons, pastelTheme, darkTheme } from 'notivue'
|
||||
import { computed } from 'vue'
|
||||
import { useTheme } from 'vuetify'
|
||||
import vuetify from '@/plugins/vuetify';
|
||||
import vuetify from '@/plugins/vuetify'
|
||||
|
||||
const Theme = useTheme()
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
override_port: {
|
||||
get() { return this.$props.data.override_port ? this.$props.data.override_port : ''; },
|
||||
set(newValue: any) { this.$props.data.override_port = newValue.length == 0 || newValue == 0 ? undefined : parseInt(newValue); }
|
||||
get() { return this.$props.data.override_port ? this.$props.data.override_port : '' },
|
||||
set(newValue: any) { this.$props.data.override_port = newValue.length == 0 || newValue == 0 ? undefined : parseInt(newValue) }
|
||||
},
|
||||
},
|
||||
components: { Network }
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Headers from '@/components/Headers.vue';
|
||||
import Headers from '@/components/Headers.vue'
|
||||
|
||||
export default {
|
||||
props: ['data'],
|
||||
|
||||
@@ -111,13 +111,16 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
version: {
|
||||
get() { this.version = this.Inbound.version; return this.Inbound.version; },
|
||||
get() {
|
||||
this.version = this.Inbound.version
|
||||
return this.Inbound.version
|
||||
},
|
||||
set(newValue: any) {
|
||||
switch (newValue) {
|
||||
case 1:
|
||||
delete this.Inbound.password
|
||||
delete this.Inbound.handshake_for_server_name
|
||||
break;
|
||||
break
|
||||
case 2:
|
||||
if (!this.Inbound.password) {
|
||||
this.Inbound.password = ""
|
||||
@@ -125,23 +128,23 @@ export default {
|
||||
if (!this.Inbound.handshake_for_server_name) {
|
||||
this.Inbound.handshake_for_server_name = {}
|
||||
}
|
||||
break;
|
||||
break
|
||||
case 3:
|
||||
delete this.Inbound.password
|
||||
if (!this.Inbound.handshake_for_server_name) {
|
||||
this.Inbound.handshake_for_server_name = {}
|
||||
}
|
||||
break;
|
||||
break
|
||||
}
|
||||
this.Inbound.version = newValue;
|
||||
this.Inbound.version = newValue
|
||||
}
|
||||
},
|
||||
Inbound(): ShadowTLS {
|
||||
return <ShadowTLS>this.$props.data;
|
||||
return <ShadowTLS>this.$props.data
|
||||
},
|
||||
server_port: {
|
||||
get() { return this.Inbound.handshake.server_port ? this.Inbound.handshake.server_port : 443; },
|
||||
set(newValue: any) { this.Inbound.handshake.server_port = newValue.length == 0 || newValue == 0 ? 443 : parseInt(newValue); }
|
||||
get() { return this.Inbound.handshake.server_port ? this.Inbound.handshake.server_port : 443 },
|
||||
set(newValue: any) { this.Inbound.handshake.server_port = newValue.length == 0 || newValue == 0 ? 443 : parseInt(newValue) }
|
||||
},
|
||||
},
|
||||
components: { Dial }
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Network from '@/components/Network.vue'
|
||||
import UoT from '@/components/UoT.vue';
|
||||
import RandomUtil from '@/plugins/randomUtil';
|
||||
import UoT from '@/components/UoT.vue'
|
||||
import RandomUtil from '@/plugins/randomUtil'
|
||||
|
||||
export default {
|
||||
props: ['direction','data'],
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Network from '@/components/Network.vue'
|
||||
import UoT from '@/components/UoT.vue';
|
||||
import UoT from '@/components/UoT.vue'
|
||||
|
||||
export default {
|
||||
props: ['data'],
|
||||
|
||||
@@ -39,7 +39,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
packet_encoding: {
|
||||
get() { return this.$props.data.packet_encoding != undefined ? this.$props.data.packet_encoding : 'none'; },
|
||||
get() { return this.$props.data.packet_encoding != undefined ? this.$props.data.packet_encoding : 'none' },
|
||||
set(newValue:string) { this.$props.data.packet_encoding = newValue != "none" ? newValue : undefined }
|
||||
},
|
||||
},
|
||||
|
||||
@@ -63,7 +63,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
packet_encoding: {
|
||||
get() { return this.$props.data.packet_encoding != undefined ? this.$props.data.packet_encoding : 'none'; },
|
||||
get() { return this.$props.data.packet_encoding != undefined ? this.$props.data.packet_encoding : 'none' },
|
||||
set(newValue:string) { this.$props.data.packet_encoding = newValue != "none" ? newValue : undefined }
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { HumanReadable } from '@/plugins/utils';
|
||||
import { computed } from 'vue';
|
||||
import { HumanReadable } from '@/plugins/utils'
|
||||
import { computed } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
tilesData: <any>{},
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Headers from '../Headers.vue';
|
||||
import Headers from '../Headers.vue'
|
||||
export default {
|
||||
props: ['transport'],
|
||||
data() {
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from "vue"
|
||||
import { useTheme } from "vuetify"
|
||||
import { useRoute } from "vue-router";
|
||||
import { useTheme } from 'vuetify'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
defineProps(['isMobile'])
|
||||
|
||||
const route = useRoute();
|
||||
const route = useRoute()
|
||||
const theme = useTheme()
|
||||
const darkMode = ref(localStorage.getItem('theme') == "dark")
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
import { createClient, randomConfigs, updateConfigs, Link, Client } from '@/types/clients'
|
||||
import DatePick from '@/components/DateTime.vue'
|
||||
import { HumanReadable } from '@/plugins/utils'
|
||||
import Data from '@/store/modules/data';
|
||||
import Data from '@/store/modules/data'
|
||||
|
||||
export default {
|
||||
props: ['visible', 'id', 'inboundTags', 'groups'],
|
||||
|
||||
@@ -89,7 +89,7 @@ import DatePick from '@/components/DateTime.vue'
|
||||
import { push } from 'notivue'
|
||||
import RandomUtil from '@/plugins/randomUtil'
|
||||
import { Client, createClient, randomConfigs } from '@/types/clients'
|
||||
import { i18n } from '@/locales';
|
||||
import { i18n } from '@/locales'
|
||||
|
||||
export default {
|
||||
props: ['visible', 'inboundTags', 'groups'],
|
||||
|
||||
@@ -169,7 +169,6 @@
|
||||
<script lang="ts">
|
||||
import { logicalRule, rule, actionKeys } from '@/types/rules'
|
||||
import RuleOptions from '@/components/Rule.vue'
|
||||
import { title } from 'process';
|
||||
export default {
|
||||
props: ['visible', 'data', 'index', 'clients', 'inTags', 'outTags', 'rsTags'],
|
||||
emits: ['close', 'save'],
|
||||
|
||||
@@ -101,8 +101,8 @@ export default {
|
||||
tooltip: {
|
||||
callbacks: {
|
||||
text: (ctx:any) => {
|
||||
const {axis = 'xy', intersect, mode} = ctx.chart.options.interaction;
|
||||
return 'Mode: ' + mode + ', axis: ' + axis + ', intersect: ' + intersect;
|
||||
const {axis = 'xy', intersect, mode} = ctx.chart.options.interaction
|
||||
return 'Mode: ' + mode + ', axis: ' + axis + ', intersect: ' + intersect
|
||||
},
|
||||
footer: (items:any[]) => {
|
||||
return HumanReadable.sizeFormat(items.reduce((acc, c) => acc + c.raw, 0))
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { en } from "vuetify/lib/locale/index.mjs";
|
||||
|
||||
export default {
|
||||
message: "Welcome",
|
||||
success: "success",
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { config } from "process";
|
||||
|
||||
export default {
|
||||
message: "خوش آمدید",
|
||||
success: "موفق",
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { config } from "process";
|
||||
|
||||
export default {
|
||||
message: "Добро пожаловать",
|
||||
success: "успех",
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { title } from "process";
|
||||
|
||||
export default {
|
||||
message: "Chào mừng OHB",
|
||||
success: "Thành công",
|
||||
|
||||
@@ -43,7 +43,7 @@ export interface Warp extends WireGuard {
|
||||
type InterfaceMap = {
|
||||
[Key in keyof typeof EpTypes]: {
|
||||
type: string
|
||||
[otherProperties: string]: any; // You can add other properties as needed
|
||||
[otherProperties: string]: any // You can add other properties as needed
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ export interface URLTest extends OutboundBasics {
|
||||
type InterfaceMap = {
|
||||
[Key in keyof typeof OutTypes]: {
|
||||
type: string
|
||||
[otherProperties: string]: any; // You can add other properties as needed
|
||||
[otherProperties: string]: any // You can add other properties as needed
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -223,7 +223,6 @@ import QrCode from '@/layouts/modals/QrCode.vue'
|
||||
import Stats from '@/layouts/modals/Stats.vue'
|
||||
import { Client } from '@/types/clients'
|
||||
import { computed, ref } from 'vue'
|
||||
import { Inbound, inboundWithUsers } from '@/types/inbounds'
|
||||
import { HumanReadable } from '@/plugins/utils'
|
||||
import { i18n } from '@/locales'
|
||||
import { push } from 'notivue'
|
||||
|
||||
@@ -95,10 +95,10 @@
|
||||
import Data from '@/store/modules/data'
|
||||
import EndpointVue from '@/layouts/modals/Endpoint.vue'
|
||||
import Stats from '@/layouts/modals/Stats.vue'
|
||||
import { Endpoint } from '@/types/endpoints';
|
||||
import { Endpoint } from '@/types/endpoints'
|
||||
import { computed, ref } from 'vue'
|
||||
import { i18n } from '@/locales';
|
||||
import { push } from 'notivue';
|
||||
import { i18n } from '@/locales'
|
||||
import { push } from 'notivue'
|
||||
|
||||
const endpoints = computed((): Endpoint[] => {
|
||||
return <Endpoint[]> Data().endpoints
|
||||
|
||||
@@ -95,10 +95,10 @@
|
||||
import Data from '@/store/modules/data'
|
||||
import OutboundVue from '@/layouts/modals/Outbound.vue'
|
||||
import Stats from '@/layouts/modals/Stats.vue'
|
||||
import { Outbound } from '@/types/outbounds';
|
||||
import { Outbound } from '@/types/outbounds'
|
||||
import { computed, ref } from 'vue'
|
||||
import { i18n } from '@/locales';
|
||||
import { push } from 'notivue';
|
||||
import { i18n } from '@/locales'
|
||||
import { push } from 'notivue'
|
||||
|
||||
const outbounds = computed((): Outbound[] => {
|
||||
return <Outbound[]> Data().outbounds
|
||||
@@ -167,8 +167,4 @@ const showStats = (tag: string) => {
|
||||
const closeStats = () => {
|
||||
stats.value.visible = false
|
||||
}
|
||||
|
||||
function awaitData() {
|
||||
throw new Error('Function not implemented.');
|
||||
}
|
||||
</script>
|
||||
@@ -291,19 +291,19 @@ const delRuleset = (index: number) => {
|
||||
delRulesetOverlay.value[index] = false
|
||||
}
|
||||
|
||||
const draggedItemIndex = ref(null);
|
||||
const draggedItemIndex = ref(null)
|
||||
|
||||
const onDragStart = (index: any) => {
|
||||
draggedItemIndex.value = index;
|
||||
draggedItemIndex.value = index
|
||||
}
|
||||
|
||||
const onDrop = (index: any) => {
|
||||
if (draggedItemIndex.value !== null) {
|
||||
// Swap the dragged item with the dropped one
|
||||
const draggedItem = rules.value[draggedItemIndex.value];
|
||||
rules.value.splice(draggedItemIndex.value, 1);
|
||||
rules.value.splice(index, 0, draggedItem);
|
||||
draggedItemIndex.value = null;
|
||||
const draggedItem = rules.value[draggedItemIndex.value]
|
||||
rules.value.splice(draggedItemIndex.value, 1)
|
||||
rules.value.splice(index, 0, draggedItem)
|
||||
draggedItemIndex.value = null
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user