Compare commits

...

2 Commits

Author SHA1 Message Date
Mint e148ff47ab
Show more features in their block
continuous-integration/drone/push Build was killed Details
2023-04-09 00:41:57 +02:00
Sam Therapy 7ad4e2d2b1
We PWA now
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-04-09 00:41:45 +02:00
72 changed files with 25 additions and 0 deletions

View File

@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
<!--server-generated-meta-->
<link rel="icon" type="image/png" href="/favicon.png">
<link rel="manifest" href="/manifest.json">
</head>
<body class="hidden">
<noscript>To use Pleroma, please enable JavaScript.</noscript>

View File

@ -5,6 +5,8 @@ const FeaturesPanel = {
shout: function () { return this.$store.state.instance.shoutAvailable },
pleromaChatMessages: function () { return this.$store.state.instance.pleromaChatMessagesAvailable },
gopher: function () { return this.$store.state.instance.gopherAvailable },
quotePosts: function () { return this.$store.state.instance.quotepostsAvailable },
customReacts: function () { return this.$store.state.instance.customReactsAvailable },
whoToFollow: function () { return this.$store.state.instance.suggestionsEnabled },
mediaProxy: function () { return this.$store.state.instance.mediaProxyAvailable },
minimalScopesMode: function () { return this.$store.state.instance.minimalScopesMode },

View File

@ -17,6 +17,12 @@
<li v-if="gopher">
{{ $t('features_panel.gopher') }}
</li>
<li v-if="quotePosts">
{{ $t('features_panel.quote_posts') }}
</li>
<li v-if="customReacts">
{{ $t('features_panel.custom_reacts') }}
</li>
<li v-if="whoToFollow">
{{ $t('features_panel.who_to_follow') }}
</li>

View File

@ -72,6 +72,8 @@
"shout": "Shoutbox",
"pleroma_chat_messages": "Pleroma Chat",
"gopher": "Gopher",
"quote_posts": "Quote posts",
"custom_reacts": "Custom emoji reactions",
"media_proxy": "Media proxy",
"scope_options": "Scope options",
"text_limit": "Text limit",

View File

@ -56,6 +56,20 @@ const persistedStateOptions = {
};
(async () => {
if ('serviceWorker' in navigator) {
// declaring scope manually
navigator.serviceWorker.register('/sw-pleroma.js', { scope: '/' }).then(
(registration) => {
console.log('Service worker registration succeeded:', registration)
},
/* catch */ (error) => {
console.error(`Service worker registration failed: ${error}`)
}
)
} else {
console.error('Service workers are not supported.')
}
let storageError = false
const plugins = [pushNotifications]
try {