wip
This commit is contained in:
@ -54,11 +54,11 @@
|
||||
e.prevent-default!
|
||||
e.stop-propagation!
|
||||
|
||||
@I.data.no_donation = true
|
||||
@I.update!
|
||||
this.I.data.no_donation = true
|
||||
this.I.update!
|
||||
this.api 'i/appdata/set' do
|
||||
data: JSON.stringify do
|
||||
no_donation: @I.data.no_donation
|
||||
no_donation: this.I.data.no_donation
|
||||
|
||||
this.unmount();
|
||||
|
||||
|
@ -81,15 +81,15 @@
|
||||
|
||||
set-avatar() {
|
||||
this.refs.ctx.close!
|
||||
@update-avatar @I, null, @file
|
||||
@update-avatar this.I, null, @file
|
||||
|
||||
set-banner() {
|
||||
this.refs.ctx.close!
|
||||
@update-banner @I, null, @file
|
||||
@update-banner this.I, null, @file
|
||||
|
||||
set-wallpaper() {
|
||||
this.refs.ctx.close!
|
||||
@update-wallpaper @I, null, @file
|
||||
@update-wallpaper this.I, null, @file
|
||||
|
||||
add-app() {
|
||||
@NotImplementedException!
|
||||
|
@ -47,9 +47,9 @@
|
||||
this.mixin('update-banner');
|
||||
|
||||
set-avatar() {
|
||||
@update-avatar @I
|
||||
@update-avatar this.I
|
||||
|
||||
set-banner() {
|
||||
@update-banner @I
|
||||
@update-banner this.I
|
||||
</script>
|
||||
</mk-profile-home-widget>
|
||||
|
@ -39,7 +39,7 @@
|
||||
this.is-loading = true
|
||||
this.is-empty = false
|
||||
this.more-loading = false
|
||||
this.no-following = @I.following_count == 0
|
||||
this.no-following = this.I.following_count == 0
|
||||
|
||||
this.on('mount', () => {
|
||||
@stream.on 'post' this.on-stream-post
|
||||
|
@ -70,7 +70,7 @@
|
||||
this.refs.tl.on('loaded', () => {
|
||||
this.trigger('loaded');
|
||||
|
||||
@I.data.home.for-each (widget) =>
|
||||
this.I.data.home.for-each (widget) =>
|
||||
try
|
||||
el = document.createElement 'mk-' + widget.name + '-home-widget'
|
||||
switch widget.place
|
||||
|
@ -35,7 +35,7 @@
|
||||
document.remove-event-listener 'visibilitychange' @window-on-visibilitychange
|
||||
|
||||
on-stream-post(post) {
|
||||
if document.hidden and post.user_id !== @I.id
|
||||
if document.hidden and post.user_id !== this.I.id
|
||||
@unread-count++
|
||||
document.title = '(' + @unread-count + ') ' + @get-post-summary post
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
this.mixin('update-avatar');
|
||||
|
||||
set() {
|
||||
@update-avatar @I
|
||||
@update-avatar this.I
|
||||
|
||||
close(e) {
|
||||
e.prevent-default!
|
||||
|
@ -35,7 +35,7 @@
|
||||
this.mixin('update-banner');
|
||||
|
||||
set() {
|
||||
@update-banner @I
|
||||
@update-banner this.I
|
||||
|
||||
close(e) {
|
||||
e.prevent-default!
|
||||
|
@ -209,7 +209,7 @@
|
||||
this.page = page
|
||||
|
||||
avatar() {
|
||||
@update-avatar @I
|
||||
@update-avatar this.I
|
||||
|
||||
update-account() {
|
||||
this.api 'i/update' do
|
||||
@ -223,21 +223,21 @@
|
||||
console.error err
|
||||
|
||||
update-cache() {
|
||||
@I.data.cache = !@I.data.cache
|
||||
this.I.data.cache = !this.I.data.cache
|
||||
this.api 'i/appdata/set' do
|
||||
data: JSON.stringify do
|
||||
cache: @I.data.cache
|
||||
cache: this.I.data.cache
|
||||
|
||||
update-debug() {
|
||||
@I.data.debug = !@I.data.debug
|
||||
this.I.data.debug = !this.I.data.debug
|
||||
this.api 'i/appdata/set' do
|
||||
data: JSON.stringify do
|
||||
debug: @I.data.debug
|
||||
debug: this.I.data.debug
|
||||
|
||||
update-nya() {
|
||||
@I.data.nya = !@I.data.nya
|
||||
this.I.data.nya = !this.I.data.nya
|
||||
this.api 'i/appdata/set' do
|
||||
data: JSON.stringify do
|
||||
nya: @I.data.nya
|
||||
nya: this.I.data.nya
|
||||
</script>
|
||||
</mk-settings>
|
||||
|
@ -132,10 +132,10 @@
|
||||
this.refs.banner.style.filter = 'blur(' + blur + 'px)'
|
||||
|
||||
on-update-banner() {
|
||||
if not @SIGNIN or @I.id != @user.id
|
||||
if not @SIGNIN or this.I.id != @user.id
|
||||
return
|
||||
|
||||
@update-banner @I, (i) =>
|
||||
@update-banner this.I, (i) =>
|
||||
@user.banner_url = i.banner_url
|
||||
this.update();
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user