summaryrefslogtreecommitdiff
path: root/src/client/sidebar.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2020-11-03 17:00:47 +0900
committersyuilo <syuilotan@yahoo.co.jp>2020-11-03 17:00:47 +0900
commitd7085b17fec7c55339efacb9e072f2228e1fc97a (patch)
treec4e263455e4e1aa88071c5b58acb3da45874b5e6 /src/client/sidebar.ts
parentTweak page window initial size (diff)
downloadmisskey-d7085b17fec7c55339efacb9e072f2228e1fc97a.tar.gz
misskey-d7085b17fec7c55339efacb9e072f2228e1fc97a.tar.bz2
misskey-d7085b17fec7c55339efacb9e072f2228e1fc97a.zip
wip: Desktop UI
Diffstat (limited to 'src/client/sidebar.ts')
-rw-r--r--src/client/sidebar.ts29
1 files changed, 23 insertions, 6 deletions
diff --git a/src/client/sidebar.ts b/src/client/sidebar.ts
index 4b7acb0a60..1132431e1c 100644
--- a/src/client/sidebar.ts
+++ b/src/client/sidebar.ts
@@ -2,8 +2,8 @@ import { faBell, faComments, faEnvelope } from '@fortawesome/free-regular-svg-ic
import { faAt, faBroadcastTower, faCloud, faColumns, faDoorClosed, faFileAlt, faFireAlt, faGamepad, faHashtag, faListUl, faSatellite, faSatelliteDish, faSearch, faStar, faTerminal, faUserClock, faUsers } from '@fortawesome/free-solid-svg-icons';
import { computed } from 'vue';
import { store } from '@/store';
-import { deckmode } from '@/config';
import { search } from '@/scripts/search';
+import * as os from '@/os';
export const sidebarDef = {
notifications: {
@@ -119,12 +119,29 @@ export const sidebarDef = {
show: computed(() => store.getters.isSignedIn),
to: computed(() => `/@${store.state.i.username}/room`),
},
- deck: {
- title: deckmode ? 'undeck' : 'deck',
+ ui: {
+ title: 'switchUi',
icon: faColumns,
- action: () => {
- localStorage.setItem('deckmode', (!deckmode).toString());
- location.reload();
+ action: (ev) => {
+ os.modalMenu([{
+ text: 'Default',
+ action: () => {
+ localStorage.setItem('ui', 'default');
+ location.reload();
+ }
+ }, {
+ text: 'Deck',
+ action: () => {
+ localStorage.setItem('ui', 'deck');
+ location.reload();
+ }
+ }, {
+ text: 'Desktop',
+ action: () => {
+ localStorage.setItem('ui', 'desktop');
+ location.reload();
+ }
+ }], ev.currentTarget || ev.target);
},
},
};