瀏覽代碼

Merge pull request #833 from pixelfed/frontend-ui-refactor

Frontend ui refactor
daniel 6 年之前
父節點
當前提交
b3c563cd52

+ 5 - 3
database/migrations/2019_01_11_005556_update_profiles_table.php

@@ -27,8 +27,10 @@ class UpdateProfilesTable extends Migration
      */
     public function down()
     {
-        $table->dropColumn('unlisted');
-        $table->dropColumn('cw');
-        $table->dropColumn('no_autolink');
+        Schema::table('profiles', function (Blueprint $table) {
+            $table->dropColumn('unlisted');
+            $table->dropColumn('cw');
+            $table->dropColumn('no_autolink');
+        });
     }
 }

+ 86 - 0
database/migrations/2019_02_13_195702_add_indexes.php

@@ -0,0 +1,86 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddIndexes extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('statuses', function (Blueprint $table) {
+            $table->index('visibility','statuses_visibility_index');
+            $table->index(['in_reply_to_id', 'reblog_of_id'], 'statuses_in_reply_or_reblog_index');
+            $table->index('uri', 'statuses_uri_index');
+            $table->index('is_nsfw', 'statuses_is_nsfw_index');
+            $table->index('created_at', 'statuses_created_at_index');
+            $table->index('profile_id', 'statuses_profile_id_index');
+            $table->index('local', 'statuses_local_index');
+        });
+
+        Schema::table('notifications', function (Blueprint $table) {
+            $table->index('created_at','notifications_created_at_index');
+            $table->index('actor_id', 'notifications_actor_id_index');
+        });
+
+        Schema::table('profiles', function (Blueprint $table) {
+            $table->index('domain', 'profiles_domain_index');
+        });
+
+        Schema::table('media', function (Blueprint $table) {
+            $table->index('user_id', 'media_user_id_index');
+        });
+
+        Schema::table('likes', function (Blueprint $table) {
+            $table->index('created_at', 'likes_created_at_index');
+        });
+
+        Schema::table('followers', function (Blueprint $table) {
+            $table->index('created_at', 'followers_created_at_index');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('statuses', function (Blueprint $table) {
+            $table->dropIndex('statuses_visibility_index');
+            $table->dropIndex('statuses_in_reply_or_reblog_index');
+            $table->dropIndex('statuses_uri_index');
+            $table->dropIndex('statuses_is_nsfw_index');
+            $table->dropIndex('statuses_created_at_index');
+            $table->dropIndex('statuses_profile_id_index');
+            $table->dropIndex('statuses_local_index');
+        });
+
+        Schema::table('notifications', function (Blueprint $table) {
+            $table->dropIndex('notifications_created_at_index');
+            $table->dropIndex('notifications_actor_id_index');
+        });
+
+        Schema::table('profiles', function (Blueprint $table) {
+            $table->dropIndex('profiles_domain_index');
+        });
+
+        Schema::table('media', function (Blueprint $table) {
+            $table->dropIndex('media_user_id_index');
+        });
+
+        Schema::table('likes', function (Blueprint $table) {
+            $table->dropIndex('likes_created_at_index');
+        });
+
+        Schema::table('followers', function (Blueprint $table) {
+            $table->dropIndex('followers_created_at_index');
+        });
+    }
+}

+ 9 - 1
resources/assets/sass/custom.scss

@@ -306,13 +306,21 @@ details summary::-webkit-details-marker {
 }
 
 .details-animated > summary {
-  display: block;
+  display: flex;
+  flex-flow: column;
+  justify-content: center;
   background-color: #ECF0F1;
   padding-top: 50px;
   padding-bottom: 50px;
   text-align: center;
 }
 
+@media (min-width: 720px) {
+  .details-animated > summary {
+    min-height: 600px;
+  }
+}
+
 .details-animated[open] > summary {
   display: none!important;
 }

+ 6 - 0
resources/lang/he/profile.php

