diff --git a/index.html b/index.html index 1ff944d9..c910d2a3 100644 --- a/index.html +++ b/index.html @@ -4,6 +4,9 @@ Pleroma + + + diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js index 5338c974..34b7cbd7 100644 --- a/src/components/user_settings/user_settings.js +++ b/src/components/user_settings/user_settings.js @@ -65,6 +65,9 @@ const UserSettings = { backgroundPreview: null, bannerUploadError: null, backgroundUploadError: null, + mascot: this.$store.state.users.currentUser.mascot, + mascotPreview: null, + mascotUploadError: null, changeEmailError: false, changeEmailPassword: '', changedEmail: false, @@ -81,6 +84,7 @@ const UserSettings = { }, created () { this.$store.dispatch('fetchTokens') + this.$store.dispatch('fetchMascot') }, components: { StyleSwitcher, @@ -253,6 +257,20 @@ const UserSettings = { this.backgroundUploading = false }) }, + submitMascot () { + if (!this.mascotPreview) { return } + let mascot = this.mascot + this.mascotUploading = true + this.$store.state.api.backendInteractor.updateMascot({ mascot }).then((data) => { + if (!data.error) { + this.mascotPreview = null + this.$store.commit('updateMascot', data.url) + } else { + this.mascotUploadError = this.$t('upload.error.base') + ' ' + data.error + } + this.mascotUploading = false + }) + }, importFollows (file) { return this.$store.state.api.backendInteractor.importFollows({ file }) .then((status) => { diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue index ad184520..edb03ee3 100644 --- a/src/components/user_settings/user_settings.vue +++ b/src/components/user_settings/user_settings.vue @@ -233,6 +233,47 @@ /> +
+

{{ $t('settings.mascot') }}

+

{{ $t('settings.current_mascot') }}

+ +

{{ $t('settings.set_new_mascot') }}

+ +
+ +
+ + +
+ Error: {{ mascotUploadError }} + +
+
@@ -683,6 +724,15 @@ border-radius: var(--avatarRadius, $fallback--avatarRadius); } + .current-mascot { + display: block; + max-height: 250px; + } + + .mascot { + max-width: 100%; + } + .oauth-tokens { width: 100%; diff --git a/src/i18n/en.json b/src/i18n/en.json index d5748719..652bc3a5 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -276,6 +276,7 @@ "composing": "Composing", "confirm_new_password": "Confirm new password", "current_avatar": "Your current avatar", + "current_mascot": "Your current mascot", "current_password": "Current password", "current_profile_banner": "Your current profile banner", "data_import_export_tab": "Data Import / Export", @@ -373,8 +374,10 @@ "search_user_to_mute": "Search whom you want to mute", "security_tab": "Security", "scope_copy": "Copy scope when replying (DMs are always copied)", + "mascot": "Mastodon FE Mascot", "minimal_scopes_mode": "Minimize post scope selection options", "set_new_avatar": "Set new avatar", + "set_new_mascot": "Set new mascot", "set_new_profile_background": "Set new profile background", "set_new_profile_banner": "Set new profile banner", "settings": "Settings", diff --git a/src/modules/users.js b/src/modules/users.js index 1d1b415c..bf8a6455 100644 --- a/src/modules/users.js +++ b/src/modules/users.js @@ -81,6 +81,10 @@ const showReblogs = (store, userId) => { .then((relationship) => store.commit('updateUserRelationship', [relationship])) } +const fetchMascot = (store) => { + return store.rootState.api.backendInteractor.fetchMascot() + .then(({ url }) => store.commit('updateMascot', url)) +} const muteDomain = (store, domain) => { return store.rootState.api.backendInteractor.muteDomain({ domain }) .then(() => store.commit('addDomainMute', domain)) @@ -179,6 +183,9 @@ export const mutations = { state.currentUser.muteIds.push(muteId) } }, + updateMascot (state, mascotUrl) { + state.currentUser.mascot = mascotUrl + }, saveDomainMutes (state, domainMutes) { state.currentUser.domainMutes = domainMutes }, @@ -318,6 +325,9 @@ const users = { unmuteUsers (store, ids = []) { return Promise.all(ids.map(id => unmuteUser(store, id))) }, + fetchMascot (store) { + return fetchMascot(store) + }, fetchDomainMutes (store) { return store.rootState.api.backendInteractor.fetchDomainMutes() .then((domainMutes) => { diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 72c8874f..a872707b 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -73,6 +73,7 @@ const MASTODON_MUTE_CONVERSATION = id => `/api/v1/statuses/${id}/mute` const MASTODON_UNMUTE_CONVERSATION = id => `/api/v1/statuses/${id}/unmute` const MASTODON_SEARCH_2 = `/api/v2/search` const MASTODON_USER_SEARCH_URL = '/api/v1/accounts/search' +const MASTODON_MASCOT_URL = '/api/v1/pleroma/mascot' const MASTODON_DOMAIN_BLOCKS_URL = '/api/v1/domain_blocks' const MASTODON_STREAMING = '/api/v1/streaming' const PLEROMA_EMOJI_REACTIONS_URL = id => `/api/v1/pleroma/statuses/${id}/reactions` @@ -800,6 +801,20 @@ const unmuteUser = ({ id, credentials }) => { return promisedRequest({ url: MASTODON_UNMUTE_USER_URL(id), credentials, method: 'POST' }) } +const fetchMascot = ({ credentials }) => { + return promisedRequest({ url: MASTODON_MASCOT_URL, credentials }) +} + +const updateMascot = ({ mascot, credentials }) => { + const form = new FormData() + form.append('file', mascot) + return fetch(MASTODON_MASCOT_URL, { + headers: authHeaders(credentials), + method: 'PUT', + body: form + }).then((data) => data.json()) +} + const subscribeUser = ({ id, credentials }) => { return promisedRequest({ url: MASTODON_SUBSCRIBE_USER(id), credentials, method: 'POST' }) } @@ -1180,6 +1195,8 @@ const apiService = { fetchPoll, fetchFavoritedByUsers, fetchRebloggedByUsers, + fetchMascot, + updateMascot, fetchEmojiReactions, reactWithEmoji, unreactWithEmoji, diff --git a/static/config.json b/static/config.json index c8267869..9e5390f7 100644 --- a/static/config.json +++ b/static/config.json @@ -1,5 +1,5 @@ { - "theme": "pleroma-dark", + "theme": "ihatebeingalive", "background": "/static/aurora_borealis.jpg", "logo": "/static/logo.png", "logoMask": true, diff --git a/static/font/css/lato.css b/static/font/css/lato.css new file mode 100644 index 00000000..b75a48d7 --- /dev/null +++ b/static/font/css/lato.css @@ -0,0 +1,13 @@ +/* lato-regular - latin */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-weight: 400; + src: url('../font/lato-v15-latin-regular.eot'); /* IE9 Compat Modes */ + src: local('Lato Regular'), local('Lato-Regular'), + url('../font/lato-v15-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('../font/lato-v15-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ + url('../font/lato-v15-latin-regular.woff') format('woff'), /* Modern Browsers */ + url('../font/lato-v15-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ + url('../font/lato-v15-latin-regular.svg#Lato') format('svg'); /* Legacy iOS */ +} diff --git a/static/font/font/lato-v15-latin-regular.eot b/static/font/font/lato-v15-latin-regular.eot new file mode 100644 index 00000000..c6413069 Binary files /dev/null and b/static/font/font/lato-v15-latin-regular.eot differ diff --git a/static/font/font/lato-v15-latin-regular.svg b/static/font/font/lato-v15-latin-regular.svg new file mode 100644 index 00000000..55b43fb8 --- /dev/null +++ b/static/font/font/lato-v15-latin-regular.svg @@ -0,0 +1,435 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/font/font/lato-v15-latin-regular.ttf b/static/font/font/lato-v15-latin-regular.ttf new file mode 100644 index 00000000..3c2d417e Binary files /dev/null and b/static/font/font/lato-v15-latin-regular.ttf differ diff --git a/static/font/font/lato-v15-latin-regular.woff b/static/font/font/lato-v15-latin-regular.woff new file mode 100644 index 00000000..189a0feb Binary files /dev/null and b/static/font/font/lato-v15-latin-regular.woff differ diff --git a/static/font/font/lato-v15-latin-regular.woff2 b/static/font/font/lato-v15-latin-regular.woff2 new file mode 100644 index 00000000..6904b664 Binary files /dev/null and b/static/font/font/lato-v15-latin-regular.woff2 differ diff --git a/static/font/lato-v15-latin-regular.eot b/static/font/lato-v15-latin-regular.eot new file mode 100644 index 00000000..c6413069 Binary files /dev/null and b/static/font/lato-v15-latin-regular.eot differ diff --git a/static/font/lato-v15-latin-regular.svg b/static/font/lato-v15-latin-regular.svg new file mode 100644 index 00000000..55b43fb8 --- /dev/null +++ b/static/font/lato-v15-latin-regular.svg @@ -0,0 +1,435 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/font/lato-v15-latin-regular.ttf b/static/font/lato-v15-latin-regular.ttf new file mode 100644 index 00000000..3c2d417e Binary files /dev/null and b/static/font/lato-v15-latin-regular.ttf differ diff --git a/static/font/lato-v15-latin-regular.woff b/static/font/lato-v15-latin-regular.woff new file mode 100644 index 00000000..189a0feb Binary files /dev/null and b/static/font/lato-v15-latin-regular.woff differ diff --git a/static/font/lato-v15-latin-regular.woff2 b/static/font/lato-v15-latin-regular.woff2 new file mode 100644 index 00000000..6904b664 Binary files /dev/null and b/static/font/lato-v15-latin-regular.woff2 differ diff --git a/static/logo.png b/static/logo.png index 7744b1ac..14aaf4a3 100644 Binary files a/static/logo.png and b/static/logo.png differ diff --git a/static/styles.json b/static/styles.json index 23f57c65..feceb47e 100644 --- a/static/styles.json +++ b/static/styles.json @@ -12,6 +12,7 @@ "redmond-xxi": "/static/themes/redmond-xxi.json", "breezy-dark": "/static/themes/breezy-dark.json", "breezy-light": "/static/themes/breezy-light.json", + "ihatebeingalive": "/static/themes/ihatebeingalive.json", "mammal": "/static/themes/mammal.json", "paper": "/static/themes/paper.json" } diff --git a/static/terms-of-service.html b/static/terms-of-service.html index a6da539e..4d91f9b0 100644 --- a/static/terms-of-service.html +++ b/static/terms-of-service.html @@ -1,4 +1,45 @@

Terms of Service

-

This is a placeholder ToS. Edit "/static/terms-of-service.html" to make it fit the needs of your instance.

+

It's mainly "be nice"

+ +
    +
  1. +

    Don't be a big meanie

    +

    Arguments are cool and all but don't make them into flamewars. Try to act in good faith - we want to be at least on good terms with people. Please act with understanding towards others on this instance. Most people here are probably struggling with a lot, be mindful of that.

    +
  2. +
  3. +

    Mark your lewds!

    +

    Reminder that lewd is bad and nobody wants to be forced to see that. Just mark it sensitive, and post unlisted. That is to say, anything suggestive/ecchi upwards should be marked. If you wouldn't look at it with your parents/boss in the room, mark it. It goes without saying that if you're going to post lewd stuff, keep it sensible. Obviously nothing underaged or otherwise questionable. Or you could just not post lewd stuff. Either/or.

    +
  4. +
  5. +

    This is a Kink Shame Zone

    +

    Being a lewdie will be met with many anime girl reaction images shaming you for your lewdness. Go think about icky things on someone else's webzone™

    +
  6. +
  7. +

    Keep it legal!

    +

    Server is hosted in france, keep content legal for there (+ wherever you're browsing from)

    +
  8. +
  9. +

    No ads/spambots

    +

    I didn't think I'd have to specify this, but please do not set up bots solely for trying to advertise. +

  10. +
  11. +

    Non-TOS recommendations

    +

    This is stuff that'd I'd like you to do, but I won't outright ban you if you don't follow them

    +
      +
    • If someone is sadposting, don't antagonise them - they probably just want to vent
    • +
    • Put walls of text behind a subject (CW) - helps the timeline not get flooded with text
    • +
    +
  12. + +
  13. +

    Other

    +

    If you're here and you happen to play minecraft, feel free to message me with your username and come play with us sometime!

    +
  14. + +
+ +

So I guess yeah, that's about it. Try to be nice, eh? We're probably all sad here.

+ +
diff --git a/static/themes/ihatebeingalive.json b/static/themes/ihatebeingalive.json new file mode 100644 index 00000000..ce468825 --- /dev/null +++ b/static/themes/ihatebeingalive.json @@ -0,0 +1,151 @@ +{ + "_pleroma_theme_version": 2, + "name": "ihatebeingalive", + "theme": { + "fonts": { + "interface": { + "family": "Lato" + } + }, + "shadows": { + "panel": [ + { + "x": "1", + "y": "2", + "blur": "6", + "spread": 0, + "color": "#000000", + "alpha": 0.6 + } + ], + "button": [ + { + "x": 0, + "y": "0", + "blur": "0", + "spread": "1", + "color": "#ffffff", + "alpha": "0.15", + "inset": true + }, + { + "x": "1", + "y": "1", + "blur": "1", + "spread": 0, + "color": "#000000", + "alpha": "0.3", + "inset": false + } + ], + "panelHeader": [ + { + "x": 0, + "y": "40", + "blur": "40", + "spread": "-40", + "inset": true, + "color": "#ffffff", + "alpha": "0.1" + } + ], + "buttonHover": [ + { + "x": 0, + "y": "0", + "blur": 0, + "spread": "1", + "color": "--link", + "alpha": "0.3", + "inset": true + }, + { + "x": "1", + "y": "1", + "blur": "1", + "spread": 0, + "color": "#000000", + "alpha": "0.3", + "inset": false + } + ], + "buttonPressed": [ + { + "x": 0, + "y": 0, + "blur": "0", + "spread": "50", + "color": "--faint", + "alpha": 1, + "inset": true + }, + { + "x": 0, + "y": "0", + "blur": 0, + "spread": "1", + "color": "#ffffff", + "alpha": 0.2, + "inset": true + }, + { + "x": "1", + "y": "1", + "blur": 0, + "spread": 0, + "color": "#000000", + "alpha": "0.3", + "inset": false + } + ], + "input": [ + { + "x": 0, + "y": "0", + "blur": 0, + "spread": "1", + "color": "#FFFFFF", + "alpha": "0.2", + "inset": true + } + ] + }, + "opacity": { + "bg": "0.99", + "btn": "0.9", + "input": "0.9", + "panel": "0.75", + "border": "0.55" + }, + "colors": { + "bg": "#070e1b", + "text": "#bebebe", + "link": "#3daee9", + "fg": "#31363b", + "fgLink": "#543fe7", + "panelLink": "#38a5ed", + "input": "#1b1d1f", + "topBar": "#0d1a31", + "topBarLink": "#bebebe", + "btn": "#1b1d1f", + "panel": "#0d1a31", + "alertError": "#ff090f", + "badgeNotification": "#024297", + "border": "#363c41", + "cRed": "#c42d38", + "cBlue": "#ffffff", + "cGreen": "#22b325", + "cOrange": "#d7d720" + }, + "radii": { + "btn": "4", + "input": "4", + "checkbox": "1", + "panel": "9", + "avatar": "3", + "avatarAlt": "4", + "tooltip": "7", + "attachment": "3" + } + } +}