Themes: Apply themes only for one device

Closes #424
This commit is contained in:
veselcraft 2022-01-17 19:01:30 +03:00
parent 8e07a59172
commit bf81402174
No known key found for this signature in database
GPG key ID: AED66BC1AC628A4E
4 changed files with 13 additions and 1 deletions

View file

@ -353,7 +353,7 @@ final class UserPresenter extends OpenVKPresenter
} else if($_GET['act'] === "interface") { } else if($_GET['act'] === "interface") {
if (isset(Themepacks::i()[$this->postParam("style")]) || $this->postParam("style") === Themepacks::DEFAULT_THEME_ID) if (isset(Themepacks::i()[$this->postParam("style")]) || $this->postParam("style") === Themepacks::DEFAULT_THEME_ID)
{ {
$user->setStyle($this->postParam("style")); if ($this->postParam("theme_for_session") != "1") $user->setStyle($this->postParam("style"));
$this->setSessionTheme($this->postParam("style")); $this->setSessionTheme($this->postParam("style"));
} }

View file

@ -462,6 +462,14 @@
</select> </select>
</td> </td>
</tr> </tr>
<tr>
<td width="120" valign="top" align="right">
<input type="checkbox" name="theme_for_session" value="1">
</td>
<td>
{_apply_style_for_this_device}
</td>
</tr>
<tr> <tr>
<td> <td>

View file

@ -369,6 +369,8 @@
"cut" = "Cut"; "cut" = "Cut";
"round_avatars" = "Round avatars"; "round_avatars" = "Round avatars";
"apply_style_for_this_device" = "Apply style only for this device";
"search_for_groups" = "Search for groups"; "search_for_groups" = "Search for groups";
"search_for_people" = "Search for people"; "search_for_people" = "Search for people";
"search_button" = "Find"; "search_button" = "Find";

View file

@ -387,6 +387,8 @@
"cut" = "Обрезка"; "cut" = "Обрезка";
"round_avatars" = "Круглый аватар"; "round_avatars" = "Круглый аватар";
"apply_style_for_this_device" = "Применить стиль только для этого устройства";
"search_for_groups" = "Поиск групп"; "search_for_groups" = "Поиск групп";
"search_for_people" = "Поиск людей"; "search_for_people" = "Поиск людей";
"search_button" = "Найти"; "search_button" = "Найти";