diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-11-02 12:39:19 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-11-02 12:39:19 +0900 |
| commit | e7fbf873ef5d5c588dc6269763e44029a5be77f1 (patch) | |
| tree | 54ff2cd566b65e42650b5a5204d9e86e896cbb18 /src/web | |
| parent | v2805 (diff) | |
| download | sharkey-e7fbf873ef5d5c588dc6269763e44029a5be77f1.tar.gz sharkey-e7fbf873ef5d5c588dc6269763e44029a5be77f1.tar.bz2 sharkey-e7fbf873ef5d5c588dc6269763e44029a5be77f1.zip | |
:v:
Diffstat (limited to 'src/web')
| -rw-r--r-- | src/web/app/app.styl (renamed from src/web/app/base.styl) | 8 | ||||
| -rw-r--r-- | src/web/app/auth/style.styl | 3 | ||||
| -rw-r--r-- | src/web/app/ch/style.styl | 7 | ||||
| -rw-r--r-- | src/web/app/ch/tags/channel.tag | 48 | ||||
| -rw-r--r-- | src/web/app/desktop/style.styl | 3 | ||||
| -rw-r--r-- | src/web/app/dev/style.styl | 3 | ||||
| -rw-r--r-- | src/web/app/mobile/style.styl | 3 | ||||
| -rw-r--r-- | src/web/app/reset.styl | 13 | ||||
| -rw-r--r-- | src/web/app/stats/style.styl | 3 | ||||
| -rw-r--r-- | src/web/app/status/style.styl | 3 |
10 files changed, 66 insertions, 28 deletions
diff --git a/src/web/app/base.styl b/src/web/app/app.styl index 81c039f0a3..94faba73d4 100644 --- a/src/web/app/base.styl +++ b/src/web/app/app.styl @@ -5,8 +5,6 @@ json('../../const.json') $theme-color = themeColor $theme-color-foreground = themeColorForeground -@import './reset' - /* ::selection background $theme-color @@ -14,6 +12,9 @@ $theme-color-foreground = themeColorForeground */ * + position relative + box-sizing border-box + background-clip padding-box !important tap-highlight-color rgba($theme-color, 0.7) -webkit-tap-highlight-color rgba($theme-color, 0.7) @@ -29,6 +30,9 @@ html &, * cursor progress !important +body + overflow-wrap break-word + #error padding 32px color #fff diff --git a/src/web/app/auth/style.styl b/src/web/app/auth/style.styl index 046a5ff6ee..bd25e1b572 100644 --- a/src/web/app/auth/style.styl +++ b/src/web/app/auth/style.styl @@ -1,4 +1,5 @@ -@import "../base" +@import "../app" +@import "../reset" html background #eee diff --git a/src/web/app/ch/style.styl b/src/web/app/ch/style.styl index 8ad6fbce0b..21ca648cbe 100644 --- a/src/web/app/ch/style.styl +++ b/src/web/app/ch/style.styl @@ -1,5 +1,10 @@ -@import "../base" +@import "../app" html padding 8px background #efefef + +#wait + top auto + bottom 15px + left 15px diff --git a/src/web/app/ch/tags/channel.tag b/src/web/app/ch/tags/channel.tag index 35463bc0b8..4ae62e7b39 100644 --- a/src/web/app/ch/tags/channel.tag +++ b/src/web/app/ch/tags/channel.tag @@ -49,6 +49,9 @@ > .body margin 8px 0 0 0 + > mk-channel-form + max-width 500px + </style> <script> import Progress from '../../common/scripts/loading'; @@ -240,20 +243,45 @@ <mk-channel-form> <p if={ reply }><b>>>{ reply.index }</b> ({ reply.user.name }): <a onclick={ clearReply }>[x]</a></p> - <textarea ref="text" disabled={ wait } oninput={ update } onkeydown={ onkeydown } onpaste={ onpaste }></textarea> - <button class={ wait: wait } ref="submit" disabled={ wait || (refs.text.value.length == 0) } onclick={ post }> - { wait ? 'やってます' : 'やる' }<mk-ellipsis if={ wait }/> - </button> - <br> - <button onclick={ drive }>ドライブ</button> + <textarea ref="text" disabled={ wait } oninput={ update } onkeydown={ onkeydown } onpaste={ onpaste } placeholder="%i18n:ch.tags.mk-channel-form.textarea%"></textarea> + <div class="actions"> + <button onclick={ selectFile }><i class="fa fa-upload"></i>%i18n:ch.tags.mk-channel-form.upload%</button> + <button onclick={ drive }><i class="fa fa-cloud"></i>%i18n:ch.tags.mk-channel-form.drive%</button> + <button class={ wait: wait } ref="submit" disabled={ wait || (refs.text.value.length == 0) } onclick={ post }> + <i class="fa fa-paper-plane" if={ !wait }></i>{ wait ? '%i18n:ch.tags.mk-channel-form.posting%' : '%i18n:ch.tags.mk-channel-form.post%' }<mk-ellipsis if={ wait }/> + </button> + </div> <mk-uploader ref="uploader"/> <ol if={ files }> <li each={ files }>{ name }</li> </ol> + <input ref="file" type="file" accept="image/*" multiple="multiple" onchange={ changeFile }/> <style> :scope display block + > textarea + width 100% + max-width 100% + min-width 100% + min-height 5em + + > .actions + display flex + + > button + > i + margin-right 0.25em + + &:last-child + margin-left auto + + &.wait + cursor wait + + > input[type='file'] + display none + </style> <script> import CONFIG from '../../common/scripts/config'; @@ -314,6 +342,14 @@ }); }; + this.changeFile = () => { + this.refs.file.files.forEach(this.upload); + }; + + this.selectFile = () => { + this.refs.file.click(); + }; + this.drive = () => { window['cb'] = files => { this.update({ diff --git a/src/web/app/desktop/style.styl b/src/web/app/desktop/style.styl index 88adb68b2b..4597dffdb3 100644 --- a/src/web/app/desktop/style.styl +++ b/src/web/app/desktop/style.styl @@ -1,4 +1,5 @@ -@import "../base" +@import "../app" +@import "../reset" @import "../../../../node_modules/cropperjs/dist/cropper.css" *::input-placeholder diff --git a/src/web/app/dev/style.styl b/src/web/app/dev/style.styl index 4fd537709d..cdbcb0e261 100644 --- a/src/web/app/dev/style.styl +++ b/src/web/app/dev/style.styl @@ -1,4 +1,5 @@ -@import "../base" +@import "../app" +@import "../reset" html background-color #fff diff --git a/src/web/app/mobile/style.styl b/src/web/app/mobile/style.styl index bd6965e402..63e4f2349f 100644 --- a/src/web/app/mobile/style.styl +++ b/src/web/app/mobile/style.styl @@ -1,4 +1,5 @@ -@import "../base" +@import "../app" +@import "../reset" #wait top auto diff --git a/src/web/app/reset.styl b/src/web/app/reset.styl index 85bbd11473..3d4b06dbdf 100644 --- a/src/web/app/reset.styl +++ b/src/web/app/reset.styl @@ -1,16 +1,3 @@ -* - position relative - box-sizing border-box - background-clip padding-box !important - -html -body - margin 0 - padding 0 - -body - overflow-wrap break-word - input:not([type]) input[type='text'] input[type='password'] diff --git a/src/web/app/stats/style.styl b/src/web/app/stats/style.styl index b48d7aeb9e..5ae230ea56 100644 --- a/src/web/app/stats/style.styl +++ b/src/web/app/stats/style.styl @@ -1,4 +1,5 @@ -@import "../base" +@import "../app" +@import "../reset" html color #456267 diff --git a/src/web/app/status/style.styl b/src/web/app/status/style.styl index b48d7aeb9e..5ae230ea56 100644 --- a/src/web/app/status/style.styl +++ b/src/web/app/status/style.styl @@ -1,4 +1,5 @@ -@import "../base" +@import "../app" +@import "../reset" html color #456267 |