pad登陆页面修改底图,增加全屏选项,工具栏浏览器全屏改为窗口全屏
This commit is contained in:
parent
40a1705c07
commit
9b33a7783b
Binary file not shown.
Before Width: | Height: | Size: 344 KiB After Width: | Height: | Size: 1.5 MiB |
|
@ -67,6 +67,9 @@ export default defineComponent({
|
||||||
(window as any).controlLogout = () => {
|
(window as any).controlLogout = () => {
|
||||||
Cookies.remove("auto_login");
|
Cookies.remove("auto_login");
|
||||||
SessionStorage.clear();
|
SessionStorage.clear();
|
||||||
|
try {
|
||||||
|
$q.fullscreen.exit();
|
||||||
|
} catch {}
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -26,13 +26,13 @@
|
||||||
class="row items-center"
|
class="row items-center"
|
||||||
style="position: ; /*fixed*/"
|
style="position: ; /*fixed*/"
|
||||||
:class="landspace ? '' : 'justify-evenly'"
|
:class="landspace ? '' : 'justify-evenly'"
|
||||||
:style="landspace ? { left: '11.5%' } : {}"
|
:style="landspace ? { left: '7%' } : {}"
|
||||||
>
|
>
|
||||||
<q-card
|
<q-card
|
||||||
class="transparent"
|
class="transparent no-box-shadow"
|
||||||
:style="{
|
:style="{
|
||||||
width: (landspace ? 40 : 70) + 'vw',
|
width: (landspace ? 48 : 70) + 'vw',
|
||||||
top: landspace ? '4vh' : 'unset',
|
top: landspace ? '-2vh' : 'unset',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div v-if="!landspace">
|
<div v-if="!landspace">
|
||||||
|
@ -178,7 +178,7 @@
|
||||||
</q-input>
|
</q-input>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item class="q-mt-md">
|
<q-item class="q-mt-sm">
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
:label="$t('remember password')"
|
:label="$t('remember password')"
|
||||||
|
@ -200,6 +200,17 @@
|
||||||
:disable="data.loading"
|
:disable="data.loading"
|
||||||
/>
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
<q-item-section>
|
||||||
|
<q-checkbox
|
||||||
|
:label="$t('full screen')"
|
||||||
|
v-model="full_screen"
|
||||||
|
@update:model-value="toogleFullScreen"
|
||||||
|
color="accent"
|
||||||
|
class="text-accent"
|
||||||
|
:dark="landspace"
|
||||||
|
:disable="data.loading"
|
||||||
|
/>
|
||||||
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
</q-form>
|
</q-form>
|
||||||
|
@ -283,6 +294,9 @@ export default defineComponent({
|
||||||
const $store = useStore();
|
const $store = useStore();
|
||||||
const data = reactive(new _Data());
|
const data = reactive(new _Data());
|
||||||
|
|
||||||
|
const ____temp = $q.fullscreen.isActive;
|
||||||
|
const full_screen = ref(____temp);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
(window as any).setPadTheme();
|
(window as any).setPadTheme();
|
||||||
} catch {}
|
} catch {}
|
||||||
|
@ -365,6 +379,7 @@ export default defineComponent({
|
||||||
landspace,
|
landspace,
|
||||||
is_pwa,
|
is_pwa,
|
||||||
show_show_password,
|
show_show_password,
|
||||||
|
full_screen,
|
||||||
async onSubmit() {
|
async onSubmit() {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
data.loading = true;
|
data.loading = true;
|
||||||
|
@ -468,6 +483,37 @@ export default defineComponent({
|
||||||
data.password = null;
|
data.password = null;
|
||||||
remember_password.value = false;
|
remember_password.value = false;
|
||||||
},
|
},
|
||||||
|
toogleFullScreen() {
|
||||||
|
if (!$q.fullscreen.isCapable) {
|
||||||
|
if ($q.platform.is.ipad) {
|
||||||
|
$q.notify({
|
||||||
|
type: "warning",
|
||||||
|
message:
|
||||||
|
$t.t("on the iPad, only Safari supports full screen") + "!",
|
||||||
|
position: "top",
|
||||||
|
timeout: 1500,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$q.notify({
|
||||||
|
type: "warning",
|
||||||
|
message:
|
||||||
|
$t.t("the current browser does not support full screen") + "!",
|
||||||
|
position: "top",
|
||||||
|
timeout: 1500,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
full_screen.value = $q.fullscreen.isActive;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ($q.fullscreen.isActive) {
|
||||||
|
$q.fullscreen.exit();
|
||||||
|
} else {
|
||||||
|
$q.fullscreen.request().catch((e: any) => {
|
||||||
|
console.log(e);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
:label="$t('clean screen')"
|
:label="$t('clean screen')"
|
||||||
@click="closeAllWindows"
|
@click="closeAllWindows"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
class="col-auto"
|
class="col-auto"
|
||||||
v-if="true || $q.fullscreen.isCapable"
|
v-if="true || $q.fullscreen.isCapable"
|
||||||
|
@ -31,16 +32,9 @@
|
||||||
stretch
|
stretch
|
||||||
stack
|
stack
|
||||||
flat
|
flat
|
||||||
:icon="
|
icon="img:pad/toolbar/full_screen_icon.png"
|
||||||
'img:pad/toolbar/' +
|
:label="$t('full screen')"
|
||||||
($q.fullscreen.isActive
|
@click="fullscreenWindow"
|
||||||
? 'exit_full_screen_icon.png'
|
|
||||||
: 'full_screen_icon.png')
|
|
||||||
"
|
|
||||||
:label="
|
|
||||||
$q.fullscreen.isActive ? $t('exit full screen') : $t('full screen')
|
|
||||||
"
|
|
||||||
@click="toogleFullScreen"
|
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<q-btn
|
||||||
class="col-auto"
|
class="col-auto"
|
||||||
|
@ -225,6 +219,16 @@ export default defineComponent({
|
||||||
?.lowerWindow(window.window_id);
|
?.lowerWindow(window.window_id);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
fullscreenWindow() {
|
||||||
|
const window = $store.state.windows.find(
|
||||||
|
(element) => element && element.uuid == $store.state.selected_window
|
||||||
|
);
|
||||||
|
if (window) {
|
||||||
|
GlobalData.getInstance()
|
||||||
|
.getCurrentClient()
|
||||||
|
?.setWindowGeometry(window.window_id, 0, 0, 1, 1);
|
||||||
|
}
|
||||||
|
},
|
||||||
closeCurrentWindow() {
|
closeCurrentWindow() {
|
||||||
const window = $store.state.windows.find(
|
const window = $store.state.windows.find(
|
||||||
(element) => element && element.uuid == $store.state.selected_window
|
(element) => element && element.uuid == $store.state.selected_window
|
||||||
|
@ -266,6 +270,9 @@ export default defineComponent({
|
||||||
} else {
|
} else {
|
||||||
Cookies.remove("auto_login");
|
Cookies.remove("auto_login");
|
||||||
SessionStorage.clear();
|
SessionStorage.clear();
|
||||||
|
try {
|
||||||
|
$q.fullscreen.exit();
|
||||||
|
} catch {}
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -602,6 +602,9 @@ export default defineComponent({
|
||||||
} else {
|
} else {
|
||||||
Cookies.remove("auto_login");
|
Cookies.remove("auto_login");
|
||||||
SessionStorage.clear();
|
SessionStorage.clear();
|
||||||
|
try {
|
||||||
|
$q.fullscreen.exit();
|
||||||
|
} catch {}
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue