summaryrefslogtreecommitdiff
path: root/src/web/app/mobile
diff options
context:
space:
mode:
authorこぴなたみぽ <syuilotan@yahoo.co.jp>2018-02-07 18:17:59 +0900
committerこぴなたみぽ <syuilotan@yahoo.co.jp>2018-02-07 18:17:59 +0900
commit07efc8e1504450b4eb6bc29f43986a9d538d0680 (patch)
tree8faf4958438cfad54383fc2df06bd2496e7acdc1 /src/web/app/mobile
parentwip (diff)
downloadmisskey-07efc8e1504450b4eb6bc29f43986a9d538d0680.tar.gz
misskey-07efc8e1504450b4eb6bc29f43986a9d538d0680.tar.bz2
misskey-07efc8e1504450b4eb6bc29f43986a9d538d0680.zip
wip
Diffstat (limited to 'src/web/app/mobile')
-rw-r--r--src/web/app/mobile/tags/drive-folder-selector.tag2
-rw-r--r--src/web/app/mobile/tags/drive-selector.tag4
-rw-r--r--src/web/app/mobile/tags/drive.tag6
-rw-r--r--src/web/app/mobile/tags/drive/file-viewer.tag2
-rw-r--r--src/web/app/mobile/tags/home-timeline.tag6
-rw-r--r--src/web/app/mobile/tags/home.tag2
-rw-r--r--src/web/app/mobile/tags/page/drive.tag14
-rw-r--r--src/web/app/mobile/tags/page/home.tag2
-rw-r--r--src/web/app/mobile/tags/page/messaging.tag2
-rw-r--r--src/web/app/mobile/tags/page/notifications.tag2
-rw-r--r--src/web/app/mobile/tags/page/search.tag2
-rw-r--r--src/web/app/mobile/tags/page/selectdrive.tag6
-rw-r--r--src/web/app/mobile/tags/page/settings/profile.tag8
-rw-r--r--src/web/app/mobile/tags/page/user-followers.tag2
-rw-r--r--src/web/app/mobile/tags/page/user-following.tag2
-rw-r--r--src/web/app/mobile/tags/page/user.tag2
-rw-r--r--src/web/app/mobile/tags/post-detail.tag10
-rw-r--r--src/web/app/mobile/tags/post-form.tag22
-rw-r--r--src/web/app/mobile/tags/search.tag2
-rw-r--r--src/web/app/mobile/tags/sub-post-content.tag4
-rw-r--r--src/web/app/mobile/tags/timeline.tag14
-rw-r--r--src/web/app/mobile/tags/ui.tag4
-rw-r--r--src/web/app/mobile/tags/user-followers.tag2
-rw-r--r--src/web/app/mobile/tags/user-following.tag2
-rw-r--r--src/web/app/mobile/tags/user-timeline.tag2
25 files changed, 63 insertions, 63 deletions
diff --git a/src/web/app/mobile/tags/drive-folder-selector.tag b/src/web/app/mobile/tags/drive-folder-selector.tag
index 82e22fed29..37d571d731 100644
--- a/src/web/app/mobile/tags/drive-folder-selector.tag
+++ b/src/web/app/mobile/tags/drive-folder-selector.tag
@@ -62,7 +62,7 @@
};
this.ok = () => {
- this.trigger('selected', this.refs.browser.folder);
+ this.trigger('selected', this.$refs.browser.folder);
this.unmount();
};
</script>
diff --git a/src/web/app/mobile/tags/drive-selector.tag b/src/web/app/mobile/tags/drive-selector.tag
index 36fed8c327..ab67cc80c0 100644
--- a/src/web/app/mobile/tags/drive-selector.tag
+++ b/src/web/app/mobile/tags/drive-selector.tag
@@ -63,13 +63,13 @@
this.files = [];
this.on('mount', () => {
- this.refs.browser.on('change-selection', files => {
+ this.$refs.browser.on('change-selection', files => {
this.update({
files: files
});
});
- this.refs.browser.on('selected', file => {
+ this.$refs.browser.on('selected', file => {
this.trigger('selected', file);
this.unmount();
});
diff --git a/src/web/app/mobile/tags/drive.tag b/src/web/app/mobile/tags/drive.tag
index d3ca1aff90..3d0396692d 100644
--- a/src/web/app/mobile/tags/drive.tag
+++ b/src/web/app/mobile/tags/drive.tag
@@ -209,7 +209,7 @@
}
if (this.opts.isNaked) {
- this.refs.nav.style.top = `${this.opts.top}px`;
+ this.$refs.nav.style.top = `${this.opts.top}px`;
}
});
@@ -517,7 +517,7 @@
};
this.selectLocalFile = () => {
- this.refs.file.click();
+ this.$refs.file.click();
};
this.createFolder = () => {
@@ -574,7 +574,7 @@
};
this.changeLocalFile = () => {
- Array.from(this.refs.file.files).forEach(f => this.refs.uploader.upload(f, this.folder));
+ Array.from(this.$refs.file.files).forEach(f => this.$refs.uploader.upload(f, this.folder));
};
</script>
</mk-drive>
diff --git a/src/web/app/mobile/tags/drive/file-viewer.tag b/src/web/app/mobile/tags/drive/file-viewer.tag
index 2d9338fd35..82fbb6609e 100644
--- a/src/web/app/mobile/tags/drive/file-viewer.tag
+++ b/src/web/app/mobile/tags/drive/file-viewer.tag
@@ -243,7 +243,7 @@
this.onImageLoaded = () => {
const self = this;
- EXIF.getData(this.refs.img, function() {
+ EXIF.getData(this.$refs.img, function() {
const allMetaData = EXIF.getAllTags(this);
self.update({
exif: allMetaData
diff --git a/src/web/app/mobile/tags/home-timeline.tag b/src/web/app/mobile/tags/home-timeline.tag
index 397d2b3980..aa3818007b 100644
--- a/src/web/app/mobile/tags/home-timeline.tag
+++ b/src/web/app/mobile/tags/home-timeline.tag
@@ -28,7 +28,7 @@
this.fetch = () => {
this.api('posts/timeline').then(posts => {
- this.refs.timeline.setPosts(posts);
+ this.$refs.timeline.setPosts(posts);
});
};
@@ -47,7 +47,7 @@
this.more = () => {
return this.api('posts/timeline', {
- until_id: this.refs.timeline.tail().id
+ until_id: this.$refs.timeline.tail().id
});
};
@@ -55,7 +55,7 @@
this.update({
isEmpty: false
});
- this.refs.timeline.addPost(post);
+ this.$refs.timeline.addPost(post);
};
this.onStreamFollow = () => {
diff --git a/src/web/app/mobile/tags/home.tag b/src/web/app/mobile/tags/home.tag
index d92e3ae4e5..2c07c286d2 100644
--- a/src/web/app/mobile/tags/home.tag
+++ b/src/web/app/mobile/tags/home.tag
@@ -15,7 +15,7 @@
</style>
<script>
this.on('mount', () => {
- this.refs.tl.on('loaded', () => {
+ this.$refs.tl.on('loaded', () => {
this.trigger('loaded');
});
});
diff --git a/src/web/app/mobile/tags/page/drive.tag b/src/web/app/mobile/tags/page/drive.tag
index 0033ffe653..b5ed3385e1 100644
--- a/src/web/app/mobile/tags/page/drive.tag
+++ b/src/web/app/mobile/tags/page/drive.tag
@@ -15,22 +15,22 @@
ui.trigger('title', '%fa:cloud%%i18n:mobile.tags.mk-drive-page.drive%');
ui.trigger('func', () => {
- this.refs.ui.refs.browser.openContextMenu();
+ this.$refs.ui.refs.browser.openContextMenu();
}, '%fa:ellipsis-h%');
- this.refs.ui.refs.browser.on('begin-fetch', () => {
+ this.$refs.ui.refs.browser.on('begin-fetch', () => {
Progress.start();
});
- this.refs.ui.refs.browser.on('fetched-mid', () => {
+ this.$refs.ui.refs.browser.on('fetched-mid', () => {
Progress.set(0.5);
});
- this.refs.ui.refs.browser.on('fetched', () => {
+ this.$refs.ui.refs.browser.on('fetched', () => {
Progress.done();
});
- this.refs.ui.refs.browser.on('move-root', () => {
+ this.$refs.ui.refs.browser.on('move-root', () => {
const title = 'Misskey Drive';
// Rewrite URL
@@ -40,7 +40,7 @@
ui.trigger('title', '%fa:cloud%%i18n:mobile.tags.mk-drive-page.drive%');
});
- this.refs.ui.refs.browser.on('open-folder', (folder, silent) => {
+ this.$refs.ui.refs.browser.on('open-folder', (folder, silent) => {
const title = folder.name + ' | Misskey Drive';
if (!silent) {
@@ -53,7 +53,7 @@
ui.trigger('title', '%fa:R folder-open%' + folder.name);
});
- this.refs.ui.refs.browser.on('open-file', (file, silent) => {
+ this.$refs.ui.refs.browser.on('open-file', (file, silent) => {
const title = file.name + ' | Misskey Drive';
if (!silent) {
diff --git a/src/web/app/mobile/tags/page/home.tag b/src/web/app/mobile/tags/page/home.tag
index 99cc6b29bf..0c3121a218 100644
--- a/src/web/app/mobile/tags/page/home.tag
+++ b/src/web/app/mobile/tags/page/home.tag
@@ -34,7 +34,7 @@
this.connection.on('post', this.onStreamPost);
document.addEventListener('visibilitychange', this.onVisibilitychange, false);
- this.refs.ui.refs.home.on('loaded', () => {
+ this.$refs.ui.refs.home.on('loaded', () => {
Progress.done();
});
});
diff --git a/src/web/app/mobile/tags/page/messaging.tag b/src/web/app/mobile/tags/page/messaging.tag
index 29e98ce092..76d6103777 100644
--- a/src/web/app/mobile/tags/page/messaging.tag
+++ b/src/web/app/mobile/tags/page/messaging.tag
@@ -15,7 +15,7 @@
document.title = 'Misskey | %i18n:mobile.tags.mk-messaging-page.message%';
ui.trigger('title', '%fa:R comments%%i18n:mobile.tags.mk-messaging-page.message%');
- this.refs.ui.refs.index.on('navigate-user', user => {
+ this.$refs.ui.refs.index.on('navigate-user', user => {
this.page('/i/messaging/' + user.username);
});
});
diff --git a/src/web/app/mobile/tags/page/notifications.tag b/src/web/app/mobile/tags/page/notifications.tag
index 1db9c5d661..596467d476 100644
--- a/src/web/app/mobile/tags/page/notifications.tag
+++ b/src/web/app/mobile/tags/page/notifications.tag
@@ -23,7 +23,7 @@
Progress.start();
- this.refs.ui.refs.notifications.on('fetched', () => {
+ this.$refs.ui.refs.notifications.on('fetched', () => {
Progress.done();
});
});
diff --git a/src/web/app/mobile/tags/page/search.tag b/src/web/app/mobile/tags/page/search.tag
index 5c39d97e51..51c8cce8b5 100644
--- a/src/web/app/mobile/tags/page/search.tag
+++ b/src/web/app/mobile/tags/page/search.tag
@@ -18,7 +18,7 @@
Progress.start();
- this.refs.ui.refs.search.on('loaded', () => {
+ this.$refs.ui.refs.search.on('loaded', () => {
Progress.done();
});
});
diff --git a/src/web/app/mobile/tags/page/selectdrive.tag b/src/web/app/mobile/tags/page/selectdrive.tag
index 42a624a7aa..172a161ec3 100644
--- a/src/web/app/mobile/tags/page/selectdrive.tag
+++ b/src/web/app/mobile/tags/page/selectdrive.tag
@@ -59,12 +59,12 @@
this.on('mount', () => {
document.documentElement.style.background = '#fff';
- this.refs.browser.on('selected', file => {
+ this.$refs.browser.on('selected', file => {
this.files = [file];
this.ok();
});
- this.refs.browser.on('change-selection', files => {
+ this.$refs.browser.on('change-selection', files => {
this.update({
files: files
});
@@ -72,7 +72,7 @@
});
this.upload = () => {
- this.refs.browser.selectLocalFile();
+ this.$refs.browser.selectLocalFile();
};
this.close = () => {
diff --git a/src/web/app/mobile/tags/page/settings/profile.tag b/src/web/app/mobile/tags/page/settings/profile.tag
index cf62c3eb55..5d6c477940 100644
--- a/src/web/app/mobile/tags/page/settings/profile.tag
+++ b/src/web/app/mobile/tags/page/settings/profile.tag
@@ -231,10 +231,10 @@
});
this.api('i/update', {
- name: this.refs.name.value,
- location: this.refs.location.value || null,
- description: this.refs.description.value || null,
- birthday: this.refs.birthday.value || null
+ name: this.$refs.name.value,
+ location: this.$refs.location.value || null,
+ description: this.$refs.description.value || null,
+ birthday: this.$refs.birthday.value || null
}).then(() => {
this.update({
saving: false
diff --git a/src/web/app/mobile/tags/page/user-followers.tag b/src/web/app/mobile/tags/page/user-followers.tag
index cffb2b58c4..a5e63613c6 100644
--- a/src/web/app/mobile/tags/page/user-followers.tag
+++ b/src/web/app/mobile/tags/page/user-followers.tag
@@ -31,7 +31,7 @@
ui.trigger('title', '<img src="' + user.avatar_url + '?thumbnail&size=64">' + '%i18n:mobile.tags.mk-user-followers-page.followers-of%'.replace('{}', user.name));
document.documentElement.style.background = '#313a42';
- this.refs.ui.refs.list.on('loaded', () => {
+ this.$refs.ui.refs.list.on('loaded', () => {
Progress.done();
});
});
diff --git a/src/web/app/mobile/tags/page/user-following.tag b/src/web/app/mobile/tags/page/user-following.tag
index 369cb46422..b4ed107834 100644
--- a/src/web/app/mobile/tags/page/user-following.tag
+++ b/src/web/app/mobile/tags/page/user-following.tag
@@ -31,7 +31,7 @@
ui.trigger('title', '<img src="' + user.avatar_url + '?thumbnail&size=64">' + '%i18n:mobile.tags.mk-user-following-page.following-of%'.replace('{}', user.name));
document.documentElement.style.background = '#313a42';
- this.refs.ui.refs.list.on('loaded', () => {
+ this.$refs.ui.refs.list.on('loaded', () => {
Progress.done();
});
});
diff --git a/src/web/app/mobile/tags/page/user.tag b/src/web/app/mobile/tags/page/user.tag
index 78ca534eb0..8eec733fcd 100644
--- a/src/web/app/mobile/tags/page/user.tag
+++ b/src/web/app/mobile/tags/page/user.tag
@@ -16,7 +16,7 @@
document.documentElement.style.background = '#313a42';
Progress.start();
- this.refs.ui.refs.user.on('loaded', user => {
+ this.$refs.ui.refs.user.on('loaded', user => {
Progress.done();
document.title = user.name + ' | Misskey';
// TODO: ユーザー名をエスケープ
diff --git a/src/web/app/mobile/tags/post-detail.tag b/src/web/app/mobile/tags/post-detail.tag
index 131ea3aa3a..be377d77f5 100644
--- a/src/web/app/mobile/tags/post-detail.tag
+++ b/src/web/app/mobile/tags/post-detail.tag
@@ -273,9 +273,9 @@
if (this.p.text) {
const tokens = this.p.ast;
- this.refs.text.innerHTML = compile(tokens);
+ this.$refs.text.innerHTML = compile(tokens);
- Array.from(this.refs.text.children).forEach(e => {
+ Array.from(this.$refs.text.children).forEach(e => {
if (e.tagName == 'MK-URL') riot.mount(e);
});
@@ -283,7 +283,7 @@
tokens
.filter(t => (t.type == 'url' || t.type == 'link') && !t.silent)
.map(t => {
- riot.mount(this.refs.text.appendChild(document.createElement('mk-url-preview')), {
+ riot.mount(this.$refs.text.appendChild(document.createElement('mk-url-preview')), {
url: t.url
});
});
@@ -319,7 +319,7 @@
this.react = () => {
riot.mount(document.body.appendChild(document.createElement('mk-reaction-picker')), {
- source: this.refs.reactButton,
+ source: this.$refs.reactButton,
post: this.p,
compact: true
});
@@ -327,7 +327,7 @@
this.menu = () => {
riot.mount(document.body.appendChild(document.createElement('mk-post-menu')), {
- source: this.refs.menuButton,
+ source: this.$refs.menuButton,
post: this.p,
compact: true
});
diff --git a/src/web/app/mobile/tags/post-form.tag b/src/web/app/mobile/tags/post-form.tag
index f0aa102d65..442919100d 100644
--- a/src/web/app/mobile/tags/post-form.tag
+++ b/src/web/app/mobile/tags/post-form.tag
@@ -156,17 +156,17 @@
this.poll = false;
this.on('mount', () => {
- this.refs.uploader.on('uploaded', file => {
+ this.$refs.uploader.on('uploaded', file => {
this.addFile(file);
});
- this.refs.uploader.on('change-uploads', uploads => {
+ this.$refs.uploader.on('change-uploads', uploads => {
this.trigger('change-uploading-files', uploads);
});
- this.refs.text.focus();
+ this.$refs.text.focus();
- new Sortable(this.refs.attaches, {
+ new Sortable(this.$refs.attaches, {
animation: 150
});
});
@@ -184,7 +184,7 @@
};
this.selectFile = () => {
- this.refs.file.click();
+ this.$refs.file.click();
};
this.selectFileFromDrive = () => {
@@ -197,11 +197,11 @@
};
this.changeFile = () => {
- Array.from(this.refs.file.files).forEach(this.upload);
+ Array.from(this.$refs.file.files).forEach(this.upload);
};
this.upload = file => {
- this.refs.uploader.upload(file);
+ this.$refs.uploader.upload(file);
};
this.addFile = file => {
@@ -241,7 +241,7 @@
const files = [];
if (this.files.length > 0) {
- Array.from(this.refs.attaches.children).forEach(el => {
+ Array.from(this.$refs.attaches.children).forEach(el => {
const id = el.getAttribute('data-id');
const file = this.files.find(f => f.id == id);
files.push(file);
@@ -249,10 +249,10 @@
}
this.api('posts/create', {
- text: this.refs.text.value == '' ? undefined : this.refs.text.value,
+ text: this.$refs.text.value == '' ? undefined : this.$refs.text.value,
media_ids: this.files.length > 0 ? files.map(f => f.id) : undefined,
reply_id: opts.reply ? opts.reply.id : undefined,
- poll: this.poll ? this.refs.poll.get() : undefined
+ poll: this.poll ? this.$refs.poll.get() : undefined
}).then(data => {
this.trigger('post');
this.unmount();
@@ -269,7 +269,7 @@
};
this.kao = () => {
- this.refs.text.value += getKao();
+ this.$refs.text.value += getKao();
};
</script>
</mk-post-form>
diff --git a/src/web/app/mobile/tags/search.tag b/src/web/app/mobile/tags/search.tag
index 2d299e0a77..15a861d7a5 100644
--- a/src/web/app/mobile/tags/search.tag
+++ b/src/web/app/mobile/tags/search.tag
@@ -8,7 +8,7 @@
this.query = this.opts.query;
this.on('mount', () => {
- this.refs.posts.on('loaded', () => {
+ this.$refs.posts.on('loaded', () => {
this.trigger('loaded');
});
});
diff --git a/src/web/app/mobile/tags/sub-post-content.tag b/src/web/app/mobile/tags/sub-post-content.tag
index adeb84dea0..7192cd0130 100644
--- a/src/web/app/mobile/tags/sub-post-content.tag
+++ b/src/web/app/mobile/tags/sub-post-content.tag
@@ -35,9 +35,9 @@
this.on('mount', () => {
if (this.post.text) {
const tokens = this.post.ast;
- this.refs.text.innerHTML = compile(tokens, false);
+ this.$refs.text.innerHTML = compile(tokens, false);
- Array.from(this.refs.text.children).forEach(e => {
+ Array.from(this.$refs.text.children).forEach(e => {
if (e.tagName == 'MK-URL') riot.mount(e);
});
}
diff --git a/src/web/app/mobile/tags/timeline.tag b/src/web/app/mobile/tags/timeline.tag
index 400fa5d85f..66f58ff0af 100644
--- a/src/web/app/mobile/tags/timeline.tag
+++ b/src/web/app/mobile/tags/timeline.tag
@@ -482,10 +482,10 @@
this.refresh = post => {
this.set(post);
this.update();
- if (this.refs.reactionsViewer) this.refs.reactionsViewer.update({
+ if (this.$refs.reactionsViewer) this.$refs.reactionsViewer.update({
post
});
- if (this.refs.pollViewer) this.refs.pollViewer.init(post);
+ if (this.$refs.pollViewer) this.$refs.pollViewer.init(post);
};
this.onStreamPostUpdated = data => {
@@ -529,9 +529,9 @@
if (this.p.text) {
const tokens = this.p.ast;
- this.refs.text.innerHTML = this.refs.text.innerHTML.replace('<p class="dummy"></p>', compile(tokens));
+ this.$refs.text.innerHTML = this.$refs.text.innerHTML.replace('<p class="dummy"></p>', compile(tokens));
- Array.from(this.refs.text.children).forEach(e => {
+ Array.from(this.$refs.text.children).forEach(e => {
if (e.tagName == 'MK-URL') riot.mount(e);
});
@@ -539,7 +539,7 @@
tokens
.filter(t => (t.type == 'url' || t.type == 'link') && !t.silent)
.map(t => {
- riot.mount(this.refs.text.appendChild(document.createElement('mk-url-preview')), {
+ riot.mount(this.$refs.text.appendChild(document.createElement('mk-url-preview')), {
url: t.url
});
});
@@ -569,7 +569,7 @@
this.react = () => {
riot.mount(document.body.appendChild(document.createElement('mk-reaction-picker')), {
- source: this.refs.reactButton,
+ source: this.$refs.reactButton,
post: this.p,
compact: true
});
@@ -577,7 +577,7 @@
this.menu = () => {
riot.mount(document.body.appendChild(document.createElement('mk-post-menu')), {
- source: this.refs.menuButton,
+ source: this.$refs.menuButton,
post: this.p,
compact: true
});
diff --git a/src/web/app/mobile/tags/ui.tag b/src/web/app/mobile/tags/ui.tag
index b03534f925..c5dc4b2e4e 100644
--- a/src/web/app/mobile/tags/ui.tag
+++ b/src/web/app/mobile/tags/ui.tag
@@ -30,7 +30,7 @@
this.toggleDrawer = () => {
this.isDrawerOpening = !this.isDrawerOpening;
- this.refs.nav.root.style.display = this.isDrawerOpening ? 'block' : 'none';
+ this.$refs.nav.root.style.display = this.isDrawerOpening ? 'block' : 'none';
};
this.onStreamNotification = notification => {
@@ -209,7 +209,7 @@
};
this.setTitle = title => {
- this.refs.title.innerHTML = title;
+ this.$refs.title.innerHTML = title;
};
this.setFunc = (fn, icon) => {
diff --git a/src/web/app/mobile/tags/user-followers.tag b/src/web/app/mobile/tags/user-followers.tag
index b710e376c6..c4cdedba81 100644
--- a/src/web/app/mobile/tags/user-followers.tag
+++ b/src/web/app/mobile/tags/user-followers.tag
@@ -20,7 +20,7 @@
};
this.on('mount', () => {
- this.refs.list.on('loaded', () => {
+ this.$refs.list.on('loaded', () => {
this.trigger('loaded');
});
});
diff --git a/src/web/app/mobile/tags/user-following.tag b/src/web/app/mobile/tags/user-following.tag
index 62ca091812..3a6a54dd76 100644
--- a/src/web/app/mobile/tags/user-following.tag
+++ b/src/web/app/mobile/tags/user-following.tag
@@ -20,7 +20,7 @@
};
this.on('mount', () => {
- this.refs.list.on('loaded', () => {
+ this.$refs.list.on('loaded', () => {
this.trigger('loaded');
});
});
diff --git a/src/web/app/mobile/tags/user-timeline.tag b/src/web/app/mobile/tags/user-timeline.tag
index 86ead5971f..65203fec4b 100644
--- a/src/web/app/mobile/tags/user-timeline.tag
+++ b/src/web/app/mobile/tags/user-timeline.tag
@@ -26,7 +26,7 @@
return this.api('users/posts', {
user_id: this.user.id,
with_media: this.withMedia,
- until_id: this.refs.timeline.tail().id
+ until_id: this.$refs.timeline.tail().id
});
};
</script>