@@ -6,4 +6,10 @@ return [
   'emptyFollowing' => 'משתמש זה עדיין אינו עוקב אחרי אף אחד!',
   'emptySaved'     => 'עדיין לא שמרת שום פוסט!',
   'savedWarning'   => 'רק אתם יכולים לראות את מה ששמרתם',
+  'privateProfileWarning' => 'חשבון זה פרטי',
+  'alreadyFollow'         => 'כבר עוקב :username?',
+  'loginToSeeProfile'     => 'על מנת לראות את התמונות והסרטונים שלהם.',
+
+  'status.disabled.header' 	  => 'פרופיל לא זמין',
+  'status.disabled.body'	  => 'מצטערים, פרופיל זה אינו זמין כרגע. אנא נסו שוב בקרוב.',
 ];

+ 16 - 0
resources/lang/he/site.php

@@ -0,0 +1,16 @@
+<?php
+
+return [
+
+	'about'			=> 'אודות',
+	'help'			=> 'עזרה',
+	'language'		=> 'שפה',
+	'fediverse'		=> 'פדיוורס',
+	'opensource'	=> 'קוד פתוח',
+	'terms'			=> 'תנאים',
+	'privacy'		=> 'פרטיות',
+	'l10nWip'		=> 'אנחנו עדיין עובדים על תמיכה לאיזור הנוכחי',
+	'currentLocale' => 'איזור נוכחי',
+	'selectLocale'  => 'בחרו מאחת השפות הנתמכות',
+
+];

+ 19 - 0
resources/lang/id/auth.php

@@ -0,0 +1,19 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Authentication Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines are used during authentication for various
+    | messages that we need to display to the user. You are free to modify
+    | these language lines according to your application's requirements.
+    |
+    */
+
+    'failed'   => 'Kredensial ini tidak cocok dengan data kami.',
+    'throttle' => 'Terlalu banyak percobaan login. COba lagi setelah :seconds detik.',
+
+];

+ 11 - 0
resources/lang/id/navmenu.php

@@ -0,0 +1,11 @@
+<?php
+return [
+    'viewMyProfile'  => 'Lihat profil saya',
+    'myTimeline'     => 'Linimasa Saya',
+    'publicTimeline' => 'Linimasa Publik',
+    'remoteFollow'   => 'Ikuti Jarak Jauh',
+    'settings'       => 'Pengaturan',
+    'admin'          => 'Admin',
+    'logout'         => 'Keluar',
+    'directMessages' => 'Pesan Langsung',
+];

+ 7 - 0
resources/lang/id/notification.php

@@ -0,0 +1,7 @@
+<?php
+return [
+  'likedPhoto'          => 'menyukai foto kamu.',
+  'startedFollowingYou' => 'mulai mengikuti kamu.',
+  'commented'           => 'mengomentari posting kamu.',
+  'mentionedYou'        => 'menyebut nama kamu.',
+];

+ 15 - 0
resources/lang/id/pagination.php

@@ -0,0 +1,15 @@
+<?php
+return [
+    /*
+    |--------------------------------------------------------------------------
+    | Pagination Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines are used by the paginator library to build
+    | the simple pagination links. You are free to change them to anything
+    | you want to customize your views to better match your application.
+    |
+    */
+    'previous' => '« Sebelumnya',
+    'next' => 'Selanjutnya »',
+];

+ 18 - 0
resources/lang/id/passwords.php

@@ -0,0 +1,18 @@
+<?php
+return [
+    /*
+    |--------------------------------------------------------------------------
+    | Password Reset Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines are the default lines which match reasons
+    | that are given by the password broker for a password update attempt
+    | has failed, such as for an invalid token or invalid new password.
+    |
+    */
+    'password' => 'Password minimal enam karakter dan diisi dua kali harus sama.',
+    'reset'    => 'Password kamu sudah di-reset!',
+    'sent'     => 'Kami sudah mengirim link reset password lewat email!',
+    'token'    => 'Token reset password ini tidak valid.',
+    'user'     => "Kami tidak menemukan user beralamat email tersebut.",
+];

+ 13 - 0
resources/lang/id/profile.php

