summaryrefslogtreecommitdiff
path: root/src/client/app/mobile
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/mobile
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/mobile')
-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
5 files changed, 35 insertions, 5 deletions
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() {