mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
added symbols and labels
added makeLabel() to return a string for the host, in order: name, address, uuid added reorder sypport added movehost() to reorder added symbolpreview view to easilty show the symbol and label added symbol with sf, iscustom, offset vars to help added a picker to choose the symbol
This commit is contained in:
12
Resources/Assets.xcassets/custom.pc.symbolset/Contents.json
Normal file
12
Resources/Assets.xcassets/custom.pc.symbolset/Contents.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
},
|
||||||
|
"symbols" : [
|
||||||
|
{
|
||||||
|
"filename" : "custom.pc.svg",
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
117
Resources/Assets.xcassets/custom.pc.symbolset/custom.pc.svg
Normal file
117
Resources/Assets.xcassets/custom.pc.symbolset/custom.pc.svg
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--Generator: Apple Native CoreSVG 341-->
|
||||||
|
<!DOCTYPE svg
|
||||||
|
PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||||
|
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 3300 2200">
|
||||||
|
<!--glyph: "", point size: 100.0, font version: "20.0d10e1", template writer version: "138.0.0"-->
|
||||||
|
<style>.monochrome-1 {}
|
||||||
|
|
||||||
|
.multicolor-0:systemBlueColor {}
|
||||||
|
.multicolor-2:systemOrangeColor {}
|
||||||
|
.multicolor-3:custom {fill:#F7D7A7}
|
||||||
|
|
||||||
|
.hierarchical-0:tertiary {}
|
||||||
|
.hierarchical-2:tertiary {}
|
||||||
|
.hierarchical-3:primary {}
|
||||||
|
|
||||||
|
.SFSymbolsPreview007AFF {fill:#007AFF;opacity:1.0}
|
||||||
|
.SFSymbolsPreviewF7D7A7 {fill:#F7D7A7;opacity:1.0}
|
||||||
|
.SFSymbolsPreviewFF9500 {fill:#FF9500;opacity:1.0}
|
||||||
|
.SFSymbolsPreviewNone {fill:none;opacity:1.0}
|
||||||
|
</style>
|
||||||
|
<g id="Notes">
|
||||||
|
<rect height="2200" id="artboard" style="fill:white;opacity:1" width="3300" x="0" y="0"/>
|
||||||
|
<line style="fill:none;stroke:black;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="292" y2="292"/>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;font-weight:bold;" transform="matrix(1 0 0 1 263 322)">Weight/Scale Variations</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 559.711 322)">Ultralight</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 856.422 322)">Thin</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 1153.13 322)">Light</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 1449.84 322)">Regular</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 1746.56 322)">Medium</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2043.27 322)">Semibold</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2339.98 322)">Bold</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2636.69 322)">Heavy</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2933.4 322)">Black</text>
|
||||||
|
<line style="fill:none;stroke:black;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1903" y2="1903"/>
|
||||||
|
<g transform="matrix(0.2 0 0 0.2 263 1933)">
|
||||||
|
<path d="m46.2402 4.15039c21.7773 0 39.4531-17.627 39.4531-39.4043s-17.6758-39.4043-39.4531-39.4043c-21.7285 0-39.4043 17.627-39.4043 39.4043s17.6758 39.4043 39.4043 39.4043Zm0-7.42188c-17.6758 0-31.9336-14.3066-31.9336-31.9824s14.2578-31.9824 31.9336-31.9824 31.9824 14.3066 31.9824 31.9824-14.3066 31.9824-31.9824 31.9824Zm-17.9688-31.9824c0 2.14844 1.51367 3.61328 3.75977 3.61328h10.498v10.5957c0 2.19727 1.46484 3.71094 3.61328 3.71094 2.24609 0 3.71094-1.51367 3.71094-3.71094v-10.5957h10.5957c2.19727 0 3.71094-1.46484 3.71094-3.61328 0-2.19727-1.51367-3.71094-3.71094-3.71094h-10.5957v-10.5469c0-2.24609-1.46484-3.75977-3.71094-3.75977-2.14844 0-3.61328 1.51367-3.61328 3.75977v10.5469h-10.498c-2.24609 0-3.75977 1.51367-3.75977 3.71094Z"/>
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(0.2 0 0 0.2 281.506 1933)">
|
||||||
|
<path d="m58.5449 14.5508c27.4902 0 49.8047-22.3145 49.8047-49.8047s-22.3145-49.8047-49.8047-49.8047-49.8047 22.3145-49.8047 49.8047 22.3145 49.8047 49.8047 49.8047Zm0-8.30078c-22.9492 0-41.5039-18.5547-41.5039-41.5039s18.5547-41.5039 41.5039-41.5039 41.5039 18.5547 41.5039 41.5039-18.5547 41.5039-41.5039 41.5039Zm-22.6562-41.5039c0 2.39258 1.66016 4.00391 4.15039 4.00391h14.3555v14.4043c0 2.44141 1.66016 4.15039 4.05273 4.15039 2.44141 0 4.15039-1.66016 4.15039-4.15039v-14.4043h14.4043c2.44141 0 4.15039-1.61133 4.15039-4.00391 0-2.44141-1.70898-4.15039-4.15039-4.15039h-14.4043v-14.3555c0-2.49023-1.70898-4.19922-4.15039-4.19922-2.39258 0-4.05273 1.70898-4.05273 4.19922v14.3555h-14.3555c-2.49023 0-4.15039 1.70898-4.15039 4.15039Z"/>
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(0.2 0 0 0.2 304.924 1933)">
|
||||||
|
<path d="m74.8535 28.3203c35.1074 0 63.623-28.4668 63.623-63.5742s-28.5156-63.623-63.623-63.623-63.5742 28.5156-63.5742 63.623 28.4668 63.5742 63.5742 63.5742Zm0-9.08203c-30.127 0-54.4922-24.3652-54.4922-54.4922s24.3652-54.4922 54.4922-54.4922 54.4922 24.3652 54.4922 54.4922-24.3652 54.4922-54.4922 54.4922Zm-28.8574-54.4922c0 2.58789 1.85547 4.39453 4.58984 4.39453h19.7266v19.7754c0 2.68555 1.85547 4.58984 4.44336 4.58984 2.68555 0 4.54102-1.85547 4.54102-4.58984v-19.7754h19.7754c2.68555 0 4.58984-1.80664 4.58984-4.39453 0-2.73438-1.85547-4.58984-4.58984-4.58984h-19.7754v-19.7266c0-2.73438-1.85547-4.63867-4.54102-4.63867-2.58789 0-4.44336 1.9043-4.44336 4.63867v19.7266h-19.7266c-2.73438 0-4.58984 1.85547-4.58984 4.58984Z"/>
|
||||||
|
</g>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;font-weight:bold;" transform="matrix(1 0 0 1 263 1953)">Design Variations</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 1971)">Symbols are supported in up to nine weights and three scales.</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 1989)">For optimal layout with text and other symbols, vertically align</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 2007)">symbols with the adjacent text.</text>
|
||||||
|
<line style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="776" x2="776" y1="1919" y2="1933"/>
|
||||||
|
<g transform="matrix(0.2 0 0 0.2 776 1933)">
|
||||||
|
<path d="m16.5527 0.78125c2.58789 0 3.85742-0.976562 4.78516-3.71094l6.29883-17.2363h28.8086l6.29883 17.2363c0.927734 2.73438 2.19727 3.71094 4.73633 3.71094 2.58789 0 4.24805-1.5625 4.24805-4.00391 0-0.830078-0.146484-1.61133-0.537109-2.63672l-22.9004-60.9863c-1.12305-2.97852-3.125-4.49219-6.25-4.49219-3.02734 0-5.07812 1.46484-6.15234 4.44336l-22.9004 61.084c-0.390625 1.02539-0.537109 1.80664-0.537109 2.63672 0 2.44141 1.5625 3.95508 4.10156 3.95508Zm13.4766-28.3691 11.8652-32.8613h0.244141l11.8652 32.8613Z"/>
|
||||||
|
</g>
|
||||||
|
<line style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="792.836" x2="792.836" y1="1919" y2="1933"/>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;font-weight:bold;" transform="matrix(1 0 0 1 776 1953)">Margins</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 776 1971)">Leading and trailing margins on the left and right side of each symbol</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 776 1989)">can be adjusted by modifying the x-location of the margin guidelines.</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 776 2007)">Modifications are automatically applied proportionally to all</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 776 2025)">scales and weights.</text>
|
||||||
|
<g transform="matrix(0.2 0 0 0.2 1289 1933)">
|
||||||
|
<path d="m14.209 9.32617 8.49609 8.54492c4.29688 4.3457 9.22852 4.05273 13.8672-1.07422l53.4668-58.9355-4.83398-4.88281-53.0762 58.3984c-1.75781 2.00195-3.41797 2.49023-5.76172 0.146484l-5.85938-5.81055c-2.34375-2.29492-1.80664-4.00391 0.195312-5.81055l57.373-54.0039-4.88281-4.83398-57.959 54.4434c-4.93164 4.58984-5.32227 9.47266-1.02539 13.8184Zm32.0801-90.9668c-2.09961 2.05078-2.24609 4.93164-1.07422 6.88477 1.17188 1.80664 3.4668 2.97852 6.68945 2.14844 7.32422-1.70898 14.9414-2.00195 22.0703 2.68555l-2.92969 7.27539c-1.70898 4.15039-0.830078 7.08008 1.85547 9.81445l11.4746 11.5723c2.44141 2.44141 4.49219 2.53906 7.32422 2.05078l5.32227-0.976562 3.32031 3.36914-0.195312 2.7832c-0.195312 2.49023 0.439453 4.39453 2.88086 6.78711l3.80859 3.71094c2.39258 2.39258 5.46875 2.53906 7.8125 0.195312l14.5508-14.5996c2.34375-2.34375 2.24609-5.32227-0.146484-7.71484l-3.85742-3.80859c-2.39258-2.39258-4.24805-3.17383-6.64062-2.97852l-2.88086 0.244141-3.22266-3.17383 1.2207-5.61523c0.634766-2.83203-0.146484-5.0293-3.07617-7.95898l-10.9863-10.9375c-16.6992-16.6016-38.8672-16.2109-53.3203-1.75781Zm7.4707 1.85547c12.1582-8.88672 28.6133-7.37305 39.7461 3.75977l12.1582 12.0605c1.17188 1.17188 1.36719 2.09961 1.02539 3.80859l-1.61133 7.42188 7.51953 7.42188 4.93164-0.292969c1.26953-0.0488281 1.66016 0.0488281 2.63672 1.02539l2.88086 2.88086-12.207 12.207-2.88086-2.88086c-0.976562-0.976562-1.12305-1.36719-1.07422-2.68555l0.341797-4.88281-7.4707-7.42188-7.61719 1.26953c-1.61133 0.341797-2.34375 0.195312-3.56445-0.976562l-10.0098-10.0098c-1.26953-1.17188-1.41602-2.00195-0.634766-3.85742l4.39453-10.4492c-7.8125-7.27539-17.9688-10.4004-28.125-7.42188-0.78125 0.195312-1.07422-0.439453-0.439453-0.976562Z"/>
|
||||||
|
</g>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;font-weight:bold;" transform="matrix(1 0 0 1 1289 1953)">Exporting</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 1289 1971)">Symbols should be outlined when exporting to ensure the</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 1289 1989)">design is preserved when submitting to Xcode.</text>
|
||||||
|
<text id="template-version" style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1933)">Template v.4.0</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1951)">Requires Xcode 14 or greater</text>
|
||||||
|
<text id="descriptive-name" style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1969)">Generated from custom.pc</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1987)">Typeset at 100.0 points</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 726)">Small</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 1156)">Medium</text>
|
||||||
|
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 1586)">Large</text>
|
||||||
|
</g>
|
||||||
|
<g id="Guides">
|
||||||
|
<g id="H-reference" style="fill:#27AAE1;stroke:none;" transform="matrix(1 0 0 1 339 696)">
|
||||||
|
<path d="M0.993654 0L3.63775 0L29.3281-67.1323L30.0303-67.1323L30.0303-70.459L28.1226-70.459ZM11.6885-24.4799L46.9815-24.4799L46.2315-26.7285L12.4385-26.7285ZM55.1196 0L57.7637 0L30.6382-70.459L29.4326-70.459L29.4326-67.1323Z"/>
|
||||||
|
</g>
|
||||||
|
<line id="Baseline-S" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="696" y2="696"/>
|
||||||
|
<line id="Capline-S" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="625.541" y2="625.541"/>
|
||||||
|
<g id="H-reference" style="fill:#27AAE1;stroke:none;" transform="matrix(1 0 0 1 339 1126)">
|
||||||
|
<path d="M0.993654 0L3.63775 0L29.3281-67.1323L30.0303-67.1323L30.0303-70.459L28.1226-70.459ZM11.6885-24.4799L46.9815-24.4799L46.2315-26.7285L12.4385-26.7285ZM55.1196 0L57.7637 0L30.6382-70.459L29.4326-70.459L29.4326-67.1323Z"/>
|
||||||
|
</g>
|
||||||
|
<line id="Baseline-M" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1126" y2="1126"/>
|
||||||
|
<line id="Capline-M" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1055.54" y2="1055.54"/>
|
||||||
|
<g id="H-reference" style="fill:#27AAE1;stroke:none;" transform="matrix(1 0 0 1 339 1556)">
|
||||||
|
<path d="M0.993654 0L3.63775 0L29.3281-67.1323L30.0303-67.1323L30.0303-70.459L28.1226-70.459ZM11.6885-24.4799L46.9815-24.4799L46.2315-26.7285L12.4385-26.7285ZM55.1196 0L57.7637 0L30.6382-70.459L29.4326-70.459L29.4326-67.1323Z"/>
|
||||||
|
</g>
|
||||||
|
<line id="Baseline-L" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1556" y2="1556"/>
|
||||||
|
<line id="Capline-L" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1485.54" y2="1485.54"/>
|
||||||
|
<line id="right-margin-Black-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="2984.67" x2="2984.67" y1="600.785" y2="720.121"/>
|
||||||
|
<line id="left-margin-Black-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="2882.13" x2="2882.13" y1="600.785" y2="720.121"/>
|
||||||
|
<line id="right-margin-Regular-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="1497.09" x2="1497.09" y1="600.785" y2="720.121"/>
|
||||||
|
<line id="left-margin-Regular-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="1402.6" x2="1402.6" y1="600.785" y2="720.121"/>
|
||||||
|
<line id="right-margin-Ultralight-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="604.75" x2="604.75" y1="600.785" y2="720.121"/>
|
||||||
|
<line id="left-margin-Ultralight-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="514.672" x2="514.672" y1="600.785" y2="720.121"/>
|
||||||
|
</g>
|
||||||
|
<g id="Symbols">
|
||||||
|
<g id="Black-S" transform="matrix(1 0 0 1 2882.13 696)">
|
||||||
|
<path class="SFSymbolsPreviewNone" d="M38.0371-52.2461C38.0371-49.7559 38.9648-47.4121 40.7715-45.9961C41.2109-45.6543 41.748-45.3613 42.5293-45.3613C43.5547-45.3613 44.5312-46.2891 44.5312-47.4609C44.5312-48.1445 44.1895-48.584 43.6035-49.2676C42.8223-50.1953 42.2363-51.2207 42.2363-52.2461C42.2363-53.2715 42.8223-54.2969 43.6035-55.2246C44.1895-55.9082 44.5312-56.3477 44.5312-57.0312C44.5312-58.2031 43.5547-59.1309 42.5293-59.1309C41.748-59.1309 41.2109-58.8379 40.7715-58.4961C38.9648-57.0801 38.0371-54.7363 38.0371-52.2461ZM33.1543-45.459C34.7168-45.459 36.0352-46.7773 36.0352-48.3887C36.0352-49.9512 34.7168-51.2207 33.1543-51.2207C31.543-51.2207 30.2734-49.9512 30.2734-48.3887C30.2734-46.7773 31.543-45.459 33.1543-45.459ZM33.1543-52.8809C34.7168-52.8809 36.0352-54.1504 36.0352-55.7129C36.0352-57.3242 34.7168-58.6426 33.1543-58.6426C31.543-58.6426 30.2734-57.3242 30.2734-55.7129C30.2734-54.1504 31.543-52.8809 33.1543-52.8809ZM32.7637-36.8164L57.9102-36.8164C59.3262-36.8164 60.3516-37.8418 60.3516-39.3066C60.3516-40.7227 59.3262-41.6992 57.9102-41.6992L32.7637-41.6992C31.2988-41.6992 30.2734-40.7227 30.2734-39.3066C30.2734-37.8418 31.2988-36.8164 32.7637-36.8164ZM32.7637-28.9062L50.6836-28.9062C52.0996-28.9062 53.125-29.9805 53.125-31.3965C53.125-32.8125 52.0996-33.7891 50.6836-33.7891L32.7637-33.7891C31.2988-33.7891 30.2734-32.8125 30.2734-31.3965C30.2734-29.9316 31.2988-28.9062 32.7637-28.9062Z"/>
|
||||||
|
<path class="monochrome-1 multicolor-3:custom hierarchical-3:primary SFSymbolsPreviewF7D7A7" d="M9.76562-22.8516C9.76562-13.9648 14.9902-8.74023 23.877-8.74023L78.6621-8.74023C87.5488-8.74023 92.7734-13.9648 92.7734-22.8516L92.7734-65.2832C92.7734-74.1699 87.5488-79.3945 78.6621-79.3945L23.877-79.3945C14.9902-79.3945 9.76562-74.1699 9.76562-65.2832ZM27.2949 4.78516L75.2441 4.78516C80.9082 4.78516 81.9824-2.68555 76.709-4.58984L71.8262-6.34766L30.2246-6.34766L25.8301-4.58984C20.6543-2.49023 21.6309 4.78516 27.2949 4.78516ZM51.2695-1.31836C62.6953-1.31836 74.7559-4.93164 76.123-10.498L26.416-10.498C27.7832-4.93164 36.9141-1.31836 51.2695-1.31836Z"/>
|
||||||
|
<path class="monochrome-1 multicolor-0:systemBlueColor multicolor-3:custom hierarchical-0:tertiary hierarchical-3:primary SFSymbolsPreview007AFF" d="M22.9492-25L22.9492-63.1348C22.9492-65.3809 23.9746-66.2109 26.0254-66.2109L76.5137-66.2109C78.5645-66.2109 79.5898-65.3809 79.5898-63.1348L79.5898-25C79.5898-22.7539 78.5645-21.9238 76.5137-21.9238L26.0254-21.9238C23.9746-21.9238 22.9492-22.7539 22.9492-25Z"/>
|
||||||
|
<path class="monochrome-1 multicolor-2:systemOrangeColor multicolor-3:custom hierarchical-2:tertiary hierarchical-3:primary SFSymbolsPreviewFF9500" d="M69.4824-12.5488C67.9688-12.5488 66.748-13.7695 66.748-15.2832C66.748-16.7969 67.9688-18.0176 69.4824-18.0176C70.9961-18.0176 72.2168-16.7969 72.2168-15.2832C72.2168-13.7695 70.9961-12.5488 69.4824-12.5488Z"/>
|
||||||
|
</g>
|
||||||
|
<g id="Regular-S" transform="matrix(1 0 0 1 1402.6 696)">
|
||||||
|
<path class="SFSymbolsPreviewNone" d="M31.0547-51.4648C31.0547-49.0234 32.4219-46.6797 33.5449-45.7031C33.8379-45.459 34.2285-45.3125 34.6191-45.3125C35.2539-45.3125 35.791-45.8008 35.791-46.4844C35.791-47.0215 35.498-47.3145 35.1562-47.6562C34.082-48.7793 33.5938-50.1465 33.5938-51.4648C33.5938-52.832 34.1309-54.1016 35.1562-55.2246C35.498-55.6641 35.791-55.9082 35.791-56.4453C35.791-57.1289 35.2539-57.666 34.6191-57.666C34.2773-57.666 33.8379-57.4707 33.5449-57.2266C31.9824-55.9082 31.0547-53.8574 31.0547-51.4648ZM26.6113-45.8984C27.6367-45.8984 28.5156-46.7773 28.5156-47.8516C28.5156-48.877 27.6367-49.8047 26.6113-49.8047C25.5371-49.8047 24.6582-48.877 24.6582-47.8516C24.6582-46.7773 25.5371-45.8984 26.6113-45.8984ZM26.6113-52.7832C27.6367-52.7832 28.5156-53.6621 28.5156-54.6875C28.5156-55.7617 27.6367-56.6895 26.6113-56.6895C25.5371-56.6895 24.6582-55.7617 24.6582-54.6875C24.6582-53.6621 25.5371-52.7832 26.6113-52.7832ZM26.1719-37.3047L51.3184-37.3047C52.1484-37.3047 52.7344-37.8418 52.7344-38.7695C52.7344-39.6484 52.1484-40.1855 51.3184-40.1855L26.1719-40.1855C25.293-40.1855 24.6582-39.6484 24.6582-38.7695C24.6582-37.8418 25.293-37.3047 26.1719-37.3047ZM26.1719-30.8594L44.0918-30.8594C44.873-30.8594 45.5078-31.3965 45.5078-32.3242C45.5078-33.2031 44.873-33.7402 44.0918-33.7402L26.1719-33.7402C25.293-33.7402 24.6582-33.2031 24.6582-32.3242C24.6582-31.3965 25.293-30.8594 26.1719-30.8594Z"/>
|
||||||
|
<path class="monochrome-1 multicolor-3:custom hierarchical-3:primary SFSymbolsPreviewF7D7A7" d="M9.76562-18.3594C9.76562-11.3281 13.1836-8.00781 20.0684-8.00781L74.4141-8.00781C81.2988-8.00781 84.7168-11.3281 84.7168-18.3594L84.7168-64.0625C84.7168-71.1914 81.25-74.4629 74.3164-74.4629L20.1172-74.4629C13.2324-74.4629 9.76562-71.1914 9.76562-64.0625ZM28.5156 2.68555L65.9668 2.68555C69.873 2.68555 70.166-1.61133 67.5781-2.73438L58.2031-6.88477L36.2793-6.88477L26.9043-2.73438C24.3164-1.61133 24.6094 2.68555 28.5156 2.68555ZM47.2168-3.36914C58.1055-3.36914 66.8457-5.9082 69.1895-9.76562L25.2441-9.76562C27.6367-5.9082 36.3281-3.36914 47.2168-3.36914Z"/>
|
||||||
|
<path class="monochrome-1 multicolor-0:systemBlueColor multicolor-3:custom hierarchical-0:tertiary hierarchical-3:primary SFSymbolsPreview007AFF" d="M16.7969-24.4141L16.7969-63.9648C16.7969-66.5039 17.8223-67.4316 20.2148-67.4316L74.2188-67.4316C76.6602-67.4316 77.6855-66.5039 77.6855-63.9648L77.6855-24.4141C77.6855-21.9238 76.6602-20.9961 74.2188-20.9961L20.2148-20.9961C17.8223-20.9961 16.7969-21.9238 16.7969-24.4141Z"/>
|
||||||
|
<path class="monochrome-1 multicolor-2:systemOrangeColor multicolor-3:custom hierarchical-2:tertiary hierarchical-3:primary SFSymbolsPreviewFF9500" d="M68.8477-12.3535C67.4805-12.3535 66.2109-13.623 66.2109-15.0391C66.2109-16.4551 67.4805-17.7246 68.8477-17.7246C70.3613-17.7246 71.582-16.4551 71.582-15.0391C71.582-13.623 70.3613-12.3535 68.8477-12.3535Z"/>
|
||||||
|
</g>
|
||||||
|
<g id="Ultralight-S" transform="matrix(1 0 0 1 514.672 696)">
|
||||||
|
<path class="SFSymbolsPreviewNone" d="M27.104-50.7383C27.104-48.5693 28.1534-46.3164 29.4126-45.2944C29.7056-45.0503 29.9146-44.9492 30.2144-44.9492C30.6675-44.9492 31.023-45.3013 31.023-45.7578C31.023-46.0679 30.8662-46.1792 30.7061-46.3848C29.5411-47.6895 28.9165-48.9658 28.9165-50.7383C28.9165-52.4688 29.5445-53.7383 30.7061-55.043C30.8662-55.2554 31.023-55.4087 31.023-55.7188C31.023-56.1753 30.6675-56.4854 30.2144-56.4854C29.918-56.4854 29.7056-56.3809 29.4126-56.1367C28.1226-55.1362 27.104-52.9038 27.104-50.7383ZM22.2066-45.626C23.0503-45.626 23.7022-46.2778 23.7022-47.125C23.7022-47.9688 23.0503-48.5786 22.2066-48.5786C21.3594-48.5786 20.7076-47.9688 20.7076-47.125C20.7076-46.2778 21.3594-45.626 22.2066-45.626ZM22.2066-52.5107C23.0503-52.5107 23.7022-53.1626 23.7022-54.0064C23.7022-54.8535 23.0503-55.4634 22.2066-55.4634C21.3594-55.4634 20.7076-54.8535 20.7076-54.0064C20.7076-53.1626 21.3594-52.5107 22.2066-52.5107ZM21.7671-36.9868L46.9136-36.9868C47.5166-36.9868 47.9209-37.3877 47.9209-38.043C47.9209-38.5586 47.5166-38.9595 46.9136-38.9595L21.7671-38.9595C21.1153-38.9595 20.7076-38.5586 20.7076-38.043C20.7076-37.3877 21.1153-36.9868 21.7671-36.9868ZM21.7671-30.5415L39.687-30.5415C40.2867-30.5415 40.6944-30.9424 40.6944-31.5977C40.6944-32.1133 40.2867-32.5142 39.687-32.5142L21.7671-32.5142C21.1153-32.5142 20.7076-32.1133 20.7076-31.5977C20.7076-30.9424 21.1153-30.5415 21.7671-30.5415Z"/>
|
||||||
|
<path class="monochrome-1 multicolor-3:custom hierarchical-3:primary SFSymbolsPreviewF7D7A7" d="M9.76562-16.2705C9.76562-11.3735 12.2754-8.8706 17.1621-8.8706L72.9155-8.8706C77.8023-8.8706 80.312-11.3735 80.312-16.2705L80.312-63.5176C80.312-68.4214 77.7989-70.8755 72.9087-70.8755L17.1656-70.8755C12.2788-70.8755 9.76562-68.4214 9.76562-63.5176ZM28.334 0.0517786L61.7437 0.0517786C63.0616 0.0517786 63.1729-1.56592 62.2198-2.05323L53.2535-6.93018L36.8242-6.93018L27.8125-2.05323C26.9048-1.56592 27.0161 0.0517786 28.334 0.0517786ZM45.0371-4.64061C55.9258-4.64061 63.4854-6.68017 66.919-10.583L23.1553-10.583C26.5469-6.68017 34.1485-4.64061 45.0371-4.64061Z"/>
|
||||||
|
<path class="monochrome-1 multicolor-0:systemBlueColor multicolor-3:custom hierarchical-0:tertiary hierarchical-3:primary SFSymbolsPreview007AFF" d="M11.9834-23.6421L11.9834-63.4199C11.9834-66.958 13.7354-68.7031 17.3086-68.7031L72.7656-68.7031C76.3423-68.7031 78.0942-66.958 78.0942-63.4199L78.0942-23.6421C78.0942-20.062 76.3423-18.3623 72.7656-18.3623L17.3086-18.3623C13.7354-18.3623 11.9834-20.062 11.9834-23.6421Z"/>
|
||||||
|
<path class="monochrome-1 multicolor-2:systemOrangeColor multicolor-3:custom hierarchical-2:tertiary hierarchical-3:primary SFSymbolsPreviewFF9500" d="M66.668-11.3545C65.3916-11.3545 64.3037-12.397 64.3037-13.7222C64.3037-15.002 65.3916-16.0899 66.668-16.0899C68-16.0899 69.0845-15.002 69.0845-13.7222C69.0845-12.397 68-11.3545 66.668-11.3545Z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 22 KiB |
@@ -39,6 +39,8 @@
|
|||||||
A9B15A9A2E0ABA0400F66E02 /* DialogView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9B15A992E0ABA0400F66E02 /* DialogView.swift */; };
|
A9B15A9A2E0ABA0400F66E02 /* DialogView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9B15A992E0ABA0400F66E02 /* DialogView.swift */; };
|
||||||
A9C4140C2E096DB7005E3047 /* SSHError.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9C4140B2E096DB7005E3047 /* SSHError.swift */; };
|
A9C4140C2E096DB7005E3047 /* SSHError.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9C4140B2E096DB7005E3047 /* SSHError.swift */; };
|
||||||
A9C897EF2DF1A9A400EF9A5F /* SSHHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9C897EE2DF1A9A400EF9A5F /* SSHHandler.swift */; };
|
A9C897EF2DF1A9A400EF9A5F /* SSHHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9C897EE2DF1A9A400EF9A5F /* SSHHandler.swift */; };
|
||||||
|
A9DA97712E0D30ED00142DDC /* Symbol.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9DA97702E0D30ED00142DDC /* Symbol.swift */; };
|
||||||
|
A9DA97732E0D40C100142DDC /* SymbolPreview.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9DA97722E0D40C100142DDC /* SymbolPreview.swift */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
@@ -110,6 +112,8 @@
|
|||||||
A9B15A992E0ABA0400F66E02 /* DialogView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DialogView.swift; sourceTree = "<group>"; };
|
A9B15A992E0ABA0400F66E02 /* DialogView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DialogView.swift; sourceTree = "<group>"; };
|
||||||
A9C4140B2E096DB7005E3047 /* SSHError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SSHError.swift; sourceTree = "<group>"; };
|
A9C4140B2E096DB7005E3047 /* SSHError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SSHError.swift; sourceTree = "<group>"; };
|
||||||
A9C897EE2DF1A9A400EF9A5F /* SSHHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SSHHandler.swift; sourceTree = "<group>"; };
|
A9C897EE2DF1A9A400EF9A5F /* SSHHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SSHHandler.swift; sourceTree = "<group>"; };
|
||||||
|
A9DA97702E0D30ED00142DDC /* Symbol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Symbol.swift; sourceTree = "<group>"; };
|
||||||
|
A9DA97722E0D40C100142DDC /* SymbolPreview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolPreview.swift; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@@ -279,6 +283,8 @@
|
|||||||
children = (
|
children = (
|
||||||
A93143BF2DF61B3200FCD5DB /* Host.swift */,
|
A93143BF2DF61B3200FCD5DB /* Host.swift */,
|
||||||
A98554602E058433009051BD /* HostsManager.swift */,
|
A98554602E058433009051BD /* HostsManager.swift */,
|
||||||
|
A9DA97702E0D30ED00142DDC /* Symbol.swift */,
|
||||||
|
A9DA97722E0D40C100142DDC /* SymbolPreview.swift */,
|
||||||
);
|
);
|
||||||
path = Host;
|
path = Host;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -452,11 +458,13 @@
|
|||||||
A93143C62DF61FE300FCD5DB /* ViewModifiers.swift in Sources */,
|
A93143C62DF61FE300FCD5DB /* ViewModifiers.swift in Sources */,
|
||||||
A98554632E0587DF009051BD /* HostsView.swift in Sources */,
|
A98554632E0587DF009051BD /* HostsView.swift in Sources */,
|
||||||
A96C6A8A2E0C0B1100F377FE /* SSHState.swift in Sources */,
|
A96C6A8A2E0C0B1100F377FE /* SSHState.swift in Sources */,
|
||||||
|
A9DA97732E0D40C100142DDC /* SymbolPreview.swift in Sources */,
|
||||||
A92538C82DEE0742007E0A18 /* ContentView.swift in Sources */,
|
A92538C82DEE0742007E0A18 /* ContentView.swift in Sources */,
|
||||||
A93143C02DF61B3200FCD5DB /* Host.swift in Sources */,
|
A93143C02DF61B3200FCD5DB /* Host.swift in Sources */,
|
||||||
A9B15A9A2E0ABA0400F66E02 /* DialogView.swift in Sources */,
|
A9B15A9A2E0ABA0400F66E02 /* DialogView.swift in Sources */,
|
||||||
A92538C92DEE0742007E0A18 /* ShhShellApp.swift in Sources */,
|
A92538C92DEE0742007E0A18 /* ShhShellApp.swift in Sources */,
|
||||||
A96C6B002E0C45FE00F377FE /* KeyDetailView.swift in Sources */,
|
A96C6B002E0C45FE00F377FE /* KeyDetailView.swift in Sources */,
|
||||||
|
A9DA97712E0D30ED00142DDC /* Symbol.swift in Sources */,
|
||||||
A98554612E058433009051BD /* HostsManager.swift in Sources */,
|
A98554612E058433009051BD /* HostsManager.swift in Sources */,
|
||||||
A985545D2E055D4D009051BD /* ConnectionView.swift in Sources */,
|
A985545D2E055D4D009051BD /* ConnectionView.swift in Sources */,
|
||||||
A98554592E0553AA009051BD /* KeyManager.swift in Sources */,
|
A98554592E0553AA009051BD /* KeyManager.swift in Sources */,
|
||||||
|
|||||||
@@ -6,10 +6,13 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
protocol HostPr: Codable, Identifiable, Equatable {
|
protocol HostPr: Codable, Identifiable, Equatable {
|
||||||
var id: UUID { get set }
|
var id: UUID { get set }
|
||||||
var name: String { get set }
|
var name: String { get set }
|
||||||
|
var symbol: Symbol { get set }
|
||||||
|
var label: String { get set }
|
||||||
var address: String { get set }
|
var address: String { get set }
|
||||||
var port: Int { get set }
|
var port: Int { get set }
|
||||||
var username: String { get set }
|
var username: String { get set }
|
||||||
@@ -22,18 +25,22 @@ protocol HostPr: Codable, Identifiable, Equatable {
|
|||||||
|
|
||||||
struct Host: HostPr {
|
struct Host: HostPr {
|
||||||
var id = UUID()
|
var id = UUID()
|
||||||
var name: String = ""
|
var name: String
|
||||||
var address: String = ""
|
var symbol: Symbol
|
||||||
|
var label: String
|
||||||
|
var address: String
|
||||||
var port: Int
|
var port: Int
|
||||||
var username: String
|
var username: String
|
||||||
var password: String
|
var password: String
|
||||||
var publicKey: Data?
|
var publicKey: Data?
|
||||||
var privateKey: Data?
|
var privateKey: Data?
|
||||||
var passphrase: String = ""
|
var passphrase: String
|
||||||
var key: String?
|
var key: String?
|
||||||
|
|
||||||
init(
|
init(
|
||||||
name: String = "",
|
name: String = "",
|
||||||
|
symbol: Symbol = .genericServer,
|
||||||
|
label: String = "",
|
||||||
address: String,
|
address: String,
|
||||||
port: Int = 22,
|
port: Int = 22,
|
||||||
username: String = "",
|
username: String = "",
|
||||||
@@ -44,6 +51,8 @@ struct Host: HostPr {
|
|||||||
hostkey: String? = nil
|
hostkey: String? = nil
|
||||||
) {
|
) {
|
||||||
self.name = name
|
self.name = name
|
||||||
|
self.symbol = symbol
|
||||||
|
self.label = label
|
||||||
self.address = address
|
self.address = address
|
||||||
self.port = port
|
self.port = port
|
||||||
self.username = username
|
self.username = username
|
||||||
@@ -62,6 +71,7 @@ extension Host {
|
|||||||
static var debug: Host {
|
static var debug: Host {
|
||||||
Host(
|
Host(
|
||||||
name: "name for localhost",
|
name: "name for localhost",
|
||||||
|
label: "lo0",
|
||||||
address: "localhost",
|
address: "localhost",
|
||||||
port: 22,
|
port: 22,
|
||||||
username: "neon443",
|
username: "neon443",
|
||||||
|
|||||||
@@ -50,6 +50,23 @@ class HostsManager: ObservableObject, @unchecked Sendable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func makeLabel(forHost: Host) -> String {
|
||||||
|
if forHost.name.isEmpty && forHost.address.isEmpty {
|
||||||
|
return forHost.id.uuidString
|
||||||
|
} else if forHost.name.isEmpty {
|
||||||
|
return forHost.address
|
||||||
|
} else if forHost.address.isEmpty {
|
||||||
|
return forHost.name
|
||||||
|
} else {
|
||||||
|
return forHost.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func moveHost(from: IndexSet, to: Int) {
|
||||||
|
savedHosts.move(fromOffsets: from, toOffset: to)
|
||||||
|
saveSavedHosts()
|
||||||
|
}
|
||||||
|
|
||||||
func loadSavedHosts() {
|
func loadSavedHosts() {
|
||||||
userDefaults.synchronize()
|
userDefaults.synchronize()
|
||||||
let decoder = JSONDecoder()
|
let decoder = JSONDecoder()
|
||||||
|
|||||||
64
ShhShell/Host/Symbol.swift
Normal file
64
ShhShell/Host/Symbol.swift
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
//
|
||||||
|
// Symbol.swift
|
||||||
|
// ShhShell
|
||||||
|
//
|
||||||
|
// Created by neon443 on 26/06/2025.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
enum Symbol: Codable, Hashable, Equatable, CaseIterable {
|
||||||
|
case desktopcomputer
|
||||||
|
case laptopcomputer
|
||||||
|
|
||||||
|
case trashcan
|
||||||
|
|
||||||
|
case genericPC
|
||||||
|
case genericServer
|
||||||
|
case genericServerVertical
|
||||||
|
|
||||||
|
var sf: String {
|
||||||
|
switch self {
|
||||||
|
case .desktopcomputer:
|
||||||
|
return "desktopcomputer"
|
||||||
|
case .laptopcomputer:
|
||||||
|
return "laptopcomputer"
|
||||||
|
|
||||||
|
case .trashcan:
|
||||||
|
return "macpro.gen2"
|
||||||
|
|
||||||
|
case .genericPC:
|
||||||
|
return "custom.pc"
|
||||||
|
case .genericServer:
|
||||||
|
return "rectangle"
|
||||||
|
case .genericServerVertical:
|
||||||
|
return "rectangle.portrait"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var isCustom: Bool {
|
||||||
|
switch self {
|
||||||
|
case .genericPC:
|
||||||
|
return true
|
||||||
|
default:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var offset: CGSize {
|
||||||
|
var deltaHeight: Double
|
||||||
|
switch self {
|
||||||
|
case .desktopcomputer:
|
||||||
|
deltaHeight = -6
|
||||||
|
case .laptopcomputer:
|
||||||
|
deltaHeight = -2
|
||||||
|
case .genericPC:
|
||||||
|
deltaHeight = -6
|
||||||
|
default:
|
||||||
|
deltaHeight = 0
|
||||||
|
}
|
||||||
|
return CGSize(width: 0, height: deltaHeight)
|
||||||
|
}
|
||||||
|
}
|
||||||
36
ShhShell/Host/SymbolPreview.swift
Normal file
36
ShhShell/Host/SymbolPreview.swift
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
//
|
||||||
|
// SymbolPreview.swift
|
||||||
|
// ShhShell
|
||||||
|
//
|
||||||
|
// Created by neon443 on 26/06/2025.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct SymbolPreview: View {
|
||||||
|
@State var symbol: Symbol
|
||||||
|
@State var label: String
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
ZStack(alignment: .center) {
|
||||||
|
if symbol.isCustom {
|
||||||
|
Image(symbol.sf)
|
||||||
|
.resizable().scaledToFit()
|
||||||
|
.symbolRenderingMode(.monochrome)
|
||||||
|
.padding(5)
|
||||||
|
} else {
|
||||||
|
Image(systemName: symbol.sf)
|
||||||
|
.resizable().scaledToFit()
|
||||||
|
.symbolRenderingMode(.monochrome)
|
||||||
|
.padding(5)
|
||||||
|
}
|
||||||
|
Text(label)
|
||||||
|
.font(.headline)
|
||||||
|
.offset(symbol.offset)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#Preview {
|
||||||
|
SymbolPreview(symbol: Symbol.desktopcomputer, label: "lo0")
|
||||||
|
}
|
||||||
@@ -24,6 +24,21 @@ struct ConnectionView: View {
|
|||||||
var body: some View {
|
var body: some View {
|
||||||
NavigationStack {
|
NavigationStack {
|
||||||
List {
|
List {
|
||||||
|
Section {
|
||||||
|
HStack {
|
||||||
|
Picker("", selection: $handler.host.symbol) {
|
||||||
|
ForEach(Symbol.allCases, id: \.self) { symbol in
|
||||||
|
SymbolPreview(symbol: symbol, label: handler.host.label)
|
||||||
|
.tag(symbol)
|
||||||
|
.frame(width: 60, height: 60)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.pickerStyle(SegmentedPickerStyle())
|
||||||
|
}
|
||||||
|
.scrollIndicators(.hidden)
|
||||||
|
TextField("label", text: $handler.host.label)
|
||||||
|
.textFieldStyle(.roundedBorder)
|
||||||
|
}
|
||||||
Section {
|
Section {
|
||||||
HStack {
|
HStack {
|
||||||
Text(handler.connected ? "connected" : "not connected")
|
Text(handler.connected ? "connected" : "not connected")
|
||||||
@@ -33,6 +48,7 @@ struct ConnectionView: View {
|
|||||||
.modifier(foregroundColorStyle(checkAuth(handler.state) ? .green : .red))
|
.modifier(foregroundColorStyle(checkAuth(handler.state) ? .green : .red))
|
||||||
Text("\(handler.state)")
|
Text("\(handler.state)")
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField("name", text: $handler.host.name)
|
TextField("name", text: $handler.host.name)
|
||||||
.textFieldStyle(.roundedBorder)
|
.textFieldStyle(.roundedBorder)
|
||||||
|
|
||||||
|
|||||||
@@ -44,13 +44,8 @@ struct HostsView: View {
|
|||||||
keyManager: keyManager
|
keyManager: keyManager
|
||||||
)
|
)
|
||||||
} label: {
|
} label: {
|
||||||
if host.name.isEmpty {
|
SymbolPreview(symbol: host.symbol, label: host.label)
|
||||||
Text(host.address)
|
.frame(width: 30, height: 30)
|
||||||
} else if host.address.isEmpty {
|
|
||||||
Text(host.name)
|
|
||||||
} else {
|
|
||||||
Text(host.id.uuidString)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.animation(.default, value: host)
|
.animation(.default, value: host)
|
||||||
.swipeActions(edge: .trailing) {
|
.swipeActions(edge: .trailing) {
|
||||||
@@ -66,6 +61,9 @@ struct HostsView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.onMove(perform: {
|
||||||
|
hostsManager.moveHost(from: $0, to: $1)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
.transition(.opacity)
|
.transition(.opacity)
|
||||||
.toolbar {
|
.toolbar {
|
||||||
|
|||||||
Reference in New Issue
Block a user