@@ -0,0 +1,13 @@
+<?php
+return [
+  'emptyTimeline'         => 'User ini belum memiliki posting!',
+  'emptyFollowers'        => 'User ini belum punya pengikut!',
+  'emptyFollowing'        => 'User ini belum mengikuti siapapun!',
+  'emptySaved'            => 'Kamu belum membuat posting!',
+  'savedWarning'          => 'Hanya kami yang bisa melihat posting kamu sendiri',
+  'privateProfileWarning' => 'Akun ini Privat',
+  'alreadyFollow'         => 'Sudah mengikuti :username?',
+  'loginToSeeProfile'     => 'untuk melihat foro dan videonya.',
+  'status.disabled.header' 	  => 'Profil Tidak Tersedia',
+  'status.disabled.body'	  => 'Maaf, profil ini sedang tidak tersedia. Silakan coba lagi kemudian.',
+];

+ 13 - 0
resources/lang/id/site.php

@@ -0,0 +1,13 @@
+<?php
+return [
+	'about'			=> 'Tentang',
+	'help'			=> 'Bantuan',
+	'language'		=> 'Bahasa',
+	'fediverse'		=> 'Fediverse',
+	'opensource'	=> 'Open Source',
+	'terms'			=> 'Syarat',
+	'privacy'		=> 'Privasi',
+	'l10nWip'		=> 'Kami masih mengusahakan fitur multi bahasa ini',
+	'currentLocale' => 'Locale sekarang',
+	'selectLocale'  => 'Pilih salah satu bahasa yang tersedia',
+];

+ 4 - 0
resources/lang/id/timeline.php

@@ -0,0 +1,4 @@
+<?php
+return [
+  'emptyPersonalTimeline' => 'Linimasa kamu kosong.',
+];

+ 114 - 0
resources/lang/id/validation.php

