Compare commits

...

5 Commits

Author SHA1 Message Date
果物リン 71f6d3d286
Merge pull request #6 from ozelotdev/patch-1
add url and proxy to server proxy
2023-11-27 09:56:57 +09:00
syuilo faceb9c5ec Merge branch 'develop' into pr/12452 2023-11-27 09:25:45 +09:00
woxtu 01d06e7121
Fix a frontend testing script (#12471) 2023-11-27 08:06:47 +09:00
ragujp 780b120c64
fix: wake lock error in safari etc (#12464) 2023-11-26 23:35:53 +09:00
ozelot 3637a0bc29
add url and proxy to server proxy 2023-11-26 22:38:37 +09:00
3 changed files with 13 additions and 7 deletions

View File

@ -10,7 +10,7 @@
"build-storybook-pre": "(tsc -p .storybook || echo done.) && node .storybook/generate.js && node .storybook/preload-locale.js && node .storybook/preload-theme.js",
"build-storybook": "pnpm build-storybook-pre && storybook build",
"chromatic": "chromatic",
"test": "vitest --run",
"test": "vitest --run --globals",
"test-and-coverage": "vitest --run --coverage --globals",
"typecheck": "vue-tsc --noEmit",
"eslint": "eslint --quiet \"src/**/*.{ts,vue}\"",

View File

@ -210,12 +210,16 @@ export async function common(createVue: () => App<Element>) {
if (defaultStore.state.keepScreenOn) {
if ('wakeLock' in navigator) {
navigator.wakeLock.request('screen');
document.addEventListener('visibilitychange', async () => {
if (document.visibilityState === 'visible') {
navigator.wakeLock.request('screen');
}
navigator.wakeLock.request('screen')
.then(() => {
document.addEventListener('visibilitychange', async () => {
if (document.visibilityState === 'visible') {
navigator.wakeLock.request('screen');
}
});
})
.catch(() => {
// If Permission fails on an AppleDevice such as Safari
});
}
}

View File

@ -72,6 +72,8 @@ export function getConfig(): UserConfig {
},
},
'/url': 'http://127.0.0.1:3000',
'/proxy': 'http://127.0.0.1:3000',
},
},