Compare commits
4 commits
812ba9d47b
...
d818b47938
Author | SHA1 | Date | |
---|---|---|---|
|
d818b47938 | ||
|
16610c8a12 | ||
|
8163366402 | ||
|
2884d6e9ba |
10 changed files with 38 additions and 39 deletions
|
@ -328,11 +328,7 @@ const setConfig = async ({ store }) => {
|
|||
|
||||
const checkOAuthToken = async ({ store }) => {
|
||||
if (store.getters.getUserToken()) {
|
||||
try {
|
||||
await store.dispatch('loginUser', store.getters.getUserToken())
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
return store.dispatch('loginUser', store.getters.getUserToken())
|
||||
}
|
||||
return Promise.resolve()
|
||||
}
|
||||
|
@ -350,6 +346,7 @@ const afterStoreSetup = async ({ store, i18n }) => {
|
|||
const server = (typeof overrides.target !== 'undefined') ? overrides.target : window.location.origin
|
||||
store.dispatch('setInstanceOption', { name: 'server', value: server })
|
||||
|
||||
document.querySelector('#status').textContent = i18n.global.t('splash.settings')
|
||||
await setConfig({ store })
|
||||
document.querySelector('#status').textContent = i18n.global.t('splash.theme')
|
||||
try {
|
||||
|
@ -358,16 +355,17 @@ const afterStoreSetup = async ({ store, i18n }) => {
|
|||
return Promise.reject(e)
|
||||
}
|
||||
|
||||
applyConfig(store.state.config)
|
||||
applyConfig(store.state.config, i18n.global)
|
||||
|
||||
// Now we can try getting the server settings and logging in
|
||||
// Most of these are preloaded into the index.html so blocking is minimized
|
||||
document.querySelector('#status').textContent = i18n.global.t('splash.instance')
|
||||
await Promise.all([
|
||||
checkOAuthToken({ store }),
|
||||
getInstancePanel({ store }),
|
||||
getNodeInfo({ store }),
|
||||
getInstanceConfig({ store })
|
||||
])
|
||||
]).catch(e => Promise.reject(e))
|
||||
|
||||
// Start fetching things that don't need to block the UI
|
||||
store.dispatch('fetchMutes')
|
||||
|
@ -401,9 +399,9 @@ const afterStoreSetup = async ({ store, i18n }) => {
|
|||
|
||||
// remove after vue 3.3
|
||||
app.config.unwrapInjectedRef = true
|
||||
document.querySelector('#status').textContent = i18n.global.t('splash.almost')
|
||||
|
||||
app.mount('#app')
|
||||
|
||||
return app
|
||||
}
|
||||
|
||||
|
|
|
@ -14,8 +14,7 @@ export default {
|
|||
'ButtonUnstyled',
|
||||
'RichContent',
|
||||
'Input',
|
||||
'Avatar',
|
||||
'Badge'
|
||||
'Avatar'
|
||||
],
|
||||
defaultRules: [
|
||||
{
|
||||
|
|
|
@ -962,6 +962,9 @@
|
|||
"component": "Component",
|
||||
"override": "Override",
|
||||
"shadow_id": "Shadow #{value}",
|
||||
"offset": "Shadow offset",
|
||||
"light_grid": "Use light checkerboard",
|
||||
"name": "Name",
|
||||
"blur": "Blur",
|
||||
"spread": "Spread",
|
||||
"inset": "Inset",
|
||||
|
@ -972,6 +975,7 @@
|
|||
"filter_hint": {
|
||||
"always_drop_shadow": "Warning, this shadow always uses {0} when browser supports it.",
|
||||
"drop_shadow_syntax": "{0} does not support {1} parameter and {2} keyword.",
|
||||
"avatar_inset_short": "Separate inset shadow",
|
||||
"avatar_inset": "Please note that combining both inset and non-inset shadows on avatars might give unexpected results with transparent avatars.",
|
||||
"spread_zero": "Shadows with spread > 0 will appear as if it was set to zero",
|
||||
"inset_classic": "Inset shadows will be using {0}"
|
||||
|
|
|
@ -490,7 +490,7 @@ const interfaceMod = {
|
|||
userThemeV2Name || instanceThemeV2Name
|
||||
)
|
||||
themeNameUsed = theme.nameUsed
|
||||
themeDataUsed = { ...theme.dataUsed, themeEngineVersion: CURRENT_VERSION }
|
||||
themeDataUsed = theme.dataUsed
|
||||
|
||||
// Themes v2 editor support
|
||||
commit('setInstanceOption', { name: 'themeData', value: themeDataUsed })
|
||||
|
|
|
@ -42,14 +42,13 @@ const adoptStyleSheets = (styles) => {
|
|||
// is nothing to do here.
|
||||
}
|
||||
|
||||
export const generateTheme = async (inputRuleset, callbacks, debug) => {
|
||||
export const generateTheme = (inputRuleset, callbacks, debug) => {
|
||||
const {
|
||||
onNewRule = (rule, isLazy) => {},
|
||||
onLazyFinished = () => {},
|
||||
onEagerFinished = () => {}
|
||||
} = callbacks
|
||||
|
||||
// Assuming that "worst case scenario background" is panel background since it's the most likely one
|
||||
const themes3 = init({
|
||||
inputRuleset,
|
||||
debug
|
||||
|
@ -167,15 +166,22 @@ export const applyTheme = (input, onFinish = (data) => {}, debug) => {
|
|||
adoptStyleSheets([eagerStyles, lazyStyles])
|
||||
const cache = { engineChecksum: getEngineChecksum(), data: [eagerStyles.rules, lazyStyles.rules] }
|
||||
onFinish(cache)
|
||||
localStorage.setItem('pleroma-fe-theme-cache', JSON.stringify(cache))
|
||||
try {
|
||||
localStorage.setItem('pleroma-fe-theme-cache', JSON.stringify(cache))
|
||||
} catch (e) {
|
||||
localStorage.removeItem('pleroma-fe-theme-cache')
|
||||
try {
|
||||
localStorage.setItem('pleroma-fe-theme-cache', JSON.stringify(cache))
|
||||
} catch (e) {
|
||||
console.warn('cannot save cache!', e)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
debug
|
||||
)
|
||||
|
||||
setTimeout(lazyProcessFunc, 0)
|
||||
|
||||
return Promise.resolve()
|
||||
}
|
||||
|
||||
const extractStyleConfig = ({
|
||||
|
@ -220,7 +226,7 @@ const extractStyleConfig = ({
|
|||
|
||||
const defaultStyleConfig = extractStyleConfig(defaultState)
|
||||
|
||||
export const applyConfig = (input) => {
|
||||
export const applyConfig = (input, i18n) => {
|
||||
const config = extractStyleConfig(input)
|
||||
|
||||
if (config === defaultStyleConfig) {
|
||||
|
@ -228,8 +234,6 @@ export const applyConfig = (input) => {
|
|||
}
|
||||
|
||||
const head = document.head
|
||||
const body = document.body
|
||||
body.classList.add('hidden')
|
||||
|
||||
const rules = Object
|
||||
.entries(config)
|
||||
|
@ -250,8 +254,6 @@ export const applyConfig = (input) => {
|
|||
--roundness: var(--forcedRoundness) !important;
|
||||
}`, 'index-max')
|
||||
}
|
||||
|
||||
body.classList.remove('hidden')
|
||||
}
|
||||
|
||||
export const getResourcesIndex = async (url) => {
|
||||
|
|
|
@ -28,7 +28,7 @@ function subscribePush (registration, isEnabled, vapidPublicKey) {
|
|||
if (!vapidPublicKey) return Promise.reject(new Error('VAPID public key is not found'))
|
||||
|
||||
const subscribeOptions = {
|
||||
userVisibleOnly: true,
|
||||
userVisibleOnly: false,
|
||||
applicationServerKey: urlBase64ToUint8Array(vapidPublicKey)
|
||||
}
|
||||
return registration.pushManager.subscribe(subscribeOptions)
|
||||
|
|
BIN
static/aurora_borealis.jpg
Normal file
BIN
static/aurora_borealis.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 628 KiB |
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"alwaysShowSubjectInput": false,
|
||||
"background": "/static/sigsegv_s.png",
|
||||
"alwaysShowSubjectInput": true,
|
||||
"background": "/static/aurora_borealis.jpg",
|
||||
"collapseMessageWithSubject": false,
|
||||
"greentext": false,
|
||||
"hideFilteredStatuses": false,
|
||||
|
@ -19,13 +19,11 @@
|
|||
"postContentType": "text/plain",
|
||||
"redirectRootLogin": "/main/friends",
|
||||
"redirectRootNoLogin": "/main/all",
|
||||
"scopeCopy": false,
|
||||
"scopeCopy": true,
|
||||
"showFeaturesPanel": true,
|
||||
"showInstanceSpecificPanel": false,
|
||||
"sidebarRight": false,
|
||||
"subjectLineBehavior": "noop",
|
||||
"theme": "sigsegv",
|
||||
"webPushNotifications": false,
|
||||
"greentext": true,
|
||||
"mentionLinkShowYous": true
|
||||
"subjectLineBehavior": "email",
|
||||
"theme": null,
|
||||
"webPushNotifications": false
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
{
|
||||
"sigsegv": [ "シグセグV", "#100f32", "#221548", "#e6fcff", "#fe9df8", "#fd3f3f", "#cafeb8", "#9fd3fe", "#ffe96b" ],
|
||||
"sigsegv2": [ "SigSeg部", "#003238", "#00616c", "#e8f9fb", "#81ffff", "#ff7b66", "#4ae619", "#00ddff", "#ccef53" ],
|
||||
"pleroma-dark": "/static/themes/pleroma-dark.json",
|
||||
"pleroma-light": "/static/themes/pleroma-light.json",
|
||||
"redmond-xx": "/static/themes/redmond-xx.json",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<img src="/static/logo.svg"/ style="display: block; margin: auto; width: 100%; padding: 20px">
|
||||
<h4>Terms of Service</h4>
|
||||
<p>We don't block/silence/suspend any other instances.</p>
|
||||
<br>
|
||||
<p>Don't do anything illegal, or else you will be シグストップ'd.</p>
|
||||
<p>Violator and subject to severe penalties and will be prosecutedt to the full extent of the JAM.</p>
|
||||
<br>
|
||||
<p>Admin: Fediverse: hj@shigusegubu.club, hj@pleroma.hjkos.com; Email: pleroma@hjkos.com</p>
|
||||
|
||||
<p>This is the default placeholder ToS. You should copy it over to your static folder and edit it to fit the needs of your instance.</p>
|
||||
|
||||
<p>To do so, place a file at <code>"/instance/static/static/terms-of-service.html"</code> in your
|
||||
Pleroma install containing the real ToS for your instance.</p>
|
||||
<p>See the <a href='https://docs.pleroma.social/backend/configuration/static_dir/'>Pleroma documentation</a> for more information.</p>
|
||||
<br>
|
||||
<img src="/static/logo.svg" style="display: block; margin: auto; max-width: 100%; height: 50px; object-fit: contain;" />
|
||||
|
|
Loading…
Add table
Reference in a new issue