壁紙廃止

This commit is contained in:
syuilo 2017-02-18 17:34:14 +09:00
parent 7f43574679
commit 2d1287d103
4 changed files with 0 additions and 60 deletions

View File

@ -34,9 +34,6 @@ module.exports = (me) ~>
riot.mixin \update-banner do riot.mixin \update-banner do
update-banner: require './scripts/update-banner.ls' update-banner: require './scripts/update-banner.ls'
riot.mixin \update-wallpaper do
update-wallpaper: require './scripts/update-wallpaper.ls'
riot.mixin \autocomplete do riot.mixin \autocomplete do
Autocomplete: require './scripts/autocomplete.ls' Autocomplete: require './scripts/autocomplete.ls'

View File

@ -1,35 +0,0 @@
# Update Wallpaper
#================================
riot = require 'riot'
dialog = require './dialog.ls'
api = require '../../common/scripts/api'
module.exports = (I, cb, file = null) ~>
@set = (file) ~>
api I, \i/appdata/set do
data: JSON.stringify do
wallpaper: file.id
.then (i) ~>
dialog do
'<i class="fa fa-info-circle"></i>壁紙を更新しました'
'新しい壁紙が反映されるまで時間がかかる場合があります。'
[
text: \はい
]
if cb? then cb i
.catch (err) ~>
console.error err
#@opts.ui.trigger \notification 'Error!'
if file?
@set file
else
browser = document.body.append-child document.create-element \mk-select-file-from-drive-window
browser = riot.mount browser, do
multiple: false
title: '<i class="fa fa-picture-o"></i>壁紙にする画像を選択'
.0
browser.one \selected (file) ~>
@set file

View File

@ -6,10 +6,6 @@
:scope :scope
display block display block
background-position center center
background-attachment fixed
background-size cover
</style> </style>
<script> <script>
@mixin \i @mixin \i
@ -30,11 +26,6 @@
@Progress.done! @Progress.done!
document.title = 'Misskey' document.title = 'Misskey'
if @I.data.wallpaper
@api \drive/files/show do
file_id: @I.data.wallpaper
.then (file) ~>
@root.style.background-image = 'url(' + file.url + ')'
@Progress.start! @Progress.start!
@stream.on \post @on-stream-post @stream.on \post @on-stream-post
document.add-event-listener \visibilitychange @window-on-visibilitychange, false document.add-event-listener \visibilitychange @window-on-visibilitychange, false

View File

@ -38,10 +38,6 @@
<section class="web" show={ page == 'web' }> <section class="web" show={ page == 'web' }>
<h1>デザイン</h1> <h1>デザイン</h1>
<label>
<p>壁紙</p>
<button class="style-normal" onclick={ wallpaper }>画像を選択</button>
</label>
</section> </section>
<section class="web" show={ page == 'web' }> <section class="web" show={ page == 'web' }>
@ -121,12 +117,7 @@
margin 0 margin 0
color #666 color #666
cursor pointer cursor pointer
-ms-user-select none
-moz-user-select none
-webkit-user-select none
user-select none user-select none
transition margin-left 0.2s ease transition margin-left 0.2s ease
> i > i
@ -211,7 +202,6 @@
@mixin \api @mixin \api
@mixin \dialog @mixin \dialog
@mixin \update-avatar @mixin \update-avatar
@mixin \update-wallpaper
@page = \account @page = \account
@ -221,9 +211,6 @@
@avatar = ~> @avatar = ~>
@update-avatar @I @update-avatar @I
@wallpaper = ~>
@update-wallpaper @I
@update-account = ~> @update-account = ~>
@api \i/update do @api \i/update do
name: @refs.account-name.value name: @refs.account-name.value