mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 17:03:09 +02:00
Merge branch 'master' into no-ls
This commit is contained in:
commit
f640f88277
4 changed files with 0 additions and 60 deletions
|
@ -34,8 +34,5 @@ module.exports = (me) ~>
|
|||
riot.mixin \update-banner do
|
||||
update-banner: require './scripts/update-banner.ls'
|
||||
|
||||
riot.mixin \update-wallpaper do
|
||||
update-wallpaper: require './scripts/update-wallpaper.ls'
|
||||
|
||||
riot.mixin \autocomplete do
|
||||
Autocomplete: require './scripts/autocomplete'
|
||||
|
|
|
@ -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
|
|
@ -6,10 +6,6 @@
|
|||
:scope
|
||||
display block
|
||||
|
||||
background-position center center
|
||||
background-attachment fixed
|
||||
background-size cover
|
||||
|
||||
</style>
|
||||
<script>
|
||||
@mixin \i
|
||||
|
@ -30,11 +26,6 @@
|
|||
@Progress.done!
|
||||
|
||||
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!
|
||||
@stream.on \post @on-stream-post
|
||||
document.add-event-listener \visibilitychange @window-on-visibilitychange, false
|
||||
|
|
|
@ -38,10 +38,6 @@
|
|||
|
||||
<section class="web" show={ page == 'web' }>
|
||||
<h1>デザイン</h1>
|
||||
<label>
|
||||
<p>壁紙</p>
|
||||
<button class="style-normal" onclick={ wallpaper }>画像を選択</button>
|
||||
</label>
|
||||
</section>
|
||||
|
||||
<section class="web" show={ page == 'web' }>
|
||||
|
@ -121,12 +117,7 @@
|
|||
margin 0
|
||||
color #666
|
||||
cursor pointer
|
||||
|
||||
-ms-user-select none
|
||||
-moz-user-select none
|
||||
-webkit-user-select none
|
||||
user-select none
|
||||
|
||||
transition margin-left 0.2s ease
|
||||
|
||||
> i
|
||||
|
@ -211,7 +202,6 @@
|
|||
@mixin \api
|
||||
@mixin \dialog
|
||||
@mixin \update-avatar
|
||||
@mixin \update-wallpaper
|
||||
|
||||
@page = \account
|
||||
|
||||
|
@ -221,9 +211,6 @@
|
|||
@avatar = ~>
|
||||
@update-avatar @I
|
||||
|
||||
@wallpaper = ~>
|
||||
@update-wallpaper @I
|
||||
|
||||
@update-account = ~>
|
||||
@api \i/update do
|
||||
name: @refs.account-name.value
|
||||
|
|
Loading…
Reference in a new issue