Skip to content

Commit

Permalink
build: jsconfig target ESNext and fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
rocka committed Oct 22, 2024
1 parent dd77617 commit 8f6efb0
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
3 changes: 2 additions & 1 deletion jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"compilerOptions": {
"baseUrl": ".",
"target": "ESNext",
"moduleResolution": "Bundler",
"experimentalDecorators": true,
"paths": {
"@/*": [
Expand Down
3 changes: 2 additions & 1 deletion src/main/api/codec.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,5 +173,6 @@ export function encodePicUrl(id) {
}
const hash = crypto.createHash('md5');
const md5 = hash.update(bytes).digest('base64');
return md5.replace(/\//g, '_').replace(/\+/g, '-');
// node's base64url would omit padding char '='
return md5.replaceAll('/', '_').replaceAll('+', '-');
}
4 changes: 2 additions & 2 deletions src/main/mpris/mpris.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class MediaPlayer2Player extends Interface {
}

_Volume = 1.0;
_ThrottledVloume = throttle(value => this.emitter.emit('dbus:volume', Math.trunc(value * 100)), 100);
_ThrottledVolume = throttle(value => this.emitter.emit('dbus:volume', Math.trunc(value * 100)), 100);

@property({ signature: 'd', access: ACCESS_READWRITE })
get Volume() { return this._Volume; }
Expand All @@ -216,7 +216,7 @@ class MediaPlayer2Player extends Interface {
if (Math.abs(this._Volume - value) < 0.01) return;
this._Volume = value;
d('set property: Volume %o', this._Volume);
this._ThrottledVloume(value);
this._ThrottledVolume(value);
}

setVolume(value) {
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/components/AppNav/LoginDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export default {
}
this.pwd.pending = false;
},
bindKeybordEvent() {
bindKeyboardEvent() {
this.$refs.inputPwd.$el.querySelector('input').onkeydown = e => {
if (e.key === 'Enter') this.handlePasswordLogin();
};
Expand Down Expand Up @@ -219,7 +219,7 @@ export default {
prepareLoginMethod() {
switch (this.type) {
case 'pwd':
this.$nextTick(this.bindKeybordEvent);
this.$nextTick(this.bindKeyboardEvent);
break;
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/renderer/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ import Message from 'muse-ui-message';
import { RecycleScroller } from 'vue-virtual-scroller/dist/vue-virtual-scroller.esm';

import App from './App.vue';
import store from './store';
import store from './store/index';
import { UPDATE_SETTINGS } from './store/mutation-types';
import routes from './routes';
import { encm, isLinux } from './util/globals';
import { initTheme, setTheme } from './util/theme';
import DblclickRipple from './util/dblclick-ripple';
import * as tray from './util/tray';
import * as mpris from './util/mpris';

import './style.css';
import './transition.css';
// because we upgraded vue-resize manually
import 'vue-resize/dist/vue-resize.css';
import 'vue-virtual-scroller/dist/vue-virtual-scroller.css';

import * as tray from '@/util/tray';
import * as mpris from '@/util/mpris';

Vue.use(Router);
Vue.use(MuseUI);
Vue.use(Toast);
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/store/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Vue from 'vue';
import Vuex from 'vuex';

import * as modules from './modules';
import * as modules from './modules/index';
import * as actions from './actions';
import * as getters from './getters';
import { installHooks } from './hooks';
Expand Down

0 comments on commit 8f6efb0

Please sign in to comment.