| 1 |
<?php |
| 2 |
namespace MediaWiki\Skins\Vector; |
| 3 |
|
| 4 |
use FatalError; |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
final class Constants { |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
public const SKIN_NAME_MODERN = 'vector-2022'; |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
public const SKIN_NAME_LEGACY = 'vector'; |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
public const SKIN_VERSION_LEGACY = '1'; |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
public const SKIN_VERSION_LATEST = '2'; |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
public const CONFIG_KEY_DEFAULT_SKIN_VERSION_FOR_NEW_ACCOUNTS = |
| 40 |
'VectorDefaultSkinVersionForNewAccounts'; |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
public const PREF_KEY_SKIN = 'skin'; |
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
public const CONFIG_KEY_FULLY_INITIALISED = 'FullyInitialised'; |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
public const REQUIREMENT_FULLY_INITIALISED = 'FullyInitialised'; |
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
public const REQUIREMENT_LOGGED_IN = 'LoggedIn'; |
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
public const FEATURE_LANGUAGE_IN_HEADER = 'LanguageInHeader'; |
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
public const CONFIG_KEY_LANGUAGE_IN_HEADER = 'VectorLanguageInHeader'; |
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
public const REQUIREMENT_LANGUAGE_IN_HEADER = 'LanguageInHeader'; |
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
public const CONFIG_STICKY_HEADER = 'VectorStickyHeader'; |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
public const REQUIREMENT_STICKY_HEADER = 'StickyHeader'; |
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
public const FEATURE_STICKY_HEADER = 'StickyHeader'; |
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
public const CONFIG_WEB_AB_TEST_ENROLLMENT = 'VectorWebABTestEnrollment'; |
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
public const SEARCH_BOX_INPUT_LOCATION_MOVED = 'header-moved'; |
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
public const SEARCH_BOX_INPUT_LOCATION_DEFAULT = 'header-navigation'; |
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
public const REQUIREMENT_IS_MAIN_PAGE = 'IsMainPage'; |
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
public const REQUIREMENT_LANGUAGE_IN_MAIN_PAGE_HEADER = 'LanguageInMainPageHeader'; |
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
public const CONFIG_LANGUAGE_IN_MAIN_PAGE_HEADER = 'VectorLanguageInMainPageHeader'; |
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
public const FEATURE_LANGUAGE_IN_MAIN_PAGE_HEADER = 'LanguageInMainPageHeader'; |
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
public const WEB_AB_TEST_ARTICLE_ID_FACTORY_SERVICE = 'WikimediaEvents.WebABTestArticleIdFactory'; |
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
public const FEATURE_PAGE_TOOLS_PINNED = 'PageToolsPinned'; |
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
public const REQUIREMENT_PAGE_TOOLS_PINNED = 'PageToolsPinned'; |
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
public const PREF_KEY_PAGE_TOOLS_PINNED = 'vector-page-tools-pinned'; |
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
public const REQUIREMENT_TOC_PINNED = 'TOCPinned'; |
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
public const PREF_KEY_TOC_PINNED = 'vector-toc-pinned'; |
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
public const FEATURE_TOC_PINNED = 'TOCPinned'; |
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
public const FEATURE_MAIN_MENU_PINNED = 'MainMenuPinned'; |
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
public const REQUIREMENT_MAIN_MENU_PINNED = 'MainMenuPinned'; |
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
public const PREF_KEY_MAIN_MENU_PINNED = 'vector-main-menu-pinned'; |
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
public const FEATURE_LIMITED_WIDTH = 'LimitedWidth'; |
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
public const REQUIREMENT_LIMITED_WIDTH = 'LimitedWidth'; |
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
public const PREF_KEY_LIMITED_WIDTH = 'vector-limited-width'; |
| 210 |
|
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
public const FEATURE_LIMITED_WIDTH_CONTENT = 'LimitedWidthContent'; |
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
public const REQUIREMENT_LIMITED_WIDTH_CONTENT = 'LimitedWidthContent'; |
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
|
| 224 |
public const CONFIG_DEFAULT_LIMITED_WIDTH = 1; |
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
public const PREF_KEY_FONT_SIZE = 'vector-font-size'; |
| 230 |
|
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
public const FEATURE_FONT_SIZE = 'CustomFontSize'; |
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
public const REQUIREMENT_FONT_SIZE = 'CustomFontSize'; |
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
public const FEATURE_APPEARANCE_PINNED = 'AppearancePinned'; |
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
|
| 249 |
public const REQUIREMENT_APPEARANCE_PINNED = 'AppearancePinned'; |
| 250 |
|
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
public const PREF_KEY_APPEARANCE_PINNED = 'vector-appearance-pinned'; |
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
public const CONFIG_KEY_NIGHT_MODE = 'VectorNightMode'; |
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
public const FEATURE_NIGHT_MODE = 'NightMode'; |
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
public const REQUIREMENT_NIGHT_MODE = 'NightMode'; |
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
public const PREF_KEY_NIGHT_MODE = 'vector-theme'; |
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
public const REQUIREMENT_PREF_NIGHT_MODE = 'PrefNightMode'; |
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
public const PREF_NIGHT_MODE = 'PrefNightMode'; |
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
public const VECTOR_2022_BETA_KEY = 'vector-2022-beta-feature'; |
| 290 |
|
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
public const VECTOR_BETA_FEATURES = [ |
| 295 |
self::CONFIG_KEY_NIGHT_MODE, |
| 296 |
]; |
| 297 |
|
| 298 |
|
| 299 |
|
| 300 |
|
| 301 |
|
| 302 |
|
| 303 |
private function __construct() { |
| 304 |
throw new FatalError( "Cannot construct a utility class." ); |
| 305 |
} |
| 306 |
} |