From faf09bb8c80fcb28b132a5a644ac689cc9abffc2 Mon Sep 17 00:00:00 2001 From: Kris Date: Fri, 24 Aug 2018 14:18:14 -0400 Subject: [PATCH] Replacing default brown category color --- .../discourse/routes/discovery-categories.js.es6 | 2 +- app/models/category.rb | 2 +- config/site_settings.yml | 2 +- db/fixtures/001_categories.rb | 2 +- db/migrate/20120712150500_create_categories.rb | 2 +- .../20131022045114_add_uncategorized_category.rb | 2 +- db/migrate/20140120155706_add_lounge_category.rb | 2 +- db/migrate/20140227201005_add_staff_category.rb | 2 +- spec/fixtures/json/import-export.json | 12 ++++++------ test/javascripts/fixtures/discovery_fixtures.js.es6 | 6 +++--- test/javascripts/fixtures/group-fixtures.js.es6 | 2 +- test/javascripts/fixtures/site-fixtures.js.es6 | 4 ++-- test/javascripts/helpers/site-settings.js | 2 +- test/javascripts/helpers/site.js.es6 | 2 +- 14 files changed, 22 insertions(+), 22 deletions(-) diff --git a/app/assets/javascripts/discourse/routes/discovery-categories.js.es6 b/app/assets/javascripts/discourse/routes/discovery-categories.js.es6 index 8356f6fb82e..e8b3f48e2b8 100644 --- a/app/assets/javascripts/discourse/routes/discovery-categories.js.es6 +++ b/app/assets/javascripts/discourse/routes/discovery-categories.js.es6 @@ -119,7 +119,7 @@ const DiscoveryCategoriesRoute = Discourse.Route.extend(OpenComposer, { everyoneName = groups.findBy("id", 0).name; const model = this.store.createRecord("category", { - color: "AB9364", + color: "0088CC", text_color: "FFFFFF", group_permissions: [{ group_name: everyoneName, permission_type: 1 }], available_groups: groups.map(g => g.name), diff --git a/app/models/category.rb b/app/models/category.rb index 25535782d37..e857f3dcbdf 100644 --- a/app/models/category.rb +++ b/app/models/category.rb @@ -624,7 +624,7 @@ end # # id :integer not null, primary key # name :string(50) not null -# color :string(6) default("AB9364"), not null +# color :string(6) default("0088CC"), not null # topic_id :integer # topic_count :integer default(0), not null # created_at :datetime not null diff --git a/config/site_settings.yml b/config/site_settings.yml index f2956bd4588..2abaf22150c 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -178,7 +178,7 @@ basic: client: true type: list list_type: compact - default: 'BF1E2E|F1592A|F7941D|9EB83B|3AB54A|12A89D|25AAE2|0E76BD|652D90|92278F|ED207B|8C6238|231F20|808281|B3B5B4|283890' + default: 'BF1E2E|F1592A|F7941D|9EB83B|3AB54A|12A89D|25AAE2|0E76BD|652D90|92278F|ED207B|8C6238|231F20|808281|B3B5B4|E45735' category_style: client: true default: 'bullet' diff --git a/db/fixtures/001_categories.rb b/db/fixtures/001_categories.rb index 982eee7dad8..397b7f3201b 100644 --- a/db/fixtures/001_categories.rb +++ b/db/fixtures/001_categories.rb @@ -16,7 +16,7 @@ if uncat_id == -1 || !Category.exists?(uncat_id) result = DB.query_single "INSERT INTO categories (name,color,slug,description,text_color, user_id, created_at, updated_at, position, name_lower) - VALUES ('#{name}', 'AB9364', 'uncategorized', '', 'FFFFFF', -1, now(), now(), 1, '#{name.downcase}' ) + VALUES ('#{name}', '0088CC', 'uncategorized', '', 'FFFFFF', -1, now(), now(), 1, '#{name.downcase}' ) RETURNING id " category_id = result.first.to_i diff --git a/db/migrate/20120712150500_create_categories.rb b/db/migrate/20120712150500_create_categories.rb index 90adb73d10d..329afb22bcd 100644 --- a/db/migrate/20120712150500_create_categories.rb +++ b/db/migrate/20120712150500_create_categories.rb @@ -2,7 +2,7 @@ class CreateCategories < ActiveRecord::Migration[4.2] def up create_table :categories do |t| t.string :name, limit: 50, null: false - t.string :color, limit: 6, null: false, default: 'AB9364' + t.string :color, limit: 6, null: false, default: '0088CC' t.integer :forum_thread_id, null: true t.integer :top1_forum_thread_id, null: true t.integer :top2_forum_thread_id, null: true diff --git a/db/migrate/20131022045114_add_uncategorized_category.rb b/db/migrate/20131022045114_add_uncategorized_category.rb index 4055fefb055..21c3c74c983 100644 --- a/db/migrate/20131022045114_add_uncategorized_category.rb +++ b/db/migrate/20131022045114_add_uncategorized_category.rb @@ -9,7 +9,7 @@ class AddUncategorizedCategory < ActiveRecord::Migration[4.2] result = execute "INSERT INTO categories (name,color,slug,description,text_color, user_id, created_at, updated_at, position) - VALUES ('#{name}', 'AB9364', 'uncategorized', '', 'FFFFFF', -1, now(), now(), 0 ) + VALUES ('#{name}', '0088CC', 'uncategorized', '', 'FFFFFF', -1, now(), now(), 0 ) RETURNING id " category_id = result[0]["id"].to_i diff --git a/db/migrate/20140120155706_add_lounge_category.rb b/db/migrate/20140120155706_add_lounge_category.rb index 9e2517d8ddb..fea475a7d3b 100644 --- a/db/migrate/20140120155706_add_lounge_category.rb +++ b/db/migrate/20140120155706_add_lounge_category.rb @@ -16,7 +16,7 @@ class AddLoungeCategory < ActiveRecord::Migration[4.2] result = DB.query_single "INSERT INTO categories (name, color, text_color, created_at, updated_at, user_id, slug, description, read_restricted, position) - VALUES (:name, 'EEEEEE', '652D90', now(), now(), -1, '', :description, true, 3) + VALUES (:name, 'A461EF', '652D90', now(), now(), -1, '', :description, true, 3) RETURNING id", name: name, description: description category_id = result.first.to_i diff --git a/db/migrate/20140227201005_add_staff_category.rb b/db/migrate/20140227201005_add_staff_category.rb index 837daaaef0e..9a990806b96 100644 --- a/db/migrate/20140227201005_add_staff_category.rb +++ b/db/migrate/20140227201005_add_staff_category.rb @@ -12,7 +12,7 @@ class AddStaffCategory < ActiveRecord::Migration[4.2] result = DB.query_single "INSERT INTO categories (name, color, text_color, created_at, updated_at, user_id, slug, description, read_restricted, position) - VALUES (:name, '283890', 'FFFFFF', now(), now(), -1, '', :description, true, 2) + VALUES (:name, 'E45735', 'FFFFFF', now(), now(), -1, '', :description, true, 2) RETURNING id", name: name, description: description category_id = result.first.to_i diff --git a/spec/fixtures/json/import-export.json b/spec/fixtures/json/import-export.json index 02446824cbb..bae4e2b7bfa 100644 --- a/spec/fixtures/json/import-export.json +++ b/spec/fixtures/json/import-export.json @@ -4,12 +4,12 @@ {"id":42,"name":"custom_group_import","created_at":"2017-10-26T15:33:46.328Z","mentionable_level":0,"messageable_level":0,"visibility_level":0,"automatic_membership_email_domains":"","automatic_membership_retroactive":false,"primary_group":false,"title":null,"grant_trust_level":null,"incoming_email":null,"user_ids":[2]} ], "categories":[ - {"id":8,"name":"Custom Category","color":"AB9364","created_at":"2017-10-26T15:32:44.083Z","user_id":1,"slug":"custom-category","description":null,"text_color":"FFFFFF","auto_close_hours":null,"parent_category_id":3,"auto_close_based_on_last_post":false,"topic_template":"","suppress_from_latest":false,"all_topics_wiki":false,"permissions_params":{"custom_group":1,"everyone":2}}, - {"id":10,"name":"Site Feedback Import","color":"808281","created_at":"2017-10-26T17:12:39.995Z","user_id":-1,"slug":"site-feedback-import","description":"Discussion about this site, its organization, how it works, and how we can improve it.","text_color":"FFFFFF","auto_close_hours":null,"parent_category_id":null,"auto_close_based_on_last_post":false,"topic_template":null,"suppress_from_latest":false,"all_topics_wiki":false,"permissions_params":{}}, - {"id":11,"name":"Uncategorized Import","color":"AB9364","created_at":"2017-10-26T17:12:32.359Z","user_id":-1,"slug":"uncategorized-import","description":"","text_color":"FFFFFF","auto_close_hours":null,"parent_category_id":null,"auto_close_based_on_last_post":false,"topic_template":null,"suppress_from_latest":false,"all_topics_wiki":false,"permissions_params":{}}, - {"id":12,"name":"Lounge Import","color":"EEEEEE","created_at":"2017-10-26T17:12:39.490Z","user_id":-1,"slug":"lounge-import","description":"A category exclusive to members with trust level 3 and higher.","text_color":"652D90","auto_close_hours":null,"parent_category_id":null,"auto_close_based_on_last_post":false,"topic_template":null,"suppress_from_latest":false,"all_topics_wiki":false,"permissions_params":{"trust_level_3":1}}, - {"id":13,"name":"Staff Import","color":"283890","created_at":"2017-10-26T17:12:42.806Z","user_id":2,"slug":"staff-import","description":"Private category for staff discussions. Topics are only visible to admins and moderators.","text_color":"FFFFFF","auto_close_hours":null,"parent_category_id":null,"auto_close_based_on_last_post":false,"topic_template":null,"suppress_from_latest":false,"all_topics_wiki":false,"permissions_params":{"custom_group_import":1,"staff":1}}, - {"id":15,"name":"Custom Category Import","color":"AB9364","created_at":"2017-10-26T15:32:44.083Z","user_id":2,"slug":"custom-category-import","description":null,"text_color":"FFFFFF","auto_close_hours":null,"parent_category_id":10,"auto_close_based_on_last_post":false,"topic_template":"","suppress_from_latest":false,"all_topics_wiki":false,"permissions_params":{"custom_group_import":1,"everyone":2}} + {"id":8,"name":"Custom Category","color":"0088CC","created_at":"2017-10-26T15:32:44.083Z","user_id":1,"slug":"custom-category","description":null,"text_color":"FFFFFF","auto_close_hours":null,"parent_category_id":3,"auto_close_based_on_last_post":false,"topic_template":"","suppress_from_latest":false,"all_topics_wiki":false,"permissions_params":{"custom_group":1,"everyone":2}}, + {"id":10,"name":"Site Feedback Import","color":"27AA5B","created_at":"2017-10-26T17:12:39.995Z","user_id":-1,"slug":"site-feedback-import","description":"Discussion about this site, its organization, how it works, and how we can improve it.","text_color":"FFFFFF","auto_close_hours":null,"parent_category_id":null,"auto_close_based_on_last_post":false,"topic_template":null,"suppress_from_latest":false,"all_topics_wiki":false,"permissions_params":{}}, + {"id":11,"name":"Uncategorized Import","color":"0088CC","created_at":"2017-10-26T17:12:32.359Z","user_id":-1,"slug":"uncategorized-import","description":"","text_color":"FFFFFF","auto_close_hours":null,"parent_category_id":null,"auto_close_based_on_last_post":false,"topic_template":null,"suppress_from_latest":false,"all_topics_wiki":false,"permissions_params":{}}, + {"id":12,"name":"Lounge Import","color":"A461EF","created_at":"2017-10-26T17:12:39.490Z","user_id":-1,"slug":"lounge-import","description":"A category exclusive to members with trust level 3 and higher.","text_color":"652D90","auto_close_hours":null,"parent_category_id":null,"auto_close_based_on_last_post":false,"topic_template":null,"suppress_from_latest":false,"all_topics_wiki":false,"permissions_params":{"trust_level_3":1}}, + {"id":13,"name":"Staff Import","color":"E45735","created_at":"2017-10-26T17:12:42.806Z","user_id":2,"slug":"staff-import","description":"Private category for staff discussions. Topics are only visible to admins and moderators.","text_color":"FFFFFF","auto_close_hours":null,"parent_category_id":null,"auto_close_based_on_last_post":false,"topic_template":null,"suppress_from_latest":false,"all_topics_wiki":false,"permissions_params":{"custom_group_import":1,"staff":1}}, + {"id":15,"name":"Custom Category Import","color":"0088CC","created_at":"2017-10-26T15:32:44.083Z","user_id":2,"slug":"custom-category-import","description":null,"text_color":"FFFFFF","auto_close_hours":null,"parent_category_id":10,"auto_close_based_on_last_post":false,"topic_template":"","suppress_from_latest":false,"all_topics_wiki":false,"permissions_params":{"custom_group_import":1,"everyone":2}} ], "users":[ {"id":1,"email":"email@example.com","username":"example","name":"Example","created_at":"2017-10-07T15:01:24.597Z","trust_level":4,"active":true,"last_emailed_at":null}, diff --git a/test/javascripts/fixtures/discovery_fixtures.js.es6 b/test/javascripts/fixtures/discovery_fixtures.js.es6 index 37917b05200..ef6edc8810b 100644 --- a/test/javascripts/fixtures/discovery_fixtures.js.es6 +++ b/test/javascripts/fixtures/discovery_fixtures.js.es6 @@ -1867,7 +1867,7 @@ export default { { id: 17, name: "uncategorized", - color: "AB9364", + color: "0088CC", text_color: "FFFFFF", slug: "uncategorized", topic_count: 229, @@ -5911,7 +5911,7 @@ export default { { id: 1, name: "Uncategorized", - color: "AB9364", + color: "0088CC", text_color: "FFFFFF", slug: "uncategorized", topic_count: 1, @@ -5940,7 +5940,7 @@ export default { { id: 3, name: "Site Feedback", - color: "808281", + color: "27AA5B", text_color: "FFFFFF", slug: "site-feedback", topic_count: 0, diff --git a/test/javascripts/fixtures/group-fixtures.js.es6 b/test/javascripts/fixtures/group-fixtures.js.es6 index 50adde6fef0..4d95a5dc1b3 100644 --- a/test/javascripts/fixtures/group-fixtures.js.es6 +++ b/test/javascripts/fixtures/group-fixtures.js.es6 @@ -509,7 +509,7 @@ export default { category: { id: 27, name: "translations", - color: "808281", + color: "27AA5B", topic_id: 14549, topic_count: 146, created_at: "2014-04-07T20:30:17.623Z", diff --git a/test/javascripts/fixtures/site-fixtures.js.es6 b/test/javascripts/fixtures/site-fixtures.js.es6 index 03c95cc79a2..f26eaba73ff 100644 --- a/test/javascripts/fixtures/site-fixtures.js.es6 +++ b/test/javascripts/fixtures/site-fixtures.js.es6 @@ -206,7 +206,7 @@ export default { { id: 27, name: "translations", - color: "808281", + color: "27AA5B", text_color: "FFFFFF", slug: "translations", topic_count: 95, @@ -376,7 +376,7 @@ export default { { id: 17, name: "uncategorized", - color: "AB9364", + color: "0088CC", text_color: "FFFFFF", slug: "uncategorized", topic_count: 342, diff --git a/test/javascripts/helpers/site-settings.js b/test/javascripts/helpers/site-settings.js index 4c8775b5f04..fd4a29b8b34 100644 --- a/test/javascripts/helpers/site-settings.js +++ b/test/javascripts/helpers/site-settings.js @@ -13,7 +13,7 @@ Discourse.SiteSettingsOriginal = { "post_menu":"like-count|like|share|flag|edit|bookmark|delete|admin|reply", "post_menu_hidden_items":"flag|edit|delete|admin", "share_links":"twitter|facebook|google+|email", - "category_colors":"BF1E2E|F1592A|F7941D|9EB83B|3AB54A|12A89D|25AAE2|0E76BD|652D90|92278F|ED207B|8C6238|231F20|808281|B3B5B4|283890", + "category_colors":"BF1E2E|F1592A|F7941D|9EB83B|3AB54A|12A89D|25AAE2|0E76BD|652D90|92278F|ED207B|8C6238|231F20|27AA5B|B3B5B4|E45735", "enable_mobile_theme":true, "relative_date_duration":14, "fixed_category_positions":false, diff --git a/test/javascripts/helpers/site.js.es6 b/test/javascripts/helpers/site.js.es6 index 61ffeb14773..98dacfcd357 100644 --- a/test/javascripts/helpers/site.js.es6 +++ b/test/javascripts/helpers/site.js.es6 @@ -216,7 +216,7 @@ PreloadStore.store("site", { { id: 17, name: "uncategorized", - color: "AB9364", + color: "0088CC", text_color: "FFFFFF", slug: "uncategorized", topic_count: 229,