闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

266 lines
4.4 KiB

Web Push Notifications (#3243) * feat: Register push subscription * feat: Notify when mentioned * feat: Boost, favourite, reply, follow, follow request * feat: Notification interaction * feat: Handle change of public key * feat: Unsubscribe if things go wrong * feat: Do not send normal notifications if push is enabled * feat: Focus client if open * refactor: Move push logic to WebPushSubscription * feat: Better title and body * feat: Localize messages * chore: Fix lint errors * feat: Settings * refactor: Lazy load * fix: Check if push settings exist * feat: Device-based preferences * refactor: Simplify logic * refactor: Pull request feedback * refactor: Pull request feedback * refactor: Create /api/web/push_subscriptions endpoint * feat: Spec PushSubscriptionController * refactor: WebPushSubscription => Web::PushSubscription * feat: Spec Web::PushSubscription * feat: Display first media attachment * feat: Support direction * fix: Stuff broken while rebasing * refactor: Integration with session activations * refactor: Cleanup * refactor: Simplify implementation * feat: Set VAPID keys via environment * chore: Comments * fix: Crash when no alerts * fix: Set VAPID keys in testing environment * fix: Follow link * feat: Notification actions * fix: Delete previous subscription * chore: Temporary logs * refactor: Move migration to a later date * fix: Fetch the correct session activation and misc bugs * refactor: Move migration to a later date * fix: Remove follow request (no notifications) * feat: Send administrator contact to push service * feat: Set time-to-live * fix: Do not show sensitive images * fix: Reducer crash in error handling * feat: Add badge * chore: Fix lint error * fix: Checkbox label overlap * fix: Check for payload support * fix: Rename action "type" (crash in latest Chrome) * feat: Action to expand notification * fix: Lint errors * fix: Unescape notification body * fix: Do not allow boosting if the status is hidden * feat: Add VAPID keys to the production sample environment * fix: Strip HTML tags from status * refactor: Better error messages * refactor: Handle browser not implementing the VAPID protocol (Samsung Internet) * fix: Error when target_status is nil * fix: Handle lack of image * fix: Delete reference to invalid subscriptions * feat: Better error handling * fix: Unescape HTML characters after tags are striped * refactor: Simpify code * fix: Modify to work with #4091 * Sort strings alphabetically * i18n: Updated Polish translation it annoys me that it's not fully localized :P * refactor: Use current_session in PushSubscriptionController * fix: Rebase mistake * fix: Set cacheName to mastodon * refactor: Pull request feedback * refactor: Remove logging statements * chore(yarn): Fix conflicts with master * chore(yarn): Copy latest from master * chore(yarn): Readd offline-plugin * refactor: Use save! and update! * refactor: Send notifications async * fix: Allow retry when push fails * fix: Save track for failed pushes * fix: Minify sw.js * fix: Remove account_id from fabricator
7 years ago
  1. body.rtl {
  2. direction: rtl;
  3. .column-link__icon,
  4. .column-header__icon {
  5. margin-right: 0;
  6. margin-left: 5px;
  7. }
  8. .compose-form .compose-form__buttons-wrapper .character-counter__wrapper {
  9. margin-right: 0;
  10. margin-left: 4px;
  11. }
  12. .navigation-bar__profile {
  13. margin-left: 0;
  14. margin-right: 8px;
  15. }
  16. .search__input {
  17. padding-right: 10px;
  18. padding-left: 30px;
  19. }
  20. .search__icon .fa {
  21. right: auto;
  22. left: 10px;
  23. }
  24. .column-header__buttons {
  25. left: 0;
  26. right: auto;
  27. margin-left: -15px;
  28. margin-right: 0;
  29. }
  30. .column-inline-form .icon-button {
  31. margin-left: 0;
  32. margin-right: 5px;
  33. }
  34. .column-header__links .text-btn {
  35. margin-left: 10px;
  36. margin-right: 0;
  37. }
  38. .account__avatar-wrapper {
  39. float: right;
  40. }
  41. .column-header__back-button {
  42. padding-left: 5px;
  43. padding-right: 0;
  44. }
  45. .column-header__setting-arrows {
  46. float: left;
  47. }
  48. .setting-toggle {
  49. margin-left: 0;
  50. margin-right: 8px;
  51. }
  52. .setting-meta__label {
  53. float: left;
  54. }
  55. .status__avatar {
  56. left: auto;
  57. right: 10px;
  58. }
  59. .status,
  60. .activity-stream .status.light {
  61. padding-left: 10px;
  62. padding-right: 68px;
  63. }
  64. .status__info .status__display-name,
  65. .activity-stream .status.light .status__display-name {
  66. padding-left: 25px;
  67. padding-right: 0;
  68. }
  69. .activity-stream .pre-header {
  70. padding-right: 68px;
  71. padding-left: 0;
  72. }
  73. .status__prepend {
  74. margin-left: 0;
  75. margin-right: 68px;
  76. }
  77. .status__prepend-icon-wrapper {
  78. left: auto;
  79. right: -26px;
  80. }
  81. .activity-stream .pre-header .pre-header__icon {
  82. left: auto;
  83. right: 42px;
  84. }
  85. .account__avatar-overlay-overlay {
  86. right: auto;
  87. left: 0;
  88. }
  89. .column-back-button--slim-button {
  90. right: auto;
  91. left: 0;
  92. }
  93. .status__relative-time,
  94. .activity-stream .status.light .status__header .status__meta {
  95. float: left;
  96. }
  97. .activity-stream .detailed-status.light .detailed-status__display-name > div {
  98. float: right;
  99. margin-right: 0;
  100. margin-left: 10px;
  101. }
  102. .activity-stream .detailed-status.light .detailed-status__meta span > span {
  103. margin-left: 0;
  104. margin-right: 6px;
  105. }
  106. .status__action-bar-button {
  107. float: right;
  108. margin-right: 0;
  109. margin-left: 18px;
  110. }
  111. .status__action-bar-dropdown {
  112. float: right;
  113. }
  114. .privacy-dropdown__dropdown {
  115. margin-left: 0;
  116. margin-right: 40px;
  117. }
  118. .privacy-dropdown__option__icon {
  119. margin-left: 10px;
  120. margin-right: 0;
  121. }
  122. .detailed-status__display-avatar {
  123. margin-right: 0;
  124. margin-left: 10px;
  125. float: right;
  126. }
  127. .detailed-status__favorites,
  128. .detailed-status__reblogs {
  129. margin-left: 0;
  130. margin-right: 6px;
  131. }
  132. .fa-ul {
  133. margin-left: 0;
  134. margin-left: 2.14285714em;
  135. }
  136. .fa-li {
  137. left: auto;
  138. right: -2.14285714em;
  139. }
  140. .admin-wrapper .sidebar ul a i.fa,
  141. a.table-action-link i.fa {
  142. margin-right: 0;
  143. margin-left: 5px;
  144. }
  145. .simple_form .check_boxes .checkbox label,
  146. .simple_form .input.with_label.boolean label.checkbox {
  147. padding-left: 0;
  148. padding-right: 25px;
  149. }
  150. .simple_form .check_boxes .checkbox input[type="checkbox"],
  151. .simple_form .input.boolean input[type="checkbox"] {
  152. left: auto;
  153. right: 0;
  154. }
  155. .simple_form .input-with-append .input input {
  156. padding-left: 127px;
  157. padding-right: 0;
  158. }
  159. .simple_form .input-with-append .append {
  160. right: auto;
  161. left: 0;
  162. }
  163. .table th,
  164. .table td {
  165. text-align: right;
  166. }
  167. .filters .filter-subset {
  168. margin-right: 0;
  169. margin-left: 45px;
  170. }
  171. .landing-page .header-wrapper .mascot {
  172. right: 60px;
  173. left: auto;
  174. }
  175. .landing-page .header .hero .floats .float-1 {
  176. left: -120px;
  177. right: auto;
  178. }
  179. .landing-page .header .hero .floats .float-2 {
  180. left: 210px;
  181. right: auto;
  182. }
  183. .landing-page .header .hero .floats .float-3 {
  184. left: 110px;
  185. right: auto;
  186. }
  187. .landing-page .header .links .brand img {
  188. left: 0;
  189. }
  190. .landing-page .fa-external-link {
  191. padding-right: 5px;
  192. padding-left: 0 !important;
  193. }
  194. .landing-page .features #mastodon-timeline {
  195. margin-right: 0;
  196. margin-left: 30px;
  197. }
  198. @media screen and (min-width: 631px) {
  199. .column,
  200. .drawer {
  201. padding-left: 5px;
  202. padding-right: 5px;
  203. &:first-child {
  204. padding-left: 5px;
  205. padding-right: 10px;
  206. }
  207. }
  208. .columns-area > div {
  209. .column,
  210. .drawer {
  211. padding-left: 5px;
  212. padding-right: 5px;
  213. }
  214. }
  215. }
  216. }