Commit 7f5c7020 authored by Duhoux Pierre-Louis's avatar Duhoux Pierre-Louis

Add social links at the bottom of the drawer

parent 74b05bde
Pipeline #39444955 passed with stages
in 4 minutes and 58 seconds
......@@ -1423,5 +1423,25 @@
"reader_page_progression": {
"message": "Page $1 / $2 - $3%",
"description": "Display progression of reading in the chapter"
},
"reader_social_all": {
"message": "All Mangas Reader on social networks",
"description": "Tooltip of the social button"
},
"reader_social_patreon": {
"message": "Help AMR ! Become a Patreon",
"description": "Tooltip of the patreon button"
},
"reader_social_facebook": {
"message": "All Mangas Reader on Facebook",
"description": "Tooltip of the facebook button"
},
"reader_social_twitter": {
"message": "All Mangas Reader on Twitter",
"description": "Tooltip of the twitter button"
},
"reader_social_discord": {
"message": "Join our community on Discord ! It's the right place for any question about AMR.",
"description": "Tooltip of the discord button"
}
}
......@@ -1423,5 +1423,21 @@
"reader_page_progression": {
"message": "Page $1 / $2 - $3%",
"description": "Display progression of reading in the chapter"
},
"reader_social_patreon": {
"message": "Aidez AMR ! Devenez un patron",
"description": "Tooltip of the patreon button"
},
"reader_social_facebook": {
"message": "All Mangas Reader sur Facebook",
"description": "Tooltip of the facebook button"
},
"reader_social_twitter": {
"message": "All Mangas Reader sur Twitter",
"description": "Tooltip of the twitter button"
},
"reader_social_discord": {
"message": "Rejoignez notre communauté sur Discord ! C'est l'endroit idéal si vous avez une question sur AMR.",
"description": "Tooltip of the discord button"
}
}
......@@ -330,6 +330,7 @@
</v-card-title>
</v-card>
</v-navigation-drawer>
<SocialBar v-show="drawer" />
<!-- End AMR Reader Side bar -->
<v-content>
<Reader ref="reader"
......@@ -361,7 +362,8 @@
import ShortcutsPopup from "./ShortcutsPopup";
import bookmarks from "./bookmarks";
import EventBus from "./EventBus";
import SocialBar from "./SocialBar";
/** Possible values for resize (readable), the stored value is the corresponding index */
const resize_values = ['width', 'height', 'container', 'none']
......@@ -542,7 +544,7 @@
return false
},
},
components: { Reader, Scan, WizDialog, BookmarkPopup, ShortcutsPopup },
components: { Reader, Scan, WizDialog, BookmarkPopup, ShortcutsPopup, SocialBar },
methods: {
/** Return drawer background color taking a light into account and the dark or not back */
backcolor(light = 0) {
......@@ -1090,6 +1092,7 @@
/** Drawer content below menu button */
.amr-drawer {
padding-top:36px;
padding-bottom:64px;
}
/** Center manga title */
.amr-manga-title div {
......
<template>
<v-layout row wrap class="amr-bottombar">
<v-flex xs12 text-xs-center pa-2>
<!-- Always displayed links -->
<v-tooltip top slot="activator" class="ml-1" v-for="(soc, i) in social_direct" :key="i">
<v-btn slot="activator" icon :color="soc.color" @click.stop="opentab(soc.url)">
<v-icon>{{soc.icon}}</v-icon>
</v-btn>
<span>{{i18n(soc.tooltip)}}</span>
</v-tooltip>
<v-menu offset-y top>
<!-- Social buttons -->
<v-tooltip top slot="activator" class="ml-1">
<v-btn slot="activator" icon>
<v-icon>mdi-share-variant</v-icon>
</v-btn>
<span>{{i18n("reader_social_all")}}</span>
</v-tooltip>
<!-- List of social -->
<v-list class="amr-social-list">
<v-list-tile v-for="(soc, i) in social_shared" :key="i">
<v-list-tile-content>
<v-tooltip left slot="activator" class="ml-1">
<v-btn slot="activator" icon :color="soc.color" @click="opentab(soc.url)">
<v-icon>{{soc.icon}}</v-icon>
</v-btn>
<span>{{i18n(soc.tooltip)}}</span>
</v-tooltip>
</v-list-tile-content>
</v-list-tile>
</v-list>
</v-menu>
</v-flex>
</v-layout>
</template>
<script>
import {i18nmixin} from "../mixins/i18n-mixin"
import browser from "webextension-polyfill";
export default {
mixins: [i18nmixin],
data() {
return {
social_direct: [
/*{ icon: "mdi-patreon", tooltip: "reader_social_patreon",
url: "", color: "orange"},*/
{ icon: "mdi-discord", tooltip: "reader_social_discord",
url: "https://discord.gg/bdzk9hR", color: "purple" }
],
social_shared: [
{ icon: "mdi-facebook", tooltip: "reader_social_facebook",
url: "https://www.facebook.com/allmangasreader/", color: "blue darken-3" },
{ icon: "mdi-twitter", tooltip: "reader_social_twitter",
url: "https://twitter.com/AllMangasReader", color: "light-blue" }
]
}
},
methods: {
opentab(url) {
browser.runtime.sendMessage({ action: "opentab", url: url })
}
}
}
</script>
<style>
.amr-bottombar {
position: fixed;
width: 300px;
bottom: 0;
right: 0;
z-index:7;
background-color: #212121;
}
.theme--light .amr-bottombar {
background-color: #f5f5f5;
}
.amr-social-list .v-list__tile {
padding: 0px 3px;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment