%fa:heart%%i18n:@title%
-+
{{ '%i18n:@text%'.substr(0, '%i18n:@text%'.indexOf('{')) }} {{ meta.maintainer.name }} {{ '%i18n:@text%'.substr('%i18n:@text%'.indexOf('}') + 1) }} diff --git a/src/client/app/config.ts b/src/client/app/config.ts index 74b9ea21c8..a326c521db 100644 --- a/src/client/app/config.ts +++ b/src/client/app/config.ts @@ -4,6 +4,7 @@ declare const _THEME_COLOR_: string; declare const _COPYRIGHT_: string; declare const _VERSION_: string; declare const _CODENAME_: string; +declare const _ENV_: string; const address = new URL(location.href); @@ -18,3 +19,4 @@ export const themeColor = _THEME_COLOR_; export const copyright = _COPYRIGHT_; export const version = _VERSION_; export const codename = _CODENAME_; +export const env = _ENV_; diff --git a/src/client/app/desktop/api/update-avatar.ts b/src/client/app/desktop/api/update-avatar.ts index f07dc623f2..e9d92d1eb1 100644 --- a/src/client/app/desktop/api/update-avatar.ts +++ b/src/client/app/desktop/api/update-avatar.ts @@ -6,9 +6,9 @@ import ProgressDialog from '../views/components/progress-dialog.vue'; export default (os: OS) => { const cropImage = file => new Promise((resolve, reject) => { - - var regex = RegExp('\.(jpg|jpeg|png|gif|webp|bmp|tiff)$') - if(!regex.test(file.name) ) { + + const regex = RegExp('\.(jpg|jpeg|png|gif|webp|bmp|tiff)$'); + if (!regex.test(file.name) ) { os.apis.dialog({ title: '%fa:info-circle% %i18n:desktop.invalid-filetype%', text: null, @@ -16,9 +16,9 @@ export default (os: OS) => { text: '%i18n:common.got-it%' }] }); - reject + reject(); } - + const w = os.new(CropWindow, { image: file, title: '%i18n:desktop.avatar-crop-title%', diff --git a/src/client/app/desktop/api/update-banner.ts b/src/client/app/desktop/api/update-banner.ts index 5af6ea88d2..e8fa35149b 100644 --- a/src/client/app/desktop/api/update-banner.ts +++ b/src/client/app/desktop/api/update-banner.ts @@ -6,10 +6,9 @@ import ProgressDialog from '../views/components/progress-dialog.vue'; export default (os: OS) => { const cropImage = file => new Promise((resolve, reject) => { - - var regex = RegExp('\.(jpg|jpeg|png|gif|webp|bmp|tiff)$') - if(!regex.test(file.name) ) { + const regex = RegExp('\.(jpg|jpeg|png|gif|webp|bmp|tiff)$'); + if (!regex.test(file.name) ) { os.apis.dialog({ title: '%fa:info-circle% %i18n:desktop.invalid-filetype%', text: null, @@ -17,9 +16,9 @@ export default (os: OS) => { text: '%i18n:common.got-it%' }] }); - reject + reject(); } - + const w = os.new(CropWindow, { image: file, title: '%i18n:desktop.banner-crop-title%', diff --git a/src/client/app/desktop/views/components/charts.vue b/src/client/app/desktop/views/components/charts.vue index e400aebbb7..c4e92e429f 100644 --- a/src/client/app/desktop/views/components/charts.vue +++ b/src/client/app/desktop/views/components/charts.vue @@ -88,7 +88,9 @@ export default Vue.extend({ }, created() { - (this as any).api('chart').then(chart => { + (this as any).api('chart', { + limit: 32 + }).then(chart => { this.chart = chart; }); }, @@ -580,6 +582,6 @@ export default Vue.extend({ > div > * display block - height 300px + height 320px diff --git a/src/client/app/desktop/views/components/note-detail.vue b/src/client/app/desktop/views/components/note-detail.vue index 227bcc349d..1ba4a9a447 100644 --- a/src/client/app/desktop/views/components/note-detail.vue +++ b/src/client/app/desktop/views/components/note-detail.vue @@ -47,7 +47,7 @@