Compare commits
42 Commits
production
...
feature/82
Author | SHA1 | Date | |
---|---|---|---|
48822cc0b1 | |||
582b1423c8 | |||
1b3bac997d | |||
c7697ad5f4 | |||
ebdf94e346 | |||
545eb6385d | |||
18c4e7ecb1 | |||
641ecd4677 | |||
35dc6c095a | |||
65beeb044d | |||
8a86cd15cb | |||
|
add3b63a0c | ||
|
221c8c771f | ||
|
a16d41e9fb | ||
|
f6ad5edbaa | ||
|
3f4812c583 | ||
|
86792bd309 | ||
|
612d02028c | ||
|
f100e84372 | ||
|
31a209cb01 | ||
|
13a062a5d9 | ||
e9606628f0 | |||
f1cd068781 | |||
4b0a895846 | |||
d7ffa77545 | |||
3dccf8bab9 | |||
818a285769 | |||
1fe1cf1cf2 | |||
e89ade266a | |||
42cea8a076 | |||
9b7b1fbf35 | |||
6d1b204b6a | |||
5091739526 | |||
63e288ed6f | |||
65d025267c | |||
560a7b602d | |||
6d1295c0e6 | |||
1388d73e0c | |||
3704f3ccb3 | |||
0b4a382151 | |||
ba1b8a5a11 | |||
4c3a7ebcca |
18
app/controllers/api/v1/invites_controller.rb
Normal file
18
app/controllers/api/v1/invites_controller.rb
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class Api::V1::InvitesController < Api::BaseController
|
||||||
|
|
||||||
|
before_action -> { doorkeeper_authorize! :write, :'write:accounts' }
|
||||||
|
before_action :require_user!
|
||||||
|
|
||||||
|
respond_to :json
|
||||||
|
|
||||||
|
def create
|
||||||
|
@invite = Invite.new(max_uses: 1)
|
||||||
|
@invite.user = current_user
|
||||||
|
@invite.save!
|
||||||
|
|
||||||
|
render json: @invite, serializer: REST::InviteSerializer
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
BIN
app/javascript/images/background-kosmos.jpg
Normal file
BIN
app/javascript/images/background-kosmos.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 124 KiB |
26
app/javascript/styles/custom.scss
Normal file
26
app/javascript/styles/custom.scss
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
@import 'application';
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: $ui-base-color;
|
||||||
|
background-image: url('../images/background-kosmos.jpg');
|
||||||
|
background-size: cover;
|
||||||
|
background-attachment: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.about-body {
|
||||||
|
background-color: transparent;
|
||||||
|
background-image: url('../images/background-kosmos.jpg');
|
||||||
|
background-size: cover;
|
||||||
|
background-attachment: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.landing-page .learn-more-cta {
|
||||||
|
background: rgba(31,35,43,0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui {
|
||||||
|
background-color: darken($ui-base-color, 7%);
|
||||||
|
background-image: url('../images/background-kosmos.jpg');
|
||||||
|
background-size: cover;
|
||||||
|
background-attachment: fixed;
|
||||||
|
}
|
21
app/serializers/rest/invite_serializer.rb
Normal file
21
app/serializers/rest/invite_serializer.rb
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class REST::InviteSerializer < ActiveModel::Serializer
|
||||||
|
attributes :id, :code, :expires_at, :max_uses
|
||||||
|
|
||||||
|
def id
|
||||||
|
object.id.to_s
|
||||||
|
end
|
||||||
|
|
||||||
|
def code
|
||||||
|
object.code
|
||||||
|
end
|
||||||
|
|
||||||
|
def expires_at
|
||||||
|
object.expires_at
|
||||||
|
end
|
||||||
|
|
||||||
|
def max_uses
|
||||||
|
object.max_uses
|
||||||
|
end
|
||||||
|
end
|
@ -36,8 +36,8 @@ en:
|
|||||||
status_count_before: Who authored
|
status_count_before: Who authored
|
||||||
terms: Terms of service
|
terms: Terms of service
|
||||||
user_count_after:
|
user_count_after:
|
||||||
one: user
|
one: kosmonaut
|
||||||
other: users
|
other: kosmonauts
|
||||||
user_count_before: Home to
|
user_count_before: Home to
|
||||||
what_is_mastodon: What is Mastodon?
|
what_is_mastodon: What is Mastodon?
|
||||||
accounts:
|
accounts:
|
||||||
|
@ -297,6 +297,7 @@ Rails.application.routes.draw do
|
|||||||
resources :reports, only: [:create]
|
resources :reports, only: [:create]
|
||||||
resources :filters, only: [:index, :create, :show, :update, :destroy]
|
resources :filters, only: [:index, :create, :show, :update, :destroy]
|
||||||
resources :endorsements, only: [:index]
|
resources :endorsements, only: [:index]
|
||||||
|
resources :invites, only: [:create]
|
||||||
|
|
||||||
namespace :apps do
|
namespace :apps do
|
||||||
get :verify_credentials, to: 'credentials#show'
|
get :verify_credentials, to: 'credentials#show'
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
default: styles/application.scss
|
default: styles/custom.scss
|
||||||
contrast: styles/contrast.scss
|
contrast: styles/contrast.scss
|
||||||
mastodon-light: styles/mastodon-light.scss
|
mastodon-light: styles/mastodon-light.scss
|
||||||
|
@ -351,6 +351,7 @@ ActiveRecord::Schema.define(version: 2019_01_17_114553) do
|
|||||||
t.boolean "silent", default: false, null: false
|
t.boolean "silent", default: false, null: false
|
||||||
t.index ["account_id", "status_id"], name: "index_mentions_on_account_id_and_status_id", unique: true
|
t.index ["account_id", "status_id"], name: "index_mentions_on_account_id_and_status_id", unique: true
|
||||||
t.index ["status_id"], name: "index_mentions_on_status_id"
|
t.index ["status_id"], name: "index_mentions_on_status_id"
|
||||||
|
t.index ["status_id"], name: "mentions_status_id_index"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "mutes", force: :cascade do |t|
|
create_table "mutes", force: :cascade do |t|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user