fix keyboard layout

This commit is contained in:
cutls 2021-06-02 15:19:58 +09:00
parent bdae21bd12
commit d6fd519086
3 changed files with 606 additions and 584 deletions

View File

@ -11,9 +11,11 @@ var envView = new Vue({
} else {
ls = ls.data
}
console.log(ls)
for (var j = 0; j < ls.length; j++) {
var id = ls[j].id
localStorage.setItem(ls[j].storage, val)
var lsi = ls[j]
if (!val || j > 0) val = lsi.setValue
localStorage.setItem(lsi.storage, val)
}
if (ls[0].id == 'ha') {
hardwareAcceleration(val)
@ -185,6 +187,7 @@ function load() {
//$("#log").val(localStorage.getItem("errors"))
$('#lastFmUser').val(localStorage.getItem('lastFmUser'))
}
function customVol() {
var cvol = $('#soundvol').val()
$('#soundVolVal').text(cvol)
@ -241,6 +244,7 @@ function climute() {
})
}
}
function cliMuteDel(key) {
var cli = localStorage.getItem('client_mute')
var obj = JSON.parse(cli)
@ -260,6 +264,7 @@ function wordmute() {
data: obj,
})
}
function wordmuteSave() {
var word = M.Chips.getInstance($('#wordmute')).chipsData
var json = JSON.stringify(word)
@ -276,11 +281,13 @@ function wordemp() {
data: obj,
})
}
function wordempSave() {
var word = M.Chips.getInstance($('#wordemp')).chipsData
var json = JSON.stringify(word)
localStorage.setItem('word_emp', json)
}
function notftest() {
var os = localStorage.getItem('platform')
var options = {
@ -289,11 +296,13 @@ function notftest() {
}
var n = new Notification('TheDesk' + lang.lang_setting_notftest, options)
}
function oks(no) {
var txt = $('#oks-' + no).val()
localStorage.setItem('oks-' + no, txt)
M.toast({ html: lang.lang_setting_ksref, displayLength: 3000 })
}
function oksload() {
if (localStorage.getItem('oks-1')) {
$('#oks-1').val(localStorage.getItem('oks-1'))
@ -305,11 +314,13 @@ function oksload() {
$('#oks-3').val(localStorage.getItem('oks-3'))
}
}
function changeLang() {
const lang = $('#langsel-sel').val()
console.log(lang)
if (lang) postMessage(['lang', lang], '*')
}
function exportSettings() {
var exp = exportSettingsCore()
$('#imp-exp').val(JSON5.stringify(exp))
@ -326,6 +337,7 @@ function exportSettings() {
}
})
}
function exportSettingsCore() {
var exp = {}
//Accounts
@ -391,6 +403,7 @@ function exportSettingsCore() {
exp.meta.platform = localStorage.getItem('platform')
return exp
}
function importSettings() {
Swal.fire({
title: 'Warning',
@ -409,6 +422,7 @@ function importSettings() {
}
})
}
function importSettingsCore(obj) {
if (obj) {
localStorage.clear()
@ -502,6 +516,7 @@ function importSettingsCore(obj) {
})
}
}
function savefolder() {
postMessage(['sendSinmpleIpc', 'savefolder'], '*')
}
@ -514,6 +529,7 @@ function font() {
$('#fonts').addClass('hide')
}
}
function fontList(arg) {
$('#fonts').removeClass('hide')
for (var i = 0; i < arg.length; i++) {
@ -521,10 +537,12 @@ function fontList(arg) {
$('#fonts').append('<div class="font pointer" style="font-family:' + font + '" onclick="insertFont(\'' + font + '\')">' + font + '</div>')
}
}
function insertFont(name) {
$('#fonts').addClass('hide')
$('#font').val(name)
}
function copyColor(from, to) {
let props = [
'background', 'subcolor', 'text', 'accent',
@ -559,6 +577,7 @@ function copyColor(from, to) {
i++
}
}
function customComp(preview) {
var nameC = $('#custom_name').val()
if (!nameC && !preview) {
@ -623,6 +642,7 @@ function customComp(preview) {
}
}
function deleteIt() {
var id = $('#custom-sel-sel').val()
$('#custom_name').val('')
@ -635,9 +655,11 @@ function deleteIt() {
}
postMessage(['themeJsonDelete', id + '.thedesktheme'], '*')
}
function ctLoad() {
postMessage(['sendSinmpleIpc', 'theme-json-list'], '*')
}
function ctLoadCore(args) {
var template = ''
var editTemplate = ''

View File

@ -27,7 +27,7 @@
<body class="">
<script>
var ver = '22.2.0 (Koume)'
var gitHash = '8acf86d9cb88488a71de6a158f6bdab4b09ae2d9'
var gitHash = 'bdae21bd12da4c1a23f57188586622db7915422d'
//betaを入れるとバージョンチェックしない
//var ver="beta";
var acct_id = 0

View File

@ -688,7 +688,7 @@
style="width:100%; max-width:40rem;"><img src="../../img/desk_full.svg" class="left" width="25"
style="padding-top:5px;">Main author: Cutls@1m.cutls.com</a>
<br>
TheDesk @ <a href="https://github.com/cutls/TheDesk/commits/8acf86d9cb88488a71de6a158f6bdab4b09ae2d9">8acf86d9cb88488a71de6a158f6bdab4b09ae2d9</a> - <a
TheDesk @ <a href="https://github.com/cutls/TheDesk/commits/bdae21bd12da4c1a23f57188586622db7915422d">bdae21bd12da4c1a23f57188586622db7915422d</a> - <a
onclick="checkupd(); return localStorage.removeItem('new-ver-skip'); location.href='index.html';"
class="pointer pwa">Sprawdź aktualizacje</a><br>
<br>
@ -698,7 +698,7 @@
<img src="https://status.cutls.com/badge-service?site=thedesk.top">
</a><br>
<h5>OSS License</h5>
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2Fcutls%2FTheDesk/refs/branch/master/8acf86d9cb88488a71de6a158f6bdab4b09ae2d9"
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2Fcutls%2FTheDesk/refs/branch/master/bdae21bd12da4c1a23f57188586622db7915422d"
alt="FOSSA Status"><img
src="https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcutls%2FTheDesk.svg?type=small" /></a>
<br>