1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pixelfed_ynh.git synced 2024-09-03 20:06:04 +02:00

Merge pull request #1083 from pixelfed/frontend-ui-refactor

Frontend ui refactor
This commit is contained in:
daniel 2019-03-26 15:14:09 -06:00 committed by GitHub
commit 2b21188af0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 49 deletions

File diff suppressed because one or more lines are too long

View file

@ -4,7 +4,7 @@
"/css/app.css": "/css/app.css?id=20dc108f4dbbc76c9827",
"/css/appdark.css": "/css/appdark.css?id=08d0a92912b101bb7457",
"/js/components.js": "/js/components.js?id=793c50b76d7f9028f550",
"/js/compose.js": "/js/compose.js?id=74b01e0c6e8febdff1c9",
"/js/compose.js": "/js/compose.js?id=aff84cf29322124685cf",
"/js/discover.js": "/js/discover.js?id=75fb12b06ee23fa05186",
"/js/landing.js": "/js/landing.js?id=328c8bec8bde1e516430",
"/js/profile.js": "/js/profile.js?id=69fd7039c50660f4e34d",

View file

@ -73,32 +73,21 @@
<input type="text" class="form-control" v-model="media[carouselCursor].license" placeholder="Optional media license">
</div>
</div>
<div class="col-6 pt-2">
<!-- <button class="btn btn-outline-secondary btn-sm mr-1"><i class="fas fa-map-marker-alt"></i></button>
<button class="btn btn-outline-secondary btn-sm"><i class="fas fa-tools"></i></button> -->
</div>
<div class="col-6 text-right pt-2">
<button class="btn btn-outline-danger btn-sm font-weight-bold mr-1" v-on:click="deleteMedia()"><i class="fas fa-trash"></i></button>
<button class="btn btn-outline-secondary btn-sm font-weight-bold" v-on:click="updateMedia()">Close</button>
<!-- <div class="col-6 pt-2">
<button class="btn btn-outline-secondary btn-sm mr-1"><i class="fas fa-map-marker-alt"></i></button>
<button class="btn btn-outline-secondary btn-sm"><i class="fas fa-tools"></i></button>
</div> -->
<div class="col-12 text-right pt-2">
<button class="btn btn-outline-danger btn-sm font-weight-bold mr-1" v-on:click="deleteMedia()">Delete Photo</button>
<button class="btn btn-outline-secondary btn-sm font-weight-bold" v-on:click="updateMedia()">Hide Media Toolbar</button>
</div>
</div>
</div>
<div :class="[mediaDrawer?'glass card-body disabled':'card-body']">
<div class="reactions my-1">
<h3 class="far fa-heart pr-3 m-0 text-lighter" title="Like"></h3>
<h3 class="far fa-comment pr-3 m-0 text-lighter" title="Comment"></h3>
</div>
<div class="likes font-weight-bold">
<span class="like-count">0</span> likes
</div>
<div :class="[mediaDrawer?'d-none':'card-body']">
<div class="caption">
<p class="mb-2 read-more" style="overflow: hidden;">
<span class="username font-weight-bold d-inline-block clearfix">
<bdi><a class="text-dark" :href="profile.url">{{profile.username}}</a></bdi>
</span>
<span contenteditable="" style="outline:none;" v-on:keyup="textWatcher"></span>
<p class="mb-2">
<textarea class="form-control d-inline-block" rows="3" placeholder="Add an optional caption" v-model="composeText"></textarea>
</p>
</div>
<div class="comments">
@ -112,7 +101,7 @@
</div>
</div>
<div :class="[mediaDrawer?'glass card-footer':'card-footer']">
<div :class="[mediaDrawer?'d-none':'card-footer']">
<div class="d-flex justify-content-between align-items-center">
<div>
<div class="custom-control custom-switch d-inline mr-3">
@ -183,7 +172,7 @@
</div>
</div>
<div class="small text-muted font-weight-bold">
{{composeTextLength}} / 500
{{composeText.length}} / 500
</div>
<div class="pl-md-5">
<div class="btn-group">
@ -209,15 +198,6 @@
</template>
<style type="text/css" scoped>
.glass {
-webkit-filter: blur(2px);
-moz-filter: blur(2px);
-o-filter: blur(2px);
-ms-filter: blur(2px);
filter: blur(2px);
width: 100%;
height: 100%;
}
.media-drawer-filters {
overflow-x: scroll;
flex-wrap:unset;
@ -310,16 +290,6 @@ export default {
];
},
watch: {
composeText: function (newComposeText, oldComposeText) {
this.debouncedTextWatcher();
}
},
created: function() {
this.debouncedTextWatcher = _.debounce(this.textWatcher, 300)
},
methods: {
fetchConfig() {
@ -345,11 +315,6 @@ export default {
el.removeAttr('disabled');
},
textWatcher() {
this.composeText = event.target.innerText;
this.composeTextLength = event.target.innerText.length;
},
mediaWatcher() {
let self = this;
$(document).on('change', '.file-input', function(e) {