Merge branch 'wujie'

This commit is contained in:
fangxiang 2023-01-06 13:59:19 +08:00
commit 089ce906d4
10 changed files with 2007 additions and 2240 deletions

View File

@ -9,8 +9,8 @@
"test": "echo \"No test specified\" && exit 0"
},
"dependencies": {
"@quasar/cli": "^1.3.2",
"@quasar/extras": "^1.15.6",
"@quasar/cli": "^1.4.0",
"@quasar/extras": "^1.15.9",
"@tinymce/tinymce-vue": "4",
"@types/element-resize-detector": "^1.1.3",
"autoprefixer": "^10.4.2",
@ -18,7 +18,7 @@
"core-js": "^3.21.0",
"element-resize-detector": "^1.2.4",
"qrcode.vue": "^3.3.3",
"quasar": "^2.10.2",
"quasar": "^2.11.3",
"reconnecting-websocket": "^4.4.0",
"sortablejs": "^1.15.0",
"to": "^0.2.9",

View File

@ -23,6 +23,11 @@ export default defineComponent({
const $store = useStore();
const $q = useQuasar();
if ((window as any).$wujie) {
const $wujie = (window as any).$wujie;
$store.commit("setWuJie", $wujie);
}
document.title = $t.t("title");
if (!navigator.cookieEnabled) {

View File

@ -45,6 +45,7 @@
</q-item>
<q-item
clickable
v-if="$store.state.isLedPlayer()"
v-close-popup
:disable="$props.disable"
@click="$emit('edit_rect', $props.window.window_id)"

View File

@ -135,6 +135,7 @@
<q-btn
stretch
:disable="!$store.state.power_state"
v-if="$store.state.isLedPlayer()"
flat
stack
no-caps

View File

@ -1,6 +1,10 @@
<template>
<div>
<q-toolbar style="background-color: #3e9acd" class="shadow-2 text-white" @dragstart.prevent>
<q-toolbar
style="background-color: #3e9acd"
class="shadow-2 text-white"
@dragstart.prevent
>
<q-btn-dropdown
v-if="false"
v-touch-hold:10000.mouse="handleHold"
@ -29,7 +33,7 @@
</q-btn-dropdown>
<q-btn-dropdown
v-if="show_device_list"
v-if="show_device_list && !$store.state.$wujie"
stretch
no-caps
flat
@ -72,7 +76,11 @@
</q-list>
</q-btn-dropdown>
<q-separator vertical inset />
<q-separator
vertical
inset
v-if="show_device_list && !$store.state.$wujie"
/>
<q-btn
stretch
@ -187,6 +195,7 @@
:disable="plan_running || !$store.state.power_state"
:icon="/*vertical_align_bottom*/ 'img:new_icon/edit_window_rect.png'"
:label="$t('toolbar edit window rect')"
v-if="$store.state.isLedPlayer()"
class="q-mr-sm"
@click="editRect"
/>
@ -288,7 +297,11 @@
:label="$t('other setting')"
class="q-mr-sm"
>
<q-list style="background-color: #3e9acd" class="shadow-2 text-white" @dragstart.prevent>
<q-list
style="background-color: #3e9acd"
class="shadow-2 text-white"
@dragstart.prevent
>
<q-item
clickable
:disable="!$store.state.power_state"
@ -445,7 +458,11 @@
<q-item-section avatar style="margin-right: 0px; padding-right: 0px">
<!-- <q-icon class="text-white rotate" name="img:svgs/fan.svg" /> -->
<!-- <q-icon class="text-white rotate" name="img:new_icon/fan.png" /> -->
<q-icon class="text-white" :style="{'animation':fan}" name="img:new_icon/fan.png" />
<q-icon
class="text-white"
:style="{ animation: fan }"
name="img:new_icon/fan.png"
/>
</q-item-section>
<q-item-section style="margin-left: -25px">
{{ $store.state.fan_temp.toFixed(1) }}
@ -479,7 +496,7 @@
<fusion-settings-dialog ref="fusion_settings_dialog" />
</template>
<style >
<style>
@keyframes rotate {
0% {
transform: rotate(0);
@ -575,13 +592,11 @@ export default defineComponent({
const plan_running = computed(
() => $store.state.current_running_plan.trim() != ""
);
const fan = computed(
() => {
let wendu:any=($store.state.fan_temp).toFixed(1)
let sulv:any=(1-(wendu/150))
return 'rotate '+sulv+'s linear infinite'
}
);
const fan = computed(() => {
let wendu: any = $store.state.fan_temp.toFixed(1);
let sulv: any = 1 - wendu / 150;
return "rotate " + sulv + "s linear infinite";
});
const checkRegistered = () => {
if (
GlobalData.getInstance().getCurrentClient()?.is_connected &&

View File

@ -138,6 +138,7 @@
:disable="plan_running || !$store.state.power_state"
:icon="/*vertical_align_bottom*/ 'img:new_icon/edit_window_rect.png'"
:label="$t('toolbar edit window rect')"
v-if="$store.state.isLedPlayer()"
class="q-mr-sm"
@click="editRect"
/>

View File

@ -47,10 +47,10 @@ export default route<StateInterface>(function (/* { store, ssrContext } */) {
if (auth_obj) {
const auth = parseInt(auth_obj);
const target_auth = parseInt(<string>to.meta.permission_level);
if (target_auth == NaN) {
if (isNaN(target_auth)) {
next();
return;
} else if (auth != NaN) {
} else {
if (auth > target_auth) {
next();
return;

View File

@ -2,26 +2,37 @@ import { RouteRecordRaw } from "vue-router";
import PermissionLevel from "src/entities/PermissionLevel";
import RedirectPage from "src/RedirectPage.vue";
import Login from "pages/Login.vue";
import MainLayout from "layouts/MainLayout.vue";
import Index from "pages/Index.vue";
import PadLogin from "src/pad/Login.vue";
import PadMainLayout from "src/pad/MainLayout.vue";
import PadIndex from "src/pad/Index.vue";
import Error404 from "pages/Error404.vue";
const routes: RouteRecordRaw[] = [
{
path: "/",
meta: {},
component: () => import("src/RedirectPage.vue"),
component: RedirectPage,
},
{
path: "/pc/login",
component: () => import("pages/Login.vue"),
component: Login,
},
{
path: "/pc",
meta: {
permission_level: PermissionLevel.User,
},
component: () => import("layouts/MainLayout.vue"),
component: MainLayout,
children: [
{
path: "",
component: () => import("pages/Index.vue"),
component: Index,
meta: {
permission_level: PermissionLevel.User,
},
@ -30,18 +41,18 @@ const routes: RouteRecordRaw[] = [
},
{
path: "/pad/login",
component: () => import("src/pad/Login.vue"),
component: PadLogin,
},
{
path: "/pad",
meta: {
permission_level: PermissionLevel.User,
},
component: () => import("src/pad/MainLayout.vue"),
component: PadMainLayout,
children: [
{
path: "",
component: () => import("src/pad/Index.vue"),
component: PadIndex,
meta: {
permission_level: PermissionLevel.User,
},
@ -53,7 +64,7 @@ const routes: RouteRecordRaw[] = [
// but you can also remove it
{
path: "/:catchAll(.*)*",
component: () => import("pages/Error404.vue"),
component: Error404,
},
];

View File

@ -39,6 +39,11 @@ export class CustomDefines {
function_mirroring_output = false;
}
export interface WuJieInterface {
props: any;
bus: EventEmitter;
}
export interface StateInterface {
// Define your own store structure, using submodules if needed
// example: ExampleStateInterface;
@ -77,12 +82,14 @@ export interface StateInterface {
power_state: boolean;
product_name: string;
custom_defines: CustomDefines;
fusion_configuration:object;
fusion_configuration: object;
isLedPlayer: () => boolean;
isSpecialVideo: () => boolean;
$wujie: WuJieInterface | null;
//
selected_projector: string;
EnableBlending:boolean
EnableBlending: boolean;
}
// provide typings for `this.$store`
@ -299,6 +306,7 @@ export const storeKey: InjectionKey<VuexStore<StateInterface>> =
import window_color_list from "./window_color_list.js";
import { EProductNames } from "src/entities/ProductNames";
import EventEmitter from "events";
export const NullSignalSource =
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF";
@ -340,12 +348,12 @@ export default store(function (/* { ssrContext } */) {
landspace: window.innerWidth > window.innerHeight,
device_attribute: 0,
power_state: false,
fusion_configuration:{},
fusion_configuration: {},
product_name: EProductNames.LED_PLAYER,
custom_defines: new CustomDefines(),
selected_projector: "0/0",
EnableBlending:false,
EnableBlending: false,
isLedPlayer: () => {
return (
Store.state.product_name == EProductNames.LED_PLAYER ||
@ -355,6 +363,8 @@ export default store(function (/* { ssrContext } */) {
isSpecialVideo: () => {
return Store.state.product_name == EProductNames.SPECIAL_VIDEO;
},
$wujie: null,
},
mutations: {
@ -562,31 +572,31 @@ export default store(function (/* { ssrContext } */) {
},
setWallCol(state: StateInterface, playload?: any) {
const num = parseInt(playload);
if (num != NaN && num > 0) {
if (!isNaN(num) && num > 0) {
state.wall_col = num;
}
},
setWallRow(state: StateInterface, playload?: any) {
const num = parseInt(playload);
if (num != NaN && num > 0) {
if (!isNaN(num) && num > 0) {
state.wall_row = num;
}
},
setDeviceScreenWidth(state: StateInterface, playload?: any) {
const num = parseInt(playload);
if (num != NaN && num > 0) {
if (!isNaN(num) && num > 0) {
state.device_screen_width = num;
}
},
setDeviceScreenHeight(state: StateInterface, playload?: any) {
const num = parseInt(playload);
if (num != NaN && num > 0) {
if (!isNaN(num) && num > 0) {
state.device_screen_height = num;
}
},
setDeviceScreenRefreshRate(state: StateInterface, playload?: any) {
const num = parseInt(playload);
if (num != NaN && num > 0) {
if (!isNaN(num) && num > 0) {
state.device_screen_refresh_rate = num;
}
},
@ -604,10 +614,10 @@ export default store(function (/* { ssrContext } */) {
state.signal_source_tree = playload;
}
},
setSelectedProjector(state: StateInterface, playload?: any){
setSelectedProjector(state: StateInterface, playload?: any) {
state.selected_projector = playload;
},
setEnableBlending(state: StateInterface, playload?: any){
setEnableBlending(state: StateInterface, playload?: any) {
state.EnableBlending = playload;
},
clearSignalSourceTree(state: StateInterface, playload?: any) {
@ -999,12 +1009,15 @@ export default store(function (/* { ssrContext } */) {
state.connect_list.slice(index, 1);
}
},
setWuJie(state: StateInterface, playload?: any) {
state.$wujie = playload;
},
},
getters: {
GetTheCurrentlySelectedCamera(state) {
let arr = state.selected_projector.split("/");
return [Number(arr[0]), Number(arr[1])];
},
getters:{
GetTheCurrentlySelectedCamera(state){
let arr = state.selected_projector.split('/');
return [Number(arr[0]),Number(arr[1])];
}
},
// enable strict mode (adds overhead!)
// for dev mode and --debug builds only

4116
yarn.lock

File diff suppressed because it is too large Load Diff