@@ -0,0 +1,114 @@
+<?php
+return [
+    /*
+    |--------------------------------------------------------------------------
+    | Validation Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines contain the default error messages used by
+    | the validator class. Some of these rules have multiple versions such
+    | as the size rules. Feel free to tweak each of these messages here.
+    |
+    */
+    'accepted'             => ':attribute harus diterima.',
+    'active_url'           => ':attribute bukan berupa URL yang benar.',
+    'after'                => ':attribute harus berupa tanggal setelah :date.',
+    'after_or_equal'       => ':attribute harus berupa tanggal yang sama atau setelah :date.',
+    'alpha'                => ':attribute hanya boleh berisi huruf.',
+    'alpha_dash'           => ':attribute hanya boleh berisi huruf, angka dan tanda minus.',
+    'alpha_num'            => ':attribute hanya boleh berisi huruf dan angka.',
+    'array'                => ':attribute harus berupa array.',
+    'before'               => ':attribute harus berupa tanggal sebelum :date.',
+    'before_or_equal'      => ':attribute harus berupa tanggal yang sama atau sebelum :date.',
+    'between'              => [
+        'numeric' => ':attribute harus antara :min dan :max.',
+        'file'    => ':attribute harus antara :min dan :max KB.',
+        'string'  => ':attribute harus antara :min dan :max karakter.',
+        'array'   => ':attribute harus antara :min dan :max item.',
+    ],
+    'boolean'              => ':attribute harus berupa true atau false.',
+    'confirmed'            => 'Konfirmasi :attribute tidak sama.',
+    'date'                 => ':attribute bukan berupa tanggal yang benar.',
+    'date_format'          => ':attribute tidak sesuai dengan format :format.',
+    'different'            => ':attribute dan :other harus berbeda.',
+    'digits'               => ':attribute haurs berisi :digits digit.',
+    'digits_between'       => ':attribute harus antara :min dan :max digit.',
+    'dimensions'           => ':attribute berisi dimensi gambar yang tidak benar.',
+    'distinct'             => 'Bagian :attribute memiliki duplikasi.',
+    'email'                => ':attribute harus berupa alamat email yang benar.',
+    'exists'               => ':attribute yang dipilih tidak benar.',
+    'file'                 => ':attribute harus berupa berkas.',
+    'filled'               => 'Bagian :attribute harus diisi.',
+    'image'                => ':attribute harus berupa gambar.',
+    'in'                   => ':attribute yang dipilih tidak benar.',
+    'in_array'             => 'Bagian :attribute tidak ada dalam :other.',
+    'integer'              => ':attribute harus berupa angka bulat.',
+    'ip'                   => ':attribute harus berupa alamat IP yang benar.',
+    'ipv4'                 => ':attribute harus berupa alamat IPv4 yang benar.',
+    'ipv6'                 => ':attribute harus berupa alamat IPv6 yang benar.',
+    'json'                 => ':attribute harus berupa string JSON yang benar.',
+    'max'                  => [
+        'numeric' => 'The :attribute may not be greater than :max.',
+        'file'    => 'The :attribute may not be greater than :max kilobytes.',
+        'string'  => 'The :attribute may not be greater than :max characters.',
+        'array'   => 'The :attribute may not have more than :max items.',
+    ],
+    'mimes'                => 'The :attribute must be a file of type: :values.',
+    'mimetypes'            => 'The :attribute must be a file of type: :values.',
+    'min'                  => [
+        'numeric' => 'The :attribute must be at least :min.',
+        'file'    => 'The :attribute must be at least :min kilobytes.',
+        'string'  => 'The :attribute must be at least :min characters.',
+        'array'   => 'The :attribute must have at least :min items.',
+    ],
+    'not_in'               => 'The selected :attribute is invalid.',
+    'not_regex'            => 'The :attribute format is invalid.',
+    'numeric'              => 'The :attribute must be a number.',
+    'present'              => 'The :attribute field must be present.',
+    'regex'                => 'The :attribute format is invalid.',
+    'required'             => 'The :attribute field is required.',
+    'required_if'          => 'The :attribute field is required when :other is :value.',
+    'required_unless'      => 'The :attribute field is required unless :other is in :values.',
+    'required_with'        => 'The :attribute field is required when :values is present.',
+    'required_with_all'    => 'The :attribute field is required when :values is present.',
+    'required_without'     => 'The :attribute field is required when :values is not present.',
+    'required_without_all' => 'The :attribute field is required when none of :values are present.',
+    'same'                 => 'The :attribute and :other must match.',
+    'size'                 => [
+        'numeric' => 'The :attribute must be :size.',
+        'file'    => 'The :attribute must be :size kilobytes.',
+        'string'  => 'The :attribute must be :size characters.',
+        'array'   => 'The :attribute must contain :size items.',
+    ],
+    'string'               => 'The :attribute must be a string.',
+    'timezone'             => 'The :attribute must be a valid zone.',
+    'unique'               => 'The :attribute has already been taken.',
+    'uploaded'             => 'The :attribute failed to upload.',
+    'url'                  => 'The :attribute format is invalid.',
+    /*
+    |--------------------------------------------------------------------------
+    | Custom Validation Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | Here you may specify custom validation messages for attributes using the
+    | convention "attribute.rule" to name the lines. This makes it quick to
+    | specify a specific custom language line for a given attribute rule.
+    |
+    */
+    'custom' => [
+        'attribute-name' => [
+            'rule-name' => 'custom-message',
+        ],
+    ],
+    /*
+    |--------------------------------------------------------------------------
+    | Custom Validation Attributes
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines are used to swap attribute place-holders
+    | with something more reader friendly such as E-Mail Address instead
+    | of "email". This simply helps us make messages a little cleaner.
+    |
+    */
+    'attributes' => [],
+];

+ 3 - 0
resources/lang/it/profile.php

@@ -9,4 +9,7 @@ return [
   'privateProfileWarning' => 'Questo Account è Privato',
   'alreadyFollow'         => 'Segui già :username?',
   'loginToSeeProfile'     => 'per vedere le sue foto e video.',
+
+  'status.disabled.header' 	  => 'Profilo Non Disponibile',
+  'status.disabled.body'	  => 'Scusa, questo profilo non è disponibile al momento. Per favore riprova più tardi.',
 ];