diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/App.js | 23 | ||||
| -rw-r--r-- | src/App.scss | 15 | ||||
| -rw-r--r-- | src/App.vue | 14 | ||||
| -rw-r--r-- | src/components/attachment/attachment.js | 8 | ||||
| -rw-r--r-- | src/components/attachment/attachment.vue | 5 | ||||
| -rw-r--r-- | src/i18n/messages.js | 61 | ||||
| -rw-r--r-- | src/main.js | 1 |
7 files changed, 67 insertions, 60 deletions
@@ -23,18 +23,6 @@ export default { style () { return { 'background-image': `url(${this.background})` } }, sitename () { return this.$store.state.config.name } }, - created () { - // this is to detect user zooming mostly - window.addEventListener('resize', this.fixSidebarWidth) - }, - mounted () { - // for some reason, at least in dev mode, dom is not ready enough at this point - // in theory calling the function directly here should be enough, but it's not - setTimeout(() => { this.fixSidebarWidth() }, 500) - }, - destroyed () { - window.removeEventListener('resize', this.fixSidebarWidth) - }, methods: { activatePanel (panelName) { this.mobileActivePanel = panelName @@ -44,17 +32,6 @@ export default { }, logout () { this.$store.dispatch('logout') - }, - fixSidebarWidth () { - // firefox - let barwidth = window.innerWidth - document.body.offsetWidth - if (document.body.offsetWidth <= 0) { - // chromium - barwidth = window.innerWidth - document.body.scrollWidth - } - // adjust the sidebar size to fit the scrollbar width to keep the gap consistently sized - document.getElementById('sidebar-container').style.width = `${345 + barwidth}px` - document.getElementById('sidebar-container').style.paddingRight = `${barwidth}px` } } } diff --git a/src/App.scss b/src/App.scss index 6679b2c2..5a117f04 100644 --- a/src/App.scss +++ b/src/App.scss @@ -128,12 +128,13 @@ main-router { border-radius: 10px; box-shadow: 1px 1px 3px rgba(0,0,0,.5); + overflow: hidden; } .panel-body:empty::before { content: "¯\\_(ツ)_/¯"; // Could use words but it'd require translations display: block; - margin: 20px; + margin: 1em; text-align: center; } @@ -190,7 +191,7 @@ nav { flex-shrink: 1; } -.sidebar { +.sidebar-bounds { flex: 0; flex-basis: 35%; } @@ -221,21 +222,25 @@ nav { body { overflow-y: scroll; } - .sidebar { + .sidebar-bounds { overflow: hidden; max-height: 100vh; width: 345px; position: fixed; margin-top: -10px; - .sidebar-container { + .sidebar-scroller { height: 96vh; width: 365px; padding-top: 10px; - padding-right: 20px; + padding-right: 50px; overflow-x: hidden; overflow-y: scroll; } + + .sidebar { + width: 345px; + } } .sidebar-flexer { max-height: 96vh; diff --git a/src/App.vue b/src/App.vue index 59cfcaa6..0d004665 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,6 @@ <template> <div id="app" v-bind:style="style" class="base02-background"> - <nav class='container base01-background base04' @click="scrollToTop()"> + <nav class='container base01-background base04' @click="scrollToTop()" id="nav"> <div class='inner-nav' :style="logoStyle"> <div class='item'> <router-link :to="{ name: 'root'}">{{sitename}}</router-link> @@ -18,11 +18,13 @@ <button @click="activatePanel('timeline')" class="base01-background base04">Timeline</button> </div> <div class="sidebar-flexer" :class="{ 'mobile-hidden': mobileActivePanel != 'sidebar'}"> - <div class="sidebar" :class="{ 'mobile-hidden': mobileActivePanel != 'sidebar' }"> - <div class="sidebar-container" id="sidebar-container"> - <user-panel></user-panel> - <nav-panel></nav-panel> - <notifications v-if="currentUser"></notifications> + <div class="sidebar-bounds"> + <div class="sidebar-scroller"> + <div class="sidebar"> + <user-panel></user-panel> + <nav-panel></nav-panel> + <notifications v-if="currentUser"></notifications> + </div> </div> </div> </div> diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js index ccf26b79..de551611 100644 --- a/src/components/attachment/attachment.js +++ b/src/components/attachment/attachment.js @@ -23,12 +23,8 @@ const Attachment = { hidden () { return this.nsfw && this.hideNsfwLocal && !this.showHidden }, - autoHeight () { - if (this.type === 'image' && this.nsfw) { - return { - 'min-height': '109px' - } - } + isEmpty () { + return this.type === 'html' && !this.attachment.oembed } }, methods: { diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index d4985732..954c46b4 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -1,5 +1,5 @@ <template> - <div class="attachment base03-border" :class="{[type]: true, loading}" :style="autoHeight"> + <div class="attachment base03-border" :class="{[type]: true, loading}" v-show="!isEmpty"> <a class="image-attachment" v-if="hidden" @click.prevent="toggleHidden()"> <img :key="nsfwImage" :src="nsfwImage"/> </a> @@ -50,7 +50,8 @@ } &.html { - flex-basis: 100%; + flex-basis: 90%; + width: 100%; display: flex; } diff --git a/src/i18n/messages.js b/src/i18n/messages.js index cedb7fd7..8671346d 100644 --- a/src/i18n/messages.js +++ b/src/i18n/messages.js @@ -555,39 +555,42 @@ const fr = { nav: { timeline: 'Journal', mentions: 'Notifications', - public_tl: 'Statuts Locaux', - twkn: 'Le Réseau Tout Entier' + public_tl: 'Statuts locaux', + twkn: 'Le réseau connu' }, user_card: { - follows_you: 'Vous Suit!', - following: 'Suivis!', - follow: 'Suivi', + follows_you: 'Vous suit!', + following: 'Suivi!', + follow: 'Suivre', + blocked: 'Bloqué', + block: 'Bloquer', statuses: 'Statuts', - mute: 'En Sourdine', - muted: 'Mis En Sourdine', - followers: 'Vous Suivent', + mute: 'En sourdine', + muted: 'Mis en sourdine', + followers: 'Vous suivent', followees: 'Suivis', per_day: 'par jour' }, timeline: { show_new: 'Afficher plus', error_fetching: 'Erreur en cherchant des mises à jours', - up_to_date: 'A jour', - load_older: 'Afficher plus' + up_to_date: 'À jour', + load_older: 'Afficher plus', + conversation: 'Conversation' }, settings: { - user_settings: 'Paramètres Utilisateur', + user_settings: 'Paramètres utilisateur', name_bio: 'Nom & Bio', name: 'Nom', - bio: 'Bio', + bio: 'Bioraphie', avatar: 'Avatar', current_avatar: 'Votre avatar', set_new_avatar: 'Changer d\'avatar', - profile_banner: 'Couverture du Profil', - current_profile_banner: 'Couverture du Profil', - set_new_profile_banner: 'Nouvelle couverture', + profile_banner: 'Bannière du Profil', + current_profile_banner: 'Bannière du profil', + set_new_profile_banner: 'Changer de bannière', profile_background: 'Image de fond', - set_new_profile_background: 'Nouvelle image de fond', + set_new_profile_background: 'Changer l\'image de fond', settings: 'Paramètres', theme: 'Thème', filtering: 'Filtre', @@ -595,15 +598,37 @@ const fr = { attachments: 'Pièces jointes', hide_attachments_in_tl: 'Cacher les pièces jointes dans le journal', hide_attachments_in_convo: 'Cacher les pièces jointes dans les conversations', - nsfw_clickthrough: 'Activer le clic pour afficher les images taggées NSFW', + nsfw_clickthrough: 'Activer le clic pour afficher les images marquées comme contenu adulte ou sensible', autoload: 'Activer le chargement automatique une fois le bas de la page atteint', - reply_link_preview: 'Activer un preview sur passage de la souris' + reply_link_preview: 'Activer un aperçu sur passage de la souris' }, notifications: { notifications: 'Notfications', read: 'Lu!', followed_you: 'vous a suivi' }, + login: { + login: 'Connexion', + username: 'Nom d\'utilisateur', + password: 'Mot de passe', + register: 'S\'inscrire', + logout: 'Déconnexion' + }, + registration: { + registration: 'Inscription', + fullname: 'Nom complet', + email: 'Adresse courriel', + bio: 'Biographie', + password_confirm: 'Confirmer le mot de passe' + }, + post_status: { + posting: 'Envoi en cours', + default: 'Écrivez ici votre prochain statut.' + }, + finder: { + find_user: 'Chercher un utilisateur', + error_fetching_user: 'Une erreur est survenue pendant la recherche d\'un utilisateur' + }, general: { submit: 'Envoyer' } diff --git a/src/main.js b/src/main.js index 9e0b9e7c..87a46ee9 100644 --- a/src/main.js +++ b/src/main.js @@ -45,6 +45,7 @@ const persistedStateOptions = { 'config.hideNsfw', 'config.autoLoad', 'config.hoverPreview', + 'config.streaming', 'config.muteWords', 'users.lastLoginName' ] |
