summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-05-05 20:33:44 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-05-05 20:33:44 +0900
commit1092532292bb07c49102db5529c2035de1c36078 (patch)
treec6c5855ccd42c6cfb3c429544d6490e7457c7dcf /src/client
parentMerge branch 'develop' (diff)
parent11.11.0 (diff)
downloadmisskey-1092532292bb07c49102db5529c2035de1c36078.tar.gz
misskey-1092532292bb07c49102db5529c2035de1c36078.tar.bz2
misskey-1092532292bb07c49102db5529c2035de1c36078.zip
Merge branch 'develop'
Diffstat (limited to 'src/client')
-rw-r--r--src/client/app/app.styl2
-rw-r--r--src/client/app/auth/views/index.vue2
-rw-r--r--src/client/app/common/hotkey.ts2
-rw-r--r--src/client/app/common/scripts/should-mute-note.ts6
-rw-r--r--src/client/app/common/views/components/analog-clock.vue2
-rw-r--r--src/client/app/common/views/components/messaging.vue2
-rw-r--r--src/client/app/common/views/components/page-editor/page-editor.blocks.vue2
-rw-r--r--src/client/app/common/views/components/page-editor/page-editor.vue6
-rw-r--r--src/client/app/common/views/components/settings/integration.vue6
-rw-r--r--src/client/app/common/views/components/settings/theme.vue2
-rw-r--r--src/client/app/common/views/components/signin.vue6
-rw-r--r--src/client/app/common/views/components/ui/input.vue2
-rw-r--r--src/client/app/common/views/components/user-list.vue2
-rw-r--r--src/client/app/common/views/deck/deck.column.vue2
-rw-r--r--src/client/app/common/views/deck/deck.user-column.vue2
-rw-r--r--src/client/app/common/views/directives/autocomplete.ts4
-rw-r--r--src/client/app/common/views/pages/page/page.vue2
-rw-r--r--src/client/app/desktop/views/components/drive.vue9
-rw-r--r--src/client/app/desktop/views/components/notes.vue2
-rw-r--r--src/client/app/desktop/views/components/post-form.vue2
-rw-r--r--src/client/app/desktop/views/components/window.vue2
-rw-r--r--src/client/app/desktop/views/pages/welcome.vue2
-rw-r--r--src/client/app/mios.ts2
-rw-r--r--src/client/app/mobile/views/components/drive.vue15
-rw-r--r--src/client/app/mobile/views/components/notes.vue2
-rw-r--r--src/client/app/mobile/views/components/notifications.vue2
-rw-r--r--src/client/app/mobile/views/components/post-form.vue4
-rw-r--r--src/client/app/mobile/views/components/ui.header.vue2
-rw-r--r--src/client/app/reset.styl2
-rw-r--r--src/client/app/store.ts2
30 files changed, 57 insertions, 43 deletions
diff --git a/src/client/app/app.styl b/src/client/app/app.styl
index a98ece7a51..6389aa0a87 100644
--- a/src/client/app/app.styl
+++ b/src/client/app/app.styl
@@ -34,7 +34,7 @@ body
.peg
display block
position absolute
- right 0px
+ right 0
width 100px
height 100%
box-shadow 0 0 10px var(--primary), 0 0 5px var(--primary)
diff --git a/src/client/app/auth/views/index.vue b/src/client/app/auth/views/index.vue
index 9bf2acba72..ad9b1e4e35 100644
--- a/src/client/app/auth/views/index.vue
+++ b/src/client/app/auth/views/index.vue
@@ -98,7 +98,7 @@ export default Vue.extend({
margin 0 auto
text-align center
background #fff
- box-shadow 0px 4px 16px rgba(#000, 0.2)
+ box-shadow 0 4px 16px rgba(#000, 0.2)
> .fetching
margin 0
diff --git a/src/client/app/common/hotkey.ts b/src/client/app/common/hotkey.ts
index b2afd57ae3..a53d3f479e 100644
--- a/src/client/app/common/hotkey.ts
+++ b/src/client/app/common/hotkey.ts
@@ -52,7 +52,7 @@ function match(e: KeyboardEvent, patterns: action['patterns']): boolean {
pattern.ctrl == e.ctrlKey &&
pattern.shift == e.shiftKey &&
pattern.alt == e.altKey &&
- e.metaKey == false
+ !e.metaKey
);
}
diff --git a/src/client/app/common/scripts/should-mute-note.ts b/src/client/app/common/scripts/should-mute-note.ts
index c5f1898942..8fd7888628 100644
--- a/src/client/app/common/scripts/should-mute-note.ts
+++ b/src/client/app/common/scripts/should-mute-note.ts
@@ -11,9 +11,9 @@ export default function(me, settings, note) {
return (
(!isMyNote && note.reply && includesMutedWords(note.reply.text)) ||
(!isMyNote && note.renote && includesMutedWords(note.renote.text)) ||
- (settings.showMyRenotes === false && isMyNote && isPureRenote) ||
- (settings.showRenotedMyNotes === false && isPureRenote && note.renote.userId == me.id) ||
- (settings.showLocalRenotes === false && isPureRenote && note.renote.user.host == null) ||
+ (!settings.showMyRenotes && isMyNote && isPureRenote) ||
+ (!settings.showRenotedMyNotes && isPureRenote && note.renote.userId == me.id) ||
+ (!settings.showLocalRenotes && isPureRenote && note.renote.user.host == null) ||
(!isMyNote && includesMutedWords(note.text))
);
}
diff --git a/src/client/app/common/views/components/analog-clock.vue b/src/client/app/common/views/components/analog-clock.vue
index 4ba578a1a4..5eb7ffd153 100644
--- a/src/client/app/common/views/components/analog-clock.vue
+++ b/src/client/app/common/views/components/analog-clock.vue
@@ -80,7 +80,7 @@ export default Vue.extend({
ms(): number {
return this.now.getMilliseconds() * this.smooth;
- }
+ },
s(): number {
return this.now.getSeconds();
},
diff --git a/src/client/app/common/views/components/messaging.vue b/src/client/app/common/views/components/messaging.vue
index 957fd389d9..f884a599d7 100644
--- a/src/client/app/common/views/components/messaging.vue
+++ b/src/client/app/common/views/components/messaging.vue
@@ -202,7 +202,7 @@ export default Vue.extend({
left 0
z-index 1
width 100%
- box-shadow 0 0px 2px rgba(#000, 0.2)
+ box-shadow 0 0 2px rgba(#000, 0.2)
> .form
background rgba(0, 0, 0, 0.02)
diff --git a/src/client/app/common/views/components/page-editor/page-editor.blocks.vue b/src/client/app/common/views/components/page-editor/page-editor.blocks.vue
index 379c960ee1..c5f3419e7b 100644
--- a/src/client/app/common/views/components/page-editor/page-editor.blocks.vue
+++ b/src/client/app/common/views/components/page-editor/page-editor.blocks.vue
@@ -14,7 +14,7 @@ import XImage from './els/page-editor.el.image.vue';
import XButton from './els/page-editor.el.button.vue';
import XTextInput from './els/page-editor.el.text-input.vue';
import XTextareaInput from './els/page-editor.el.textarea-input.vue';
-import XNumberInput from './els/page-editor.el.text-input.vue';
+import XNumberInput from './els/page-editor.el.number-input.vue';
import XSwitch from './els/page-editor.el.switch.vue';
import XIf from './els/page-editor.el.if.vue';
import XPost from './els/page-editor.el.post.vue';
diff --git a/src/client/app/common/views/components/page-editor/page-editor.vue b/src/client/app/common/views/components/page-editor/page-editor.vue
index d70049121d..a3c21322af 100644
--- a/src/client/app/common/views/components/page-editor/page-editor.vue
+++ b/src/client/app/common/views/components/page-editor/page-editor.vue
@@ -36,10 +36,10 @@
</ui-select>
<div class="eyeCatch">
- <ui-button v-if="eyeCatchingImageId == null && !readonly" @click="setEyeCatchingImage()"><fa :icon="faPlus"/> {{ $t('set-eye-catchig-image') }}</ui-button>
+ <ui-button v-if="eyeCatchingImageId == null && !readonly" @click="setEyeCatchingImage()"><fa :icon="faPlus"/> {{ $t('set-eye-catching-image') }}</ui-button>
<div v-else-if="eyeCatchingImage">
<img :src="eyeCatchingImage.url" :alt="eyeCatchingImage.name"/>
- <ui-button @click="removeEyeCatchingImage()" v-if="!readonly"><fa :icon="faTrashAlt"/> {{ $t('remove-eye-catchig-image') }}</ui-button>
+ <ui-button @click="removeEyeCatchingImage()" v-if="!readonly"><fa :icon="faTrashAlt"/> {{ $t('remove-eye-catching-image') }}</ui-button>
</div>
</div>
</template>
@@ -337,7 +337,7 @@ export default Vue.extend({
getScriptBlockList(type: string = null) {
const list = [];
- const blocks = blockDefs.filter(block => type === null || block.out === null || block.out === type);
+ const blocks = blockDefs.filter(block => type === null || block.out === null || block.out === type || typeof block.out === 'number');
for (const block of blocks) {
const category = list.find(x => x.category === block.category);
diff --git a/src/client/app/common/views/components/settings/integration.vue b/src/client/app/common/views/components/settings/integration.vue
index b91880679f..8ac0c134c0 100644
--- a/src/client/app/common/views/components/settings/integration.vue
+++ b/src/client/app/common/views/components/settings/integration.vue
@@ -54,7 +54,11 @@ export default Vue.extend({
},
mounted() {
- document.cookie = `i=${this.$store.state.i.token}`;
+ if (!document.cookie.match(/i=(\w+)/)) {
+ document.cookie = `i=${this.$store.state.i.token}; path=/;` +
+ ` domain=${document.location.hostname}; max-age=31536000;` +
+ (document.location.protocol.startsWith('https') ? ' secure' : '');
+ }
this.$watch('$store.state.i', () => {
if (this.$store.state.i.twitter) {
if (this.twitterForm) this.twitterForm.close();
diff --git a/src/client/app/common/views/components/settings/theme.vue b/src/client/app/common/views/components/settings/theme.vue
index 3440aacb28..b1f7b2bc49 100644
--- a/src/client/app/common/views/components/settings/theme.vue
+++ b/src/client/app/common/views/components/settings/theme.vue
@@ -273,7 +273,7 @@ export default Vue.extend({
import_() {
(this.$refs.file as any).click();
- }
+ },
export_() {
const blob = new Blob([this.selectedThemeCode], {
diff --git a/src/client/app/common/views/components/signin.vue b/src/client/app/common/views/components/signin.vue
index e05085cdbf..671158a113 100644
--- a/src/client/app/common/views/components/signin.vue
+++ b/src/client/app/common/views/components/signin.vue
@@ -15,9 +15,9 @@
<template #prefix><fa icon="gavel"/></template>
</ui-input>
<ui-button type="submit" :disabled="signing">{{ signing ? $t('signing-in') : $t('@.signin') }}</ui-button>
- <p v-if="meta && meta.enableTwitterIntegration" style="margin: 8px 0;"><a :href="`${apiUrl}/signin/twitter`">{{ $t('signin-with-twitter') }}</a></p>
- <p v-if="meta && meta.enableGithubIntegration" style="margin: 8px 0;"><a :href="`${apiUrl}/signin/github`">{{ $t('signin-with-github') }}</a></p>
- <p v-if="meta && meta.enableDiscordIntegration" style="margin: 8px 0;"><a :href="`${apiUrl}/signin/discord`">{{ $t('signin-with-discord') /* TODO: Make these layouts better */ }}</a></p>
+ <p v-if="meta && meta.enableTwitterIntegration" style="margin: 8px 0;"><a :href="`${apiUrl}/signin/twitter`"><fa :icon="['fab', 'twitter']"/> {{ $t('signin-with-twitter') }}</a></p>
+ <p v-if="meta && meta.enableGithubIntegration" style="margin: 8px 0;"><a :href="`${apiUrl}/signin/github`"><fa :icon="['fab', 'github']"/> {{ $t('signin-with-github') }}</a></p>
+ <p v-if="meta && meta.enableDiscordIntegration" style="margin: 8px 0;"><a :href="`${apiUrl}/signin/discord`"><fa :icon="['fab', 'discord']"/> {{ $t('signin-with-discord') /* TODO: Make these layouts better */ }}</a></p>
</form>
</template>
diff --git a/src/client/app/common/views/components/ui/input.vue b/src/client/app/common/views/components/ui/input.vue
index a841ecca11..dd0912f833 100644
--- a/src/client/app/common/views/components/ui/input.vue
+++ b/src/client/app/common/views/components/ui/input.vue
@@ -322,7 +322,7 @@ root(fill)
> .value
display block
- width 0%
+ width 0
height 100%
background transparent
border-radius 6px
diff --git a/src/client/app/common/views/components/user-list.vue b/src/client/app/common/views/components/user-list.vue
index 53577bad00..6761886b09 100644
--- a/src/client/app/common/views/components/user-list.vue
+++ b/src/client/app/common/views/components/user-list.vue
@@ -166,7 +166,7 @@ export default Vue.extend({
> .follow-button
position absolute
top 8px
- right 0px
+ right 0
> .more
display block
diff --git a/src/client/app/common/views/deck/deck.column.vue b/src/client/app/common/views/deck/deck.column.vue
index fcf9c506bb..eaa344d36f 100644
--- a/src/client/app/common/views/deck/deck.column.vue
+++ b/src/client/app/common/views/deck/deck.column.vue
@@ -160,7 +160,7 @@ export default Vue.extend({
this.$emit('top');
}
- if (this.$store.state.settings.fetchOnScroll !== false) {
+ if (this.$store.state.settings.fetchOnScroll) {
const current = this.$refs.body.scrollTop + this.$refs.body.clientHeight;
if (current > this.$refs.body.scrollHeight - 1) this.$emit('bottom');
}
diff --git a/src/client/app/common/views/deck/deck.user-column.vue b/src/client/app/common/views/deck/deck.user-column.vue
index fb50d880eb..8d1b458a84 100644
--- a/src/client/app/common/views/deck/deck.user-column.vue
+++ b/src/client/app/common/views/deck/deck.user-column.vue
@@ -205,7 +205,7 @@ export default Vue.extend({
top -32px
left 0
right 0
- width 0px
+ width 0
margin 0 auto
border-top solid 16px transparent
border-left solid 16px transparent
diff --git a/src/client/app/common/views/directives/autocomplete.ts b/src/client/app/common/views/directives/autocomplete.ts
index 7f8e409a7c..40fe06c19a 100644
--- a/src/client/app/common/views/directives/autocomplete.ts
+++ b/src/client/app/common/views/directives/autocomplete.ts
@@ -102,7 +102,7 @@ class Autocomplete {
}
}
- if (isHashtag && opened == false) {
+ if (isHashtag && !opened) {
const hashtag = text.substr(hashtagIndex + 1);
if (!hashtag.includes(' ')) {
this.open('hashtag', hashtag);
@@ -110,7 +110,7 @@ class Autocomplete {
}
}
- if (isEmoji && opened == false) {
+ if (isEmoji && !opened) {
const emoji = text.substr(emojiIndex + 1);
if (!emoji.includes(' ')) {
this.open('emoji', emoji);
diff --git a/src/client/app/common/views/pages/page/page.vue b/src/client/app/common/views/pages/page/page.vue
index 29853f95b8..29580fab64 100644
--- a/src/client/app/common/views/pages/page/page.vue
+++ b/src/client/app/common/views/pages/page/page.vue
@@ -47,7 +47,7 @@ class Script {
public interpolate(str: string) {
if (str == null) return null;
- return str.replace(/\{(.+?)\}/g, match => {
+ return str.replace(/{(.+?)}/g, match => {
const v = this.vars[match.slice(1, -1).trim()];
return v == null ? 'NULL' : v.toString();
});
diff --git a/src/client/app/desktop/views/components/drive.vue b/src/client/app/desktop/views/components/drive.vue
index 48443669ac..4b64d4f22a 100644
--- a/src/client/app/desktop/views/components/drive.vue
+++ b/src/client/app/desktop/views/components/drive.vue
@@ -750,12 +750,17 @@ export default Vue.extend({
bottom 0
animation-delay -1.0s
- @keyframes sk-rotate { 100% { transform: rotate(360deg); }}
+ @keyframes sk-rotate {
+ 100% {
+ transform: rotate(360deg);
+ }
+ }
@keyframes sk-bounce {
0%, 100% {
transform: scale(0.0);
- } 50% {
+ }
+ 50% {
transform: scale(1.0);
}
}
diff --git a/src/client/app/desktop/views/components/notes.vue b/src/client/app/desktop/views/components/notes.vue
index a3ca6fe44b..8a77a4560c 100644
--- a/src/client/app/desktop/views/components/notes.vue
+++ b/src/client/app/desktop/views/components/notes.vue
@@ -181,7 +181,7 @@ export default Vue.extend({
this.releaseQueue();
}
- if (this.$store.state.settings.fetchOnScroll !== false) {
+ if (this.$store.state.settings.fetchOnScroll) {
const current = window.scrollY + window.innerHeight;
if (current > document.body.offsetHeight - 8) this.fetchMore();
}
diff --git a/src/client/app/desktop/views/components/post-form.vue b/src/client/app/desktop/views/components/post-form.vue
index 1f33ea01fe..0307ff305e 100644
--- a/src/client/app/desktop/views/components/post-form.vue
+++ b/src/client/app/desktop/views/components/post-form.vue
@@ -377,7 +377,7 @@ export default Vue.extend({
}, err => {
this.$root.dialog({
type: 'error',
- title: this.$t('error')
+ title: this.$t('error'),
text: err.message
});
}, {
diff --git a/src/client/app/desktop/views/components/window.vue b/src/client/app/desktop/views/components/window.vue
index 23ccf28862..95d9e2feff 100644
--- a/src/client/app/desktop/views/components/window.vue
+++ b/src/client/app/desktop/views/components/window.vue
@@ -480,7 +480,7 @@ export default Vue.extend({
&:focus
&:not([data-is-modal])
> .body
- box-shadow 0 0 0px 1px var(--primaryAlpha05), 0 2px 12px 0 var(--desktopWindowShadow)
+ box-shadow 0 0 0 1px var(--primaryAlpha05), 0 2px 12px 0 var(--desktopWindowShadow)
> .handle
$size = 8px
diff --git a/src/client/app/desktop/views/pages/welcome.vue b/src/client/app/desktop/views/pages/welcome.vue
index d7af82cd8d..091377181b 100644
--- a/src/client/app/desktop/views/pages/welcome.vue
+++ b/src/client/app/desktop/views/pages/welcome.vue
@@ -352,7 +352,7 @@ export default Vue.extend({
padding 0 16px
line-height 48px
background var(--faceHeader)
- box-shadow 0 1px 0px rgba(0, 0, 0, 0.1)
+ box-shadow 0 1px 0 rgba(0, 0, 0, 0.1)
& + div
max-height calc(100% - 48px)
diff --git a/src/client/app/mios.ts b/src/client/app/mios.ts
index 3ebee35804..fb1e7e13ec 100644
--- a/src/client/app/mios.ts
+++ b/src/client/app/mios.ts
@@ -505,7 +505,7 @@ class WindowSystem extends EventEmitter {
function urlBase64ToUint8Array(base64String: string): Uint8Array {
const padding = '='.repeat((4 - base64String.length % 4) % 4);
const base64 = (base64String + padding)
- .replace(/\-/g, '+')
+ .replace(/-/g, '+')
.replace(/_/g, '/');
const rawData = window.atob(base64);
diff --git a/src/client/app/mobile/views/components/drive.vue b/src/client/app/mobile/views/components/drive.vue
index b79c0b3806..2613cfff99 100644
--- a/src/client/app/mobile/views/components/drive.vue
+++ b/src/client/app/mobile/views/components/drive.vue
@@ -83,7 +83,7 @@ export default Vue.extend({
hierarchyFolders: [],
selectedFiles: [],
info: null,
- connection: null
+ connection: null,
fetching: true,
fetchingMoreFiles: false,
@@ -385,7 +385,7 @@ export default Vue.extend({
createFolder() {
this.$root.dialog({
- title: this.$t('folder-name')
+ title: this.$t('folder-name'),
input: {
default: this.folder.name
}
@@ -415,7 +415,7 @@ export default Vue.extend({
return;
}
this.$root.dialog({
- title: this.$t('folder-name')
+ title: this.$t('folder-name'),
input: {
default: this.folder.name
}
@@ -597,12 +597,17 @@ export default Vue.extend({
bottom 0
animation-delay -1.0s
- @keyframes sk-rotate { 100% { transform: rotate(360deg); }}
+ @keyframes sk-rotate {
+ 100% {
+ transform: rotate(360deg);
+ }
+ }
@keyframes sk-bounce {
0%, 100% {
transform: scale(0.0);
- } 50% {
+ }
+ 50% {
transform: scale(1.0);
}
}
diff --git a/src/client/app/mobile/views/components/notes.vue b/src/client/app/mobile/views/components/notes.vue
index a77f9a0786..6cba1f4e28 100644
--- a/src/client/app/mobile/views/components/notes.vue
+++ b/src/client/app/mobile/views/components/notes.vue
@@ -175,7 +175,7 @@ export default Vue.extend({
this.releaseQueue();
}
- if (this.$store.state.settings.fetchOnScroll !== false) {
+ if (this.$store.state.settings.fetchOnScroll) {
// 親要素が display none だったら弾く
// https://github.com/syuilo/misskey/issues/1569
// http://d.hatena.ne.jp/favril/20091105/1257403319
diff --git a/src/client/app/mobile/views/components/notifications.vue b/src/client/app/mobile/views/components/notifications.vue
index b129ad54aa..a0edab65ec 100644
--- a/src/client/app/mobile/views/components/notifications.vue
+++ b/src/client/app/mobile/views/components/notifications.vue
@@ -115,7 +115,7 @@ export default Vue.extend({
},
onScroll() {
- if (this.$store.state.settings.fetchOnScroll !== false) {
+ if (this.$store.state.settings.fetchOnScroll) {
// 親要素が display none だったら弾く
// https://github.com/syuilo/misskey/issues/1569
// http://d.hatena.ne.jp/favril/20091105/1257403319
diff --git a/src/client/app/mobile/views/components/post-form.vue b/src/client/app/mobile/views/components/post-form.vue
index 82cbdcc547..326ff57c1f 100644
--- a/src/client/app/mobile/views/components/post-form.vue
+++ b/src/client/app/mobile/views/components/post-form.vue
@@ -295,7 +295,7 @@ export default Vue.extend({
}, err => {
this.$root.dialog({
type: 'error',
- title: this.$t('error')
+ title: this.$t('error'),
text: err.message
});
}, {
@@ -341,7 +341,7 @@ export default Vue.extend({
post() {
this.posting = true;
- const viaMobile = this.$store.state.settings.disableViaMobile !== true;
+ const viaMobile = !this.$store.state.settings.disableViaMobile;
this.$root.api('notes/create', {
text: this.text == '' ? undefined : this.text,
fileIds: this.files.length > 0 ? this.files.map(f => f.id) : undefined,
diff --git a/src/client/app/mobile/views/components/ui.header.vue b/src/client/app/mobile/views/components/ui.header.vue
index 068679567d..b636041d63 100644
--- a/src/client/app/mobile/views/components/ui.header.vue
+++ b/src/client/app/mobile/views/components/ui.header.vue
@@ -49,7 +49,7 @@ export default Vue.extend({
padding 0 8px
&.shadow
- box-shadow 0 0px 8px rgba(0, 0, 0, 0.25)
+ box-shadow 0 0 8px rgba(0, 0, 0, 0.25)
&, *
user-select none
diff --git a/src/client/app/reset.styl b/src/client/app/reset.styl
index 13a4eaf8d2..8128f1ed23 100644
--- a/src/client/app/reset.styl
+++ b/src/client/app/reset.styl
@@ -1,5 +1,5 @@
input
- min-width 0px
+ min-width 0
input:not([type])
input[type='text']
diff --git a/src/client/app/store.ts b/src/client/app/store.ts
index a6f2a0b00b..b137f79989 100644
--- a/src/client/app/store.ts
+++ b/src/client/app/store.ts
@@ -126,7 +126,7 @@ export default (os: MiOS) => new Vuex.Store({
logout(ctx) {
ctx.commit('updateI', null);
- document.cookie = 'i=;';
+ document.cookie = `i=; max-age=0; domain=${document.location.hostname}`;
localStorage.removeItem('i');
},