mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-25 01:08:50 +01:00
Show synced icon & link to instance for more settings
Context: some users were confused why some settings are not on Phanpy when it can be set on their own instance's web UI
This commit is contained in:
parent
56365ebc39
commit
715357c8c9
3 changed files with 22 additions and 2 deletions
|
@ -101,6 +101,7 @@ export const ICONS = {
|
||||||
keyboard: () => import('@iconify-icons/mingcute/keyboard-line'),
|
keyboard: () => import('@iconify-icons/mingcute/keyboard-line'),
|
||||||
'mute-user': () => import('@iconify-icons/mingcute/user-hide-line'),
|
'mute-user': () => import('@iconify-icons/mingcute/user-hide-line'),
|
||||||
'block-user': () => import('@iconify-icons/mingcute/user-security-line'),
|
'block-user': () => import('@iconify-icons/mingcute/user-security-line'),
|
||||||
|
cloud: () => import('@iconify-icons/mingcute/cloud-line'),
|
||||||
};
|
};
|
||||||
|
|
||||||
function Icon({
|
function Icon({
|
||||||
|
|
|
@ -135,3 +135,8 @@
|
||||||
padding-inline: 16px;
|
padding-inline: 16px;
|
||||||
color: var(--text-insignificant-color);
|
color: var(--text-insignificant-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#settings-container .synced-icon {
|
||||||
|
color: var(--link-color);
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ function Settings({ onClose }) {
|
||||||
const currentTextSize = store.local.get('textSize') || DEFAULT_TEXT_SIZE;
|
const currentTextSize = store.local.get('textSize') || DEFAULT_TEXT_SIZE;
|
||||||
|
|
||||||
const [prefs, setPrefs] = useState(store.account.get('preferences') || {});
|
const [prefs, setPrefs] = useState(store.account.get('preferences') || {});
|
||||||
const { masto, authenticated } = api();
|
const { masto, authenticated, instance } = api();
|
||||||
// Get preferences every time Settings is opened
|
// Get preferences every time Settings is opened
|
||||||
// NOTE: Disabled for now because I don't expect this to change often. Also for some reason, the /api/v1/preferences endpoint is cached for a while and return old prefs if refresh immediately after changing them.
|
// NOTE: Disabled for now because I don't expect this to change often. Also for some reason, the /api/v1/preferences endpoint is cached for a while and return old prefs if refresh immediately after changing them.
|
||||||
// useEffect(() => {
|
// useEffect(() => {
|
||||||
|
@ -178,7 +178,8 @@ function Settings({ onClose }) {
|
||||||
<li>
|
<li>
|
||||||
<div>
|
<div>
|
||||||
<label for="posting-privacy-field">
|
<label for="posting-privacy-field">
|
||||||
Default visibility
|
Default visibility{' '}
|
||||||
|
<Icon icon="cloud" alt="Synced" class="synced-icon" />
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -217,6 +218,19 @@ function Settings({ onClose }) {
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
<p class="section-postnote">
|
||||||
|
<Icon icon="cloud" alt="Synced" class="synced-icon" />{' '}
|
||||||
|
<small>
|
||||||
|
Synced to your instance server's settings.{' '}
|
||||||
|
<a
|
||||||
|
href={`https://${instance}/`}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
Go to your instance ({instance}) for more settings.
|
||||||
|
</a>
|
||||||
|
</small>
|
||||||
|
</p>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<h3>Experiments</h3>
|
<h3>Experiments</h3>
|
||||||
|
|
Loading…
Reference in a new issue