mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
Browser: Reorder storage inspector columns
Show "domain" and "path" as the first two columns. Since we're showing all cookies for all domains and all paths, you will probably want to see the domain and path before the actual cookie name and value.
This commit is contained in:
parent
68ee193464
commit
62fbf282b1
2 changed files with 10 additions and 10 deletions
|
@ -29,14 +29,14 @@ void CookiesModel::clear_items()
|
||||||
String CookiesModel::column_name(int column) const
|
String CookiesModel::column_name(int column) const
|
||||||
{
|
{
|
||||||
switch (column) {
|
switch (column) {
|
||||||
case Column::Name:
|
|
||||||
return "Name";
|
|
||||||
case Column::Value:
|
|
||||||
return "Value";
|
|
||||||
case Column::Domain:
|
case Column::Domain:
|
||||||
return "Domain";
|
return "Domain";
|
||||||
case Column::Path:
|
case Column::Path:
|
||||||
return "Path";
|
return "Path";
|
||||||
|
case Column::Name:
|
||||||
|
return "Name";
|
||||||
|
case Column::Value:
|
||||||
|
return "Value";
|
||||||
case Column::ExpiryTime:
|
case Column::ExpiryTime:
|
||||||
return "Expiry time";
|
return "Expiry time";
|
||||||
case Column::__Count:
|
case Column::__Count:
|
||||||
|
@ -61,14 +61,14 @@ GUI::Variant CookiesModel::data(GUI::ModelIndex const& index, GUI::ModelRole rol
|
||||||
const auto& cookie = m_cookies[index.row()];
|
const auto& cookie = m_cookies[index.row()];
|
||||||
|
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case Column::Name:
|
|
||||||
return cookie.name;
|
|
||||||
case Column::Value:
|
|
||||||
return cookie.value;
|
|
||||||
case Column::Domain:
|
case Column::Domain:
|
||||||
return cookie.domain;
|
return cookie.domain;
|
||||||
case Column::Path:
|
case Column::Path:
|
||||||
return cookie.path;
|
return cookie.path;
|
||||||
|
case Column::Name:
|
||||||
|
return cookie.name;
|
||||||
|
case Column::Value:
|
||||||
|
return cookie.value;
|
||||||
case Column::ExpiryTime:
|
case Column::ExpiryTime:
|
||||||
return cookie.expiry_time.to_string();
|
return cookie.expiry_time.to_string();
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,10 +17,10 @@ namespace Browser {
|
||||||
class CookiesModel final : public GUI::Model {
|
class CookiesModel final : public GUI::Model {
|
||||||
public:
|
public:
|
||||||
enum Column {
|
enum Column {
|
||||||
Name,
|
|
||||||
Value,
|
|
||||||
Domain,
|
Domain,
|
||||||
Path,
|
Path,
|
||||||
|
Name,
|
||||||
|
Value,
|
||||||
ExpiryTime,
|
ExpiryTime,
|
||||||
__Count,
|
__Count,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue