Skip to content
Snippets Groups Projects
Footer.vue 5.65 KiB
Newer Older
  • Learn to ignore specific revisions
  •   <footer id="footer" role="contentinfo" class="ui vertical footer segment">
    
        <div class="ui container">
          <div class="ui stackable equal height stackable grid">
    
            <section class="four wide column">
    
              <h4 v-if="podName" class="ui header ellipsis">
                <translate translate-context="Footer/About/Title" :translate-params="{instanceName: podName}" >About %{instanceName}</translate>
              </h4>
              <h4 v-else class="ui header ellipsis">
                <translate translate-context="Footer/About/Title" :translate-params="{instanceUrl: instanceHostname}" >About %{instanceUrl}</translate>
    
              </h4>
              <div class="ui link list">
                <router-link class="item" to="/about">
    
                  <translate translate-context="Footer/About/List item.Link">About page</translate>
    
                  <a v-if="version" class="item" href="https://docs.funkwhale.audio/changelog.html" target="_blank">
                    <translate translate-context="Footer/*/List item" :translate-params="{version: version}" >Version %{version}</translate>
                  </a>
    
                <div role="button" class="item" @click="$emit('show:set-instance-modal')" >
    
                  <translate translate-context="Footer/*/List item.Link">Use another instance</translate>
    
              </div>
              <div class="ui form">
                <div class="ui field">
    
                  <label><translate translate-context="Footer/Settings/Dropdown.Label/Short, Verb">Change language</translate></label>
    
                  <select class="ui dropdown" :value="$language.current" @change="$store.commit('ui/currentLanguage', $event.target.value)">
    
                    <option v-for="(language, key) in $language.available" :key="key" :value="key">{{ language }}</option>
                  </select>
                </div>
              </div>
    
            </section>
            <section class="four wide column">
    
    jovuit's avatar
    jovuit committed
              <h4 v-translate class="ui header" translate-context="Footer/*/Title">Using Funkwhale</h4>
    
                <a href="https://docs.funkwhale.audio" class="item" target="_blank"><translate translate-context="Footer/*/List item.Link/Short, Noun">Documentation</translate></a>
    
    Eliot Berriot's avatar
    Eliot Berriot committed
                <a href="https://funkwhale.audio/apps" class="item" target="_blank"><translate translate-context="Footer/*/List item.Link">Mobile and desktop apps</translate></a>
    
    jovuit's avatar
    jovuit committed
                <div role="button" class="item" @click="$emit('show:shortcuts-modal')"><translate translate-context="*/*/*/Noun">Keyboard shortcuts</translate></div>
    
    Eliot Berriot's avatar
    Eliot Berriot committed
              <div class="ui form">
                <div class="ui field">
                  <label><translate translate-context="Footer/Settings/Dropdown.Label/Short, Verb">Change theme</translate></label>
                  <select class="ui dropdown" :value="$store.state.ui.theme" @change="$store.commit('ui/theme', $event.target.value)">
                    <option v-for="theme in themes" :key="theme.key" :value="theme.key">{{ theme.name }}</option>
                  </select>
                </div>
              </div>
    
            </section>
            <section class="four wide column">
    
    jovuit's avatar
    jovuit committed
              <h4 v-translate translate-context="Footer/*/Link" class="ui header">Getting help</h4>
    
    Eliot Berriot's avatar
    Eliot Berriot committed
                <a href="https://governance.funkwhale.audio/g/kQgxNq15/funkwhale" class="item" target="_blank"><translate translate-context="Footer/*/Listitem.Link">Support forum</translate></a>
    
                <a href="https://riot.im/app/#/room/#funkwhale-troubleshooting:matrix.org" class="item" target="_blank"><translate translate-context="Footer/*/List item.Link">Chat room</translate></a>
                <a href="https://dev.funkwhale.audio/funkwhale/funkwhale/issues" class="item" target="_blank"><translate translate-context="Footer/*/List item.Link">Issue tracker</translate></a>
    
            </section>
            <section class="four wide column">
    
    jovuit's avatar
    jovuit committed
              <h4 v-translate class="ui header" translate-context="Footer/*/Title/Short">About Funkwhale</h4>
    
                <a href="https://funkwhale.audio" class="item" target="_blank"><translate translate-context="Footer/*/List item.Link">Official website</translate></a>
                <a href="https://contribute.funkwhale.audio" class="item" target="_blank"><translate translate-context="Footer/*/List item.Link">Contribute</translate></a>
                <a href="https://dev.funkwhale.audio/funkwhale/funkwhale" class="item" target="_blank"><translate translate-context="Footer/*/List item.Link">Source code</translate></a>
    
              </div>
              <div class="ui hidden divider"></div>
              <p>
    
                <translate translate-context="Footer/*/List item.Link">The funkwhale logo was kindly designed and provided by Francis Gading.</translate>
    
    import axios from 'axios'
    
          messages: state => state.ui.messages,
          nodeinfo: state => state.instance.nodeinfo,
    
        podName() {
          return _.get(this.nodeinfo, 'metadata.nodeName')
        },
    
          let url = this.$store.state.instance.instanceUrl
    
          let parser = document.createElement("a")
    
          parser.href = url
          return parser.hostname
        },
    
    Eliot Berriot's avatar
    Eliot Berriot committed
        themes () {
          return [
            {
              name: this.$pgettext('Footer/Settings/Dropdown.Label/Theme name', 'Light'),
              key: 'light'
            },
            {
              name: this.$pgettext('Footer/Settings/Dropdown.Label/Theme name', 'Dark'),
              key: 'dark'
            }
          ]
        }