summaryrefslogtreecommitdiff
path: root/src/client/app
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-08-30 22:16:04 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-08-30 22:16:04 +0900
commitae36bf301af4c8dffd0543e9cd45f8d4a0dbd18b (patch)
treec9b10d65d71bdb97e2bbc263a2767f9f812ceb1e /src/client/app
parentMerge pull request #2502 from acid-chicken/patch-autogen (diff)
parent8.16.0 (diff)
downloadsharkey-ae36bf301af4c8dffd0543e9cd45f8d4a0dbd18b.tar.gz
sharkey-ae36bf301af4c8dffd0543e9cd45f8d4a0dbd18b.tar.bz2
sharkey-ae36bf301af4c8dffd0543e9cd45f8d4a0dbd18b.zip
Merge branch 'develop'
Diffstat (limited to 'src/client/app')
-rw-r--r--src/client/app/common/views/components/url-preview.vue185
-rw-r--r--src/client/app/common/views/widgets/donation.vue2
-rw-r--r--src/client/app/config.ts2
-rw-r--r--src/client/app/desktop/api/update-avatar.ts67
-rw-r--r--src/client/app/desktop/api/update-banner.ts13
-rw-r--r--src/client/app/desktop/views/components/charts.vue6
-rw-r--r--src/client/app/desktop/views/components/note-detail.vue2
-rw-r--r--src/client/app/desktop/views/components/notes.note.vue2
-rw-r--r--src/client/app/desktop/views/components/ui.header.nav.vue2
-rw-r--r--src/client/app/desktop/views/components/ui.header.vue19
-rw-r--r--src/client/app/desktop/views/pages/deck/deck.note.vue2
-rw-r--r--src/client/app/desktop/views/pages/stats/stats.vue2
-rw-r--r--src/client/app/desktop/views/pages/user/user.friends.vue19
-rw-r--r--src/client/app/desktop/views/pages/user/user.photos.vue13
-rw-r--r--src/client/app/desktop/views/pages/user/user.vue2
-rw-r--r--src/client/app/init.ts4
-rw-r--r--src/client/app/mobile/views/components/note-detail.vue2
-rw-r--r--src/client/app/mobile/views/components/note.vue2
-rw-r--r--src/client/app/mobile/views/components/ui.header.vue18
-rw-r--r--src/client/app/mobile/views/components/ui.vue7
-rw-r--r--src/client/app/mobile/views/pages/settings.vue11
-rw-r--r--src/client/app/store.ts2
22 files changed, 246 insertions, 138 deletions
diff --git a/src/client/app/common/views/components/url-preview.vue b/src/client/app/common/views/components/url-preview.vue
index 4ddc137ed1..242d9ba5c6 100644
--- a/src/client/app/common/views/components/url-preview.vue
+++ b/src/client/app/common/views/components/url-preview.vue
@@ -28,18 +28,99 @@
import Vue from 'vue';
import { url as misskeyUrl } from '../../../config';
+// THIS IS THE WHITELIST FOR THE EMBED PLAYER
+const whiteList = [
+ 'afreecatv.com',
+ 'aparat.com',
+ 'applemusic.com',
+ 'amazon.com',
+ 'awa.fm',
+ 'bandcamp.com',
+ 'bbc.co.uk',
+ 'beatport.com',
+ 'bilibili.com',
+ 'boomstream.com',
+ 'breakers.tv',
+ 'cam4.com',
+ 'cavelis.net',
+ 'chaturbate.com',
+ 'cnn.com',
+ 'cybergame.tv',
+ 'dailymotion.com',
+ 'deezer.com',
+ 'djlive.pl',
+ 'e-onkyo.com',
+ 'eventials.com',
+ 'facebook.com',
+ 'fc2.com',
+ 'gameplank.tv',
+ 'goodgame.ru',
+ 'google.com',
+ 'hardtunes.com',
+ 'instagram.com',
+ 'johnnylooch.com',
+ 'kexp.org',
+ 'lahzenegar.com',
+ 'liveedu.tv',
+ 'livetube.cc',
+ 'livestream.com',
+ 'meridix.com',
+ 'mixcloud.com',
+ 'mixer.com',
+ 'mobcrush.com',
+ 'mylive.in.th',
+ 'myspace.com',
+ 'netflix.com',
+ 'newretrowave.com',
+ 'nhk.or.jp',
+ 'nicovideo.jp',
+ 'nico.ms',
+ 'noisetrade.com',
+ 'nood.tv',
+ 'npr.org',
+ 'openrec.tv',
+ 'pandora.com',
+ 'pandora.tv',
+ 'picarto.tv',
+ 'pscp.tv',
+ 'restream.io',
+ 'reverbnation.com',
+ 'sermonaudio.com',
+ 'smashcast.tv',
+ 'songkick.com',
+ 'soundcloud.com',
+ 'spinninrecords.com',
+ 'spotify.com',
+ 'stitcher.com',
+ 'stream.me',
+ 'switchboard.live',
+ 'tunein.com',
+ 'twitcasting.tv',
+ 'twitch.tv',
+ 'twitter.com',
+ 'vaughnlive.tv',
+ 'veoh.com',
+ 'vimeo.com',
+ 'watchpeoplecode.com',
+ 'web.tv',
+ 'youtube.com',
+ 'youtu.be'
+];
+
export default Vue.extend({
props: {
url: {
type: String,
require: true
},
+
detail: {
type: Boolean,
required: false,
default: false
}
},
+
data() {
return {
fetching: true,
@@ -57,6 +138,7 @@ export default Vue.extend({
misskeyUrl
};
},
+
created() {
const url = new URL(this.url);
@@ -81,97 +163,22 @@ export default Vue.extend({
}
return;
}
+
fetch('/url?url=' + encodeURIComponent(this.url)).then(res => {
res.json().then(info => {
- if (info.url != null) {
- this.title = info.title;
- this.description = info.description;
- this.thumbnail = info.thumbnail;
- this.icon = info.icon;
- this.sitename = info.sitename;
- this.fetching = false;
- if ([ // THIS IS THE WHITELIST FOR THE EMBED PLAYER
- 'afreecatv.com',
- 'aparat.com',
- 'applemusic.com',
- 'amazon.com',
- 'awa.fm',
- 'bandcamp.com',
- 'bbc.co.uk',
- 'beatport.com',
- 'bilibili.com',
- 'boomstream.com',
- 'breakers.tv',
- 'cam4.com',
- 'cavelis.net',
- 'chaturbate.com',
- 'cnn.com',
- 'cybergame.tv',
- 'dailymotion.com',
- 'deezer.com',
- 'djlive.pl',
- 'e-onkyo.com',
- 'eventials.com',
- 'facebook.com',
- 'fc2.com',
- 'gameplank.tv',
- 'goodgame.ru',
- 'google.com',
- 'hardtunes.com',
- 'instagram.com',
- 'johnnylooch.com',
- 'kexp.org',
- 'lahzenegar.com',
- 'liveedu.tv',
- 'livetube.cc',
- 'livestream.com',
- 'meridix.com',
- 'mixcloud.com',
- 'mixer.com',
- 'mobcrush.com',
- 'mylive.in.th',
- 'myspace.com',
- 'netflix.com',
- 'newretrowave.com',
- 'nhk.or.jp',
- 'nicovideo.jp',
- 'nico.ms',
- 'noisetrade.com',
- 'nood.tv',
- 'npr.org',
- 'openrec.tv',
- 'pandora.com',
- 'pandora.tv',
- 'picarto.tv',
- 'pscp.tv',
- 'restream.io',
- 'reverbnation.com',
- 'sermonaudio.com',
- 'smashcast.tv',
- 'songkick.com',
- 'soundcloud.com',
- 'spinninrecords.com',
- 'spotify.com',
- 'stitcher.com',
- 'stream.me',
- 'switchboard.live',
- 'tunein.com',
- 'twitcasting.tv',
- 'twitch.tv',
- 'twitter.com',
- 'vaughnlive.tv',
- 'veoh.com',
- 'vimeo.com',
- 'watchpeoplecode.com',
- 'web.tv',
- 'youtube.com',
- 'youtu.be'
- ].some(x => x == url.hostname || url.hostname.endsWith(`.${x}`)))
- this.player = info.player;
- } // info.url
- }) // json
- }); // fetch
- } // created
+ if (info.url == null) return;
+ this.title = info.title;
+ this.description = info.description;
+ this.thumbnail = info.thumbnail;
+ this.icon = info.icon;
+ this.sitename = info.sitename;
+ this.fetching = false;
+ if (whiteList.some(x => x == url.hostname || url.hostname.endsWith(`.${x}`))) {
+ this.player = info.player;
+ }
+ })
+ });
+ }
});
</script>
diff --git a/src/client/app/common/views/widgets/donation.vue b/src/client/app/common/views/widgets/donation.vue
index b1352e803e..544ca1bd9d 100644
--- a/src/client/app/common/views/widgets/donation.vue
+++ b/src/client/app/common/views/widgets/donation.vue
@@ -2,7 +2,7 @@
<div class="mkw-donation" :data-mobile="platform == 'mobile'">
<article>
<h1>%fa:heart%%i18n:@title%</h1>
- <p>
+ <p v-if="meta">
{{ '%i18n:@text%'.substr(0, '%i18n:@text%'.indexOf('{')) }}
<a :href="meta.maintainer.url">{{ meta.maintainer.name }}</a>
{{ '%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 83820f92bd..e9d92d1eb1 100644
--- a/src/client/app/desktop/api/update-avatar.ts
+++ b/src/client/app/desktop/api/update-avatar.ts
@@ -3,8 +3,21 @@ import { apiUrl } from '../../config';
import CropWindow from '../views/components/crop-window.vue';
import ProgressDialog from '../views/components/progress-dialog.vue';
-export default (os: OS) => (cb, file = null) => {
- const fileSelected = file => {
+export default (os: OS) => {
+
+ const cropImage = file => new Promise((resolve, reject) => {
+
+ 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,
+ actions: [{
+ text: '%i18n:common.got-it%'
+ }]
+ });
+ reject();
+ }
const w = os.new(CropWindow, {
image: file,
@@ -19,27 +32,29 @@ export default (os: OS) => (cb, file = null) => {
os.api('drive/folders/find', {
name: '%i18n:desktop.avatar%'
- }).then(iconFolder => {
- if (iconFolder.length === 0) {
+ }).then(avatarFolder => {
+ if (avatarFolder.length === 0) {
os.api('drive/folders/create', {
name: '%i18n:desktop.avatar%'
}).then(iconFolder => {
- upload(data, iconFolder);
+ resolve(upload(data, iconFolder));
});
} else {
- upload(data, iconFolder[0]);
+ resolve(upload(data, avatarFolder[0]));
}
});
});
w.$once('skipped', () => {
- set(file);
+ resolve(file);
});
+ w.$once('cancelled', reject);
+
document.body.appendChild(w.$el);
- };
+ });
- const upload = (data, folder) => {
+ const upload = (data, folder) => new Promise((resolve, reject) => {
const dialog = os.new(ProgressDialog, {
title: '%i18n:desktop.uploading-avatar%'
});
@@ -52,18 +67,19 @@ export default (os: OS) => (cb, file = null) => {
xhr.onload = e => {
const file = JSON.parse((e.target as any).response);
(dialog as any).close();
- set(file);
+ resolve(file);
};
+ xhr.onerror = reject;
xhr.upload.onprogress = e => {
if (e.lengthComputable) (dialog as any).update(e.loaded, e.total);
};
xhr.send(data);
- };
+ });
- const set = file => {
- os.api('i/update', {
+ const setAvatar = file => {
+ return os.api('i/update', {
avatarId: file.id
}).then(i => {
os.store.commit('updateIKeyValue', {
@@ -83,18 +99,21 @@ export default (os: OS) => (cb, file = null) => {
}]
});
- if (cb) cb(i);
+ return i;
});
};
- if (file) {
- fileSelected(file);
- } else {
- os.apis.chooseDriveFile({
- multiple: false,
- title: '%fa:image% %i18n:desktop.choose-avatar%'
- }).then(file => {
- fileSelected(file);
- });
- }
+ return (file = null) => {
+ const selectedFile = file
+ ? Promise.resolve(file)
+ : os.apis.chooseDriveFile({
+ multiple: false,
+ title: '%fa:image% %i18n:desktop.choose-avatar%'
+ });
+
+ return selectedFile
+ .then(cropImage)
+ .then(setAvatar)
+ .catch(err => err && console.warn(err));
+ };
};
diff --git a/src/client/app/desktop/api/update-banner.ts b/src/client/app/desktop/api/update-banner.ts
index 33c4e306a2..e8fa35149b 100644
--- a/src/client/app/desktop/api/update-banner.ts
+++ b/src/client/app/desktop/api/update-banner.ts
@@ -6,6 +6,19 @@ import ProgressDialog from '../views/components/progress-dialog.vue';
export default (os: OS) => {
const cropImage = file => new Promise((resolve, reject) => {
+
+ 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,
+ actions: [{
+ text: '%i18n:common.got-it%'
+ }]
+ });
+ 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
</style>
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 @@
</div>
<mk-poll v-if="p.poll" :note="p"/>
<mk-url-preview v-for="url in urls" :url="url" :key="url" :detail="true"/>
- <a class="location" v-if="p.geo" :href="`http://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
+ <a class="location" v-if="p.geo" :href="`https://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
<div class="map" v-if="p.geo" ref="map"></div>
<div class="renote" v-if="p.renote">
<mk-note-preview :note="p.renote"/>
diff --git a/src/client/app/desktop/views/components/notes.note.vue b/src/client/app/desktop/views/components/notes.note.vue
index 87acf7974d..7592ae3905 100644
--- a/src/client/app/desktop/views/components/notes.note.vue
+++ b/src/client/app/desktop/views/components/notes.note.vue
@@ -32,7 +32,7 @@
<mk-media-list :media-list="p.media"/>
</div>
<mk-poll v-if="p.poll" :note="p" ref="pollViewer"/>
- <a class="location" v-if="p.geo" :href="`http://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% 位置情報</a>
+ <a class="location" v-if="p.geo" :href="`https://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% 位置情報</a>
<div class="map" v-if="p.geo" ref="map"></div>
<div class="renote" v-if="p.renote">
<mk-note-preview :note="p.renote"/>
diff --git a/src/client/app/desktop/views/components/ui.header.nav.vue b/src/client/app/desktop/views/components/ui.header.nav.vue
index f01aade306..6292b764c6 100644
--- a/src/client/app/desktop/views/components/ui.header.nav.vue
+++ b/src/client/app/desktop/views/components/ui.header.nav.vue
@@ -11,7 +11,7 @@
<li class="deck" :class="{ active: $route.name == 'deck' }" @click="goToTop">
<router-link to="/deck">
%fa:columns%
- <p>%i18n:@deck% <small>(beta)</small></p>
+ <p>%i18n:@deck%</p>
</router-link>
</li>
<li class="messaging">
diff --git a/src/client/app/desktop/views/components/ui.header.vue b/src/client/app/desktop/views/components/ui.header.vue
index 6de4eaf744..ac8a6c7765 100644
--- a/src/client/app/desktop/views/components/ui.header.vue
+++ b/src/client/app/desktop/views/components/ui.header.vue
@@ -1,5 +1,6 @@
<template>
<div class="header">
+ <p class="warn" v-if="env != 'production'">%i18n:common.do-not-use-in-production%</p>
<mk-special-message/>
<div class="main" ref="main">
<div class="backdrop"></div>
@@ -28,6 +29,7 @@
<script lang="ts">
import Vue from 'vue';
import * as anime from 'animejs';
+import { env } from '../../../config';
import XNav from './ui.header.nav.vue';
import XSearch from './ui.header.search.vue';
@@ -43,7 +45,13 @@ export default Vue.extend({
XAccount,
XNotifications,
XPost,
- XClock,
+ XClock
+ },
+
+ data() {
+ return {
+ env: env
+ };
},
mounted() {
@@ -119,6 +127,15 @@ root(isDark)
width 100%
box-shadow 0 1px 1px rgba(#000, 0.075)
+ > .warn
+ display block
+ margin 0
+ padding 4px
+ text-align center
+ font-size 12px
+ background #f00
+ color #fff
+
> .main
height 48px
diff --git a/src/client/app/desktop/views/pages/deck/deck.note.vue b/src/client/app/desktop/views/pages/deck/deck.note.vue
index c7df715a05..e6d062eac9 100644
--- a/src/client/app/desktop/views/pages/deck/deck.note.vue
+++ b/src/client/app/desktop/views/pages/deck/deck.note.vue
@@ -32,7 +32,7 @@
<mk-media-list :media-list="p.media"/>
</div>
<mk-poll v-if="p.poll" :note="p" ref="pollViewer"/>
- <a class="location" v-if="p.geo" :href="`http://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
+ <a class="location" v-if="p.geo" :href="`https://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
<div class="renote" v-if="p.renote">
<mk-note-preview :note="p.renote" :mini="true"/>
</div>
diff --git a/src/client/app/desktop/views/pages/stats/stats.vue b/src/client/app/desktop/views/pages/stats/stats.vue
index 6fcbf069ee..41005b6398 100644
--- a/src/client/app/desktop/views/pages/stats/stats.vue
+++ b/src/client/app/desktop/views/pages/stats/stats.vue
@@ -60,5 +60,5 @@ export default Vue.extend({
font-size 70%
> div
- max-width 800px
+ max-width 850px
</style>
diff --git a/src/client/app/desktop/views/pages/user/user.friends.vue b/src/client/app/desktop/views/pages/user/user.friends.vue
index 4af0f0bca6..516eea0288 100644
--- a/src/client/app/desktop/views/pages/user/user.friends.vue
+++ b/src/client/app/desktop/views/pages/user/user.friends.vue
@@ -40,10 +40,12 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
+root(isDark)
.friends
- background #fff
+ background isDark ? #282C37 : #fff
border solid 1px rgba(#000, 0.075)
border-radius 6px
+ overflow hidden
> .title
z-index 1
@@ -52,7 +54,8 @@ export default Vue.extend({
line-height 42px
font-size 0.9em
font-weight bold
- color #888
+ background isDark ? #313543 : inherit
+ color isDark ? #e3e5e8 : #888
box-shadow 0 1px rgba(#000, 0.07)
> i
@@ -70,7 +73,7 @@ export default Vue.extend({
> .user
padding 16px
- border-bottom solid 1px #eee
+ border-bottom solid 1px isDark ? #21242f : #eee
&:last-child
border-bottom none
@@ -96,18 +99,24 @@ export default Vue.extend({
margin 0
font-size 16px
line-height 24px
- color #555
+ color isDark ? #ccc : #555
> .username
display block
margin 0
font-size 15px
line-height 16px
- color #ccc
+ color isDark ? #555 : #ccc
> .mk-follow-button
position absolute
top 16px
right 16px
+.friends[data-darkmode]
+ root(true)
+
+.friends:not([data-darkmode])
+ root(false)
+
</style>
diff --git a/src/client/app/desktop/views/pages/user/user.photos.vue b/src/client/app/desktop/views/pages/user/user.photos.vue
index ce7791a96b..8397e56484 100644
--- a/src/client/app/desktop/views/pages/user/user.photos.vue
+++ b/src/client/app/desktop/views/pages/user/user.photos.vue
@@ -39,10 +39,12 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
+root(isDark)
.photos
- background #fff
+ background isDark ? #282C37 : #fff
border solid 1px rgba(#000, 0.075)
border-radius 6px
+ overflow hidden
> .title
z-index 1
@@ -51,7 +53,8 @@ export default Vue.extend({
line-height 42px
font-size 0.9em
font-weight bold
- color #888
+ background: isDark ? #313543 : inherit
+ color isDark ? #e3e5e8 : #888
box-shadow 0 1px rgba(#000, 0.07)
> i
@@ -85,4 +88,10 @@ export default Vue.extend({
> i
margin-right 4px
+.photos[data-darkmode]
+ root(true)
+
+.photos:not([data-darkmode])
+ root(false)
+
</style>
diff --git a/src/client/app/desktop/views/pages/user/user.vue b/src/client/app/desktop/views/pages/user/user.vue
index 300fd68f06..afb5e674d9 100644
--- a/src/client/app/desktop/views/pages/user/user.vue
+++ b/src/client/app/desktop/views/pages/user/user.vue
@@ -138,7 +138,7 @@ root(isDark)
padding 16px
font-size 12px
color #aaa
- background #fff
+ background isDark ? #21242f : #fff
border solid 1px rgba(#000, 0.075)
border-radius 6px
diff --git a/src/client/app/init.ts b/src/client/app/init.ts
index 18f510ea24..cf97957400 100644
--- a/src/client/app/init.ts
+++ b/src/client/app/init.ts
@@ -19,8 +19,8 @@ import { version, codename, lang } from './config';
let elementLocale;
switch (lang) {
- case 'ja': elementLocale = ElementLocaleJa; break;
- case 'en': elementLocale = ElementLocaleEn; break;
+ case 'ja-JP': elementLocale = ElementLocaleJa; break;
+ case 'en-US': elementLocale = ElementLocaleEn; break;
default: elementLocale = ElementLocaleEn; break;
}
diff --git a/src/client/app/mobile/views/components/note-detail.vue b/src/client/app/mobile/views/components/note-detail.vue
index 317f08dcfa..f9996f9da6 100644
--- a/src/client/app/mobile/views/components/note-detail.vue
+++ b/src/client/app/mobile/views/components/note-detail.vue
@@ -45,7 +45,7 @@
</div>
<mk-poll v-if="p.poll" :note="p"/>
<mk-url-preview v-for="url in urls" :url="url" :key="url" :detail="true"/>
- <a class="location" v-if="p.geo" :href="`http://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
+ <a class="location" v-if="p.geo" :href="`https://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
<div class="map" v-if="p.geo" ref="map"></div>
<div class="renote" v-if="p.renote">
<mk-note-preview :note="p.renote"/>
diff --git a/src/client/app/mobile/views/components/note.vue b/src/client/app/mobile/views/components/note.vue
index 8fc8af7f8d..d0cea135f9 100644
--- a/src/client/app/mobile/views/components/note.vue
+++ b/src/client/app/mobile/views/components/note.vue
@@ -33,7 +33,7 @@
</div>
<mk-poll v-if="p.poll" :note="p" ref="pollViewer"/>
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
- <a class="location" v-if="p.geo" :href="`http://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
+ <a class="location" v-if="p.geo" :href="`https://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
<div class="map" v-if="p.geo" ref="map"></div>
<div class="renote" v-if="p.renote">
<mk-note-preview :note="p.renote"/>
diff --git a/src/client/app/mobile/views/components/ui.header.vue b/src/client/app/mobile/views/components/ui.header.vue
index a616586c56..c9b3ab51ae 100644
--- a/src/client/app/mobile/views/components/ui.header.vue
+++ b/src/client/app/mobile/views/components/ui.header.vue
@@ -1,5 +1,6 @@
<template>
-<div class="header">
+<div class="header" ref="root">
+ <p class="warn" v-if="env != 'production'">%i18n:common.do-not-use-in-production%</p>
<mk-special-message/>
<div class="main" ref="main">
<div class="backdrop"></div>
@@ -20,6 +21,7 @@
<script lang="ts">
import Vue from 'vue';
import * as anime from 'animejs';
+import { env } from '../../../config';
export default Vue.extend({
props: ['func'],
@@ -27,7 +29,8 @@ export default Vue.extend({
return {
hasGameInvitation: false,
connection: null,
- connectionId: null
+ connectionId: null,
+ env: env
};
},
computed: {
@@ -39,7 +42,7 @@ export default Vue.extend({
}
},
mounted() {
- this.$store.commit('setUiHeaderHeight', 48);
+ this.$store.commit('setUiHeaderHeight', this.$refs.root.offsetHeight);
if (this.$store.getters.isSignedIn) {
this.connection = (this as any).os.stream.getConnection();
@@ -133,6 +136,15 @@ root(isDark)
height 3px
background $theme-color
+ > .warn
+ display block
+ margin 0
+ padding 4px
+ text-align center
+ font-size 12px
+ background #f00
+ color #fff
+
> .main
color rgba(#fff, 0.9)
diff --git a/src/client/app/mobile/views/components/ui.vue b/src/client/app/mobile/views/components/ui.vue
index 7e2d39f259..d2af15d235 100644
--- a/src/client/app/mobile/views/components/ui.vue
+++ b/src/client/app/mobile/views/components/ui.vue
@@ -31,7 +31,14 @@ export default Vue.extend({
connectionId: null
};
},
+ watch: {
+ '$store.state.uiHeaderHeight'() {
+ this.$el.style.paddingTop = this.$store.state.uiHeaderHeight + 'px';
+ }
+ },
mounted() {
+ this.$el.style.paddingTop = this.$store.state.uiHeaderHeight + 'px';
+
if (this.$store.getters.isSignedIn) {
this.connection = (this as any).os.stream.getConnection();
this.connectionId = (this as any).os.stream.use();
diff --git a/src/client/app/mobile/views/pages/settings.vue b/src/client/app/mobile/views/pages/settings.vue
index 6b82be099d..7437eb8b47 100644
--- a/src/client/app/mobile/views/pages/settings.vue
+++ b/src/client/app/mobile/views/pages/settings.vue
@@ -42,6 +42,12 @@
</ui-card>
<ui-card>
+ <div slot="title">%fa:volume-up% %i18n:@sound%</div>
+
+ <ui-switch v-model="enableSounds">%i18n:@enable-sounds%</ui-switch>
+ </ui-card>
+
+ <ui-card>
<div slot="title">%fa:language% %i18n:@lang%</div>
<ui-select v-model="lang" placeholder="%i18n:@auto%">
@@ -142,6 +148,11 @@ export default Vue.extend({
get() { return this.$store.state.device.lang; },
set(value) { this.$store.commit('device/set', { key: 'lang', value }); }
},
+
+ enableSounds: {
+ get() { return this.$store.state.device.enableSounds; },
+ set(value) { this.$store.commit('device/set', { key: 'enableSounds', value }); }
+ },
},
mounted() {
diff --git a/src/client/app/store.ts b/src/client/app/store.ts
index 0f3ff4a380..469563495f 100644
--- a/src/client/app/store.ts
+++ b/src/client/app/store.ts
@@ -13,7 +13,7 @@ const defaultSettings = {
showMaps: true,
showPostFormOnTopOfTl: false,
suggestRecentHashtags: true,
- showClockOnHeader: false,
+ showClockOnHeader: true,
circleIcons: true,
gradientWindowHeader: false,
showReplyTarget: true,