mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-30 19:56:43 -06:00
Pari Plus! system settings and add hardware acc
This commit is contained in:
parent
327f0511a7
commit
c9462d4a8e
6 changed files with 33 additions and 0 deletions
|
@ -1285,9 +1285,11 @@ clipNoteLimitExceeded: "No more notes can be added to this clip."
|
|||
timeTravel: "Time Travel"
|
||||
timeTravelDescription: "Show posts before this date."
|
||||
pariPlusInfo: "Pari Plus! customized Misskey~!"
|
||||
pariPlusSystemSettings: "Pari Plus! system settings"
|
||||
pariPlusNoteSettings: "Pari Plus! note settings"
|
||||
pariPlusAppearanceSettings: "Pari Plus! appearance settings"
|
||||
pariPlusFontPicker: "Default fonts"
|
||||
useHardwareAcceleration: "Enable hardware Acceleration"
|
||||
autoTranslateButton: "Display translation function on notes in different languages"
|
||||
showDetailTimeWhenHover: "Hover the timestamp of the note to expand the detailed time"
|
||||
noteClickToOpen: "Click to open note details"
|
||||
|
|
|
@ -1294,9 +1294,11 @@ passkeyVerificationSucceededButPasswordlessLoginDisabled: "通行密钥验证成
|
|||
timeTravel: "时光机"
|
||||
timeTravelDescription: "显示该日期以前的帖子"
|
||||
pariPlusInfo: "Pari Plus! 定制 Misskey~!"
|
||||
pariPlusSystemSettings: "Pari Plus! 系统设置"
|
||||
pariPlusNoteSettings: "Pari Plus! 帖文设置"
|
||||
pariPlusAppearanceSettings: "Pari Plus! 外观设置"
|
||||
pariPlusFontPicker: "默认字体"
|
||||
useHardwareAcceleration: "启用硬件加速"
|
||||
autoTranslateButton: "在不同语言的帖文上显示翻译功能"
|
||||
showDetailTimeWhenHover: "悬浮/长按帖文时间戳时,展开详细时间"
|
||||
noteClickToOpen: "点击展开帖文详情"
|
||||
|
|
|
@ -1294,9 +1294,11 @@ passkeyVerificationSucceededButPasswordlessLoginDisabled: "雖然驗證金鑰成
|
|||
timeTravel: "時光機"
|
||||
timeTravelDescription: "回到指定的日期"
|
||||
pariPlusInfo: "Pari Plus! 自訂 Misskey~!"
|
||||
pariPlusSystemSettings: "Pari Plus! 系統設定"
|
||||
pariPlusNoteSettings: "Pari Plus! 貼文設定"
|
||||
pariPlusAppearanceSettings: "Pari Plus! 外觀設定"
|
||||
pariPlusFontPicker: "預設字體"
|
||||
useHardwareAcceleration: "啓用硬件加速"
|
||||
autoTranslateButton: "在不同語言的貼文上顯示翻譯功能"
|
||||
showDetailTimeWhenHover: "長按貼文時間戳記時展開詳細時間"
|
||||
noteClickToOpen: "點擊展開貼文詳情"
|
||||
|
|
|
@ -197,6 +197,19 @@ export async function common(createVue: () => App<Element>) {
|
|||
}
|
||||
}, { immediate: true });
|
||||
|
||||
watch(defaultStore.reactiveState.useHardwareAcceleration, v => {
|
||||
if (v) {
|
||||
const miHwAcc = document.createElement('style');
|
||||
miHwAcc.textContent = `html {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}`;
|
||||
document.head.appendChild(miHwAcc);
|
||||
} else {
|
||||
document.querySelector('style')?.remove();
|
||||
}
|
||||
}, { immediate: true });
|
||||
|
||||
// Keep screen on
|
||||
const onVisibilityChange = () => document.addEventListener('visibilitychange', () => {
|
||||
if (document.visibilityState === 'visible') {
|
||||
|
|
|
@ -7,6 +7,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkInfo>
|
||||
{{ i18n.ts.pariPlusInfo }}
|
||||
</MkInfo>
|
||||
<FormSection>
|
||||
<div class="label">{{ i18n.ts.pariPlusSystemSettings }}</div>
|
||||
<div class="_gaps_m">
|
||||
<div class="_gaps_s">
|
||||
<MkSwitch v-model="useHardwareAcceleration">{{ i18n.ts.useHardwareAcceleration }}</MkSwitch>
|
||||
</div>
|
||||
</div>
|
||||
</FormSection>
|
||||
<FormSection>
|
||||
<div class="label">{{ i18n.ts.pariPlusAppearanceSettings }}</div>
|
||||
<div class="_gaps_m">
|
||||
|
@ -102,6 +110,8 @@ function saveFontSize() {
|
|||
fontSizeNumberOld.value = fontSizeNumber.value;
|
||||
}
|
||||
|
||||
const useHardwareAcceleration = computed(defaultStore.makeGetterSetter('useHardwareAcceleration'));
|
||||
|
||||
const autoTranslateButton = computed(defaultStore.makeGetterSetter('autoTranslateButton'));
|
||||
const showDetailTimeWhenHover = computed(defaultStore.makeGetterSetter('showDetailTimeWhenHover'));
|
||||
const noteClickToOpen = computed(defaultStore.makeGetterSetter('noteClickToOpen'));
|
||||
|
|
|
@ -508,6 +508,10 @@ export const defaultStore = markRaw(new Storage('base', {
|
|||
where: 'device',
|
||||
default: { type: 'syuilo/bubble1', volume: 1 } as SoundStore,
|
||||
},
|
||||
useHardwareAcceleration: {
|
||||
where: 'device',
|
||||
default: true,
|
||||
},
|
||||
autoTranslateButton: {
|
||||
where: 'device',
|
||||
default: false,
|
||||
|
|
Loading…
Reference in a new issue