feat(i18n): mask setting

This commit is contained in:
AkiChase 2024-05-24 11:31:21 +08:00
parent a48c2b9d8a
commit 3a015488e7
4 changed files with 49 additions and 10 deletions

View File

@ -49,6 +49,7 @@ async function maximizeOrRestore() {
justify-content: end; justify-content: end;
align-items: center; align-items: center;
border-radius: 0 10px 0 0; border-radius: 0 10px 0 0;
user-select: none;
.n-button-group{ .n-button-group{
flex-shrink: 0; flex-shrink: 0;

View File

@ -236,43 +236,58 @@ onUnmounted(() => {
</NGrid> </NGrid>
</NForm> </NForm>
<NH4 prefix="bar">设备旋转</NH4> <NH4 prefix="bar">{{ $t("pages.Setting.Mask.rotation.title") }}</NH4>
<NFormItem :label="'跟随设备旋转'" label-placement="left"> <NFormItem
:label="$t('pages.Setting.Mask.rotation.rotateWithDevice')"
label-placement="left"
>
<NCheckbox <NCheckbox
v-model:checked="store.rotation.enable" v-model:checked="store.rotation.enable"
@update:checked="localStore.set('rotation', store.rotation)" @update:checked="localStore.set('rotation', store.rotation)"
/> />
</NFormItem> </NFormItem>
<NGrid :cols="2"> <NGrid :cols="2">
<NFormItemGi label="竖屏蒙版高度" label-placement="left"> <NFormItemGi
:label="$t('pages.Setting.Mask.rotation.verticalLength')"
label-placement="left"
>
<NInputNumber <NInputNumber
v-model:value="store.rotation.verticalLength" v-model:value="store.rotation.verticalLength"
@update:value="localStore.set('rotation', store.rotation)" @update:value="localStore.set('rotation', store.rotation)"
:placeholder="$t('pages.Setting.Mask.areaFormPlaceholder.w')" :placeholder="$t('pages.Setting.Mask.rotation.verticalLength')"
/> />
</NFormItemGi> </NFormItemGi>
<NFormItemGi label="横屏蒙版宽度" label-placement="left"> <NFormItemGi
:label="$t('pages.Setting.Mask.rotation.horizontalLength')"
label-placement="left"
>
<NInputNumber <NInputNumber
v-model:value="store.rotation.horizontalLength" v-model:value="store.rotation.horizontalLength"
@update:value="localStore.set('rotation', store.rotation)" @update:value="localStore.set('rotation', store.rotation)"
:placeholder="$t('pages.Setting.Mask.areaFormPlaceholder.h')" :placeholder="$t('pages.Setting.Mask.rotation.horizontalLength')"
/> />
</NFormItemGi> </NFormItemGi>
</NGrid> </NGrid>
<NH4 prefix="bar">ScreenStream</NH4> <NH4 prefix="bar">ScreenStream</NH4>
<NFormItem :label="'启用投屏'" label-placement="left"> <NFormItem
:label="$t('pages.Setting.Mask.screenStream.enable')"
label-placement="left"
>
<NCheckbox <NCheckbox
v-model:checked="store.screenStream.enable" v-model:checked="store.screenStream.enable"
@update:checked="localStore.set('screenStream', store.screenStream)" @update:checked="localStore.set('screenStream', store.screenStream)"
/> />
</NFormItem> </NFormItem>
<NFormItem :label="'投屏地址'" label-placement="left"> <NFormItem
:label="$t('pages.Setting.Mask.screenStream.address')"
label-placement="left"
>
<NInput <NInput
v-model:value="store.screenStream.address" v-model:value="store.screenStream.address"
@update:value="localStore.set('screenStream', store.screenStream)" @update:value="localStore.set('screenStream', store.screenStream)"
clearable clearable
:placeholder="'请输入 ScreenStream 投屏地址'" :placeholder="$t('pages.Setting.Mask.screenStream.addressPlaceholder')"
/> />
</NFormItem> </NFormItem>
</div> </div>

View File

@ -36,7 +36,8 @@
"wsClose": "Close", "wsClose": "Close",
"wsConnect": "Control", "wsConnect": "Control",
"adbDeviceError": "Unable to get available devices", "adbDeviceError": "Unable to get available devices",
"adbConnectError": "Wireless connection failed" "adbConnectError": "Wireless connection failed",
"rotation": "Device rotation {0}°"
}, },
"Mask": { "Mask": {
"keyconfigException": "The key mapping config is abnormal, please delete this config", "keyconfigException": "The key mapping config is abnormal, please delete this config",
@ -85,6 +86,17 @@
"y": "Y coordinate of upper left corner", "y": "Y coordinate of upper left corner",
"w": "Mask width", "w": "Mask width",
"h": "Mask height" "h": "Mask height"
},
"rotation": {
"title": "Device rotation",
"rotateWithDevice": "Follow device rotation",
"verticalLength": "Mask height in vertical screen",
"horizontalLength": "Mask width in horizontal screen "
},
"screenStream": {
"enable": "Enable mirror",
"address": "Screen mirror address",
"addressPlaceholder": "Please enter the ScreenStream screen mirror address"
} }
}, },
"Basic": { "Basic": {

View File

@ -86,6 +86,17 @@
"y": "请输入蒙版左上角Y坐标", "y": "请输入蒙版左上角Y坐标",
"w": "请输入蒙版宽度", "w": "请输入蒙版宽度",
"h": "请输入蒙版高度" "h": "请输入蒙版高度"
},
"rotation": {
"title": "设备旋转",
"rotateWithDevice": "跟随设备旋转",
"verticalLength": "竖屏蒙版高度",
"horizontalLength": "横屏蒙版宽度"
},
"screenStream": {
"enable": "启用投屏",
"address": "投屏地址",
"addressPlaceholder": "请输入 ScreenStream 投屏地址"
} }
}, },
"Basic": { "Basic": {